/* ====================================
   게시판 컨트롤 영역
   ==================================== */
   a{
    text-decoration: none;
    color: #333333;
}

a:hover{
    color: #2563eb;
}

.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.board-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.board-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 검색 폼 */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
}

.search-input-small {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 200px;
}

/* ====================================
   게시판 테이블
   ==================================== */
.board-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #374151;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* 게시글 제목 링크 */
.post-title {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.post-title:hover {
    text-decoration: underline;
}

/* 게시글 메타 정보 */
.post-meta {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 게시글 상태 배지 */
.post-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-notice {
    background: #fef3c7;
    color: #92400e;
}

.status-hot {
    background: #fee2e2;
    color: #991b1b;
}

.status-new {
    background: #d1fae5;
    color: #065f46;
}

.comment-count {
    color: #ef4444;
    font-weight: 600;
}

/* ====================================
   게시글 상세 보기
   ==================================== */
.post-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* 게시글 헤더 */
.post-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.post-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-stats {
    display: flex;
    gap: 1rem;
}

/* 게시글 내용 */
.post-content {
    padding: 2rem;
    line-height: 1.8;
    font-size: 1rem;
	min-height:300px;
	height:auto;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content p {
    margin-bottom: 1rem;
}

/* 게시글 액션 영역 */
.post-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.like-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 좋아요 버튼 */
.like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.like-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.like-btn.liked {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.post-controls {
    display: flex;
    gap: 0.5rem;
}

/* ====================================
   글쓰기 페이지
   ==================================== */


/* ====================================
   파일 업로드
   ==================================== */
.file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #2563eb;
    background: #f8faff;
}

.file-upload.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.file-upload-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.file-upload-text {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    color: #9ca3af;
    font-size: 0.875rem;
}

.file-input {
    display: none;
}

/* 업로드된 파일 목록 */
.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #6b7280;
    font-size: 0.875rem;
}

.file-remove {
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.file-remove:hover {
    background: #fee2e2;
}

/* 파일 미리보기 컨테이너 */
#filePreview {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* 파일 미리보기 카드 스타일 */
.preview-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    max-width: none;
}

.preview-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 이미지 컨테이너 */
.preview-image-container {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 8px;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.05);
}

/* 파일 아이콘 컨테이너 */
.preview-icon-container {
    position: relative;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-icon {
    font-size: 32px;
    color: #64748b;
    transition: color 0.3s ease;
}

.preview-icon-container:hover .file-icon {
    color: #3b82f6;
}

/* 삭제 버튼 */
.delete-file-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.preview-card:hover .delete-file-btn {
    opacity: 1;
}

.delete-file-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.delete-icon {
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* 파일 정보 영역 */
.preview-info {
    text-align: left;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    word-break: break-word;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-size {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* 파일 타입별 아이콘 색상 */
.file-icon.fa-file-pdf {
    color: #dc2626;
}

.file-icon.fa-file-word {
    color: #2563eb;
}

.file-icon.fa-file-excel {
    color: #16a34a;
}

.file-icon.fa-file-powerpoint {
    color: #ea580c;
}

.file-icon.fa-file-archive {
    color: #7c3aed;
}

.file-icon.fa-file-code {
    color: #059669;
}

.file-icon.fa-file-text {
    color: #4b5563;
}

.file-icon.fa-file {
    color: #6b7280;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    #filePreview {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    #filePreview {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    #filePreview {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 12px;
    }
    
    .preview-card {
        padding: 10px;
    }
    
    .preview-image-container,
    .preview-icon-container {
        height: 70px;
        margin-bottom: 6px;
    }
    
    .file-icon {
        font-size: 24px;
    }
    
    .preview-title {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    
    .preview-size {
        font-size: 10px;
    }
    
    .delete-file-btn {
        width: 20px;
        height: 20px;
        top: 6px;
        right: 6px;
    }
    
    .delete-icon {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #filePreview {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }
}



/* ====================================
   게시글 옵션
   ==================================== */
.post-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.options-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox {
    width: 18px;
    height: 18px;
}

/* ====================================
   반응형 디자인 (모바일)
   ==================================== */
@media (max-width: 768px) {
    /* 모바일 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: block;
    }

    /* 데스크톱 네비게이션 숨김 */
    .nav-menu {
        display: none;
    }

    /* 헤더 레이아웃 조정 */
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* 히어로 섹션 타이틀 크기 조정 */
    .hero-title {
        font-size: 2.5rem;
    }

    /* 히어로 버튼 세로 배치 */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* 그리드 레이아웃을 단일 컬럼으로 변경 */
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    /* 푸터 그리드 조정 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 게시글 관련 요소들 패딩 조정 */
    .post-header,
    .post-content,
    .post-actions,
    .comment-form,
    .comment-item {
        padding: 1.5rem 1rem;
    }

    /* 게시글 메타 정보 세로 배치 */
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 게시글 액션 세로 배치 */
    .post-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .like-section {
        justify-content: center;
    }

    .post-controls {
        justify-content: center;
    }

    /* 네비게이션 아이템 레이아웃 조정 */
    .nav-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-author {
        text-align: left;
    }

    /* 검색바 조정 */
    .search-bar {
        margin: 0;
        max-width: 100%;
    }

    /* 게시판 컨트롤 세로 배치 */
    .board-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .board-actions {
        justify-content: space-between;
    }

    /* 검색 폼 세로 배치 */
    .search-form {
        flex-direction: column;
    }

    .search-input-small {
        width: 100%;
    }

    /* 테이블 폰트 크기 조정 */
    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }

    /* 모바일에서 특정 컬럼 숨김 */
    .table .hide-mobile {
        display: none;
    }

    /* 글쓰기 컨테이너 패딩 조정 */
    .write-container {
        padding: 1.5rem 1rem;
    }
}

/* ====================================
   게시글 아이콘 및 배지
   ==================================== */
.post-icon {
    margin-left: 8px;
    font-size: 14px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.post-icon:hover {
    color: #2563eb;
}

.post-icon-attach {
    color: #059669;
}

.post-icon-attach:hover {
    color: #047857;
}

.post-icon-secret {
    color: #dc2626;
}

.post-icon-secret:hover {
    color: #b91c1c;
}

.post-icon-comment {
    color: #7c3aed;
}

.post-icon-comment:hover {
    color: #6d28d9;
}

.post-badge {
    display: inline-block;
	width:16px;
	height:16px;
    line-height:16px;
    margin-left: 8px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
	text-align:center;
}

.post-badge-new {
    background-color: #dc2626;
    color: #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* ====================================
   댓글 (Comments)
   ==================================== */
.comment-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author {
    font-weight: 600;
    color: #374151;
}

.comment-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.comment-actions {
    /* display: flex;
    gap: 8px; */
}


.comment-action-btn {
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #fff;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.comment-action-btn.edit-comment:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

.comment-action-btn.delete-comment:hover {
    color: #dc2626;
    border-color: #fecaca;
    background-color: #fee2e2;
}

/* ====================================
   태그 입력(Tag Input)
   ==================================== */
.tag-input-wrapper {
    min-height: 40px;
}

#tagList {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border-radius: 16px;
    padding: 4px 12px 4px 10px;
    font-size: 0.95em;
    margin-bottom: 2px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.tag-badge:hover {
    background: #e0e7ef;
}

.tag-remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1em;
    margin-left: 6px;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.tag-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}