/* ========================================
   기본 스타일
   ======================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background: #ffffff;
}

/* ========================================
   공지사항 갤러리 스타일
   ======================================== */

.notice-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 200px 20px 40px;
}

.notice-header {
    text-align: center;
    margin-bottom: 30px;
}

.notice-subtitle {
    font-size: 16px;
    color: #A6756A;
    letter-spacing: 8px;
    margin-bottom: 15px;
    font-weight: 400;
}

.notice-main-title {
    font-size: 42px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 20px;
}

/* 갤러리 그리드 */
.notice-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.notice-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: block;
    text-decoration: none;
    color: inherit;
}

.notice-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(166, 117, 106, 0.2);
}

.notice-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.notice-info {
    padding: 20px;
}

.notice-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notice-card-date {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #A6756A;
    color: white;
    border-color: #A6756A;
}

.pagination span.active {
    background: #A6756A;
    color: white;
    border-color: #A6756A;
    font-weight: 600;
}

.pagination .page-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
}

.pagination .page-arrow:hover {
    background: #f8f9fa;
}

/* 모달 */
.notice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.notice-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.modal-body {
    padding: 40px;
}

.modal-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.modal-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ========================================
   반응형 - 태블릿
   ======================================== */
@media (max-width: 1200px) {

    /* 공지사항 갤러리 태블릿 */
    .notice-container {
        padding: 100px 20px 20px;
    }

    .notice-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* ========================================
   반응형 - 모바일
   ======================================== */
@media (max-width: 768px) {

    /* 공지사항 갤러리 모바일 */
    .notice-container {
        padding: 100px 15px 20px;
    }

    .notice-header {
        margin-bottom: 20px;
    }

    .notice-subtitle {
        font-size: 12px;
        letter-spacing: 4px;
        margin-bottom: 10px;
    }

    .notice-main-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .notice-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .notice-image {
        height: 150px;
    }

    .notice-info {
        padding: 15px;
    }

    .notice-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .notice-card-date {
        font-size: 12px;
    }

    /* 모달 모바일 */
    .modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .modal-image {
        height: 250px;
        border-radius: 12px 12px 0 0;
    }

    .modal-body {
        padding: 25px 20px;
    }

    .modal-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .modal-date {
        font-size: 13px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .modal-text {
        font-size: 14px;
        line-height: 1.7;
    }

    .pagination {
        gap: 5px;
        margin-top: 30px;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ========================================
   반응형 - 작은 모바일
   ======================================== */
@media (max-width: 480px) {

    /* 공지사항 갤러리 작은 모바일 */
    .notice-container {
        padding: 80px 15px 16px;
    }

    .notice-main-title {
        font-size: 20px;
    }

    .notice-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .notice-image {
        height: 180px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-text {
        font-size: 13px;
    }

    .pagination a,
    .pagination span {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}