/* ========================================
   게시판 모던 스타일
   ======================================== */

/* 페이지 헤더 (참고 사이트 스타일) */
.board-header {
    background: #f8f9fa;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid #dee2e6;
}

.board-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.board-subtitle {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

/* ========================================
   게시글 목록 - 테이블 형태 (참고 사이트 스타일)
   ======================================== */

.board-table-simple {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-bottom: 0;
}

.board-table-simple thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.board-table-simple thead th {
    font-weight: 600;
    padding: 0.75rem;
    text-align: center;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.board-table-simple tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.board-table-simple tbody tr:last-child {
    border-bottom: none;
}

.board-table-simple tbody tr:hover {
    background-color: #f8f9fa;
}

.board-table-simple tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    color: #495057;
}

.board-title-cell {
    text-align: left;
}

.board-title-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s;
}

.board-title-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 기존 board-table 스타일 유지 (하위 호환성) */
.board-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}

.board-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.board-table thead th {
    font-weight: 600;
    padding: 1rem;
    border: none;
    text-align: center;
}

.board-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.board-table tbody tr:last-child {
    border-bottom: none;
}

.board-table tbody tr:hover {
    background-color: #f7fafc;
}

.board-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #4a5568;
}

/* 카드 형태 (하위 호환성) */
.board-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.board-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.board-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.board-item-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.board-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.board-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.board-item-views {
    color: #718096;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.board-item-meta {
    display: flex;
    gap: 1.5rem;
    color: #718096;
    font-size: 0.9rem;
}

.board-item-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.board-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #a0aec0;
}

.board-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.board-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* ========================================
   게시글 상세보기
   ======================================== */

.board-content-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #cbd5e0;
}

.board-content-header {
    padding: 2rem;
    border-bottom: 1px solid #cbd5e0;
}

.board-content-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.board-content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #718096;
    font-size: 0.95rem;
}

.board-content-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.board-content-body {
    padding: 2.5rem 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
    min-height: 300px;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
}

.board-content-footer {
    padding: 1.5rem 2rem;
    background: #f7fafc;
    border-top: 1px solid #cbd5e0;
}

/* ========================================
   답변 섹션 스타일
   ======================================== */

.board-reply-section {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 2px solid #e0e0e0;
}

.board-reply-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4F46E5;
    margin-bottom: 1.5rem;
}

.board-reply-title i {
    margin-right: 0.5rem;
}

.board-reply-body {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
}

.board-reply-meta {
    color: #6B7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.board-reply-meta i {
    margin-right: 0.25rem;
}

/* ========================================
   게시글 작성/수정 폼
   ======================================== */

.board-write-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.board-write-form .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.board-write-form .form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.board-write-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.board-write-form textarea.form-control {
    resize: vertical;
    min-height: 300px;
}

/* ========================================
   관리자 로그인
   ======================================== */

.admin-login-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.admin-login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
}

.admin-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.admin-login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.admin-login-header p {
    color: #718096;
    margin: 0;
}

.admin-login-form .input-group-text {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-right: none;
}

.admin-login-form .form-control {
    border: 2px solid #e2e8f0;
    border-left: none;
    padding: 0.75rem 1rem;
}

.admin-login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: none;
}

.admin-login-form .form-control:focus+.input-group-text,
.admin-login-form .input-group-text:has(+ .form-control:focus) {
    border-color: #667eea;
}

.admin-login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.admin-login-info {
    text-align: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

/* ========================================
   페이지네이션
   ======================================== */

.board-pagination .pagination {
    gap: 0.25rem;
}

.board-pagination .page-link {
    border-radius: 4px;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
    background-color: #fff;
}

.board-pagination .page-link:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
}

.board-pagination .page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* ========================================
   버튼 스타일
   ======================================== */

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.btn-outline-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

/* ========================================
   게시판 목록 섹션 스타일
   ======================================== */

.board-list-section {
    background-color: #fff;
    padding: 2rem 0;
}

/* ========================================
   메인 이미지 영역 스타일
   ======================================== */

.event-main-image {
    position: relative;
    height: 700px;
    overflow: hidden;
    margin-top: 0;
}

.event-main-image img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    display: block;
}

.event-main-image-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.event-main-image-caption h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.event-main-image-caption p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .event-main-image-caption h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .event-main-image-caption p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* ========================================
   반응형 디자인
   ======================================== */

/* 태블릿 */
@media (max-width: 1199px) {
    .board-title {
        font-size: 1.75rem;
    }
}

.board-content-footer .btn {
    width: auto;
    min-width: auto;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
}

/* ========================================
   반응형 스타일
   ======================================== */

/* 페이지 제목 */
.board-page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #595959;
    margin-bottom: 1rem;
}

/* 검색 폼 */
.board-search-form {
    width: auto;
    max-width: 400px;
}

/* 검색 입력 필드 */
.board-search-input {
    width: 200px;
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
    height: auto;
    line-height: 1.4;
}

.board-search-btn,
.board-search-reset-btn {
    font-size: 0.9rem;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
    line-height: 1.4;
    height: auto;
}

/* 하단 컨트롤 영역 */
.board-footer-controls {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    position: relative;
}

.board-footer-controls .board-per-page-selector {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-footer-controls .board-pagination {
    flex: 0 0 auto;
    margin-left: auto;
}

.board-footer-controls .board-pagination .pagination {
    justify-content: flex-end;
    margin: 0;
}

/* xs, sm 해상도 */
@media (max-width: 767.98px) {
    .board-footer-controls {
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .board-footer-controls .board-per-page-label {
        display: none;
    }
    
    .board-footer-controls .board-per-page-selector {
        flex-shrink: 0;
        flex-grow: 0;
        min-width: 0;
        max-width: 120px;
    }
    
    .board-footer-controls .board-per-page-select {
        width: 100%;
        min-width: 90px;
        max-width: 120px;
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
    
    .board-footer-controls .board-pagination {
        flex-shrink: 1;
        flex-grow: 1;
        min-width: 0;
        margin-left: 0;
        overflow: hidden;
        max-width: calc(100% - 130px);
    }
    
    .board-footer-controls .board-pagination .pagination {
        justify-content: center;
        flex-wrap: nowrap !important;
        margin: 0;
        overflow: hidden;
    }
    
    .board-footer-controls .board-write-button {
        display: none;
    }
    
    .board-write-button-mobile {
        margin-top: 1rem;
    }
    
    .board-write-button-mobile .board-write-btn {
        min-width: 80px;
    }
    
    .board-footer-controls .board-pagination .page-item {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .board-footer-controls .board-pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* md 해상도 이상 */
@media (min-width: 768px) {
    .board-search-btn {
        min-width: 75px;
    }
    
    .board-search-reset-btn {
        min-width: 70px;
    }
    
    .board-footer-controls {
        justify-content: flex-start;
        position: relative;
    }
    
    .board-footer-controls .board-per-page-label {
        display: none;
    }
    
    .board-footer-controls .board-per-page-selector {
        flex-shrink: 0;
        margin-right: auto;
    }
    
    .board-footer-controls .board-pagination {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex: 0 0 auto;
        margin: 0;
    }
    
    .board-footer-controls .board-pagination .pagination {
        justify-content: center;
    }
    
    .board-footer-controls .board-write-button {
        flex-shrink: 0;
        margin-left: auto;
    }
}

/* lg 해상도 이상 */
@media (min-width: 992px) {
    /* md 해상도와 동일한 레이아웃 유지 */
}

.board-footer-controls .board-write-button {
    flex-shrink: 0;
}

.board-per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-per-page-label {
    margin-bottom: 0;
    font-size: 0.9rem;
    white-space: nowrap;
}

.board-per-page-select {
    width: auto;
    min-width: 100px;
}

/* 태블릿 */
@media (max-width: 1199px) {
    .board-page-title {
        font-size: 2.5rem;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .board-page-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .board-table-simple {
        font-size: 0.875rem;
    }
    
    .board-table-simple thead th,
    .board-table-simple tbody td {
        padding: 0.5rem;
    }
    
    .board-title {
        font-size: 1.5rem;
    }
    
    /* 모바일에서 번호 컬럼 숨기기 */
    .board-table-simple thead th:first-child,
    .board-table-simple tbody td:first-child {
        display: none;
    }
    
    /* 검색 폼 모바일 최적화 */
    .board-search-form {
        width: 100%;
        max-width: 100%;
    }
    
    .board-search-input {
        width: 100%;
        flex: 1;
        min-width: 0;
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .board-search-btn,
    .board-search-reset-btn {
        flex-shrink: 0;
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    .board-search-btn {
        min-width: 75px;
    }
    
    /* 하단 컨트롤 모바일 최적화 */
    .board-footer-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .board-footer-controls .board-per-page-selector {
        width: 100%;
        justify-content: center;
    }
    
    .board-footer-controls .board-pagination {
        width: 100%;
        flex: none;
    }
    
    .board-per-page-select {
        flex: 1;
        max-width: 200px;
    }
    
    /* 페이지네이션 모바일 최적화 */
    .board-pagination {
        width: 100%;
    }
    
    .board-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .board-pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* 테이블 모바일 최적화 */
    .board-table-simple {
        font-size: 0.8rem;
    }
    
    .board-table-simple thead th,
    .board-table-simple tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .board-title-link {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* 작은 모바일 */
@media (max-width: 576px) {
    .board-page-title {
        font-size: 1.75rem;
    }
    
    .board-table-simple {
        font-size: 0.75rem;
    }
    
    .board-table-simple thead th,
    .board-table-simple tbody td {
        padding: 0.4rem 0.2rem;
    }
    
    .board-title-link {
        font-size: 0.85rem;
    }
    
    .board-pagination .page-link {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   게시글 목록 - 그리드 형태
   ======================================== */

.board-grid-list {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.board-grid-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    color: #495057;
}

.board-grid-item {
    transition: background-color 0.2s ease;
}

.board-grid-item:hover {
    background-color: #f8f9fa;
}

.board-grid-item > div {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* 제목 컬럼 정렬 */
.board-grid-header > div:nth-child(2) {
    justify-content: center;
    text-align: center;
}

.board-grid-item > div:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
}

.board-grid-item > div:nth-child(2) a {
    text-align: left;
}

/* 등록일 컬럼 중앙 정렬 */
.board-grid-item > div:last-child {
    justify-content: center;
    text-align: center;
}

.board-grid-header > div:last-child {
    justify-content: center;
    text-align: center;
}

/* 답변여부 컬럼 중앙 정렬 (md 이상) */
.board-grid-item > div:nth-last-child(2) {
    justify-content: center;
    text-align: center;
}

.board-grid-header > div:nth-last-child(2) {
    justify-content: center;
    text-align: center;
}

.board-grid-item .board-title-link {
    color: #212529;
    transition: color 0.2s ease;
}

.board-grid-item .board-title-link:hover {
    color: var(--primary-color, #667eea);
}

/* xs 해상도에서 No 컬럼 숨김 */
@media (max-width: 575.98px) {
    .board-grid-item > div:first-child {
        display: none;
    }
}
