/* --- 1. Core Variables & Reset --- */
:root {
    --dark-metal: #1a1c20;
    --dark-panel: #111316;
    --blueprint-blue: #0044cc;
    --steel-grey: #8d99ae;
    --rust-accent: #c05646;
    --gold-accent: #d4af37;
    --highlight-cyan: #00f3ff;
    --paper-bg: #f4f1ea;
    --tech-font: 'Share Tech Mono', monospace;
    --header-font: 'Cinzel', serif;
    --body-font: 'Rajdhani', sans-serif;
    --article-font: 'Merriweather', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: #e6e8eb;
    color: #333;
    overflow-x: hidden;
}

/* Background Grid */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* --- 2. Gear Decoration --- */
.gear-decoration {
    position: fixed;
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
    fill: #333;
    transition: transform 0.1s linear;
}

.gear-1 {
    top: 10%;
    right: -50px;
    width: 300px;
    height: 300px;
}

.gear-2 {
    top: 40%;
    left: -80px;
    width: 400px;
    height: 400px;
    fill: #111;
}

.gear-3 {
    bottom: 10%;
    left: -50px;
    width: 250px;
    height: 250px;
    fill: var(--rust-accent);
    opacity: 0.05;
}

/* --- 3. Header --- */
.main-header {
    background: rgba(26, 28, 32, 0.98);
    border-bottom: 3px solid var(--gold-accent);
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--header-font);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    color: var(--gold-accent);
    text-transform: uppercase;
}

.logo-img {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    border: 2px solid var(--gold-accent);
    object-fit: cover;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.nav-links {
    display: flex;
    gap: 20px;
    font-family: var(--tech-font);
    font-size: 0.85rem;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--gold-accent);
}

.nav-links a.active {
    color: #fff;
    border-bottom: 2px solid var(--gold-accent);
}

/* --- 4. Hero Section --- */
.hero-section {
    height: 70vh;
    background: linear-gradient(rgba(20, 20, 20, 0.8), rgba(20, 20, 20, 0.6)), url('https://images.unsplash.com/photo-1504221507732-5246cbb78452?q=80&w=1974&auto=format&fit=crop');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    position: relative;
    border-bottom: 8px solid var(--dark-metal);
    overflow: hidden;
}

.steam-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.steam {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.3) 0%, rgba(200, 200, 200, 0) 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: rise 8s infinite ease-in;
    opacity: 0;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    40% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-300px) scale(3);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-family: var(--header-font);
    font-size: 4.5rem;
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-family: var(--tech-font);
    color: var(--gold-accent);
    display: block;
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0 auto;
    line-height: 1.8;
    color: #ddd;
}

/* --- Featured Program --- */
.program-section {
    background: #000;
    padding: 80px 0;
    border-bottom: 4px solid var(--rust-accent);
    text-align: center;
    position: relative;
}

.program-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #222 0%, #000 100%);
    opacity: 0.5;
}

.program-header {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.program-label {
    font-family: var(--tech-font);
    color: var(--gold-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--gold-accent);
    padding: 5px 15px;
    display: inline-block;
    margin-bottom: 15px;
}

.program-title {
    font-family: var(--header-font);
    font-size: 2.5rem;
    color: #fff;
}

.video-container {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid #333;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.15);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- 7. New Museum Catalog Layout --- */
.museum-section {
    background: var(--dark-metal);
    color: #fff;
    padding: 80px 0;
    border-top: 4px solid var(--steel-grey);
    border-bottom: 4px solid var(--gold-accent);
}

/* Controls: Filter & Search */
.museum-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border: 1px solid #333;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 8px 16px;
    font-family: var(--tech-font);
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--highlight-cyan);
    color: var(--highlight-cyan);
    background: rgba(0, 243, 255, 0.1);
}

.museum-search {
    background: #000;
    border: 1px solid #555;
    color: #fff;
    padding: 8px 15px;
    font-family: var(--tech-font);
    width: 250px;
}

.museum-search:focus {
    border-color: var(--gold-accent);
    outline: none;
}

/* Grid of Exhibits */
.museum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.exhibit-card {
    background: #1a1a1a;
    border: 1px solid #333;
    transition: 0.3s;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.exhibit-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-accent);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.1);
}

.exhibit-img-box {
    height: 180px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.exhibit-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    opacity: 0.8;
}

.exhibit-card:hover .exhibit-img-box img {
    transform: scale(1.1);
    opacity: 1;
}

.exhibit-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.exhibit-cat {
    font-family: var(--tech-font);
    color: var(--steel-grey);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.exhibit-title {
    font-family: var(--header-font);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.exhibit-short {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-btn {
    margin-top: auto;
    text-align: right;
    font-family: var(--tech-font);
    color: var(--gold-accent);
    font-size: 0.8rem;
}

/* Exhibit Detail Modal */
.exhibit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.exhibit-content {
    background: #111;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border: 1px solid var(--gold-accent);
    display: flex;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
}

.exhibit-detail-img {
    width: 40%;
    background: #000;
    object-fit: cover;
}

.exhibit-detail-info {
    width: 60%;
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

.close-exhibit {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #666;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.3s;
}

.close-exhibit:hover {
    color: #fff;
}

.detail-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.detail-title {
    font-family: var(--header-font);
    font-size: 2.5rem;
    color: var(--gold-accent);
    margin-bottom: 10px;
}

.detail-meta {
    font-family: var(--tech-font);
    color: var(--steel-grey);
    font-size: 0.9rem;
}

.detail-desc {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 30px;
}

.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border: 1px solid #333;
}

.stat-box label {
    display: block;
    font-family: var(--tech-font);
    color: #666;
    font-size: 0.8rem;
}

.stat-box span {
    font-family: var(--tech-font);
    color: var(--highlight-cyan);
    font-size: 1.2rem;
}

/* --- 5. Timeline --- */
.section-title {
    font-family: var(--header-font);
    font-size: 2.2rem;
    color: var(--dark-metal);
    margin-bottom: 40px;
    border-left: 6px solid var(--rust-accent);
    padding-left: 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-subtitle {
    font-family: var(--tech-font);
    font-size: 1rem;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    margin-top: 60px;
}

.moment-card {
    background: #fff;
    border: 1px solid #ccc;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.moment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--rust-accent);
}

.moment-img {
    height: 200px;
    background: #333;
    overflow: hidden;
    position: relative;
}

.moment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    filter: grayscale(80%);
}

.moment-card:hover .moment-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.moment-body {
    padding: 25px;
    flex: 1;
}

.moment-year {
    font-family: var(--tech-font);
    color: var(--rust-accent);
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    border-bottom: 2px solid var(--rust-accent);
    margin-bottom: 10px;
}

.moment-title {
    font-family: var(--header-font);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-metal);
}

.moment-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.load-more-container {
    text-align: center;
    margin-bottom: 80px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dark-metal);
    padding: 10px 30px;
    font-family: var(--tech-font);
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    color: var(--dark-metal);
}

.btn-outline:hover {
    background: var(--dark-metal);
    color: #fff;
}

/* --- 6. Archive Grid --- */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.archive-item.featured {
    grid-column: span 8;
    background: var(--dark-metal);
    color: #fff;
    display: flex;
    position: relative;
    min-height: 350px;
}

.featured-content {
    padding: 40px;
    width: 60%;
    z-index: 2;
}

.featured-bg {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1565514020128-44d47d6e5e8d?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    mask-image: linear-gradient(to right, transparent, black 80%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 80%);
    opacity: 0.6;
}

.tag {
    font-family: var(--tech-font);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    display: inline-block;
}

.tag.video {
    border-color: var(--highlight-cyan);
    color: var(--highlight-cyan);
}

.tag.article {
    border-color: var(--gold-accent);
    color: var(--gold-accent);
}

.tag.gallery {
    border-color: #fff;
    color: #fff;
}

.archive-item.small {
    grid-column: span 4;
    background: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.3s;
    cursor: pointer;
}

.archive-item.small:hover {
    border-color: var(--blueprint-blue);
}

/* --- NEW: Gallery Section --- */
.gallery-section {
    padding: 60px 0;
    background: #e0e2e5;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    height: 200px;
    overflow: hidden;
    border: 1px solid #ccc;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    filter: sepia(0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: sepia(0);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-family: var(--tech-font);
    font-size: 0.8rem;
    transform: translateY(100%);
    transition: 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* --- Expanded Footer --- */
footer {
    background: #111;
    color: #888;
    padding: 60px 0 20px;
    font-family: var(--tech-font);
    border-top: 5px solid var(--dark-metal);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-family: var(--header-font);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #888;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--gold-accent);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons i {
    font-size: 1.2rem;
    transition: 0.3s;
    cursor: pointer;
}

.social-icons i:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .archive-item.featured,
    .archive-item.small {
        grid-column: span 12;
    }

    .exhibit-content {
        flex-direction: column;
        overflow-y: auto;
    }

    .exhibit-detail-img {
        width: 100%;
        height: 200px;
    }

    .exhibit-detail-info {
        width: 100%;
        padding: 20px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Responsive Video Embeds --- */
.ql-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 20px 0;
}