/* ======================================================================
   GOOGLE FONT (fonts only; no layout changes)
   - Loads Poppins in multiple weights.
   - Keep this import at the very top to avoid FOUT/FOIT issues.
   ====================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');


/* ======================================================================
      ROOT COLOR PALETTE — Lighter & Softer Tone
      - These CSS variables control brand colors & are reused throughout.
      - Adjust here to theme the entire page consistently.
      ====================================================================== */
:root {
    --primary: #1A486B;
    /* softened deep blue (headings/links) */
    --light: #2C6286;
    /* soft mid-blue tone (accents/headlines) */
    --soft: #5E8EA7;
    /* light teal blend (dividers/secondary) */
    --accent: #F4F7FA;
    /* very light soft white-blue (page bg) */
    --ink: #1A2E40;
    /* clean text ink (body copy) */
}

/* ======================================================================
      BASE STYLES
      - Normalize box-model, set font family, improve font rendering,
        and establish base page background and text color.
      ====================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--ink);
    background: var(--accent);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better keyboard focus visibility for interactive elements (a11y) */
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(26, 72, 107, 0.35);
    /* matches --primary hue */
    outline-offset: 2px;
    border-radius: 8px;
}


/* ======================================================================
      ABOUT WRAPPER (Gradient hero + content)
      - Outer container with soft animated background.
      - "about-inner" provides readable width & padding for content.
      ====================================================================== */
.about-wrap {
    width: 90%;
    background: #F4F7FA;
    /* fallback (solid) */
    background-size: 400% 400%;
    /* for animated gradient (if any) */
    animation: abg 16s ease-in-out infinite;
    margin: auto;
    border-radius: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Gradient animation keyframes
   - If you later switch to a gradient background-image,
     this animates the position for a breathing effect. */
@keyframes abg {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Disable the animation when the user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .about-wrap {
        animation: none !important;
    }
}

/* Wrapper for the hero image/carousel area */
.image-inner {
    max-width: 100%;
    /* span parent width */
    margin: 0 auto;
    /* padding optional; set in about-inner for consistent vertical rhythm */
}

/* Content container for About section */
.about-inner {
    max-width: 1200px;
    /* keeps line-length readable on large screens */
    margin: 0 auto;
    padding: 48px 20px;
}


/* ======================================================================
      HERO IMAGE SECTION
      - The hero container can hold a static banner or the carousel.
      - Fixed height on large screens; switches to auto on smaller screens.
      ====================================================================== */
.about-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    /* responsive height */
    min-height: 320px;
    /* safety floor on small screens */
    max-height: 700px;
    /* cap at desktop */
    margin: 0 auto 18px;
    position: relative;
    overflow: hidden;
    /* hide overflow when using cover */
    /* border-radius: 12px; */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Base image styling inside hero (covers non-carousel cases too) */
.about-hero img {
    width: 100%;
    height: auto;
    display: block;
    /* border-radius: 5px;  Keep commented to avoid double rounding with carousel */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.8s ease;
}

/* Gentle hover scale for desktop pointer devices */
@media (hover: hover) and (pointer: fine) {
    .about-hero img:hover {
        transform: scale(1.02);
    }
}

/* Slides layer */
.about-hero .slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Base image layout for carousel:
   - We fade slides by toggling opacity.
   - IMPORTANT FALLBACK: If JS hasn't added .is-active yet,
     we will show the FIRST image via CSS (see rule below). */
.about-hero .slides img {
    position: absolute;
    /* stack slides */
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity .5s ease, transform .8s ease;
    opacity: 0;
    /* hidden by default; .is-active shows it */
}

/* The currently shown slide (when JS toggles this class) */
.about-hero .slides img.is-active {
    opacity: 1;
}

/* ---------- CRITICAL FALLBACK (fix for "images not showing") ----------
   If JS hasn't run yet (or you don't add .is-active), at least show the
   FIRST image so users see a banner.
   This does NOT change your logic; it only provides a safe default.
------------------------------------------------------------------------ */
.about-hero .slides img:first-child {
    opacity: 1;
}

/* FIT MODES
   - Cover: fills entire card (may crop)
   - Contain: shows full image (might letterbox)
*/
/* .about-hero.fit-cover .slides img {
    object-fit: cover;
} */

.about-hero.fit-contain .slides img {
    object-fit: contain;
    background: #00000010;
}

/* Gentle hover scale on desktop pointer devices (cover only) */
@media (hover: hover) and (pointer: fine) {
    .about-hero.fit-cover .slides img.is-active:hover {
        transform: scale(1.02);
    }
}

/* Controls placed vertically centered over the card */
.about-hero .prev,
.about-hero .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s ease;
}

.about-hero .prev {
    left: 10px;
}

.about-hero .next {
    right: 10px;
}

.about-hero .prev:hover,
.about-hero .next:hover {
    background: rgba(0, 0, 0, .55);
}

/* Small screens: slightly taller hero */
@media (max-width: 576px) {
    .about-hero {
        aspect-ratio: 16 / 9;
        min-height: 240px;
    }
}

/* ======================================================================
      PAGE TITLES
      - Prominent About title; scales down at smaller breakpoints below.
      ====================================================================== */
.about-title {
    text-align: center;
    color: #1A486B;
    /* matches --primary, explicit for clarity */
    font-weight: 800;
    font-size: 42px;
    letter-spacing: 0.3px;
    line-height: 1.25;
    margin: 12px 0 18px;
}


/* ======================================================================
      CAROUSEL + BUTTONS
      - Generic carousel shell; JS handles translateX on .slides.
      - Buttons are positioned and responsive/tappable.
      ====================================================================== */

/* Ensure navbar sits above the carousel if overlapping */
.navbar {
    position: relative;
    z-index: 1060;
}

/* Establish stacking contexts for inner elements */
.about-wrap,
.about-inner,
.carousel {
    position: relative;
}

/* Make sure carousel buttons remain above images */
.about-wrap .carousel button {
    z-index: 1;
}

/* Carousel viewport */
.carousel {
    position: relative;
    overflow: hidden;
    /* border-radius: 16px;   Let slides handle rounding to avoid double rounding */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    max-width: 100%;
}

/* Horizontal strip of slides
   NOTE: For your hero, we also use absolute-positioned slides (above).
   This flex layout is compatible and does not interfere because the
   absolute slides are taken out of normal flow. */
.carousel .slides {
    display: flex;
    /* [img][img][img] laid out horizontally (generic carousels) */
    transition: transform 0.6s ease-in-out;
    width: 100%;
}

/* Each slide image takes full viewport width inside the strip
   (for the generic carousel case). For the hero stack, absolute rules apply. */
.carousel .slides img {
    width: 100%;
    flex-shrink: 0;
    /* border-radius: 16px; */
    /* soft rounding on slides themselves */
    /* TIP: If you ever set a fixed height to the carousel,
           you can pair images with: height: 100%; object-fit: cover; */
}

/* Prev/Next controls (large tap targets; accessible contrast) */
.carousel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 72, 107, 0.5);
    /* semi-opaque to show over images */
    border: none;
    color: #fff;
    font-size: 2rem;
    /* icon size */
    cursor: pointer;
    padding: 8px 14px;
    /* tap area */
    border-radius: 50%;
    z-index: 2;
    transition: background 0.3s ease;
    line-height: 1;
    /* avoid extra vertical space */
    /* Minimum hit area for accessibility on touch devices */
    min-width: 44px;
    min-height: 44px;
}

/* Hover/active feedback for pointer devices */
@media (hover: hover) and (pointer: fine) {
    .carousel button:hover {
        background: rgba(26, 72, 107, 0.75);
    }
}

/* Visible focus for keyboard users */
.carousel button:focus-visible {
    outline: 3px solid rgba(26, 72, 107, 0.35);
    outline-offset: 2px;
}

/* Button positions */
.carousel .prev {
    left: 15px;
}

.carousel .next {
    right: 15px;
}

/* Slightly reduce button size on very narrow screens for layout comfort */
@media (max-width: 400px) {
    .carousel button {
        font-size: 1.6rem;
        padding: 6px 10px;
    }
}


/* ======================================================================
      TEXT SECTIONS
      - .lead: highlighted intro paragraph.
      - .para: regular supporting paragraphs.
      - .center & .tagline: minor helpers.
      ====================================================================== */
.lead {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 1.08rem;
    font-weight: 500;
    line-height: 1.9rem;
    color: var(--ink);
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.center {
    text-align: center;
}

.tagline {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    color: var(--light);
    margin-top: 6px;
}

.para {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.9rem;
    color: var(--ink);
    margin-bottom: 12px;
    text-align: justify;
    /* improves block readability for long copy */
}


/* ======================================================================
      TEAM & CARDS — Section shells and headings
      - Mirrored container visuals for consistency with About block.
      ====================================================================== */
.team-wrap {
    width: 90%;
    background: #F4F7FA;
    /* matches About wrap */
    background-size: 400% 400%;
    animation: abg 16s ease-in-out infinite;
    margin: auto;
    border-radius: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Disable animated bg for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .team-wrap {
        animation: none !important;
    }
}

.team-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.section-title {
    text-align: center;
    color: var(--light);
    margin-bottom: 22px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.subhead {
    text-align: center;
    color: var(--soft);
    margin: 24px 0 14px;
    font-size: 24px;
    font-weight: 700;
}

/* Decorative gradient rule between groups */
.rule {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--soft), transparent);
    margin: 24px auto;
    width: 100%;
    max-width: 900px;
}


/* ======================================================================
      CARD GRID — Responsive grid layout
      - auto-fit with minmax ensures graceful wrapping across widths.
      ====================================================================== */
.card-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    justify-content: center;
    /* centers last row cards on wide screens */
}


/* ======================================================================
      CARD ELEMENTS — Container, image, text
      - Hover lift, soft shadow, and accessible link color changes.
      ====================================================================== */
.card {
    background: #ffffff;
    border: 1px solid #dce5eb;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px;
}

/* Hover/active lift for pointer devices only (prevents jump on touch) */
@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
    }
}

/* Image frame with aspect ratio guard for consistent card heights */
.card-img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 4 / 4.5;
    /* portrait-friendly */
    display: block;
    border-radius: 10px;
    overflow: hidden;
    margin: 6px auto 10px;
}

/* Ensure images fill their frame without distortion */
.card-img img,
.card figure.card-img img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    object-fit: contain;

    display: block;
}

/* Support for <figure class="card-img"> variant used in your markup */
figure.card-img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 4/4.5;
    margin: 6px auto 10px;
    border-radius: 10px;
    overflow: hidden;
}

.card-body {
    padding: 4px 8px 8px;
}

.card-name {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 4px 0 4px;
}

.card-name a {
    color: var(--primary);
    text-decoration: none;
}

.card-name a:hover {
    color: var(--soft);
    text-decoration: underline;
}

.card-role {
    color: #4f5b63;
    font-size: .9rem;
    font-weight: 500;
}


/* ======================================================================
      RESPONSIVE QUERIES
      - Scales typography, paddings, grid columns, and hero behavior.
      - Existing breakpoints preserved; added minor comfort tweaks.
      ====================================================================== */

/* Large tablets / small desktops and below */
@media (max-width: 1200px) {
    .about-title {
        font-size: 36px;
    }

    .about-inner {
        padding: 40px 18px;
    }

    /* Force a fixed 3-col grid at this range (overrides auto-fit) */
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets and below */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Allow hero height to grow with content/images for smaller screens */
    .about-hero {
        height: auto;
    }
}

/* Common tablets / large phones */
@media (max-width: 768px) {
    .about-title {
        font-size: 32px;
    }

    .lead,
    .para {
        font-size: .98rem;
        line-height: 1.75rem;
    }

    .about-inner {
        padding: 32px 16px;
    }
}

/* Phones */
@media (max-width: 576px) {
    .about-title {
        font-size: 28px;
    }

    .lead,
    .para {
        font-size: .95rem;
        line-height: 1.6rem;
        padding: 10px 12px;
    }

    .about-inner {
        padding: 28px 12px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    /* single column for narrow screens */


}

/* Extra-small phones / compact widths */
@media (max-width: 400px) {
    .about-title {
        font-size: 24px;
    }

    .lead,
    .para {
        font-size: .9rem;
    }

    .section-title {
        font-size: 26px;
    }

    .subhead {
        font-size: 20px;
    }
}

/* Optional: very large screens — slightly tighten max widths for readability */
@media (min-width: 1600px) {
    .about-inner {
        max-width: 1200px;
    }

    .team-inner {
        max-width: 1300px;
    }
}