/* Archive Page (Tag/Category Results) Styles */
.archive .page-header, 
.category .page-header, 
.tag .page-header {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 280px; /* 최소 높이를 주어 텍스트 양과 상관없이 일정한 크기 유지 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid #f1f3f5;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); /* 조금 더 자연스러운 대각선 그라데이션 */
}

.archive .page-title, 
.category .page-title, 
.tag .page-title {
    font-size: 3rem;
    font-weight: 800;
    color: #212529;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.3;
    word-break: keep-all; /* 단어 단위 줄바꿈 */
    max-width: 900px; /* 너무 길어지면 적당히 줄바꿈 */
}

/* Common Label Style above Title */
.tag .page-title::before,
.category .page-title::before {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #12b886;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2em;
}

/* Tag Specific Label */
.tag .page-title::before {
    content: 'TAG';
}

/* Category Specific Label */
.category .page-title::before {
    content: 'CATEGORY';
}

/* Style the actual name with a subtle # for tags */
.tag .page-title {
    position: relative;
    /* inline-block 제거하여 너비 문제 해결 */
}

.archive .taxonomy-description,
.category .taxonomy-description,
.tag .taxonomy-description {
    font-size: 1.2rem;
    color: #495057;
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
    word-break: keep-all;
    opacity: 0.9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .archive .page-header, 
    .category .page-header, 
    .tag .page-header {
        min-height: 200px; /* 모바일에서는 높이 줄임 */
        padding: 3rem 1rem;
        margin-bottom: 2rem;
    }

    .archive .page-title, 
    .category .page-title, 
    .tag .page-title {
        font-size: 2.2rem;
    }

    .tag .page-title::before,
    .category .page-title::before {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .archive .taxonomy-description,
    .category .taxonomy-description,
    .tag .taxonomy-description {
        font-size: 1rem;
        padding: 0;
        margin-top: 1rem;
    }
}

/* Dark Mode */
body.dark-mode .page-header {
    background: linear-gradient(135deg, #1e1e1e 0%, #121212 100%) !important;
    border-bottom-color: #333;
}

body.dark-mode .page-title {
    color: #ececec;
}

body.dark-mode .taxonomy-description {
    color: #acacac;
}

body.dark-mode.tag .page-title::before,
body.dark-mode.category .page-title::before {
    color: #96f2d7;
}

/* Search Results Page Styles */
.search .page-header,
.search .page-title {
    display: none !important;
}

.velog-search-results-wrapper {
    width: 100%;
    padding: 2rem 1rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.velog-search-results-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.velog-search-count {
    font-size: 0.9rem;
    color: #868e96;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Dark Mode Search Results */
body.dark-mode .velog-search-results-wrapper {
    background: transparent;
}

body.dark-mode .velog-search-count {
    color: #acacac;
}

@media (max-width: 768px) {
    .velog-search-results-wrapper {
        padding: 1.5rem 1rem 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .velog-search-count {
        font-size: 0.85rem;
    }
}
