:root {
    --tdt-forest: #174f2c;
    --tdt-emerald: #2f7d32;
    --tdt-gold: #d79d25;
    --tdt-earth: #6c4b2a;
    --tdt-cream: #fbf7ef;
    --tdt-ink: #102018;
    --tdt-surface: rgba(255, 255, 255, 0.08);
    --tdt-border: rgba(255, 255, 255, 0.16);
    --tdt-shadow: 0 30px 60px rgba(15, 30, 21, 0.22);
}

html {
    font-size: 14px; /* compact baseline (was browser default ~16px) */
    scroll-behavior: smooth;
}

body.site-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #f8faf7;
    background:
        radial-gradient(circle at top left, rgba(216, 173, 72, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(47, 125, 50, 0.18), transparent 28%),
        linear-gradient(180deg, #0d2014 0%, #16351f 34%, #f7f3e9 34%, #f7f3e9 100%);
}

h1, h2, h3, h4, h5, h6,
.brand-name,
.hero-title,
.section-title {
    font-family: 'Cormorant Garamond', serif;
}

.text-gold { color: var(--tdt-gold); }
.text-white-75 { color: rgba(251, 247, 239, 0.85) !important; }

.site-navbar {
    background: rgba(8, 24, 15, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-topbar {
    background: linear-gradient(90deg, rgba(16,32,24,0.98) 0%, rgba(23,79,44,0.92) 50%, rgba(16,32,24,0.98) 100%);
    color: rgba(255, 255, 255, 0.92);
    border-top: 3px solid var(--tdt-gold);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    font-size: 0.82rem;
    line-height: 1.15;
}

.topbar-item,
.topbar-link,
.topbar-site {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    font-size: 0.82rem;
}

.topbar-item,
.topbar-link,
.topbar-site {
    white-space: nowrap;
}

.topbar-divider {
    color: var(--tdt-border);
    font-size: 0.9rem;
}

.topbar-site {
    color: var(--tdt-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.topbar-link {
    transition: color 160ms ease, background-color 160ms ease;
}

.topbar-link:hover {
    color: #fff;
    background: var(--tdt-surface);
    border-radius: 999px;
    padding-inline: 0.45rem;
}

.topbar-social {
    color: rgba(255, 255, 255, 0.9);
}

.topbar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.95rem;
    height: 1.95rem;
    color: var(--tdt-cream);
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.06);
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.topbar-social-link:hover {
    color: var(--tdt-ink);
    background: var(--tdt-gold);
    transform: translateY(-1px);
}

.topbar-cta {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.95rem;
}

.topbar-contact-row {
    overflow: hidden;
}

.topbar-meta-row {
    flex-shrink: 0;
}

.brand-logo,
.footer-logo {
    width: auto;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

.brand-logo-banner {
    height: 48px;
    max-width: min(560px, 68vw);
}

.navbar-brand {
    max-width: min(560px, 68vw);
}

.brand-name {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.68);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.84);
    font-weight: 600;
    padding-inline: 0.85rem;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--tdt-gold), #f3c566);
    color: #1b180f;
    border: 0;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(215, 157, 37, 0.34);
}

.btn-accent:hover {
    color: #17130b;
    transform: translateY(-1px);
}

body.site-body .btn,
body.site-body .btn-sm,
body.site-body .btn-lg,
body.site-body .btn-group .btn,
body.site-body .input-group .btn,
body.site-body .btn.rounded-pill {
    border-radius: 0.35rem !important;
}

body.site-body .btn {
    text-transform: none;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 3rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 22, 13, 0.68), rgba(8, 22, 13, 0.3)),
        url('https://images.unsplash.com/photo-1509099836639-18ba1795216d?auto=format&fit=crop&w=1800&q=80') center/cover;
    opacity: 0.18;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Make hero eyebrow clearly readable over the hero image */
.hero-eyebrow {
    background: rgba(16, 32, 24, 0.56);
    color: var(--tdt-cream);
    border-color: rgba(255, 255, 255, 0.06);
}

.section-heading .section-eyebrow {
    background: rgba(215, 157, 37, 0.28);
    color: #11331f;
    border-color: rgba(215, 157, 37, 0.22);
}

/* On explicitly light sections use gold eyebrow for contrast */
.section-alt .section-eyebrow {
    /* Use dark text on light sections for strong contrast */
    color: #11331f;
    background: rgba(215, 157, 37, 0.12);
    border-color: rgba(215, 157, 37, 0.14);
}

.section-heading .section-title {
    color: var(--tdt-cream);
    text-shadow: none;
}

.section-heading .section-copy {
    color: rgba(251, 247, 239, 0.88);
    max-width: 58rem;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.94;
    margin: 1rem 0;
    text-wrap: balance;
}

.hero-copy {
    max-width: 56rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.06rem;
}

.hero-media {
    position: relative;
    padding: 1rem;
}

.hero-video-badge {
    position: absolute;
    left: 1.6rem;
    bottom: 1.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(16, 32, 24, 0.82);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-card,
.mini-card,
.card-premium {
    background: var(--tdt-surface);
    border: 1px solid var(--tdt-border);
    backdrop-filter: blur(18px);
    border-radius: 1.5rem;
    box-shadow: var(--tdt-shadow);
}

.section-pad .glass-card,
.section-pad .mini-card,
.section-pad .card-premium,
.section-alt .glass-card,
.section-alt .mini-card,
.section-alt .card-premium {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 79, 44, 0.12);
    color: #11331f;
}

.section-pad .glass-card h1,
.section-pad .glass-card h2,
.section-pad .glass-card h3,
.section-pad .glass-card h4,
.section-pad .glass-card h5,
.section-pad .glass-card h6,
.section-pad .mini-card h1,
.section-pad .mini-card h2,
.section-pad .mini-card h3,
.section-pad .mini-card h4,
.section-pad .mini-card h5,
.section-pad .mini-card h6,
.section-pad .card-premium h1,
.section-pad .card-premium h2,
.section-pad .card-premium h3,
.section-pad .card-premium h4,
.section-pad .card-premium h5,
.section-pad .card-premium h6,
.section-alt .glass-card h1,
.section-alt .glass-card h2,
.section-alt .glass-card h3,
.section-alt .glass-card h4,
.section-alt .glass-card h5,
.section-alt .glass-card h6,
.section-alt .mini-card h1,
.section-alt .mini-card h2,
.section-alt .mini-card h3,
.section-alt .mini-card h4,
.section-alt .mini-card h5,
.section-alt .mini-card h6,
.section-alt .card-premium h1,
.section-alt .card-premium h2,
.section-alt .card-premium h3,
.section-alt .card-premium h4,
.section-alt .card-premium h5,
.section-alt .card-premium h6 {
    color: #11331f;
}

.section-pad .glass-card p,
.section-pad .mini-card p,
.section-pad .card-premium p,
.section-alt .glass-card p,
.section-alt .mini-card p,
.section-alt .card-premium p {
    color: rgba(17, 51, 31, 0.9);
}

.section-pad .glass-card .badge,
.section-pad .mini-card .badge,
.section-pad .card-premium .badge,
.section-alt .glass-card .badge,
.section-alt .mini-card .badge,
.section-alt .card-premium .badge {
    color: #11331f;
}

.section-pad .glass-card .text-white-75,
.section-pad .mini-card .text-white-75,
.section-pad .card-premium .text-white-75,
.section-alt .glass-card .text-white-75,
.section-alt .mini-card .text-white-75,
.section-alt .card-premium .text-white-75 {
    color: rgba(16, 32, 24, 0.82) !important;
}

.section-pad .glass-card a,
.section-pad .mini-card a,
.section-pad .card-premium a,
.section-alt .glass-card a,
.section-alt .mini-card a,
.section-alt .card-premium a {
    color: var(--tdt-forest);
}

.section-pad .glass-card .btn-outline-light,
.section-pad .mini-card .btn-outline-light,
.section-pad .card-premium .btn-outline-light,
.section-alt .glass-card .btn-outline-light,
.section-alt .mini-card .btn-outline-light,
.section-alt .card-premium .btn-outline-light {
    color: var(--tdt-forest);
    border-color: rgba(23, 79, 44, 0.28);
}

.section-pad .glass-card .btn-outline-light:hover,
.section-pad .mini-card .btn-outline-light:hover,
.section-pad .card-premium .btn-outline-light:hover,
.section-alt .glass-card .btn-outline-light:hover,
.section-alt .mini-card .btn-outline-light:hover,
.section-alt .card-premium .btn-outline-light:hover {
    background: var(--tdt-forest);
    color: #fff;
}

.section-pad {
    padding: 5rem 0;
    color: var(--tdt-ink);
}

.section-alt {
    background:
        linear-gradient(180deg, rgba(23, 79, 44, 0.05), rgba(23, 79, 44, 0.01)),
        linear-gradient(180deg, #f7f3e9 0%, #f1eadb 100%);
}

.section-title {
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    line-height: 1;
    margin-bottom: 0.75rem;
    color: var(--tdt-cream);
}

.section-copy {
    max-width: 42rem;
    color: rgba(251, 247, 239, 0.88);
}

/* When inside explicitly light-themed sections use dark text for readability */
.section-alt .section-title {
    color: #11331f;
}

.section-alt .section-copy {
    color: rgba(17, 51, 31, 0.76);
}

/* Ensure section-alt exposes a concrete background color for contrast audits
   and for user agents that don't compute layered background-images. */
.section-alt {
    background-color: var(--tdt-cream);
}

/* Ensure regular section pads (dark background) use light text */
.section-pad:not(.section-alt) .section-title {
    color: var(--tdt-cream);
}

.section-pad:not(.section-alt) .section-copy {
    color: rgba(251, 247, 239, 0.88);
}

.counter-strip,
.section-cta {
    background: linear-gradient(180deg, #173f28 0%, #102718 100%);
    color: #fff;
}

.counter-card {
    padding: 1.5rem;
}

.value-pill {
    background: rgba(23, 79, 44, 0.28) !important;
    color: var(--tdt-cream) !important;
    border: 1px solid rgba(23, 79, 44, 0.18);
}

/* Improve badge contrast on light cards */
.badge.rounded-pill.text-bg-light {
    background: rgba(23, 79, 44, 0.28) !important;
    color: var(--tdt-cream) !important;
    border-color: rgba(23, 79, 44, 0.18) !important;
}

/* Ensure small date labels and other small muted text inside card surfaces are dark for readability */
.card-premium .text-white-50,
.card-premium .text-white-75,
.glass-card .text-white-50,
.glass-card .text-white-75,
.card-premium .small,
.glass-card .small {
    color: rgba(16, 32, 24, 0.82) !important;
}

/* Counters inside light card surfaces should be dark */
.card-premium .counter,
.card-premium .display-6,
.glass-card .counter,
.glass-card .display-6,
.counter-card .counter,
.counter-card .display-5 {
    color: #11331f !important;
}

/* More specific: counters within counter-card glass surfaces */
.counter-card.glass-card .display-5 .counter,
.counter-card.glass-card .display-5 {
    color: #11331f !important;
}

/* Ensure .btn-accent background is always applied for contrast */
.btn-accent,
a.btn-accent {
    background-image: linear-gradient(135deg, var(--tdt-gold), #f3c566) !important;
    background-color: var(--tdt-gold) !important;
    color: #1b180f !important;
}

/* Ensure counters are readable on dark counter strip */
.counter-strip .text-gold,
.counter-strip .counter,
.counter-strip .display-6 {
    color: var(--tdt-cream) !important;
}

/* Darken warning links inside light cards to improve contrast */
.section-pad a.text-warning,
.glass-card a.text-warning,
.section-alt a.text-warning,
.card-premium a.text-warning,
.news-card a.text-warning {
    color: var(--tdt-forest) !important;
}

.program-card {
    overflow: hidden;
    color: #fff;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.program-card:hover {
    transform: translateY(-8px);
}

.program-card .card-img-top {
    height: 240px;
    object-fit: cover;
}

.news-card,
.program-card,
.gallery-tile {
    align-items: stretch;
}

.news-card .card-img-top,
.program-card .card-img-top,
.gallery-tile img {
    width: 100%;
    object-fit: cover;
}

.news-card .card-img-top,
.program-card .card-img-top {
    flex-shrink: 0;
}

.news-card .card-body,
.program-card .card-body,
.gallery-tile figcaption {
    flex: 1 1 auto;
}

.program-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(215, 157, 37, 0.2), rgba(215, 157, 37, 0.06));
    color: var(--tdt-gold);
    font-size: 1.25rem;
}

.timeline {
    position: relative;
    display: grid;
    gap: 1.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(23, 79, 44, 0.16);
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    align-items: start;
}

.timeline-year {
    position: relative;
    z-index: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: var(--tdt-forest);
    box-shadow: 0 10px 20px rgba(23, 79, 44, 0.2);
}

.icon-list li {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.icon-list i {
    color: var(--tdt-forest);
    font-size: 1.1rem;
}

.site-footer {
    background: #0c1d13;
    color: #fff;
}

.footer-heading {
    color: #f3f4ef;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
}

.scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: var(--tdt-gold);
    color: #1a150d;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 180ms ease;
    z-index: 1030;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.page-hero {
    padding: 4.5rem 0 2.5rem;
    background: linear-gradient(180deg, #173f28 0%, #102718 100%);
    color: #fff;
}

.page-hero-sm {
    min-height: auto;
}

.testimonial-card {
    max-width: 62rem;
}

.testimonial-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(215, 157, 37, 0.16);
    color: var(--tdt-gold);
    font-weight: 800;
}

.partner-pill {
    color: var(--tdt-forest);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.88);
}

.gallery-masonry {
    columns: 3 18rem;
    column-gap: 1rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.gallery-item figcaption {
    padding: 1rem;
}

.lightbox-close {
    position: absolute;
    top: -0.75rem;
    right: 0;
    z-index: 2;
}

.text-dark-ink {
    color: #11331f !important;
}

@media (max-width: 991.98px) {
    .hero-section {
        padding-top: 3.5rem;
    }

    .hero-title {
        line-height: 0.98;
    }

    .timeline-item {
        grid-template-columns: 4rem 1fr;
    }

    .gallery-masonry {
        columns: 2 16rem;
    }
}

@media (max-width: 575.98px) {
    .brand-tagline {
        display: none;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section-pad {
        padding: 4rem 0;
    }

    .gallery-masonry {
        columns: 1;
    }
}

/* Compact spacing overrides - make layout denser */
:root {
    --tdt-compact-scale: 0.78; /* multiplier for selective paddings */
}

.page-hero {
    padding: calc(4.5rem * var(--tdt-compact-scale)) 0 calc(2.5rem * var(--tdt-compact-scale));
}

.section-pad {
    padding: calc(3.6rem * var(--tdt-compact-scale)) 0; /* tighter than default */
}

.section-pad .section-heading,
.page-hero .section-heading {
    margin-bottom: calc(1.5rem * var(--tdt-compact-scale));
}

.news-card .card-body,
.program-card .card-body,
.gallery-tile figcaption,
.counter-card {
    padding: calc(1.25rem * var(--tdt-compact-scale));
}

.topbar-social-link {
    width: calc(1.95rem * 0.82);
    height: calc(1.95rem * 0.82);
    font-size: 0.9rem;
}

.program-icon {
    width: calc(3rem * 0.82);
    height: calc(3rem * 0.82);
    font-size: 1rem;
}

.timeline {
    gap: calc(1.25rem * 0.82);
}

.icon-list li {
    gap: calc(0.8rem * 0.82);
    margin-bottom: calc(0.8rem * 0.82);
}

.scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(3rem * 0.82);
    height: calc(3rem * 0.82);
}

@media (max-width: 575.98px) {
    .section-pad {
        padding: calc(3.2rem * var(--tdt-compact-scale)) 0;
    }
}