/* ============================================================
   Keshav Smruti Pratishthan — Custom Design System
   Layered on top of Bootstrap 5. Full palette/typography/component
   system is finalised in Phase 2 (Design System) — this file
   establishes the architecture and CSS custom properties so later
   phases only need to fill in values, not restructure.
   ============================================================ */

/* Self-hosted (no external/CDN dependency, works offline on Hostinger)
   so Marathi text on the SITE uses the exact same font file as the
   certificate generator (includes/bhulabai-certificate.php reads these
   identical .ttf files via GD). Without this @font-face, "Mukta" below
   resolves to nothing and every browser silently falls back to
   whatever Devanagari font the visitor's OS happens to ship — which
   looks visibly different from the certificate, and was the original
   cause of the form/certificate font-mismatch complaint.

   Font: "Mukta" (Ek Type / Indian Type Foundry), SIL Open Font
   License 1.1 — free to bundle and redistribute (see
   assets/fonts/licenses/Mukta-OFL.txt). Chosen over the previously
   used Noto Sans Devanagari because it sits much closer, in both
   letterform style and stroke weight, to the client's original
   certificate artwork (typeset in a commercial, non-Unicode font
   called "Shree Dev 7" that can't legally be used here — see the file
   header of includes/bhulabai-certificate.php for the full story). */
@font-face {
    font-family: "Mukta";
    src: url("../fonts/Mukta-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Mukta";
    src: url("../fonts/Mukta-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* --- Colour tokens ---
       Primary and ink are sampled directly from the official logo artwork
       (wordmark orange and wordmark dark), not invented — see Phase 2 notes.
       The seven emblem figure colours are kept as a documented accent set
       for sparing decorative use (small icon accents, category tags) —
       never as large fills, per the brief's "avoid excessive colours"
       guidance. */
    --ksp-primary: #ff6600;      /* logo wordmark orange — exact sample */
    --ksp-primary-dark: #cc5200; /* darkened for hover states */
    --ksp-ink: #2b2a29;          /* logo wordmark dark — exact sample; primary text colour */
    --ksp-secondary: #1f2937;    /* deep neutral for dark sections (hero, footer) */
    --ksp-bg-light: #f9f7f4;
    --ksp-white: #ffffff;
    --ksp-muted: #6b7280;

    /* Emblem accent set — sampled from the logo's seven figures.
       Use for small highlights only (icon tints, category dots),
       never as dominant section colours. */
    --ksp-emblem-orange: #f06400;
    --ksp-emblem-red: #dc1414;
    --ksp-emblem-yellow: #f0dc00;
    --ksp-emblem-green: #008c3c;
    --ksp-emblem-navy: #282878;
    --ksp-emblem-pink: #c85088;
    --ksp-emblem-skyblue: #a0c8f0;

    /* --- Typography tokens --- */
    --ksp-font-display: "Georgia", "Noto Serif", serif; /* headline font — replace with licensed display font if the client has one */
    --ksp-font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ksp-font-devanagari: "Mukta", var(--ksp-font-body);

    /* --- Spacing / motion tokens --- */
    --ksp-radius: 0.5rem;
    --ksp-transition: 0.3s ease;
    --ksp-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ksp-font-body);
    color: var(--ksp-ink);
}

h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
    font-family: var(--ksp-font-display);
    font-weight: 700;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ksp-ink);
}

/* ---- Typography scale ----
   Fluid sizing via clamp() so headings scale smoothly between mobile and
   desktop instead of jumping at breakpoints — one rule covers all viewport
   widths. */
h1, .h1 { font-size: clamp(2rem, 1.6rem + 1.8vw, 3.25rem); line-height: 1.15; }
h2, .h2 { font-size: clamp(1.65rem, 1.4rem + 1.1vw, 2.5rem); line-height: 1.2; }
h3, .h3 { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.85rem); line-height: 1.3; }
h4, .h4 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); line-height: 1.35; }
h5, .h5 { font-size: 1.1rem; line-height: 1.4; font-weight: 600; }
h6, .h6 { font-size: 0.95rem; line-height: 1.4; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }

p {
    line-height: 1.7;
    color: var(--ksp-ink);
}

.lead {
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
    line-height: 1.6;
    color: var(--ksp-muted);
    font-weight: 400;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ksp-primary);
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-title.text-center {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

:lang(mr), .lang-mr {
    font-family: var(--ksp-font-devanagari);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.65rem 1.75rem;
    transition: transform var(--ksp-transition), box-shadow var(--ksp-transition),
                background-color var(--ksp-transition), color var(--ksp-transition),
                border-color var(--ksp-transition);
}

.btn-lg {
    padding: 0.85rem 2.25rem;
}

.btn-sm {
    padding: 0.4rem 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn:focus-visible {
    outline: 3px solid var(--ksp-primary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--ksp-primary);
    border-color: var(--ksp-primary);
    color: var(--ksp-white);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ksp-primary-dark);
    border-color: var(--ksp-primary-dark);
    color: var(--ksp-white);
    box-shadow: 0 10px 24px rgba(255, 102, 0, 0.28);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--ksp-primary);
    border-color: var(--ksp-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ksp-primary);
    border-color: var(--ksp-primary);
    color: var(--ksp-white);
    box-shadow: 0 10px 24px rgba(255, 102, 0, 0.22);
}


.btn-outline-light {
    background-color: transparent;
    color: var(--ksp-white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
    background-color: var(--ksp-white);
    border-color: var(--ksp-white);
    color: var(--ksp-ink);
}

/* ---- Navigation ----
   Transparent by default (sits over the dark hero/page-header band every
   page starts with) and transitions to solid white once scrolled — see
   initNavScrollState() in main.js, which toggles .is-scrolled. */
.site-header .navbar {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    background-color: transparent;
    transition: background-color var(--ksp-transition), box-shadow var(--ksp-transition), padding var(--ksp-transition);
}

.navbar.is-scrolled {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    background-color: var(--ksp-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar.is-scrolled .brand-logo {
    height: 43px;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--ksp-white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    position: relative;
    transition: color var(--ksp-transition);
}

.navbar.is-scrolled .nav-link {
    color: var(--ksp-ink);
    text-shadow: none;
}

/* Understated active/hover indicator instead of a full background fill —
   keeps the nav feeling light per the "premium, not flashy" direction. */
.navbar .nav-link::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.1rem;
    height: 2px;
    background-color: var(--ksp-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ksp-transition);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

/* Toggler icon: white lines over the transparent/dark state, dark lines
   once the nav goes solid white on scroll — Bootstrap resolves the icon
   from this CSS variable, so no JS class-swapping is needed. */
.navbar-toggler {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.is-scrolled .navbar-toggler {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2843, 42, 41, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menus: fade + slight slide instead of Bootstrap's instant show */
.dropdown-menu {
    border: none;
    border-radius: var(--ksp-radius);
    box-shadow: var(--ksp-shadow-soft);
    padding: 0.5rem;
    margin-top: 0.5rem !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    border-radius: calc(var(--ksp-radius) - 0.2rem);
    padding: 0.5rem 0.9rem;
    transition: background-color var(--ksp-transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--ksp-bg-light);
    color: var(--ksp-primary);
}

/* Mobile navigation panel */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--ksp-white);
        margin-top: 0.75rem;
        padding: 1rem 0.5rem;
        border-radius: var(--ksp-radius);
        box-shadow: var(--ksp-shadow-soft);
    }

    .navbar-collapse .nav-link {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        color: var(--ksp-ink) !important;
        text-shadow: none !important;
    }

    .navbar .dropdown-menu {
        box-shadow: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding-left: 0.75rem;
        background-color: var(--ksp-bg-light);
        border-radius: calc(var(--ksp-radius) - 0.15rem);
    }

    .navbar-nav .nav-item.ms-lg-2 {
        margin-top: 0.5rem;
        padding: 0 0.75rem;
    }

    .lang-switch {
        display: inline-block;
        margin: 0.5rem 0.75rem 0;
    }
}

.navbar-toggler {
    border: none;
    padding: 0.4rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.25);
}

/* ---- Logo ---- */
/* Clear space: padding keeps the logo from crowding the navbar edge/toggler.
   Height-constrained, width auto, so the image's native aspect ratio (632:200)
   is always preserved — never stretched or distorted. */
.navbar-brand {
    padding: 0.25rem 0.75rem 0.25rem 0;
    margin-right: 1rem;
}

.brand-logo {
    height: 53px;
    width: auto;
    display: block;
}

@media (max-width: 767.98px) {
    .brand-logo {
        height: 41px;
    }
}

/* Footer sits on a dark background; the official logo artwork includes dark
   wordmark text that isn't legible on dark. Rather than recolour the logo
   itself, it sits on a small light card so it renders correctly on both
   light and dark sections. */
.footer-logo-card {
    display: inline-flex;
    align-items: center;
    background-color: var(--ksp-white);
    border-radius: var(--ksp-radius);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.footer-logo-card img {
    height: 40px;
    width: auto;
    display: block;
}

/* Hero "brand moment" — same rationale as the footer card: the hero has a
   dark background and the official logo's wordmark is dark, so it sits on
   a light card rather than being recoloured. */
.hero-brand-card {
    display: inline-flex;
    align-items: center;
    background-color: var(--ksp-white);
    border-radius: var(--ksp-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--ksp-shadow-soft);
}

.hero-brand-moment {
    width: 280px;
    height: 88px;
    display: block;
}

.lang-switch {
    font-size: 0.85rem;
    border: 1px solid var(--ksp-primary);
    border-radius: 999px;
    padding: 0.25rem 0.75rem !important;
}

/* ---- Hero ----
   Structure: .hero-media (positioning context) > .hero-media-bg (poster
   image, and eventually <video>, absolutely positioned) + .hero-media-overlay
   (gradient for text contrast) + .hero-content-wrap (actual content, above
   both). See assets/js/main.js initHeroVideo() for the video-swap logic —
   inert until a real <video> element with working sources is present. */
.hero-media {
    position: relative;
    min-height: 100vh;
    min-height: 100svh; /* modern mobile-viewport-aware unit; ignored (falls back to the line above) on browsers that don't support it */
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--ksp-white);
    background-color: var(--ksp-secondary); /* shows briefly before the poster image paints */
}

.hero-media-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-media-poster,
.hero-media-video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Video starts invisible and only fades in once main.js confirms actual
   playback (the browser fired 'playing', not just that .play() was
   called) — so a slow-loading or failed video never hides the poster
   behind a black/blank frame. */
.hero-media-video {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-media-video.is-playing {
    opacity: 1;
}

.hero-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(15, 15, 20, 0.72) 0%, rgba(15, 15, 20, 0.45) 45%, rgba(15, 15, 20, 0.15) 75%),
                linear-gradient(180deg, rgba(15, 15, 20, 0.15) 0%, rgba(15, 15, 20, 0.55) 100%);
}

.hero-content-wrap {
    position: relative;
    z-index: 2;
    padding-top: 6rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ksp-white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-eyebrow .bi {
    color: var(--ksp-primary);
}

.hero-title {
    font-size: clamp(2.75rem, 2rem + 4.5vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--ksp-white);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    max-width: 20ch;
}

.hero-sub {
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
    max-width: 38rem;
    color: var(--ksp-white);
    opacity: 0.95;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--ksp-white);
    opacity: 0.8;
    font-size: 1.5rem;
    animation: ksp-scroll-bounce 2s ease-in-out infinite;
}

@keyframes ksp-scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

@media (max-width: 767.98px) {
    .hero-scroll-cue { display: none; }
}

/* ---- Stats / counters ---- */
.stats-band {
    background-color: var(--ksp-bg-light);
}

.stats-band .row > div {
    position: relative;
}

.stats-band .row > div:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 767.98px) {
    .stats-band .row > div:nth-child(odd)::after {
        display: none;
    }
}

.stat-number {
    display: block;
    font-family: var(--ksp-font-display);
    font-size: clamp(2.25rem, 1.8rem + 2vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ksp-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    color: var(--ksp-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

/* ---- Editorial project blocks (alternating image/text) ----
   Used for Featured Projects where a real photograph is available —
   large image, generous whitespace, alternating left/right, rather than
   a uniform card grid. See brief: "visual storytelling, not a database". */
.editorial-block {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.editorial-block .editorial-media,
.editorial-block .editorial-text {
    flex: 1 1 0;
    min-width: 0;
}

.editorial-block:nth-of-type(even) .editorial-media {
    order: 2;
}

.editorial-media {
    border-radius: var(--ksp-radius);
    overflow: hidden;
    box-shadow: var(--ksp-shadow-soft);
    aspect-ratio: 4 / 3;
}

.editorial-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.editorial-block:hover .editorial-media img {
    transform: scale(2.2);
}

.editorial-text .category-badge {
    margin-bottom: 1rem;
}

.editorial-index {
    display: block;
    font-family: var(--ksp-font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ksp-primary);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.editorial-text h3 {
    font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.9rem);
    margin-bottom: 0.75rem;
}

.editorial-text p {
    color: var(--ksp-muted);
}

@media (max-width: 767.98px) {
    .editorial-block {
        flex-direction: column;
        gap: 1.5rem;
    }
    .editorial-block:nth-of-type(even) .editorial-media {
        order: 0;
    }
}

/* ---- Photo mosaic (visual spotlight, e.g. Rural Development / water
   conservation) — an asymmetric grid rather than a uniform row, so a
   set of related photographs reads as one visual story. ---- */
.photo-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 160px);
    gap: 0.75rem;
}

.photo-mosaic a {
    display: block;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    position: relative;
}

.photo-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-mosaic a:hover img {
    transform: scale(2.2);
}

.photo-mosaic .mosaic-large {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 767.98px) {
    .photo-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 130px);
    }
    .photo-mosaic .mosaic-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ---- Team / Leadership ---- */
.team-card {
    position: relative;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: var(--ksp-shadow-soft);
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: transform 0.5s ease;
}

.team-card:hover img {
    transform: scale(2.2);
}

.team-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.75rem 1rem 1rem;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0) 0%, rgba(20, 20, 26, 0.88) 100%);
    color: var(--ksp-white);
    text-align: center;
}

.team-card-caption .team-name {
    display: block;
    font-family: var(--ksp-font-display);
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: 0.15rem;
}

.team-card-caption .team-role {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

/* ---- Lightbox gallery ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 160px;
    gap: 0.75rem;
}

.gallery-grid a {
    display: block;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: transform 0.5s ease;
}

.gallery-grid a:hover img {
    transform: scale(2.2);
}

@media (max-width: 767.98px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 130px;
    }
}

/* Homepage gallery teaser only: a FIXED set of exactly 6 photos (see
   pages/home.php). Kept deliberately uniform — no large/wide special
   tiles — after an earlier attempt at a masonry treatment here forced
   at least one photo into an aspect ratio its actual composition
   couldn't support (a portrait-oriented shot with its subject
   concentrated in one corner, stretched into an ultra-wide banner,
   cropping out the people entirely). A plain uniform grid (inherited
   from .gallery-grid above) has no such risk for any photo, and reads
   as genuinely consistent — this just adjusts the column count so 6
   photos fill two clean rows of 3 rather than an uneven 4-per-row. */
@media (min-width: 576px) {
    .gallery-grid--home {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ksp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: rgba(10, 10, 12, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ksp-lightbox.is-open {
    display: flex;
}

.ksp-lightbox img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ksp-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--ksp-white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ksp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Cards (projects/news/events/testimonials) ---- */
.ksp-card {
    border: none;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    background-color: var(--ksp-white);
    box-shadow: var(--ksp-shadow-soft);
    transition: transform var(--ksp-transition), box-shadow var(--ksp-transition);
    height: 100%;
}

.ksp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.ksp-card .card-img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

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

.ksp-card:hover .card-img-wrap img {
    transform: scale(2.2);
}

.ksp-card .card-body {
    padding: 1.5rem;
}

/* Text-forward variant: used where no real photo exists yet, instead of
   a fake gradient standing in for a photo (per brief: never disguise
   missing content as decoration). A left accent bar + icon replace the
   image area entirely. */
.ksp-card--text {
    border-left: 4px solid var(--ksp-primary);
    display: flex;
    flex-direction: column;
}

.ksp-card--text .card-body {
    padding: 1.75rem 1.5rem;
}

.ksp-card--text .card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--ksp-bg-light);
    color: var(--ksp-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.ksp-card .card-title {
    font-family: var(--ksp-font-display);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Category badges — one of the seven emblem colours, used only as a small
   accent chip, never as a large fill (keeps the "avoid excessive colour"
   direction while still tying back to the brand mark). */
.category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    color: var(--ksp-white);
    margin-bottom: 0.75rem;
}

.category-badge.cat-education     { background-color: var(--ksp-emblem-green); }
.category-badge.cat-healthcare    { background-color: var(--ksp-emblem-red); }
.category-badge.cat-social        { background-color: var(--ksp-emblem-navy); }
.category-badge.cat-rural         { background-color: var(--ksp-emblem-orange); }
.category-badge.cat-skill         { background-color: var(--ksp-emblem-pink); }

/* ---- Areas of Work ---- */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 1.25rem;
}

.areas-grid .area-card-wrap:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 991.98px) {
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .areas-grid .area-card-wrap:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 575.98px) {
    .areas-grid {
        grid-template-columns: 1fr;
    }
    .areas-grid .area-card-wrap:first-child {
        grid-column: span 1;
    }
}

.area-card {
    text-align: left;
    padding: 2rem;
    border-radius: var(--ksp-radius);
    background-color: var(--ksp-white);
    box-shadow: var(--ksp-shadow-soft);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform var(--ksp-transition), box-shadow var(--ksp-transition);
}

.areas-grid .area-card-wrap:first-child .area-card {
    background: linear-gradient(150deg, var(--ksp-secondary), #33415c);
    color: var(--ksp-white);
    justify-content: flex-end;
    min-height: 280px;
}

.areas-grid .area-card-wrap:first-child .area-card h3,
.areas-grid .area-card-wrap:first-child .area-card p {
    color: var(--ksp-white);
}

.areas-grid .area-card-wrap:first-child .area-card p {
    opacity: 0.85;
}

.areas-grid .area-card-wrap:first-child .area-icon {
    background-color: rgba(255, 255, 255, 0.15) !important;
    margin: 0 0 1.25rem;
}

.area-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.area-card .area-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    color: var(--ksp-white);
}

.area-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.area-card p {
    color: var(--ksp-muted);
    font-size: 0.92rem;
    margin-bottom: 0;
}

.area-icon.bg-education  { background-color: var(--ksp-emblem-green); }
.area-icon.bg-healthcare { background-color: var(--ksp-emblem-red); }
.area-icon.bg-social     { background-color: var(--ksp-emblem-navy); }
.area-icon.bg-rural      { background-color: var(--ksp-emblem-orange); }
.area-icon.bg-skill      { background-color: var(--ksp-emblem-pink); }

/* ---- Our Journey (timeline) ---- */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 2px;
    background-color: rgba(255, 102, 0, 0.25);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.25rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--ksp-primary);
    box-shadow: 0 0 0 5px rgba(255, 102, 0, 0.15), 0 0 0 2px var(--ksp-white);
}

.timeline-year {
    display: inline-block;
    font-family: var(--ksp-font-display);
    font-weight: 700;
    color: var(--ksp-primary);
    font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.65rem);
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
}

.timeline-item p {
    margin-bottom: 0;
    color: var(--ksp-muted);
}

/* ---- Pending-content placeholder ----
   Used for homepage sections whose real content (testimonials, events,
   news, gallery photography) hasn't been supplied yet, per the Phase 0
   audit — shown honestly rather than filled with invented material. */
.pending-content {
    border: 1px dashed rgba(107, 114, 128, 0.35);
    border-radius: var(--ksp-radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background-color: var(--ksp-bg-light);
    color: var(--ksp-muted);
}

.pending-content .bi {
    font-size: 1.75rem;
    color: var(--ksp-primary);
    margin-bottom: 0.75rem;
    display: inline-block;
}

.pending-content p {
    margin-bottom: 0;
    max-width: 30rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Get Involved CTA cards ---- */
.involve-card {
    display: block;
    text-decoration: none;
    padding: 2rem 1.5rem;
    border-radius: var(--ksp-radius);
    background-color: var(--ksp-white);
    box-shadow: var(--ksp-shadow-soft);
    height: 100%;
    transition: transform var(--ksp-transition), box-shadow var(--ksp-transition);
    border-top: 3px solid var(--ksp-primary);
}

.involve-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.involve-card .bi {
    font-size: 1.75rem;
    color: var(--ksp-primary);
    margin-bottom: 1rem;
    display: inline-block;
}

.involve-card h3 {
    font-size: 1.15rem;
    color: var(--ksp-ink);
    margin-bottom: 0.5rem;
}

.involve-card p {
    color: var(--ksp-muted);
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* ---- Scroll-reveal animation classes (driven by assets/js/main.js) ---- */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Image reveal/mask effect — a clip-path wipe used for large feature images
   (e.g. hero photography, project story imagery). Triggered by adding
   .is-revealed via IntersectionObserver in main.js. Used sparingly, not on
   every image, per the "premium not flashy" direction. */
.img-reveal {
    position: relative;
    overflow: hidden;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    /* Safety net: reveals automatically after 2.5s regardless of whether
       the JS-driven IntersectionObserver ever adds .is-revealed. Content
       should never depend entirely on JS succeeding to become visible —
       if the observer fires first (the normal case), this has no visible
       effect since the content is already shown. */
    animation: ksp-auto-reveal 0.01s ease 2.5s forwards;
}

.img-reveal.is-revealed {
    clip-path: inset(0 0 0 0);
}

@keyframes ksp-auto-reveal {
    to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
    .img-reveal {
        clip-path: inset(0 0 0 0);
        transition: none;
    }
}

/* Subtle parallax — a slow, capped background-position drift on scroll,
   applied via JS (initParallax) to elements with .parallax-bg. Deliberately
   understated: brief asks for "subtle... where appropriate", not a heavy
   effect. Skipped for prefers-reduced-motion and disabled on touch/mobile
   where scroll-linked transforms tend to feel janky. */
.parallax-bg {
    background-position: center;
    background-size: cover;
    will-change: background-position;
}

/* ---- About section: page header + sub-navigation ---- */
.page-header {
    background: linear-gradient(135deg, var(--ksp-secondary), #2d3a4f);
    color: var(--ksp-white);
    padding: 7rem 0 3rem;
    text-align: center;
}

.page-header .eyebrow {
    color: var(--ksp-emblem-skyblue);
}

.page-header h1 {
    color: var(--ksp-white);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 40rem;
    margin: 0 auto;
}

.about-subnav-wrap {
    background-color: var(--ksp-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.about-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.about-subnav::-webkit-scrollbar {
    display: none;
}

.about-subnav-link {
    flex-shrink: 0;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ksp-muted);
    text-decoration: none;
    transition: background-color var(--ksp-transition), color var(--ksp-transition);
    white-space: nowrap;
}

.about-subnav-link:hover {
    background-color: var(--ksp-bg-light);
    color: var(--ksp-ink);
}

.about-subnav-link.active {
    background-color: var(--ksp-primary);
    color: var(--ksp-white);
}

/* Quote block — used for the President's message / founder's words,
   real quotes sourced from the organisation's own site content. */
.quote-block {
    position: relative;
    border-left: 4px solid var(--ksp-primary);
    padding-left: 2rem;
    margin: 2rem 0;
    font-family: var(--ksp-font-display);
    font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.75rem);
    line-height: 1.35;
    font-style: italic;
    color: var(--ksp-ink);
}

.quote-block::before {
    content: '\201C';
    position: absolute;
    left: 0.5rem;
    top: -1.75rem;
    font-family: var(--ksp-font-display);
    font-size: 5rem;
    font-style: normal;
    color: var(--ksp-primary);
    opacity: 0.18;
    line-height: 1;
}

.quote-block cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--ksp-font-body);
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ksp-muted);
}

/* Focus-area / value chips (About Us, Vision & Mission pages) */
.value-chip {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--ksp-radius);
    background-color: var(--ksp-bg-light);
    height: 100%;
}

.value-chip .bi {
    font-size: 1.5rem;
    color: var(--ksp-primary);
    flex-shrink: 0;
}

.value-chip h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.value-chip p {
    font-size: 0.9rem;
    color: var(--ksp-muted);
    margin-bottom: 0;
}

/* Discrepancy note — used sparingly, for flagging a conflict between
   source materials rather than silently picking one version. */
.source-note {
    font-size: 0.85rem;
    color: var(--ksp-muted);
    background-color: var(--ksp-bg-light);
    border-radius: var(--ksp-radius);
    padding: 0.85rem 1.1rem;
    margin-top: 1rem;
}

/* ---- Footer ---- */
.site-footer {
    background-color: var(--ksp-secondary);
    color: rgba(255, 255, 255, 0.85);
}

.footer-heading {
    color: var(--ksp-white);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ksp-primary);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    margin-right: 0.5rem;
    transition: background-color var(--ksp-transition), color var(--ksp-transition);
}

.footer-social a:hover {
    background-color: var(--ksp-primary);
    color: var(--ksp-white);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.15);
}

.social-links a {
    color: var(--ksp-white);
    font-size: 1.25rem;
}

/* ---- WhatsApp floating CTA ---- */
.whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--ksp-shadow-soft);
    z-index: 1050;
}

/* ---- Utility ---- */

/* Responsive layout system: consistent vertical rhythm between sections,
   fluid via clamp() rather than fixed breakpoint jumps. Bootstrap's py-5
   utility tops out at 3rem — this adds a larger option for desktop-scale
   sections while staying proportionate on mobile. */
.section-py {
    padding-top: clamp(3rem, 2.2rem + 3vw, 6rem);
    padding-bottom: clamp(3rem, 2.2rem + 3vw, 6rem);
}

/* Any content image without a more specific rule stays fluid and never
   overflows its container or distorts. */
img {
    max-width: 100%;
    height: auto;
}

/* Images with explicit width/height attributes (logo, icons) are exempt —
   those are sized deliberately and should keep their set dimensions. */
.brand-logo, .footer-logo-card img, .hero-brand-moment {
    max-width: none;
}

/* ============================================================
   Phase 10.5 — Second Pass: dedicated storytelling & CTA sections
   ============================================================ */

/* ---- About/Introduction: offset editorial composition ---- */
.intro-section {
    position: relative;
}

.intro-media {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    box-shadow: var(--ksp-shadow-soft);
    max-width: 26rem;
}

.intro-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.intro-badge-card {
    position: absolute;
    bottom: -1.75rem;
    right: -1.5rem;
    background: var(--ksp-white);
    border-radius: var(--ksp-radius);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    padding: 1.25rem 1.75rem;
    text-align: center;
    min-width: 10rem;
}

.intro-badge-card .badge-value {
    display: block;
    font-family: var(--ksp-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ksp-primary);
    line-height: 1;
}

.intro-badge-card .badge-label {
    display: block;
    font-size: 0.75rem;
    color: var(--ksp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

.intro-media-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    padding-bottom: 1.75rem;
}

@media (min-width: 992px) {
    .intro-media-wrap {
        justify-content: flex-end;
        padding-right: 2rem;
    }
}

/* ---- Storytelling blocks: Blood Centre / Samtol / Sevavasti / Eye Care.
   Each uses a genuinely different composition so the five key projects
   don't read as repeats of one template. ---- */

/* Blood Centre — full-bleed photo with a stat panel overlapping its edge */
.story-bleed {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 22rem;
    border-radius: var(--ksp-radius);
    overflow: hidden;
}

.story-bleed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* blood-donation-camp-4-wide.jpg is the real photo padded with a
       plain dark panel on its left (same source photo used, unedited,
       on its right ~55%) specifically so this works: the source photo
       on its own is portrait-ish and already matches this section's
       16:9 box width exactly under object-fit:cover, leaving zero
       horizontal slack for object-position to shift — a plain
       left/right object-position (or even zooming in with transform)
       could only crop the photo's edges, not actually move the people
       in it clear of the text panel pinned to the left
       (.story-bleed-content { left:0 }). With the wider padded canvas,
       "right" below really does select the real photo (not a zoomed
       crop of it), fully clear of the text, while the pad's dark tone
       sits unnoticed under the scrim. */
    object-position: right center;
}

.story-bleed-scrim {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 15, 20, 0.82) 0%, rgba(15, 15, 20, 0.35) 55%, rgba(15, 15, 20, 0) 80%);
}

.story-bleed-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    max-width: 32rem;
    color: var(--ksp-white);
}

.story-bleed-content .story-stat {
    font-family: var(--ksp-font-display);
    font-size: clamp(2.75rem, 2.2rem + 2.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--ksp-white);
    letter-spacing: -0.02em;
}

.story-bleed-content .story-stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.story-bleed-content p {
    color: var(--ksp-white);
    opacity: 0.9;
}

/* Samtol — offset floating card overlapping the bottom-left of the image */
.story-offset {
    position: relative;
    padding-bottom: 3rem;
}

.story-offset-media {
    aspect-ratio: 5 / 4;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    box-shadow: var(--ksp-shadow-soft);
}

.story-offset-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.story-offset-card {
    background: var(--ksp-white);
    border-radius: var(--ksp-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    padding: 2rem;
    position: relative;
    margin-top: -3rem;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    z-index: 2;
}

@media (min-width: 768px) {
    .story-offset-card {
        margin-top: 0;
        margin-left: -3rem;
        margin-right: 0;
        max-width: 22rem;
    }
}

/* Sevavasti — mirrored offset (card overlaps top-right instead).
   NOTE: in the markup both classes land on the SAME element
   (class="story-offset-card story-offset--reverse"), not on a
   wrapper around a separate .story-offset-card — so this must be a
   compound selector (no space), not a descendant selector. The
   previous descendant-selector version (`.story-offset--reverse
   .story-offset-card`) never matched anything, which is why
   Sevavasti's card was silently falling back to the base
   .story-offset-card rule's margin-left: -3rem (meant for Samtol,
   where the image is on the left) instead of being pulled toward its
   own image on the right — the card sat flush left with a large gap
   before the image. */
.story-offset-card.story-offset--reverse {
    margin-left: 1.5rem;
}

@media (min-width: 768px) {
    .story-offset-card.story-offset--reverse {
        /* margin-left must be auto, not 0: with width:auto capped by
           max-width, a block box only honours ONE literal side-margin
           to absorb the column's leftover width — if both sides are
           given fixed values, the browser silently discards the
           trailing one. Making margin-left auto hands the leftover
           space to that side, so the literal margin-right: -3rem is
           honoured and actually pulls the card over against the
           image, mirroring how margin-left: -3rem works for the
           non-reversed Samtol card. */
        margin-left: auto;
        margin-right: -3rem;
    }
}

/* Eye Care — statistics-led composition, no photo (none supplied) */
.story-stat-panel {
    position: relative;
    background: linear-gradient(160deg, var(--ksp-secondary), #33415c);
    color: var(--ksp-white);
    border-radius: var(--ksp-radius);
    padding: clamp(2.5rem, 2rem + 2vw, 4rem);
    overflow: hidden;
}

.story-stat-panel::before {
    content: '';
    position: absolute;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -8rem;
    right: -6rem;
}

.story-stat-panel .story-main-stat {
    font-family: var(--ksp-font-display);
    font-size: clamp(3rem, 2.3rem + 3vw, 5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ksp-white);
    position: relative;
}

.story-stat-panel .story-sub-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
    position: relative;
}

.story-stat-panel .story-sub-stats strong {
    display: block;
    font-family: var(--ksp-font-display);
    font-size: 1.5rem;
    color: var(--ksp-white);
}

.story-stat-panel .story-sub-stats span {
    font-size: 0.8rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.story-stat-panel p {
    color: var(--ksp-white);
    opacity: 0.8;
}

/* ---- Areas of Work: image-led mosaic (replaces icon-card grid) ----
   Grid math deliberately fills a whole 4x2 block with zero remainder:
   one tile-lg (2 cols x 2 rows = 4 cells) + four equal tile-sm (1x1 = 4
   cells) = 8 cells exactly, so nothing is ever left half-empty
   regardless of dense-packing order. (A previous version mixed in a
   tile-md, which summed to 9 cells against an 8-cell frame and left a
   visible empty gap — fixed here.) */
.areas-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 170px;
    gap: 1rem;
}

.areas-mosaic .area-tile {
    position: relative;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    color: var(--ksp-white);
}

.areas-mosaic .area-tile.tile-lg {
    grid-column: span 2;
    grid-row: span 2;
}

.areas-mosaic .area-tile.tile-sm {
    grid-column: span 1;
    grid-row: span 1;
}

/* Real photographs of people: anchor the crop to the top of the frame,
   not the centre, so heads are never cut off by object-fit: cover. */
.areas-mosaic .area-tile img {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.areas-mosaic .area-tile:hover img {
    transform: scale(2.2);
}

.areas-mosaic .area-tile-scrim {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
}

.areas-mosaic .area-tile-content {
    position: relative;
    padding: 1.25rem;
    z-index: 1;
}

.areas-mosaic .area-tile-content h3 {
    color: var(--ksp-white);
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.areas-mosaic .area-tile-content p {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    margin-bottom: 0;
    display: none;
}

.areas-mosaic .tile-lg .area-tile-content p {
    display: block;
}

/* No-photo tiles (Education, Skill Development) stay honest — a plain
   ink-coloured card with an icon, never a fake photographic gradient. */
.areas-mosaic .area-tile.tile-flat {
    background-color: var(--ksp-ink);
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
}

.areas-mosaic .tile-flat .area-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ksp-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 991.98px) {
    .areas-mosaic { grid-template-columns: repeat(2, 1fr); }
    .areas-mosaic .area-tile.tile-lg { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 575.98px) {
    .areas-mosaic { grid-template-columns: 1fr; grid-auto-rows: 160px; }
    .areas-mosaic .area-tile.tile-lg,
    .areas-mosaic .area-tile.tile-sm { grid-column: span 1; }
    .areas-mosaic .area-tile.tile-lg { grid-row: span 2; }
}

/* ---- Leadership preview: editorial, not a directory grid ---- */
.leadership-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 2rem;
}

.leadership-preview .leader-primary {
    flex: 0 0 auto;
    text-align: center;
}

.leadership-preview .leader-primary .leader-portrait {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--ksp-shadow-soft);
    margin: 0 auto 1rem;
    border: 4px solid var(--ksp-white);
}

.leadership-preview .leader-secondary-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 0 1 auto;
    justify-content: center;
}

.leadership-preview .leader-secondary-row .leader-portrait {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--ksp-shadow-soft);
    margin: 0 auto 0.6rem;
}

.leadership-preview .leader-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.leadership-preview .leader-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.leadership-preview .leader-secondary-row .leader-name {
    font-size: 0.85rem;
}

.leadership-preview .leader-role {
    display: block;
    font-size: 0.78rem;
    color: var(--ksp-muted);
}

/* ---- Get Involved: single powerful CTA, not four equal cards ---- */
.involve-hero {
    position: relative;
    border-radius: var(--ksp-radius);
    overflow: hidden;
    min-height: 24rem;
    display: flex;
    align-items: center;
}

.involve-hero img {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.involve-hero-scrim {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    background: linear-gradient(100deg, rgba(15,15,20,0.85) 0%, rgba(15,15,20,0.55) 60%, rgba(15,15,20,0.3) 100%);
}

.involve-hero-content {
    position: relative;
    z-index: 1;
    padding: clamp(2rem, 1.5rem + 2vw, 4rem);
    color: var(--ksp-white);
    max-width: 40rem;
}

.involve-hero-content h2 {
    color: var(--ksp-white);
    font-size: clamp(1.9rem, 1.5rem + 2vw, 3rem);
}

.involve-hero-content p {
    color: rgba(255,255,255,0.9);
}

.involve-secondary-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.involve-secondary-links a {
    color: var(--ksp-white);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 0.15rem;
    transition: border-color var(--ksp-transition);
}

.involve-secondary-links a:hover {
    border-color: var(--ksp-white);
}

/* ---- Footer refinements: premium spacing/typography ---- */
.site-footer {
    padding-top: 1rem;
}

.footer-cta-band {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-cta-band h3 {
    color: var(--ksp-white);
    font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
    margin-bottom: 0;
    max-width: 28rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    max-width: 22rem;
    margin-top: 1rem;
}

/* ---- Show-complete-photo utility (bug fix round 3) ----
   For specific photos where cropping would cut people out of frame
   (e.g. a wide group shot with a reclining donor in the foreground and
   a standing team behind it — no single crop rectangle keeps everyone
   without cutting either the group's heads or the donor's body). Add
   this class alongside the existing container class to switch that one
   instance from object-fit: cover to contain, with a dark letterbox
   fill so the un-cropped photo still reads as an intentional
   composition rather than a broken image. */
.img-contain-wrap {
    background-color: var(--ksp-ink);
}

.img-contain-wrap img {
    object-fit: contain !important;
    object-position: center !important;
}

/* ---- Leadership preview: centre the whole cluster (bug fix round 3) ----
   Previously the secondary-officer row flex-grew to fill all remaining
   width, which left no room for centering and visually pinned the whole
   leadership block to the left half of the section with a large empty
   gap on the right. Fixed at the source (leader-secondary-row above no
   longer flex-grows) plus centering the outer container here, so the
   whole compact cluster sits centered regardless of how many secondary
   portraits are shown. */
.leadership-preview {
    justify-content: center;
}

/* ---- Rich project body text (format_rich_text() output) ----
   Lightweight structure for long-form project descriptions: real
   headings and bullet lists instead of one undifferentiated block of
   text. Used on project detail pages. */
.rich-body-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ksp-ink);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.rich-body-list {
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
}

.rich-body-list li {
    margin-bottom: 0.5rem;
    color: var(--ksp-muted);
}

.rich-body-list li::marker {
    color: var(--ksp-primary);
}

/* ---- Project impact stat strip (established_year/beneficiaries/etc.
   companion — a small band of extra verified numbers for projects with
   richer data, e.g. Samagra Krushi Gramin Vikas Prakalp) ---- */
.project-impact-strip {
    background-color: var(--ksp-bg-light);
    border-radius: var(--ksp-radius);
    padding: 2rem;
    margin: 2rem 0;
}

.project-impact-strip .row > div {
    text-align: center;
}

.project-impact-strip .stat-number {
    font-size: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
}

/* ---- Project-specific photo strip (gallery images tied to a project
   via gallery_albums.related_project_id) ---- */
.project-photo-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 2rem 0;
}

.project-photo-strip a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--ksp-radius);
    overflow: hidden;
}

.project-photo-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.project-photo-strip a:hover img {
    transform: scale(2.2);
}

@media (max-width: 575.98px) {
    .project-photo-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Projects nav dropdown: scrollable when the project list grows
   long, so it never overflows off the bottom of the viewport ---- */
.dropdown-menu-scrollable {
    max-height: 70vh;
    overflow-y: auto;
}

/* ---- Projects nav dropdown: parent/sub-project grouping ---- */
.dropdown-item-parent {
    font-weight: 700;
    color: var(--ksp-ink);
}

.dropdown-item-sub {
    padding-left: 2rem;
    font-size: 0.92rem;
    color: var(--ksp-muted);
}

.dropdown-item-sub::before {
    content: '– ';
}

/* =========================================================================
   Avinashi Seva Puraskar showcase  (includes/puraskar-showcase.php)
   Default = plain stacked list (mobile, no JS, reduced motion).
   .pk-enhanced (set by assets/js/puraskar.js, desktop + motion allowed)
   turns it into "notepad pages": year | info | photo, pinned while the
   pages are turned by scrolling.
   ========================================================================= */
.pk {
    --pk-top: 63px;                 /* height of the fixed navbar when scrolled */
    --pk-paper: #fffaf1;
    --pk-ink: #2b2a29;
    --pk-dark: #1f2937;
    background: var(--ksp-bg-light);
    padding-top: 4rem;
    scroll-margin-top: 70px;
}
.pk-head { text-align: center; max-width: 46rem; padding-bottom: 2.5rem; }
.pk-intro { color: var(--ksp-muted); font-size: 1.05rem; margin: .75rem auto 0; }
.pk-hint { color: var(--ksp-primary-dark); font-weight: 600; margin-top: 1rem; }

/* ---- Plain list (default) ---- */
.pk-stage { max-width: 1140px; margin: 0 auto; padding: 0 1rem 3rem; }
.pk-year-group { margin-bottom: 3rem; }
.pk-year-page {
    background: var(--pk-dark); color: #fff; border-radius: .75rem .75rem 0 0;
    padding: .9rem 1.25rem;
}
.pk-year { display: flex; align-items: baseline; gap: .1rem; font-family: var(--ksp-font-display); }
.pk-year-a { font-size: 2.25rem; font-weight: 700; color: var(--ksp-primary); line-height: 1; }
.pk-year-b { font-size: 1.5rem; font-weight: 600; color: rgba(255,255,255,.85); }
.pk-award { display: flex; flex-direction: column; background: var(--pk-paper); border: 1px solid rgba(0,0,0,.08); border-top: 0; }
.pk-award:last-child { border-radius: 0 0 .75rem .75rem; overflow: hidden; }
.pk-photo-page { order: -1; }
.pk-photo-page img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.pk-info-scroll { padding: 1.5rem 1.25rem 1.75rem; }

/* ---- shared typography of the info page ---- */
.pk-kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ksp-primary-dark); font-weight: 700; margin: 0 0 .75rem; }
.pk-name { font-size: clamp(1.5rem, 2.2vw, 2.1rem); line-height: 1.2; margin: 0 0 .5rem; color: var(--pk-ink); }
.pk-place { color: var(--ksp-muted); font-weight: 600; margin: 0 0 1rem; }
.pk-place i { color: var(--ksp-primary); }
.pk-tag { display: inline-block; background: rgba(255,102,0,.1); color: var(--ksp-primary-dark); font-weight: 600; font-size: .9rem; padding: .3rem .75rem; border-radius: 2rem; margin: 0 0 1.5rem; }
.pk-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ksp-muted); margin: 0 0 .4rem; font-family: var(--ksp-font-body); font-weight: 700; }
.pk-work { font-size: 1.15rem; line-height: 1.7; font-weight: 600; margin: 0 0 1rem; }
.pk-story { font-size: 1.05rem; line-height: 1.8; color: #444; margin: 0 0 1.75rem; }
.pk-guests { border-top: 1px dashed rgba(0,0,0,.2); padding-top: 1.25rem; margin: 0; }
.pk-guests dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ksp-muted); margin-top: .9rem; font-weight: 700; }
.pk-guests dt:first-child { margin-top: 0; }
.pk-guests dd { margin: .15rem 0 0; line-height: 1.5; }

/* reduced-motion desktop: simple two-column rows */
@media (min-width: 992px) {
    .pk:not(.pk-enhanced) .pk-award { flex-direction: row; }
    .pk:not(.pk-enhanced) .pk-info-page { flex: 0 0 50%; }
    .pk:not(.pk-enhanced) .pk-photo-page { flex: 0 0 50%; order: 0; }
    .pk:not(.pk-enhanced) .pk-photo-page img { height: 100%; aspect-ratio: auto; }
}

/* ---- Enhanced: pinned notepad pages ---- */
.pk-enhanced .pk-hint { display: block !important; }
.pk-enhanced .pk-stage {
    position: sticky; top: var(--pk-top);
    height: calc(100vh - var(--pk-top)); min-height: 520px;
    max-width: none; margin: 0; padding: 0;
    overflow: hidden; background: var(--pk-dark);
}
.pk-enhanced .pk-year-group,
.pk-enhanced .pk-award { display: contents; }
.pk-enhanced .pk-page {
    position: absolute; top: 0; height: 100%;
    margin: 0; border: 0; border-radius: 0;
    transform-origin: 50% 0; will-change: transform;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}
.pk-enhanced .pk-year-page { left: 0; width: 15%; display: flex; align-items: center; justify-content: center; padding: 0; background: var(--pk-dark); }
.pk-enhanced .pk-info-page { left: 15%; width: 35%; background: var(--pk-paper); overflow: hidden; }
.pk-enhanced .pk-photo-page { left: 50%; width: 50%; background: #111; order: 0; }
.pk-enhanced .pk-photo-page img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 40%; }
.pk-enhanced .pk-year { flex-direction: column; align-items: center; gap: .15rem; text-align: center; }
.pk-enhanced .pk-year-a { font-size: clamp(2.2rem, 4.2vw, 4.4rem); }
.pk-enhanced .pk-year-b { font-size: clamp(1.4rem, 2.4vw, 2.6rem); }
.pk-enhanced .pk-year::after { content: ""; width: 2.5rem; height: 3px; background: var(--ksp-primary); margin-top: 1rem; border-radius: 2px; }
.pk-enhanced .pk-info-scroll {
    /* everything inside is in em, so the text block scales with the screen width */
    font-size: clamp(15px, 1.3vw, 25px);
    padding: 3.2em 2.4em 4.5em; will-change: transform;
}
.pk-enhanced .pk-kicker { font-size: .78em; margin-bottom: 1em; }
.pk-enhanced .pk-name { font-size: 2.1em; margin-bottom: .35em; }
.pk-enhanced .pk-place { font-size: 1.05em; margin-bottom: 1.1em; }
.pk-enhanced .pk-tag { font-size: .9em; margin-bottom: 2em; }
.pk-enhanced .pk-label { font-size: .75em; margin-bottom: .6em; }
.pk-enhanced .pk-work { font-size: 1.2em; line-height: 1.75; margin-bottom: 1.1em; }
.pk-enhanced .pk-story { font-size: 1.05em; line-height: 1.9; margin-bottom: 2.2em; }
.pk-enhanced .pk-guests { padding-top: 1.6em; font-size: 1em; }
.pk-enhanced .pk-guests dt { font-size: .74em; margin-top: 1.2em; }
.pk-enhanced .pk-guests dd { margin-top: .25em; line-height: 1.6; }
/* notepad binding strip + bottom fade (text scrolls under both) */
.pk-enhanced .pk-info-page::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; z-index: 2;
    background:
        radial-gradient(circle at 12px 11px, rgba(0,0,0,.28) 0 3px, transparent 3.5px) 0 0 / 24px 22px repeat-x,
        var(--pk-paper);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.pk-enhanced .pk-info-page::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: 2; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,250,241,0), var(--pk-paper) 85%);
}
.pk-enhanced .pk-year-page::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px;
    background: radial-gradient(circle at 12px 11px, rgba(255,255,255,.28) 0 3px, transparent 3.5px) 0 0 / 24px 22px repeat-x;
}
.pk-enhanced .pk-photo-page.is-far { display: none; }
.pk-enhanced .pk-page.is-lifting { box-shadow: 0 28px 60px rgba(0,0,0,.45); }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .pk { --pk-top: 84px; }   /* navbar wraps to two lines at this width */
}

/* ---- Project detail: pinned right-hand sidebar (Support button + At a Glance) ---- */
@media (min-width: 992px) {
    .project-aside {
        position: sticky;
        top: 6.5rem;   /* clears the fixed navbar */
    }
}

/* ---- Awards & Recognition page ---- */
.award-feature {
    display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
    padding: 2.5rem 0; border-top: 1px solid rgba(0,0,0,.08);
}
.award-feature:first-of-type { border-top: 0; }
@media (min-width: 992px) {
    .award-feature { grid-template-columns: 5fr 6fr; gap: 4rem; padding: 3.5rem 0; }
    .award-feature--reverse .award-feature__media { order: 2; }
}
.award-frame {
    display: block; background: linear-gradient(145deg, #fffaf1, #f3ece0);
    padding: 1.25rem; border-radius: 1rem; border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 45px rgba(31,41,55,.14); text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
}
.award-frame:hover { transform: translateY(-4px); box-shadow: 0 24px 55px rgba(31,41,55,.2); }
.award-frame img { max-width: 100%; max-height: 520px; width: auto; height: auto; display: inline-block; border-radius: .4rem; }
.award-year {
    background: var(--ksp-primary); color: #fff; font-weight: 700; letter-spacing: .04em;
    padding: .3rem .9rem; border-radius: 2rem; font-size: .9rem;
}
.award-level { color: var(--ksp-muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.award-title { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.2; margin: 0 0 1rem; }
.award-giver { color: var(--ksp-primary-dark); font-weight: 600; margin: 0 0 1.25rem; }
.award-text { font-size: 1.1rem; line-height: 1.85; color: #444; margin: 0; padding-left: 1.1rem; border-left: 3px solid var(--ksp-primary); }

/* ---- Inspiration page: Smruti Shraddhanjali ---- */
.tribute-section {
    background: radial-gradient(circle at 20% 10%, #2c3b52 0, var(--ksp-secondary, #1f2937) 60%);
    padding: 5rem 0; color: #fff;
}
.tribute-dates { font-family: var(--ksp-font-display); font-size: 1.35rem; color: var(--ksp-primary); margin: .25rem 0 1.25rem; }
.tribute-lead { color: rgba(255,255,255,.85); font-size: 1.1rem; line-height: 1.8; }
.tribute-hint { color: rgba(255,255,255,.6); font-size: .9rem; }
.tribute-frame {
    display: inline-block; padding: .75rem; background: #fff; border-radius: .5rem;
    box-shadow: 0 30px 70px rgba(0,0,0,.5); max-width: 100%;
}
.tribute-frame img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: .25rem; }

/* =========================================================================
   Our Journey (includes/journey-showcase.php + assets/js/journey.js)
   Default = plain stacked list. .oj-enhanced (desktop, motion allowed) pins
   the section: heading + year stay, projects change one at a time.
   ========================================================================= */
.oj { background: var(--ksp-cream, #f6f1e7); padding: 4rem 0; position: relative; }
.oj-head { text-align: center; margin-bottom: 2.5rem; }
.oj-head .section-title { margin-bottom: 0; }
.oj-fireworks { display: none; }
.oj-years { display: none; }
.oj-nav { display: none; }
.oj-slide { margin-bottom: 3.5rem; }
.oj-slide-year { font-family: var(--ksp-font-display); font-size: 3rem; line-height: 1; color: var(--ksp-primary); margin-bottom: 1rem; }
.oj-media { border-radius: var(--ksp-radius); overflow: hidden; box-shadow: var(--ksp-shadow-soft); background: #fff; line-height: 0; }
.oj-media img { display: block; width: 100%; height: auto; }   /* never cropped */
.oj-media--logo { padding: 2rem; display: flex; align-items: center; justify-content: center; }
.oj-media--logo img { max-width: 420px; }
.oj-card { background: #fff; border-radius: var(--ksp-radius); box-shadow: 0 20px 50px rgba(0,0,0,.12); padding: 1.75rem; position: relative; margin: -2rem 1.25rem 0; z-index: 2; }
.oj-card .h4 { margin: .25rem 0 .75rem; }
.oj-stat { margin: 1rem 0; }
.oj-stat .stat-number { font-family: var(--ksp-font-display); font-size: 1.9rem; color: var(--ksp-primary); }
.oj-stat .stat-label { color: var(--ksp-text-muted, #6b7280); font-size: .9rem; }

@media (min-width: 992px) {
  .oj-enhanced { padding: 0; }
  .oj-enhanced .oj-track { position: relative; }
  .oj-enhanced .oj-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; padding-top: 4.5rem; box-sizing: border-box; }
  .oj-enhanced .oj-fireworks { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
  .oj-enhanced .oj-inner { position: relative; z-index: 2; }
  .oj-enhanced .oj-head { margin-bottom: 1.25rem; }
  .oj-enhanced .oj-body { display: grid; grid-template-columns: 17rem 1fr 3.5rem; align-items: center; gap: 1.5rem; min-height: 0; }
  .oj-enhanced .oj-years { display: block; position: relative; height: 8rem; }
  .oj-enhanced .oj-yr { position: absolute; inset: 0; display: flex; align-items: center; font-family: var(--ksp-font-display); font-size: 6.5rem; line-height: 1; color: var(--ksp-primary); opacity: 0; transition: opacity .5s ease; }
  .oj-enhanced .oj-yr.is-on { opacity: 1; }
  .oj-enhanced .oj-slides { position: relative; height: calc(100vh - 17rem); min-height: 22rem; }
  .oj-enhanced .oj-slide { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
  .oj-enhanced .oj-slide.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease; }
  .oj-enhanced .oj-slide-year { display: none; }
  .oj-enhanced .oj-media { flex: 0 1 auto; max-width: 62%; }
  .oj-enhanced .oj-media img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 20rem); }
  .oj-enhanced .oj-media--logo img { width: 420px; max-height: none; }
  .oj-enhanced .oj-card { flex: 0 0 22rem; max-width: 22rem; margin: 0 0 0 -3rem; padding: 1.75rem; }
  .oj-enhanced .oj-media--logo + .oj-card { margin-left: 1.5rem; }
  .oj-enhanced .oj-slide--rev { flex-direction: row-reverse; }
  .oj-enhanced .oj-slide--rev .oj-card { margin: 0 -3rem 0 0; }
  .oj-enhanced .oj-nav { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
  .oj-enhanced .oj-counter { font-size: .8rem; letter-spacing: .05em; color: var(--ksp-text-muted, #6b7280); writing-mode: vertical-rl; }
  .oj-enhanced .oj-dots { display: flex; flex-direction: column; gap: .4rem; }
  .oj-enhanced .oj-dot { width: .55rem; height: .55rem; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.2); cursor: pointer; transition: transform .3s, background .3s; }
  .oj-enhanced .oj-dot.is-on { background: var(--ksp-primary); transform: scale(1.5); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .oj-slide { display: flex; align-items: center; flex-wrap: wrap; }
  .oj-slide-year { flex: 0 0 100%; }
  .oj-media { flex: 0 1 60%; }
  .oj-slide .oj-card { flex: 0 0 22rem; margin: 0 0 0 -3rem; }
  .oj-slide--rev { flex-direction: row-reverse; }
  .oj-slide--rev .oj-card { margin: 0 -3rem 0 0; }
}

/* ---- Mobile overflow guards (sideways-scroll fixes) ---- */
@media (max-width: 767.98px) {
  .story-bleed { aspect-ratio: auto; min-height: 24rem; max-width: 100%; }
  .story-bleed img { max-width: 100%; }
}
@media (max-width: 991.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }
@media (max-width: 575.98px) { .intro-badge-card { right: 0; } }

/* ---- Home intro photo: landscape, shown whole (never cropped) ---- */
.intro-media.intro-media--photo { aspect-ratio: auto; max-width: none; width: 100%; }
.intro-media.intro-media--photo img { height: auto; object-fit: initial; display: block; }

/* ---- Gallery: Leadership & Team albums show each portrait whole ---- */
.gallery-grid.gallery-grid--whole { grid-auto-rows: 280px; }
.gallery-grid.gallery-grid--whole a { background: #f1ede4; display: flex; align-items: center; justify-content: center; }
.gallery-grid.gallery-grid--whole img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.gallery-grid.gallery-grid--whole a:hover img { transform: scale(1.04); }

/* ---- Documentation page ---- */
.docs-pan { margin: 1rem 0 0; color: var(--ksp-text-muted, #6b7280); }
.docs-pan strong { font-family: var(--ksp-font-display); color: var(--ksp-primary); letter-spacing: .06em; margin-left: .35rem; }
.docs-group { font-family: var(--ksp-font-display); font-size: 1.5rem; margin-bottom: 1.25rem; padding-bottom: .6rem; border-bottom: 2px solid var(--ksp-primary); display: inline-block; }
.doc-card { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: var(--ksp-radius); box-shadow: var(--ksp-shadow-soft); overflow: hidden; display: flex; flex-direction: column; }
.doc-thumb { position: relative; display: block; background: #eee9dd; padding: 1rem 1rem 0; height: 15rem; overflow: hidden; }
.doc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: .25rem .25rem 0 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform .35s ease; }
.doc-thumb:hover img { transform: translateY(-4px); }
.doc-badge { position: absolute; top: .75rem; right: .75rem; background: var(--ksp-primary); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 2rem; }
.doc-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.doc-body .btn { align-self: flex-start; margin-top: auto; }
.doc-date { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ksp-primary); font-weight: 600; }
.doc-title { font-family: var(--ksp-font-display); font-size: 1.2rem; margin: 0; }
.doc-text { font-size: .92rem; color: var(--ksp-text-muted, #6b7280); margin: .25rem 0 1rem; }

/* ---- Donate: bank card ---- */
.bank-card { max-width: 30rem; background: #fbf8f1; border: 1px solid rgba(0,0,0,.08); border-radius: var(--ksp-radius); padding: 1.5rem 1.5rem 1.25rem; }
.bank-card__title { font-family: var(--ksp-font-display); font-size: 1.25rem; margin: 0 0 1rem; color: var(--ksp-primary); }
.bank-card__list { margin: 0; }
.bank-card__row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.bank-card__row dt { font-weight: 500; color: var(--ksp-text-muted, #6b7280); margin: 0; }
.bank-card__row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.bank-card__hint { margin: 1rem 0 0; font-size: .85rem; color: var(--ksp-text-muted, #6b7280); }
.bank-copy { border: 0; background: transparent; color: var(--ksp-primary); padding: 0 .25rem; cursor: pointer; }
.bank-copy.is-copied i::before { content: "\f26b"; } /* bi-check2 */

/* ---- Contact: map ---- */
.contact-map { margin-top: 1.25rem; border-radius: var(--ksp-radius); overflow: hidden; box-shadow: var(--ksp-shadow-soft); aspect-ratio: 4 / 3; background: #eee; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Mobile polish (round 5) ---- */
/* Menu panel: never taller than the screen, scrolls inside itself */
@media (max-width: 991.98px) {
  .navbar-collapse { max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .navbar .dropdown-menu, .dropdown-menu-scrollable { max-height: none; overflow: visible; }
  .navbar .dropdown-item { white-space: normal; color: var(--ksp-ink); }
  .navbar-collapse .nav-link::after { display: none; }
  .navbar-brand { margin-right: .25rem; }
  .navbar-collapse { flex-basis: 100%; }
  /* Language button beside the hamburger — always visible */
  .lang-switch--mobile { display: inline-block; margin: 0; font-weight: 600; white-space: nowrap;
    color: var(--ksp-white); background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.7); text-shadow: none; }
  .navbar.is-scrolled .lang-switch--mobile { color: var(--ksp-primary); background: transparent; border-color: var(--ksp-primary); }
}
@media (min-width: 992px) { .lang-switch--mobile { display: none !important; } }

/* Blood Centre card: stack photo above the text on phones */
@media (max-width: 767.98px) {
  .story-bleed { display: flex; flex-direction: column; background: #1b1b20; aspect-ratio: auto; min-height: 0; }
  .story-bleed img { position: static; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; width: 100%; display: block; }
  .story-bleed picture { display: block; }
  .story-bleed-scrim { display: none; }
  .story-bleed-content { position: static; max-width: none; padding: 1.5rem 1.25rem 1.75rem; justify-content: flex-start; }
  .story-bleed-content .section-title { font-size: 1.6rem; }
  .story-bleed-content .story-stat { font-size: 2.75rem; }
  .story-bleed-content p { line-height: 1.6; font-size: .98rem; }
}
@media (max-width: 991.98px) {
  .navbar .dropdown-menu { display: none; visibility: visible; margin-top: 0 !important; }
  .navbar .dropdown-menu.show { display: block; }
}

/* ---- Footer credit (WhennEx) ---- */
.footer-credit { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; opacity: .95; }
.footer-credit a { display: inline-flex; background: #fff; padding: .3rem .7rem; border-radius: .5rem; transition: transform .2s ease; }
.footer-credit a:hover { transform: translateY(-2px); }
.footer-credit img { height: 28px; width: auto; display: block; }
.contact-social-link { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ksp-primary); color: #fff; font-size: 1.1rem; transition: transform .2s ease, opacity .2s ease; }
.contact-social-link:hover { transform: translateY(-2px); opacity: .9; color: #fff; }

/* ---- Uniform content cards (events / news / press) ---- */
.ksp-card--uniform { display: flex; flex-direction: column; }
.ksp-card--uniform .card-img-wrap { display: block; aspect-ratio: 16 / 10; background: var(--ksp-bg-light, #f4efe6); flex: 0 0 auto; }
.ksp-card--uniform .card-img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.6rem; color: var(--ksp-primary); }
.ksp-card--uniform:hover .card-img-wrap img { transform: scale(1.05); }
.ksp-card--uniform .card-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.ksp-card--uniform .card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; margin-top: .6rem; }
.ksp-card--uniform .card-title a { color: inherit; text-decoration: none; }
.ksp-card--uniform .card-title a:hover { color: var(--ksp-primary); }
.ksp-card--uniform .card-excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.ksp-card--uniform .card-more { margin-top: auto; align-self: flex-start; }
/* Gentle image hover everywhere (was an extreme zoom) */
.ksp-card:hover .card-img-wrap img { transform: scale(1.06); }

/* ---- Event / article detail pages ---- */
.detail-hero { margin: 0 0 1.5rem; border-radius: var(--ksp-radius); overflow: hidden; background: #f1ede4; }
.detail-hero img { display: block; width: 100%; max-height: 520px; object-fit: contain; margin: 0 auto; }
.detail-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0 0 1.5rem; padding: .9rem 1.1rem; background: var(--ksp-bg-light, #f7f3ea); border-radius: .6rem; }
.detail-facts i { color: var(--ksp-primary); margin-right: .35rem; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.detail-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: .5rem; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.detail-gallery a:hover img { transform: scale(1.06); }

/* Generic long-text clamp with Read more toggle (see main.js) */
.js-clamp{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.js-clamp.is-open{display:block;-webkit-line-clamp:unset}
.js-clamp-toggle{background:none;border:0;padding:0;margin:-.5rem 0 .75rem;color:var(--ksp-primary);font-weight:600;font-size:.9rem;cursor:pointer}

/* ================= Keshav Smruti Seva Sanstha Samuh ================= */
.div-social      { --div: #282878; --div-dark: #1b1b57; }
.div-educational { --div: #008c3c; --div-dark: #00622a; }
.div-financial   { --div: #cc5200; --div-dark: #8f3900; }
.div-medical     { --div: #b81212; --div-dark: #7e0c0c; }
.category-badge.cat-samuh-social      { background-color: #282878; }
.category-badge.cat-samuh-educational { background-color: #008c3c; }
.category-badge.cat-samuh-financial   { background-color: #cc5200; }
.category-badge.cat-samuh-medical     { background-color: #b81212; }

.samuh-hero { padding-bottom: 3.5rem; }
.samuh-ring { display: block; margin: 0 auto 1rem; width: 132px; height: 132px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0,0,0,.25)); }
.samuh-motto { font-family: var(--ksp-font-devanagari); font-size: 1.35rem; color: #ffd8a8 !important; letter-spacing: .02em; margin-bottom: .75rem !important; }

.samuh-figures { background: var(--ksp-bg-light); padding: 1.75rem 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.samuh-figure strong { display: block; font-family: var(--ksp-font-display); font-size: 1.9rem; line-height: 1.1; color: var(--ksp-primary-dark); }
.samuh-figure span { display: block; font-size: .85rem; color: var(--ksp-muted); margin-top: .25rem; }
.samuh-figures--entity { background: #fff; }
.samuh-figures--entity .samuh-figure strong { color: var(--div, var(--ksp-primary-dark)); font-size: 1.55rem; overflow-wrap: anywhere; }

.division-card { display: block; height: 100%; padding: 2rem 1.75rem; border-radius: .75rem; background: #fff; border: 1px solid rgba(0,0,0,.08); border-top: 6px solid var(--div); text-decoration: none; color: var(--ksp-ink); box-shadow: 0 2px 10px rgba(0,0,0,.04); transition: transform .25s ease, box-shadow .25s ease; }
.division-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.1); color: var(--ksp-ink); }
.division-card h3 { font-size: 1.3rem; margin: .9rem 0 .5rem; color: var(--div); }
.division-card p { color: var(--ksp-muted); margin-bottom: 1rem; }
.division-meta { font-weight: 600; font-size: .9rem; color: var(--div); }
.division-icon { display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--div); color: #fff; font-size: 1.4rem; }
.division-icon--lg { width: 4rem; height: 4rem; font-size: 1.8rem; margin-bottom: 1rem; background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.55); }

.division-header { background: linear-gradient(135deg, var(--div-dark), var(--div)); }
.division-header .eyebrow { color: #fff; }
.samuh-crumbs { font-size: .85rem; margin-bottom: 1rem; color: rgba(255,255,255,.8); }
.samuh-crumbs a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.entity-logo { display: block; max-width: min(22rem, 90%); max-height: 5.5rem; width: auto; height: auto; margin: 0 auto 1rem; background: #fff; border-radius: .5rem; padding: .4rem .8rem; }
.entity-est { display: inline-block; margin-top: .9rem; padding: .3rem .9rem; border-radius: 2rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45); font-size: .85rem; color: #fff; }

.entity-hero { display: block; border-radius: .75rem; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.14); }
.entity-hero img { width: 100%; height: auto; display: block; }

.highlight-card { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .6rem; overflow: hidden; display: flex; flex-direction: column; }
.highlight-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }
.highlight-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.highlight-body { padding: 1rem 1.1rem 1.1rem; }
.highlight-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255,102,0,.12); color: var(--ksp-primary-dark); margin-bottom: .6rem; font-size: 1.15rem; }
.highlight-body h3 { margin-bottom: .4rem; }

.samuh-timeline { list-style: none; margin: 0 auto; padding: 0 0 0 1.5rem; max-width: 56rem; border-left: 3px solid var(--div, var(--ksp-primary)); }
.samuh-timeline li { position: relative; margin-bottom: 1.75rem; }
.samuh-timeline li::before { content: ""; position: absolute; left: -2.02rem; top: .35rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; border: 3px solid var(--div, var(--ksp-primary)); }
.tl-year { display: inline-block; margin-bottom: .4rem; padding: .15rem .7rem; border-radius: 2rem; background: var(--div, var(--ksp-primary)); color: #fff; font-size: .8rem; font-weight: 600; }
.tl-card { display: flex; gap: 1rem; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .6rem; overflow: hidden; }
.tl-img { flex: 0 0 11rem; max-width: 40%; background: #eee; }
.tl-img img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 7rem; }
.tl-text { padding: .9rem 1rem .9rem 0; }
.tl-card:not(:has(.tl-img)) .tl-text { padding-left: 1rem; }
.tl-text h3 { margin-bottom: .35rem; }
@media (max-width: 575.98px) {
    .tl-card { flex-direction: column; gap: 0; }
    .tl-img { flex: none; max-width: 100%; aspect-ratio: 16 / 9; }
    .tl-text { padding: .9rem 1rem; }
}

.facts-table { border: 1px solid rgba(0,0,0,.1); border-radius: .6rem; overflow: hidden; background: #fff; }
.facts-table h3 { margin: 0; padding: .75rem 1rem; background: var(--ksp-bg-light); border-bottom: 1px solid rgba(0,0,0,.08); }
.facts-table td { padding: .5rem 1rem; }

.samuh-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .6rem; }
.samuh-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: .45rem; background: #eee; }
.samuh-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.samuh-gallery a:hover img { transform: scale(1.05); }

.needs-box { border: 2px dashed var(--ksp-primary); border-radius: .6rem; padding: 1.1rem 1.2rem; background: #fff8f2; }
.needs-box h3 .bi { color: var(--ksp-emblem-red); margin-right: .25rem; }
