

:root {
    /* Apple-palette */
    --accent:       #0071E3;   /* Apple blue */
    --accent-dark:  #0058B0;   /* hover state */
    --accent-light: #E8F1FC;   /* tinted bg */
    --sidebar-bg:   #1D1D1F;   /* Apple near-black */
    --black:        #1D1D1F;
    --gray-1:       #F5F5F7;   /* Apple light gray bg */
    --gray-2:       #E8E8ED;   /* dividers / alt rows */
    --gray-3:       #6E6E73;   /* secondary text */
    --gray-4:       #3A3A3C;   /* strong secondary */
    --white:        #FFFFFF;
    --shadow:       rgba(0,0,0,0.07);
    --shadow-md:    rgba(0,0,0,0.11);
    --card-bg:      #FFFFFF;

    /* Sri Lanka accent — used sparingly as cultural highlight blocks */
    --sl-red:       #A02334;   /* deep vermillion / temple red */
    --sl-red-dark:  #7A1A28;
    --sl-red-tint:  #FBEEEF;

    /* Legacy aliases so no page PHP needs touching */
    --gold:        var(--accent);
    --saffron:     var(--accent-dark);
    --deep-green:  var(--accent);
    --maroon:      var(--sl-red);
    --cream:       var(--gray-1);
    --light-cream: var(--white);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, 'SF Pro Display', 'Inter', sans-serif;
    background-color: var(--gray-1);
    color: var(--black);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: -apple-system, 'SF Pro Display', 'Playfair Display', serif;
    color: var(--black);
    font-weight: 600;
    letter-spacing: -.02em;
}

a { text-decoration: none; }

/* ---- Mobile Toggle ---- */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px; left: 20px;
    z-index: 1001;
    background: var(--sidebar-bg);
    color: white;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    transition: background .25s, transform .2s;
}
.mobile-menu-toggle:hover  { background: var(--gray-4); }
.mobile-menu-toggle.is-open { background: var(--accent); transform: scale(1.05); }

/* ---- Sidebar Overlay ---- */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* ---- Layout ---- */
.main-wrapper { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    border-right: none;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 18px; right: 18px;
    background: rgba(255,255,255,.1); border: none;
    color: rgba(255,255,255,.7); font-size: 1rem;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
    transition: background .2s;
}
.sidebar-close:hover { background: rgba(255,255,255,.18); }

.sidebar-header {
    padding: 36px 22px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.site-title {
    font-family: -apple-system, 'SF Pro Display', 'Cormorant Garamond', serif;
    font-size: 1.9rem; font-weight: 700;
    color: var(--white);
    letter-spacing: -.01em; line-height: 1.2;
}

.site-subtitle {
    font-size: .75rem;
    color: rgba(255,255,255,.45);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 6px;
    font-weight: 400;
}

.nav-section {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.nav-title {
    font-size: .7rem;
    color: rgba(255,255,255,.35);
    padding: 0 22px 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    position: relative;
    margin-bottom: 4px;
}
.nav-title::after { display: none; }

.nav-links { list-style: none; }
.nav-links li { margin-bottom: 1px; }
.nav-links a {
    display: flex; align-items: center;
    padding: 9px 22px;
    color: rgba(255,255,255,.65);
    font-size: .9rem;
    font-weight: 400;
    border-radius: 0;
    border-left: 2px solid transparent;
    transition: all .2s;
}
.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,.07);
    color: white;
    border-left-color: var(--accent);
    padding-left: 26px;
}
.nav-links a i {
    width: 18px; margin-right: 10px;
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    transition: color .2s;
}
.nav-links a:hover i,
.nav-links a.active i { color: var(--accent); }

/* Sidebar search */
.sidebar-search { padding: 0 18px 10px; }
.search-container { position: relative; }
.search-container input {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    color: white;
    border-radius: 8px;
    padding: 9px 38px 9px 14px;
    font-size: .85rem;
    width: 100%;
    transition: border-color .2s, background .2s;
}
.search-container input::placeholder { color: rgba(255,255,255,.3); }
.search-container input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,.1);
}
.search-container button {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: rgba(255,255,255,.4); cursor: pointer;
    transition: color .2s;
}
.search-container button:hover { color: var(--accent); }

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gray-1);
}

/* ---- Hero Banner ---- */
.hero-banner {
    background: linear-gradient(160deg, #1D1D1F 0%, #2C2C2E 55%, #3A3A3C 100%);
    color: white;
    padding: 90px 40px 80px;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1400&q=60') center/cover no-repeat;
    opacity: .12;
}
.hero-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(0,113,227,.15) 0%, transparent 60%);
}
.hero-banner .container { position: relative; z-index: 1; }
.hero-banner h1 {
    font-size: 3.2rem;
    color: white;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 18px;
}
.hero-banner .lead {
    font-size: 1.1rem;
    color: rgba(255,255,255,.72);
    max-width: 560px;
    font-weight: 300;
    line-height: 1.6;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0,113,227,.25);
    border: 1px solid rgba(0,113,227,.4);
    color: #6EB5FF;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

/* ---- Section Headers ---- */
.section-header { margin-bottom: 40px; }
.section-header h2 { font-size: 2rem; margin-bottom: 10px; letter-spacing: -.03em; }
.section-header p { color: var(--gray-3); font-size: 1rem; font-weight: 300; }
.section-divider {
    width: 40px; height: 3px;
    background: var(--accent);
    margin: 12px 0 16px;
    border-radius: 2px;
}

/* ---- Heritage Cards ---- */
.heritage-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow), 0 4px 16px var(--shadow);
    transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
    opacity: 0;
    transform: translateY(20px);
    height: 100%;
    border: 1px solid var(--gray-2);
}
.heritage-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s, transform .5s, box-shadow .3s;
}
.heritage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-md);
}
.heritage-card .card-img-top { height: 200px; object-fit: cover; }
.heritage-card .card-body { padding: 22px; background: white; }
.heritage-card .card-title { font-size: 1.05rem; margin-bottom: 8px; letter-spacing: -.01em; }
.heritage-card .card-text { font-size: .88rem; color: var(--gray-3); margin-bottom: 16px; line-height: 1.6; }
.card-category-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.badge-history      { background: #F0F0F5; color: #3A3A3C; }
.badge-religion     { background: #E8F1FC; color: #0058B0; }
.badge-architecture { background: #F0F0F5; color: #3A3A3C; }
.badge-traditions   { background: #E8F1FC; color: #0058B0; }
/* lowercase variants used in article.php */
.badge-History      { background: #F0F0F5; color: #3A3A3C; }
.badge-Religion     { background: #E8F1FC; color: #0058B0; }
.badge-Architecture { background: #F0F0F5; color: #3A3A3C; }
.badge-Traditions   { background: #E8F1FC; color: #0058B0; }

/* ---- Article Cards ---- */
.article-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow), 0 4px 12px var(--shadow);
    border: 1px solid var(--gray-2);
    transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
    opacity: 0;
    transform: translateY(20px);
    height: 100%;
    display: flex; flex-direction: column;
}
.article-card.visible { opacity:1; transform:translateY(0); transition: opacity .5s, transform .5s; }
.article-card:hover   { transform: translateY(-5px); box-shadow: 0 8px 28px var(--shadow-md); }
.article-card-img {
    height: 200px; object-fit: cover; width: 100%;
}
.article-card-img-placeholder {
    height: 200px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #2C2C2E, #3A3A3C);
    color: rgba(255,255,255,.3);
    font-size: 2.5rem;
}
.article-card-body {
    padding: 22px;
    flex: 1; display: flex; flex-direction: column;
    background: white;
}
.article-card-title { font-size: 1.05rem; margin-bottom: 8px; letter-spacing: -.01em; }
.article-card-excerpt { font-size: .87rem; color: var(--gray-3); flex: 1; margin-bottom: 16px; line-height: 1.6; }
.article-card-meta { font-size: .75rem; color: #AEAEB2; margin-bottom: 14px; }
.article-card-meta i { color: var(--accent); margin-right: 4px; }

/* ---- Buttons ---- */
.btn-heritage {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .2s;
    display: inline-block;
    letter-spacing: .01em;
}
.btn-heritage:hover { background: var(--accent-dark); color: white; transform: translateY(-1px); }

.btn-gold {
    background: var(--white);
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 10px 22px;
    border-radius: 20px;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    display: inline-block;
}
.btn-gold:hover { background: var(--accent); color: white; transform: translateY(-1px); }

/* ---- Timeline ---- */
.timeline { position: relative; padding: 10px 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    background: var(--gray-2);
    transform: translateX(-50%);
}
.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity .5s, transform .5s;
}
.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
    transform: translateX(20px);
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-content {
    background: var(--white);
    border-radius: 14px;
    padding: 20px 24px;
    max-width: 380px;
    box-shadow: 0 1px 4px var(--shadow), 0 4px 16px var(--shadow);
    border: 1px solid var(--gray-2);
    position: relative;
}
.timeline-dot {
    position: absolute;
    top: 20px; right: -38px;
    width: 13px; height: 13px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--gray-1);
    box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item:nth-child(even) .timeline-dot { right: auto; left: -38px; }
.timeline-year {
    font-size: .75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.timeline-content h5 { font-size: 1rem; margin-bottom: 6px; letter-spacing: -.01em; }
.timeline-content p  { font-size: .87rem; color: var(--gray-3); margin: 0; line-height: 1.6; }

/* ---- UNESCO Badge Grid ---- */
.unesco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; }
.unesco-item {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow);
    border: 1px solid var(--gray-2);
    transition: transform .3s, box-shadow .3s;
}
.unesco-item:hover { transform: translateY(-4px); box-shadow: 0 6px 24px var(--shadow-md); }
.unesco-item img  { width: 100%; height: 180px; object-fit: cover; }
.unesco-body      { padding: 18px; }
.unesco-body h5   { font-size: .98rem; margin-bottom: 6px; letter-spacing: -.01em; }
.unesco-body p    { font-size: .84rem; color: var(--gray-3); margin: 0; }
.unesco-year      { font-size: .72rem; color: var(--accent); font-weight: 700; display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,.6));
    display: flex; align-items: flex-end;
    padding: 14px;
    opacity: 0; transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h5 { font-size: .88rem; margin: 0; font-family: inherit; color: white; font-weight: 500; }

/* ---- Single Article ---- */
.article-hero {
    height: 380px; object-fit: cover; width: 100%;
    border-radius: 16px; margin-bottom: 32px;
}
.article-hero-placeholder {
    height: 280px;
    background: linear-gradient(135deg, #2C2C2E, #3A3A3C);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.2); font-size: 4rem;
    margin-bottom: 32px;
}
.article-body { font-size: 1.05rem; line-height: 1.85; color: var(--gray-4); }
.article-body p { margin-bottom: 1.4rem; }
.article-body h2, .article-body h3 { margin: 2rem 0 1rem; color: var(--black); letter-spacing: -.02em; }

/* ---- Info Boxes ---- */
.info-card {
    background: var(--white);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px var(--shadow);
    border: 1px solid var(--gray-2);
    border-left: 3px solid var(--accent);
    margin-bottom: 20px;
}
.info-card h4 { font-size: 1rem; color: var(--black); margin-bottom: 8px; letter-spacing: -.01em; }
.info-card p  { font-size: .88rem; color: var(--gray-3); margin: 0; line-height: 1.6; }

/* ---- Page Sections ---- */
.page-section { padding: 60px 40px; background: var(--gray-1); }
.page-section:nth-child(even) { background: var(--white); }

/* ---- Footer ---- */
.footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,.65);
    padding: 50px 0 0;
    margin-top: auto;
}
.footer-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -.01em;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; font-size: .88rem; }
.footer-links a  { color: rgba(255,255,255,.5); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-links i  { color: rgba(255,255,255,.3); }
.copyright {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: .8rem;
    color: rgba(255,255,255,.3);
}
.legal-links {
    margin-top: 10px;
    font-size: .78rem;
}
.legal-links a {
    color: rgba(255,255,255,.45);
    transition: color .2s;
}
.legal-links a:hover {
    color: var(--accent);
}
.legal-sep {
    color: rgba(255,255,255,.2);
    margin: 0 10px;
}

/* ---- Breadcrumb ---- */
.heritage-breadcrumb {
    padding: 14px 40px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-2);
    font-size: .83rem;
    color: var(--gray-3);
}
.heritage-breadcrumb a { color: var(--accent); }
.heritage-breadcrumb a:hover { text-decoration: underline; }
.heritage-breadcrumb .separator { margin: 0 8px; color: var(--gray-2); }

/* ---- Pagination ---- */
.heritage-pagination .page-link { color: var(--accent); border-color: var(--gray-2); }
.heritage-pagination .page-item.active .page-link {
    background: var(--accent); border-color: var(--accent); color: white;
}

/* ---- Filter Bar ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-2);
    background: var(--white);
    color: var(--gray-4);
    font-size: .83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ---- Stat Numbers ---- */
.stat-box {
    text-align: center;
    padding: 28px 20px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--gray-2);
    box-shadow: 0 1px 4px var(--shadow);
}
.stat-box .stat-number {
    font-size: 2.4rem; font-weight: 700;
    color: var(--black); line-height: 1;
    margin-bottom: 6px; letter-spacing: -.03em;
}
.stat-box .stat-label {
    font-size: .78rem; color: var(--gray-3);
    text-transform: uppercase; letter-spacing: 1px;
}
.stat-box i { font-size: 1.5rem; color: var(--accent); margin-bottom: 12px; display: block; }

/* ---- Sri Lanka Accent Panel (inspired by museum-style "Experience" block) ---- */
.sl-panel {
    background: linear-gradient(145deg, var(--sl-red) 0%, var(--sl-red-dark) 100%);
    color: white;
    border-radius: 20px;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
}
.sl-panel::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,.08) 0%, transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(255,255,255,.06) 0%, transparent 40%);
    pointer-events: none;
}
.sl-panel .sl-eyebrow {
    font-size: .72rem; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.65);
    margin-bottom: 10px;
}
.sl-panel h3 {
    color: white; font-size: 1.7rem;
    letter-spacing: -.02em; margin-bottom: 6px;
}
.sl-panel p { color: rgba(255,255,255,.78); font-size: .92rem; line-height: 1.7; }
.sl-panel .sl-divider { width: 32px; height: 2px; background: rgba(255,255,255,.4); margin: 16px 0; border-radius: 2px; }
.sl-panel-link {
    display: inline-block; color: white; font-size: .85rem;
    font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.5);
    padding-bottom: 2px; margin-top: 14px; transition: border-color .2s, opacity .2s;
}
.sl-panel-link:hover { border-color: white; opacity: .85; }

/* Small accent chip — a subtle Sri Lanka red used only for "featured/highlight" tags */
.sl-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--sl-red-tint);
    color: var(--sl-red);
    font-size: .72rem; font-weight: 600;
    letter-spacing: .8px; text-transform: uppercase;
    padding: 4px 12px; border-radius: 20px;
}
.sl-chip i { font-size: .68rem; }

/* ---- Hero with image (index.php) ---- */
.hero-with-image { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.hero-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-frame::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.45) 100%);
}
.hero-image-caption {
    position: absolute; left: 20px; right: 20px; bottom: 18px;
    z-index: 2; color: white;
}
.hero-image-caption .sl-chip { background: rgba(160,35,52,.85); color: white; backdrop-filter: blur(6px); margin-bottom: 8px; }
.hero-image-caption .cap-title { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 992px) {
    .hero-with-image { grid-template-columns: 1fr; gap: 32px; }
    .hero-image-frame { aspect-ratio: 16/10; max-width: 480px; margin: 0 auto; }
}
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--gray-2); }
::-webkit-scrollbar-thumb        { background: #AEAEB2; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--accent); }
.sidebar::-webkit-scrollbar       { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: #AEAEB2 var(--gray-2); }
.sidebar { scrollbar-color: rgba(255,255,255,.15) transparent; }

/* ---- Burger open state ---- */
.mobile-menu-toggle.is-open { background: var(--accent); }

/* ---- Responsive ---- */

/* Tablet (≤992px) */
@media (max-width: 992px) {
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-close      { display: block; }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.active { transform: translateX(0); }

    .main-content { margin-left: 0; }

    /* Hero — push down so burger button doesn't cover title */
    .hero-banner         { padding: 80px 24px 50px; }
    .hero-banner h1      { font-size: 2rem; }
    .hero-banner .lead   { font-size: 1rem; }

    .page-section { padding: 40px 20px; }
    .heritage-breadcrumb { padding: 12px 20px; }

    /* Gallery 2-col on tablet */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    /* UNESCO grid 2-col */
    .unesco-grid { grid-template-columns: repeat(2, 1fr); }

    /* Timeline — single column left-aligned */
    .timeline::before { left: 20px; }
    .timeline-item,
    .timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding-left: 52px;
        padding-right: 0;
        transform: translateX(-10px);
    }
    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot { left: 14px; right: auto; }

    /* Article single page */
    .article-hero { height: 260px; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    .hero-banner        { padding: 76px 20px 44px; }
    .hero-banner h1     { font-size: 1.85rem; line-height: 1.25; }
    .hero-banner .lead  { font-size: .95rem; }

    /* Hero buttons stack */
    .hero-banner .d-flex.gap-3 { flex-direction: column; align-items: flex-start; gap: 12px !important; }
    .hero-banner .btn-heritage,
    .hero-banner .btn-gold     { width: 100%; text-align: center; }

    .page-section  { padding: 32px 16px; }
    .section-header h2 { font-size: 1.6rem; }

    /* Stats 2-col */
    .stat-box .stat-number { font-size: 2rem; }

    /* Filter bar — scrollable row instead of wrapping */
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-btn { white-space: nowrap; flex-shrink: 0; }

    /* Breadcrumb — allow scroll */
    .heritage-breadcrumb {
        white-space: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .heritage-breadcrumb::-webkit-scrollbar { display: none; }

    /* Cards — full width on small screens */
    .article-card { margin-bottom: 4px; }

    /* Gallery 2-col */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* UNESCO 1-col */
    .unesco-grid { grid-template-columns: 1fr; }

    /* Timeline content full width */
    .timeline-content { max-width: 100%; }

    /* Article single */
    .article-hero { height: 220px; border-radius: 8px; }
    .article-hero-placeholder { height: 180px; }

    /* Footer columns */
    .footer .row > div { margin-bottom: 28px; }
    .copyright { font-size: .78rem; }

    /* Pagination — smaller */
    .heritage-pagination .page-link { padding: 6px 10px; font-size: .82rem; }

    /* Info cards in cultural page */
    .info-card { padding: 20px; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
    .hero-banner     { padding: 72px 16px 40px; }
    .hero-banner h1  { font-size: 1.6rem; }
    .hero-badge      { font-size: .72rem; padding: 4px 12px; }

    .section-header h2 { font-size: 1.35rem; }

    /* Stats 2-col tighter */
    .stat-box { padding: 20px 12px; }
    .stat-box .stat-number { font-size: 1.8rem; }
    .stat-box .stat-label  { font-size: .75rem; letter-spacing: .5px; }
    .stat-box i            { font-size: 1.4rem; }

    /* Gallery 1-col on tiny screens */
    .gallery-grid { grid-template-columns: 1fr; }

    /* Hero card image height */
    .heritage-card .card-img-top,
    .article-card-img,
    .article-card-img-placeholder { height: 180px; }

    /* Single article */
    .article-hero { height: 180px; }

    /* Buttons full width */
    .btn-heritage, .btn-gold { display: block; width: 100%; text-align: center; margin-bottom: 8px; }

    /* Page section tighter */
    .page-section { padding: 28px 14px; }

    /* Footer */
    .footer { padding: 36px 0 0; }
    .footer-title { font-size: 1rem; }
}

/* ============================================
   VISIBILITY SAFETY FIX
   Cards must NEVER depend on JavaScript to appear.
   This overrides the opacity:0 entrance states above
   with a pure-CSS load animation instead.
   ============================================ */
.heritage-card,
.article-card {
    opacity: 1;
    transform: translateY(0);
    animation: cardFadeUp .55s ease both;
}
.timeline-item,
.timeline-item:nth-child(even) {
    opacity: 1;
    transform: translateX(0);
    animation: cardFadeUp .55s ease both;
}
@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Gentle stagger for the first few cards */
.row > div:nth-child(1) .article-card,
.row > div:nth-child(1) .heritage-card { animation-delay: .05s; }
.row > div:nth-child(2) .article-card,
.row > div:nth-child(2) .heritage-card { animation-delay: .12s; }
.row > div:nth-child(3) .article-card,
.row > div:nth-child(3) .heritage-card { animation-delay: .19s; }
/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .heritage-card, .article-card, .timeline-item { animation: none; }
}
/* ============================================
   APPEND this to the END of assets/style.css
   Hero Ken Burns Slideshow
   ============================================ */

/* The hero becomes a positioned stage */
.hero-slideshow {
    position: relative;
    overflow: hidden;
    background: var(--sidebar-bg); /* fallback while images load */
    min-height: 560px;
    display: flex;
    align-items: center;
}

/* Remove the old static ::before/::after backgrounds for this variant */
.hero-slideshow::before,
.hero-slideshow::after { display: none; }

/* ---- Slide layers ---- */
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: -5%;                      /* oversized so the pan never shows edges */
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.8s ease-in-out;
    will-change: opacity, transform;
}
.hero-slide.active {
    opacity: 1;
    animation: kenburns 12s ease-in-out infinite alternate;
}

/* Slow cinematic zoom + drift.
   Alternate direction per slide for variety */
@keyframes kenburns {
    0%   { transform: scale(1)    translate(0, 0); }
    100% { transform: scale(1.12) translate(-1.5%, -1%); }
}
.hero-slide:nth-child(even).active {
    animation-name: kenburns-alt;
}
@keyframes kenburns-alt {
    0%   { transform: scale(1.12) translate(1.5%, 1%); }
    100% { transform: scale(1)    translate(0, 0); }
}

/* Reduced motion — no zoom, simple crossfade only */
.reduced-motion .hero-slide.active { animation: none; }

/* ---- Readability overlay ----
   Three-layer gradient: dark left side for text, subtle top/bottom vignette */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(15,15,17,.82) 0%, rgba(15,15,17,.55) 45%, rgba(15,15,17,.15) 100%),
        linear-gradient(180deg, rgba(15,15,17,.35) 0%, transparent 25%, transparent 70%, rgba(15,15,17,.55) 100%);
    pointer-events: none;
}

/* ---- Content sits above everything ---- */
.hero-slideshow .hero-content {
    position: relative;
    z-index: 2;
    padding-top: 30px;
    padding-bottom: 30px;
}
.hero-slideshow h1 {
    text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero-slideshow .lead {
    color: rgba(255,255,255,.85);
    text-shadow: 0 1px 12px rgba(0,0,0,.4);
}

/* Outline button needs to be visible on dark imagery */
.btn-gold-on-dark {
    background: rgba(255,255,255,.1);
    color: white;
    border-color: rgba(255,255,255,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.btn-gold-on-dark:hover {
    background: white;
    color: var(--black);
    border-color: white;
}

/* ---- Slide caption (bottom-right) ---- */
.hero-slide-caption {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 2;
}
.hero-slide-caption .sl-chip {
    background: rgba(15,15,17,.55);
    color: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.15);
    font-size: .74rem;
    padding: 6px 14px;
}
.hero-slide-caption .sl-chip i { color: var(--sl-red-tint); }
#heroCaptionText { transition: opacity .3s ease; }

/* ---- Progress dots (bottom-left) ---- */
.hero-dots {
    position: absolute;
    left: 40px;
    bottom: 28px;
    z-index: 2;
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 26px;
    height: 4px;
    border-radius: 2px;
    border: none;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    padding: 0;
    transition: background .3s, width .3s;
}
.hero-dot:hover  { background: rgba(255,255,255,.55); }
.hero-dot.active {
    background: white;
    width: 40px;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .hero-slideshow { min-height: 480px; }
    .hero-dots { left: 24px; bottom: 22px; }
    .hero-slide-caption { right: 20px; bottom: 20px; }
}
@media (max-width: 768px) {
    .hero-slideshow { min-height: 440px; }
    /* On small screens the caption overlaps dots — stack caption above */
    .hero-slide-caption { right: 16px; bottom: 52px; }
    .hero-dots { left: 16px; bottom: 20px; }
    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(15,15,17,.75) 0%, rgba(15,15,17,.55) 55%, rgba(15,15,17,.75) 100%);
    }
}
@media (max-width: 480px) {
    .hero-slideshow { min-height: 420px; }
    .hero-slide-caption { display: none; } /* keep it clean on tiny screens */
}