/* archives.css */

/* Hero Search Section */
.archives-hero {
    background: linear-gradient(135deg, #0f1c2e, #1a2f4c);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 28, 46, 0.75);
    z-index: 2;
}

.archives-hero .container {
    position: relative;
    z-index: 3;
}

.archives-hero-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-4);
}

.archives-hero-stats {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    color: var(--white);
    margin-bottom: var(--space-6);
}

.archives-hero-stats span {
    color: var(--gold, #C9A84C);
    font-weight: 700;
    font-size: var(--text-xl);
}

.search-bar-container {
    max-width: 800px;
    margin: 0 auto var(--space-4);
    display: flex;
    height: 50px;
}

.search-dropdown {
    width: 140px;
    background: #e2e8f0 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat;
    background-position: calc(50% + 15px) center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: 0;
    text-align: center;
    text-indent: -10px;
    font-size: var(--text-sm);
    color: var(--navy);
    font-weight: 600;
    border-radius: 4px 0 0 4px;
    outline: none;
    cursor: pointer;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 var(--space-4);
    font-size: var(--text-base);
    outline: none;
}

.search-btn {
    background: var(--gold);
    border: none;
    width: 60px;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-text {
    display: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.search-btn:hover {
    background: var(--gold-light);
}

.search-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.search-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: 4px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.3s;
}

.search-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--gold);
}

/* Oxford Blue Banner */
.collection-banner {
    background: var(--navy, #0A1F44);
    color: var(--white);
    padding: var(--space-4) 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

.collection-banner .container {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    position: relative;
    z-index: 2;
}

.collection-banner h3 {
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0;
}

.collection-banner .btn-collection {
    background: var(--gold, #C9A84C);
    color: var(--navy, #0A1F44);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.collection-banner .btn-collection:hover {
    background: #ffffff;
    color: var(--navy, #0A1F44);
}

/* Section Common */
.archive-section {
    padding: var(--space-12) 0;
    background: var(--white);
}

.archive-section-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: var(--space-8);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
}

/* Author Cards */
.author-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.author-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--gray-200);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-info h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 2px;
}

.author-info span {
    font-size: var(--text-xs);
    color: var(--gray-500);
    text-transform: uppercase;
}

.author-desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
}

.btn-follow {
    align-self: flex-start;
    border: 1px solid var(--navy);
    color: var(--navy);
    background: transparent;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all 0.3s;
}

.btn-follow:hover {
    background: var(--navy);
    color: var(--white);
}

/* Article Cards */
.article-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card h4 {
    padding: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.4;
    margin: 0;
}

/* Extra Articles Hidden State */
.extra-article.hidden {
    display: none !important;
}

/* News Section */
.webinar-promo {
    background: var(--navy);
    color: var(--white);
    position: relative;
    height: 100%;
    min-height: 300px;
}

.webinar-promo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0.7;
}

.webinar-promo-content {
    position: relative;
    z-index: 2;
    padding: var(--space-6);
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
}

.news-item:first-child {
    padding-top: 0;
}

.news-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.news-item-content h4 {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.4;
    margin: 0;
}

/* Conferences List */
.conference-item {
    display: flex;
    border: 1px solid var(--gray-300);
    margin-bottom: var(--space-4);
    background: var(--white);
}

.conf-date-block {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--gray-300);
    padding: var(--space-4);
}

.conf-day {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.conf-month {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-500);
}

.conf-content {
    padding: var(--space-4) var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.conf-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 var(--space-4);
}

.conf-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
}

.conf-actions {
    display: flex;
    gap: var(--space-4);
}

.conf-action {
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
}

.conf-action:hover {
    color: var(--navy);
}

.conf-location {
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 900px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    .archives-hero {
        padding: 80px 0 40px;
    }
    .search-bar-container {
        flex-direction: column;
        height: auto;
        gap: 8px;
    }
    .search-dropdown, .search-input {
        border-radius: 4px;
        padding: 12px;
        width: 100%;
        border: 1px solid rgba(0, 0, 0, 0.15); /* Premium crisp border */
    }
    .search-input {
        background: rgba(255, 255, 255, 0.95);
    }
    .search-btn {
        width: 100%;
        padding: 12px;
        border-radius: 4px;
    }
    .search-icon {
        display: none;
    }
    .search-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .news-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
        padding: var(--space-4) 0;
    }
    .news-thumbnail {
        width: 100%;
        height: 160px;
        border-radius: var(--radius-md);
    }
    .news-item-content h4 {
        font-size: var(--text-base);
    }
    .author-card {
        padding: var(--space-4);
    }
}

/* ================================================================
   SEARCH SUGGESTIONS DROPDOWN
   ================================================================ */

.search-bar-container {
    position: relative;
}

.search-suggestions {
    display: none;
    position: fixed;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: 10000;
    overflow: hidden;
    overflow-y: auto;
    max-height: 400px;
    animation: suggestionsSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-suggestions.active {
    display: block;
}

@keyframes suggestionsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 14px;
    color: var(--navy, #0a192f);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.04));
}

.suggestion-item.highlighted {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.07));
}

.suggestion-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(10, 25, 47, 0.06);
    color: var(--navy, #0a192f);
}

.suggestion-title .suggestion-icon {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.08));
    color: #92650a;
}

.suggestion-text {
    flex: 1;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-title .suggestion-text {
    font-weight: 600;
    white-space: normal;
}

.suggestion-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.search-highlight {
    background: rgba(212, 175, 55, 0.25);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
    font-weight: 600;
}

/* ================================================================
   SEARCH RESULTS SECTION
   ================================================================ */

.search-results-section {
    display: none;
    padding: var(--space-12, 48px) 0;
    background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    animation: resultsReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-results-section.active {
    display: block;
}

@keyframes resultsReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8, 32px);
    flex-wrap: wrap;
    gap: 12px;
}

.search-results-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl, 1.5rem);
    font-weight: 700;
    color: var(--navy, #0a192f);
    margin: 0;
}

.clear-search-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600, #6b7280);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: rgba(225, 29, 72, 0.06);
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.2);
}

/* Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6, 24px);
}

.search-results-grid.mdpi-article-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}


/* Result Cards */
.search-result-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-result-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(212, 175, 55, 0.3);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-card-image {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.result-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-card:hover .result-card-image img {
    transform: scale(1.06);
}

.result-match-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--gold, #d4af37), #c4972a);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.result-card-body {
    padding: 16px 18px 20px;
}

.result-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.result-title {
    font-family: var(--font-display);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 700;
    color: var(--navy, #0a192f);
    line-height: 1.45;
    margin: 0 0 8px;
}

.result-title .search-highlight {
    background: rgba(212, 175, 55, 0.2);
    padding: 1px 3px;
    border-radius: 3px;
}

.result-date {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    color: var(--gray-500, #9ca3af);
}

/* No Results */
.no-results-message {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-12, 48px) var(--space-4, 16px);
    color: var(--gray-500, #9ca3af);
}

.no-results-message p {
    margin: 8px 0 0;
    font-size: 16px;
    color: var(--navy, #0a192f);
    font-weight: 600;
}

.no-results-hint {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--gray-500, #9ca3af) !important;
}

/* Did You Mean */
.did-you-mean {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-600, #6b7280);
}

.did-you-mean span {
    font-weight: 500;
}

.did-you-mean-btn {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold, #d4af37);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.did-you-mean-btn:hover {
    background: var(--gold, #d4af37);
    color: #fff;
    border-color: var(--gold, #d4af37);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ================================================================
   RESPONSIVE ADJUSTMENTS FOR SEARCH
   ================================================================ */

@media (max-width: 1100px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-suggestions {
        margin-top: 4px;
        border-radius: 8px;
    }

    .suggestion-item {
        padding: 10px 14px;
    }
}

@media (max-width: 600px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-card-image {
        height: 200px;
    }
}

