.archive-root {
    min-height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

span > i {
    margin-right: 0.5rem;
}

/* Base Layout */
.archive-container {
    margin: 0 auto;
    padding: 0 clamp(1rem, 5%, 2rem);
    margin-top: 400px;
    width: 100%;
    max-width: 100%;
}

/* Hero Section */
.archive-hero {
    width: 100%;
    height: 400px;
    margin-top: 63px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.archive-hero__bg {
    width: 100%;
    height: 100%;
    background-image: url('/images/sub_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.4);
}

.archive-hero__title {
    color: var(--white);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    position: relative;
    z-index: 1;
}

/* Navigation */
.archive-nav {
    width: 100%;
    background: rgba(17, 24, 39, 0.7);
    padding: 0;
    position: absolute;
    bottom: 0;
    left: 0;
}

.archive-nav .container {
    display: flex;
    justify-content: center;
}

.archive-nav__desktop {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Tab Buttons */
.archive-tab {
    padding: var(--space-5) var(--space-10);
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-base);
    opacity: 0.7;
    transition: all var(--transition-base);
}

.archive-tab:hover {
    opacity: 1;
    color: var(--white);
}

.archive-tab--active {
    opacity: 1;
    background: var(--white);
    color: var(--black);
    font-weight: var(--font-medium);
}

.archive-tab--active:hover {
    color: var(--black);
}

/* Mobile Navigation */
.archive-nav__mobile {
    display: none;
    position: relative;
    width: 100%;
    padding: 0;
}

.archive-nav__dropdown-btn {
    width: 100%;
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-700);
    color: var(--white);
    border: none;
    text-align: left;
    cursor: pointer;
}

.archive-nav__dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--gray-700);
    border-top: 1px solid rgb(255 255 255 / 0.1);
    z-index: 1000;
}

.archive-nav__dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: var(--space-4);
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
    transition: background-color 0.3s;
}

.dropdown-item:hover {
    background: var(--gray-600);
}

.dropdown-item--active {
    background: var(--gray-600);
}

/* Main Content */
.archive-main {
    min-width: 1440px;
    display: flex;
    justify-content: center;
    padding: var(--space-5) var(--space-6);
    gap: var(--space-1);
}

.archive-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.archive-tab-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-right: 30px;
}

/* Tab Content */
.archive-tab-pane {
    display: none;
    padding : 3rem 0;
}

.archive-tab-pane--active {
    display: block;
}


/* Responsive Styles */
@media (max-width: 768px) {
    /* Layout */
    .archive-hero {
        height: 250px;
    }

    .archive-container {
        padding: 0 var(--space-4);
        margin-top: 300px;
    }

    .archive-main {
        padding: var(--space-2);
        min-width: auto;
    }

    .archive-content {
        width: 100%;
    }

    .archive-tab-wrapper {
        padding-right: 0;
    }

    /* Navigation */
    .archive-nav {
        bottom: inherit;
    }

    .archive-nav__desktop {
        display: none;
    }

    .archive-nav__mobile {
        display: block;
    }

    .archive-nav .container {
        padding: 0;
    }

}

.archive-icon {
    font-size: var(--text-xl);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg);
}

.board-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.board-detail-header {
    padding: var(--space-8);
    border-bottom: 1px solid var(--gray-200);
}

.board-detail-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.detail-category-title {
    flex: 1;
}

.detail-category {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--gray-800);
    color: var(--white);
    border-radius: var(--radius-base);
    font-size: var(--text-sm);
    margin-bottom: 0.5rem;
}

.detail-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
}

.detail-info {
    display: flex;
    gap: var(--space-4);
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.detail-author {
    color: var(--gray-700);
    font-size: var(--text-base);
}

.board-detail-content {
    padding: var(--space-8);
    line-height: 1.7;
}

.related-articles {
    background: var(--gray-50);
    padding: var(--space-6);
    border-radius: var(--radius-base);
    margin-bottom: 2rem;
}

.related-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.article-link {
    color: var(--blue-600);
    word-break: break-all;
}

.board-detail-footer {
    padding: var(--space-8);
    border-top: 1px solid var(--gray-200);
}

.post-navigation {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-base);
}

.nav-label {
    min-width: 100px;
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.nav-title {
    color: var(--gray-800);
    text-decoration: none;
}

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

.board-actions {
    display: flex;
    justify-content: flex-end;
}

.back-to-list {
    padding: var(--space-3) var(--space-6);
    background: var(--gray-800);
    color: var(--white);
    border: none;
    border-radius: var(--radius-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: background-color 0.2s;
}

.back-to-list:hover {
    background: var(--gray-900);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .detail-header-top {
        flex-direction: column;
        gap: var(--space-4);
    }

    .detail-info {
        width: 100%;
        justify-content: flex-start;
    }

    .detail-title {
        font-size: var(--text-xl);
    }

    .board-detail-header,
    .board-detail-content,
    .board-detail-footer {
        padding: var(--space-6) var(--space-4);
    }
}

/* 첨부파일 스타일 */
.detail-attach-file {
    margin-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.attach-file-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.attach-file-header i {
    color: var(--gray-600);
}

.attach-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attach-file-item {
    margin-bottom: 0.5rem;
}

.attach-file-item:last-child {
    margin-bottom: 0;
}

.attach-file-link {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--gray-50);
    border-radius: var(--radius-base);
    text-decoration: none;
    color: var(--gray-700);
    transition: background-color 0.2s;
}

.attach-file-link:hover {
    background: var(--gray-100);
}

.attach-file-link i {
    font-size: var(--text-lg);
    margin-right: 0.75rem;
    color: var(--gray-600);
}

.attach-file-link i.fa-file-pdf {
    color: var(--error-600);
}

.attach-file-link i.fa-file-word {
    color: var(--info-600);
}

.attach-file-link i.fa-file-excel {
    color: var(--success-700);
}

.attach-file-link i.fa-file-archive {
    color: var(--accent-600);
}

.attach-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attach-file-size {
    margin-left: 1rem;
    color: var(--gray-500);
    font-size: var(--text-sm);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .attach-file-link {
        padding: var(--space-3);
    }

    .attach-file-size {
        display: none;
    }
}