/* 아카이브 페이지 스타일 */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px 20px;
}

/* school 페이지(.blog-section + .blog-tabs)와 시각적으로 동일하게 맞춤 */
.archive-header {
    text-align: center;
    padding: 100px 0 0 0;
    margin-bottom: 0;
}

.archive-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
}

.archive-header .subtitle {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.5;
}

/* 카테고리 탭 (school·about과 동일한 스타일) */
.archive-tabs {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.archive-tabs .tab-links {
    display: flex;
    background: transparent;
    padding: 0;
    margin: 0;
    list-style: none;
}

.archive-tabs .tab-link {
    padding: 15px 30px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin: 0;
    border-radius: 0;
}

.archive-tabs .tab-link:hover {
    background: transparent;
    color: #333;
}

.archive-tabs .tab-link.active {
    background: #fff;
    color: #008385;
    border: 1px solid #e0e0e0;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.archive-tabs .tab-link:first-child {
    border-top-left-radius: 4px;
}

.archive-tabs .tab-link:last-child {
    border-top-right-radius: 4px;
}

.archive-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
    max-width: 1400px;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.slide {
    position: relative;
    transition: all 0.3s ease;
}

.slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.slide:hover {
    transform: translateY(-10px);
}

.slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slide-caption {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    position: absolute;
}

.slider-arrow.prev {
    left: -25px;
}

.slider-arrow.next {
    right: -25px;
}

.slider-arrow:hover:not(.disabled) {
    background: #f8f9fa;
    transform: scale(1.1);
}

.slider-arrow.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.arrow-icon {
    font-size: 1.5rem;
    color: #333;
}

/* 반응형 스타일 */
@media (max-width: 1400px) {
    .archive-slider {
        max-width: 1100px;
    }
}

@media (max-width: 1200px) {
    .archive-slider {
        max-width: 800px;
    }
}

@media (max-width: 992px) {
    .archive-slider {
        max-width: 600px;
    }
    
    .slide img {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .archive-slider {
        max-width: 300px;
    }
    
    .slide img {
        height: 200px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-arrow.prev {
        left: -20px;
    }
    
    .slider-arrow.next {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .archive-slider {
        max-width: 280px;
    }
    
    .slide img {
        height: 180px;
    }
}

/* 카테고리 박스 스타일 */
.archive-category-box {
    background: #f7fbff;
    border: 1.5px solid #e3eaf2;
    border-radius: 12px;
    margin-bottom: 32px;
    padding: 24px 24px 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.category-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #222;
    margin: 0;
}
.category-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.category-title-link:hover {
    color: #008385;
}
.category-count {
    color: #008385;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

/* 카드 리스트 그리드 */
.archive-card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* 하위 분류 그룹 */
.archive-subgroup {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #d4dde8;
}
.archive-subgroup:first-of-type {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}
.archive-subgroup-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #008385;
    margin: 0 0 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.archive-subgroup-title::before {
    content: '▸';
    color: #4ea29f;
    font-size: 0.9rem;
}
.archive-subgroup-count {
    color: #7a8aa0;
    font-size: 0.88rem;
    font-weight: 500;
}
.archive-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    width: 220px;
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 12px;
}
.archive-card:hover {
    box-shadow: 0 4px 16px rgba(0,131,133,0.13);
    transform: translateY(-2px) scale(1.03);
}
.archive-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 12px 8px 16px 8px;
}
.archive-card-img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #f0f0f0;
}
.archive-card-caption {
    font-size: 1.08rem;
    color: #444;
    margin-top: 2px;
    text-align: center;
}

@media (max-width: 900px) {
    .archive-card-list {
        gap: 14px;
    }
    .archive-card {
        width: 45vw;
        min-width: 140px;
        max-width: 220px;
    }
    .archive-card-img {
        width: 90%;
        height: 90px;
    }
}
@media (max-width: 600px) {
    .archive-category-box {
        padding: 12px 4px 8px 4px;
    }
    .archive-card-list {
        gap: 8px;
    }
    .archive-card {
        width: 90vw;
        min-width: 120px;
        max-width: 100%;
    }
    .archive-card-img {
        width: 100%;
        height: 70px;
    }
}

/* =========================
   아카이브 상세 페이지
   ========================= */
.archive-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    /* about/business 상세 페이지(.business-detail-container)와 위쪽 여백 통일 (180px) */
    padding: 180px 20px 60px 20px;
}

.ad-breadcrumb {
    font-size: 0.92rem;
    color: #888;
    margin-bottom: 18px;
}
.ad-breadcrumb a {
    color: #008385;
    text-decoration: none;
}
.ad-breadcrumb a:hover { text-decoration: underline; }
.ad-sep { margin: 0 6px; color: #ccc; }
.ad-current { color: #444; font-weight: 500; }

.ad-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
/* about/business 상세의 .bd-badge 와 동일한 형태·색상 */
.ad-badge {
    display: inline-block;
    background: #e4f0f0;
    color: #006e70;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.ad-header h1 {
    font-size: 1.9rem;
    margin: 6px 0 8px 0;
    color: #222;
    line-height: 1.3;
}
.ad-subtitle {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.ad-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-bottom: 36px;
    align-items: stretch;
}
.ad-photo-area { min-width: 0; }
.ad-photo-wrap {
    width: 100%;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}
.ad-photo-wrap img {
    width: 100%;
    height: auto;
    display: block;
    background: #f5f5f5;
}
.ad-no-image {
    color: #aaa;
    padding: 60px 0;
}
.ad-photo-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}
/* 사진 다운로드 버튼 — .ad-back-btn(목록으로) 과 동일한 톤 */
.ad-download-btn {
    display: inline-flex;
    align-items: center;
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ad-download-btn:hover {
    background: #444;
    color: #fff;
    transform: translateY(-2px);
}
.ad-download-btn:disabled { background: #aaa; cursor: not-allowed; transform: none; }

.ad-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}
.ad-map-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    background: #fafafa;
}
.ad-map {
    width: 100%;
    height: 220px;
    border: none;
    display: block;
}
.ad-map-empty {
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-align: center;
    padding: 12px;
}
.ad-map-empty p {
    font-size: 0.9rem;
    margin: 8px 0 0 0;
}

.ad-meta {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0;
    flex: 1;            /* 남은 세로 공간 채워 좌측 이미지 높이와 맞춤 */
    min-height: 0;
}
.ad-meta-row {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.94rem;
}
.ad-meta-row:last-child { border-bottom: none; }
.ad-meta-row dt {
    width: 95px;
    color: #888;
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
}
.ad-meta-row dd {
    color: #333;
    margin: 0;
    flex: 1;
    word-break: break-word;
}

.ad-meta-copyright { padding-top: 10px; }
.ad-meta-copyright dt { width: 0; }
.ad-copyright-btn {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.ad-copyright-btn:hover { color: #0d47a1; }
.ad-copyright-icon {
    color: #888;
    font-size: 1rem;
    text-decoration: none;
    margin-right: 2px;
}

.ad-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ad-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.ad-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #eee;
}
.ad-modal-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #222;
}
.ad-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}
.ad-modal-close:hover { color: #222; }
.ad-modal-body {
    padding: 18px 22px 22px 22px;
    overflow-y: auto;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.65;
}

.ad-content-section {
    margin: 36px 0 28px 0;
}
.ad-section-label {
    display: inline-block;
    font-size: 1.05rem;
    color: #1976d2;
    font-weight: 600;
    margin-right: 12px;
}
.ad-section-bar {
    display: inline-block;
    width: 36px;
    height: 2px;
    background: #1976d2;
    vertical-align: middle;
    margin-bottom: 4px;
}
.ad-content-body {
    margin-top: 16px;
    color: #333;
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-word;
}
.ad-content-body img { max-width: 100%; height: auto; }

.ad-related {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #eee;
}
.ad-related h2 {
    font-size: 1.2rem;
    color: #222;
    margin: 0 0 14px 0;
}
.ad-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}
.ad-related-card {
    width: calc((100% - 48px) / 4);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s;
}
.ad-related-card:hover { transform: translateY(-3px); }
.ad-related-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}
.ad-related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-related-caption {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #444;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* school_post 페이지의 .back-to-list 와 동일한 스타일 */
.ad-bottom-nav {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.ad-back-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.98rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.ad-back-btn:hover {
    background: #444;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

@media (max-width: 900px) {
    .ad-main {
        grid-template-columns: 1fr;
    }
    .ad-related-card {
        width: calc((100% - 16px) / 2);
    }
    .ad-header h1 { font-size: 1.5rem; }
}
@media (max-width: 600px) {
    .archive-detail-container { padding: 120px 12px 40px 12px; }
    .ad-related-card { width: 100%; }
    /* 모바일에선 라벨(dt)·값(dd) 을 세로로 쌓아 긴 라벨(통합코드번호 등)과 값이 겹치지 않도록 */
    .ad-meta-row {
        flex-direction: column;
        gap: 2px;
    }
    .ad-meta-row dt {
        width: auto;
        font-size: 0.85rem;
    }
    .ad-meta-row dd {
        font-size: 0.95rem;
    }
}