/* =============================================================================
   Pragati Welfare Foundation – site-wide UI/UX layer (2026-11)
   Style: "Accessible & Ethical" (ui-ux-pro-max) on top of the existing brand:
   sunflower yellow + warm cream + charcoal, Poppins, Gloria Hallelujah accents.

   Loaded LAST in <head>. Pages keep their own inline <style> blocks; rules here are
   prefixed with `body` so they win on specificity without rewriting every page.
   Note: <html> is 62.5% (1rem = 10px) – all rem values below are in that scale.
   ============================================================================= */

:root {
    /* Brand */
    --pwf-yellow: #FDD831;
    --pwf-yellow-soft: #FFF3B0;
    --pwf-yellow-deep: #E8BF00;
    --pwf-ink: #171717;          /* headings, text on yellow (14:1 on yellow) */
    --pwf-text: #2B2B2B;         /* body text (13.6:1 on cream)               */
    --pwf-muted: #575757;        /* secondary text (7:1 on cream)             */
    --pwf-cream: #FFFEF9;
    --pwf-cream-2: #FFF9DF;
    --pwf-card: #FFFFFF;
    --pwf-border: #E8E6DE;
    --pwf-focus: #1B5FD1;        /* focus ring – visible on yellow, cream, white and dark */
    --pwf-danger: #B42318;
    --pwf-success: #146C2E;

    /* Type scale (1rem = 10px) */
    --pwf-fs-body: 1.6rem;
    --pwf-fs-small: 1.4rem;
    --pwf-lh-body: 1.7;

    /* Spacing / shape */
    --pwf-radius: 14px;
    --pwf-radius-pill: 999px;
    --pwf-shadow-sm: 0 1px 2px rgba(23, 23, 23, .06), 0 2px 8px rgba(23, 23, 23, .06);
    --pwf-shadow-md: 0 6px 24px rgba(23, 23, 23, .10);
    --pwf-ease: cubic-bezier(.2, .7, .2, 1);

    /* Bootstrap 5.3 hooks (Bootstrap assumes 1rem = 16px) */
    --bs-body-font-size: var(--pwf-fs-body);
    --bs-body-line-height: var(--pwf-lh-body);
    --bs-body-color: var(--pwf-text);
    --bs-body-bg: var(--pwf-cream);
}

/* ---------------------------------------------------------------- Base type */
body {
    font-family: poppinsRegular, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: var(--pwf-fs-body);
    line-height: var(--pwf-lh-body);
    color: var(--pwf-text);
    background-color: var(--pwf-cream);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body h1, body h2, body h3, body h4 {
    color: var(--pwf-ink);
    line-height: 1.25;
    text-wrap: balance;
}

body p, body li {
    text-wrap: pretty;
}

/* Justified text leaves "rivers" of white space on phones – left-align long copy */
body p, body li, body .blogDetailContent, body .blogDetailContent * {
    text-align: left;
}
body .text-center, body .text-center p, body p.text-center { text-align: center; }

/* Readable measure for long-form pages */
body .blogDetailContent,
body .privacyPolicyContent,
body .termsConditionContent {
    max-width: 72ch;
}

/* Handwritten accent words (Better Future, Someone Smiles, You, …).
   Yellow text on cream is ~1.3:1 – unreadable. Keep the brand yellow as a
   highlighter stroke behind dark text instead (14:1). */
body .homeHeroSpecHead,
body .helpChildSpcHead,
body .homeSec2SpcHead,
body .impactSectionSpcHead,
body .aboutUsVideoSectionSpcHead,
body .blogsMainSpcHead,
body .qrSectionSpcHead,
body .ourimpactHeroSpcHead {
    font-family: gloria, "Gloria Hallelujah", cursive;
    color: var(--pwf-ink);
    background-image: linear-gradient(transparent 58%, var(--pwf-yellow) 58%, var(--pwf-yellow) 92%, transparent 92%);
    background-repeat: no-repeat;
    padding: 0 .15em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* ------------------------------------------------------------ Accessibility */
.pwf-skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    padding: 12px 18px;
    background: var(--pwf-ink);
    color: #fff;
    font-family: poppinsMedium, sans-serif;
    font-size: 1.5rem;
    border-radius: 10px;
    transition: top .15s var(--pwf-ease);
}
.pwf-skip-link:focus { top: 12px; color: #fff; }

body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body [tabindex]:focus-visible,
body .splide__arrow:focus-visible,
body .splide__pagination__page:focus-visible {
    outline: 3px solid var(--pwf-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none;
}

body a { color: inherit; }
body a, body button, body [role="button"], body label[for], body .splide__arrow { cursor: pointer; }

/* Screen-reader-only helper (Bootstrap's .visually-hidden also works) */
.pwf-sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------------ Buttons */
body .themeBtn,
body .pragatiThemeBtn,
body .mainHeaderDonateBtn {
    min-height: 44px;
    padding: 10px 24px !important;
    gap: 8px;
    font-family: poppinsMedium, sans-serif;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--pwf-ink) !important;
    background-color: var(--pwf-yellow) !important;
    border: 2px solid var(--pwf-yellow) !important;
    border-radius: var(--pwf-radius-pill);
    box-shadow: 0 2px 0 var(--pwf-yellow-deep);
    transition: transform .18s var(--pwf-ease), box-shadow .18s var(--pwf-ease), background-color .18s var(--pwf-ease);
}
body .themeBtn .fa-heart { margin-right: 0; }
body .themeBtn:hover,
body .pragatiThemeBtn:hover,
body .mainHeaderDonateBtn:hover {
    color: var(--pwf-ink) !important;
    background-color: #FFE15A !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 191, 0, .35);
}
body .themeBtn:active,
body .pragatiThemeBtn:active { transform: translateY(1px); box-shadow: none; }
body .themeBtn:disabled,
body .themeBtn.disabled { opacity: .6; cursor: not-allowed; transform: none; }

@media (max-width: 576px) {
    body .themeBtn { padding: 10px 20px !important; font-size: 1.5rem; }
}

/* ------------------------------------------------------------------- Header */
body .mainHeaderBg {
    font-size: 1.5rem;
    box-shadow: 0 1px 0 var(--pwf-border), 0 6px 18px rgba(23, 23, 23, .06);
}
body .topHeader { font-size: 1.4rem; }
body .topHeader a { display: inline-flex; align-items: center; min-height: 32px; }
body .topHeaderSocial a {
    color: #C9C9C9;
    font-size: 1.5rem;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
body .topHeaderSocial a:hover { color: #fff; background: rgba(255, 255, 255, .12); }

body .navbar-nav .nav-link {
    position: relative;
    font-family: poppinsMedium, sans-serif;
    font-size: 1.5rem;
    color: var(--pwf-text) !important;
    padding: 10px 12px !important;
    min-height: 44px;
    display: flex; align-items: center;
    border-radius: 10px;
    transition: color .15s var(--pwf-ease), background-color .15s var(--pwf-ease);
}
body .navbar-nav .nav-link:hover { color: var(--pwf-ink) !important; background: var(--pwf-cream-2); }
/* Active page: dark text + yellow underline (yellow text on white was 1.3:1) */
body .navbar-nav .nav-link.active,
body .navbar-nav .nav-link.show {
    color: var(--pwf-ink) !important;
    font-weight: normal !important;
    font-family: poppinsBold, sans-serif;
}
body .navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: 4px;
    height: 3px;
    border-radius: 3px;
    background: var(--pwf-yellow);
}
body .navbar-toggler {
    min-width: 44px; min-height: 44px;
    padding: 6px !important;
    border-radius: 10px;
}
body .navbar-toggler:focus { box-shadow: none; }

/* Mobile off-canvas menu: big, tappable rows */
@media (max-width: 991.98px) {
    body .offcanvas { width: min(86vw, 360px) !important; background: var(--pwf-cream); }
    body .offcanvas-header { border-bottom: 1px solid var(--pwf-border); padding: 18px 20px; }
    body .offcanvas-title { font-family: poppinsBold, sans-serif; font-size: 1.8rem; color: var(--pwf-ink); }
    body .offcanvas-body { padding: 12px 12px 24px; }
    body .offcanvas .navbar-nav .nav-link { font-size: 1.7rem; padding: 14px 16px !important; min-height: 52px; }
    body .offcanvas .navbar-nav .nav-link.active { background: var(--pwf-yellow-soft); }
    body .offcanvas .navbar-nav .nav-link.active::after { display: none; }
    body .offcanvas .btn-close { width: 44px; height: 44px; padding: 0; background-size: 14px; }
}

/* ---------------------------------------------------------- Forms (shared) */
body .donationDetailForm__field,
body .designDonationInputFeild,
body .form-control,
body .form-select {
    font-size: 1.6rem !important;        /* 16px: no iOS zoom-on-focus */
    font-family: poppinsRegular, sans-serif;
    color: var(--pwf-ink);
    min-height: 48px;
}
body .donationDetailForm__field {
    padding: 14px 0 8px !important;
    border-bottom: 2px solid #BDBAB0 !important;
    transition: border-color .15s var(--pwf-ease);
}
body .donationDetailForm__field:hover { border-bottom-color: #8E8A7E !important; }
body .donationDetailForm__field:focus { border-bottom-color: var(--pwf-ink) !important; }
body .donationDetailForm__field:focus-visible { outline: none !important; box-shadow: 0 2px 0 0 var(--pwf-ink); }
body .donationDetailForm__label { font-size: 1.4rem !important; color: var(--pwf-muted) !important; }
body .donationDetailForm__field:placeholder-shown ~ .donationDetailForm__label { font-size: 1.6rem !important; }
body .donationDetailForm__field:focus ~ .donationDetailForm__label { color: var(--pwf-ink) !important; }
body .donationDetailForm__field:user-invalid { border-bottom-color: var(--pwf-danger) !important; }
body .formRequredAstrik { color: var(--pwf-danger); }
body textarea.donationDetailForm__field { min-height: 110px; line-height: 1.6; }
body .form-control { border-radius: 10px; border-color: #CFCBBF; }
body .form-control:focus { border-color: var(--pwf-ink); box-shadow: 0 0 0 3px rgba(253, 216, 49, .55); }

/* Form alerts (includes/formAlerts) */
body .alert { font-size: 1.5rem; border-radius: 12px; }

/* ------------------------------------------------------- Carousels (Splide) */
body .splide__arrow {
    width: 44px !important; height: 44px !important;
    background: #fff !important;
    opacity: 1 !important;
    box-shadow: var(--pwf-shadow-sm);
    border: 1px solid var(--pwf-border) !important;
}
body .splide__arrow svg { width: 14px; height: 14px; fill: var(--pwf-ink); }
body .splide__arrow:hover:not(:disabled) { background: var(--pwf-yellow) !important; }
body .splide__arrow:disabled { opacity: .35 !important; }
/* Pagination dots: 12px visual, 32px tap area */
body .splide__pagination__page {
    width: 12px !important; height: 12px !important;
    margin: 10px !important;
    position: relative;
    background: #CFCBBF;
}
body .splide__pagination__page::before { content: ""; position: absolute; inset: -10px; }
body .splide__pagination__page.is-active { background: var(--pwf-ink) !important; transform: scale(1.15); }

/* ------------------------------------------------------------- Cards & media */
body img { max-width: 100%; height: auto; }
body .card,
body .donationDetailsCards,
body .blogCard {
    border-radius: var(--pwf-radius);
}

/* ----------------------------------------------------------------- Footer */
body .pragatiFooter { font-size: 1.5rem; }
body .footerQuickLinks a {
    display: inline-flex; align-items: center;
    min-height: 40px;
    font-size: 1.5rem;
}
body .footerDisclaimerDesc { font-size: 1.4rem; line-height: 1.7; }
body .footerDisclaimerDesc a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------- Section rhythm */
@media (max-width: 767.98px) {
    body .sectionPadding { margin: 5.6rem 0 !important; }
    body .sectionPaddingTB { padding: 6.4rem 0 !important; }
}

/* Checkboxes / radios: 20px, brand-coloured, label stays the tap area */
body input[type="checkbox"],
body input[type="radio"] {
    width: 20px; height: 20px;
    accent-color: var(--pwf-ink);
    vertical-align: -4px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ------------------------------------------------------------ Font aliases */
/* Several sections ask for 'Poppins' by name, which was never registered, so
   they fell back to Helvetica/Arial. Map the name to the bundled files.       */
@font-face { font-family: 'Poppins'; font-weight: 300; font-display: swap; src: url('../fonts/Poppins-Light.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/Poppins-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/Poppins-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 700 900; font-display: swap; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Gloria Hallelujah'; font-display: swap; src: url('../fonts/GloriaHallelujah-Regular.ttf') format('truetype'); }

/* ------------------------------------------- Yellow used as TEXT colour */
/* Brand yellow on white/cream is ~1.3:1. Small yellow labels become a deep
   gold that keeps the warmth and passes WCAG AA (5.9:1 on white).          */
:root { --pwf-gold-text: #7A5E00; }
body .helpChildSpliderContentHeading,
body .blogDetailDate,
body .aboutCardYear,
body .mediaCrySectionCardDate,
body .aboutSectestiProfession,
body .donationDetailSpcHeading {
    color: var(--pwf-gold-text) !important;
}
body .helpChildSpliderContentHeading { letter-spacing: .08em; }

/* Secondary paragraph copy was light grey on cream – darken to AA */
body .helpChildDesc,
body .homeSec2Desc,
body .helpChildSpliderContentDesc { color: var(--pwf-muted); }

/* Header donate button: one line, compact on phones */
body .mainHeaderDonate .themeBtn { white-space: nowrap; }
@media (max-width: 576px) {
    body .mainHeaderDonate .themeBtn { padding: 8px 16px !important; font-size: 1.4rem; min-height: 44px; }
    body .mainHeaderDonate { padding-right: 4px !important; }
}

/* Accent blue/orange were 2.9–3.1:1 on white. Deeper shades keep the hue and pass
   AA both as text on white and as backgrounds behind white text (~5.5:1).        */
:root {
    --blue: #1565C0;
    --orange: #B5400B;
}

/* Primary form submit: full-width, easy thumb target on phones */
@media (max-width: 576px) {
    body form button[type="submit"].themeBtn,
    body form input[type="submit"].themeBtn,
    body form .themeBtn[type="submit"] { width: 100%; min-height: 50px; font-size: 1.6rem; }
}

/* Skip-link target: no outline around the whole page when it receives focus */
body main#main-content:focus { outline: none !important; }

/* ------------------------------------------------ Banner images on phones */
/* Decorative full-width banners made phone pages very long. Cap their height and
   crop with object-fit (never squash); object-position keeps faces in frame.    */
@media (max-width: 767.98px) {
    /* Section divider banners (people + yellow brush) */
    body .homeBannerSecImage,
    body .aboutusTeamBanner {
        max-height: 130px !important;
        object-fit: cover !important;
        object-position: 50% 38% !important;
    }
    /* Page hero / banner photos */
    body .homeHeroSectionImg,
    body .aboutHeroImg,
    body .approachHeroImg,
    body .volunteerBannerImage,
    body .contactPageSecImages,
    body .donationDetailBanner {
        width: 100%;
        height: auto !important;
        max-height: 220px !important;
        object-fit: cover !important;
        object-position: 50% 35% !important;
    }
    body .aboutUsVideo {
        height: auto !important;
        max-height: 210px !important;
        object-fit: cover !important;
        object-position: 50% 40% !important;
    }
    /* QR card: scanning needs a second phone anyway – keep it compact */
    body .qrCodeImage {
        max-width: 260px !important;
        margin: 0 auto;
        display: block;
    }
}

/* ------------------------------------------- Section spacing on phones */
/* Desktop rhythm (50–150px between blocks) is far too loose on a 390px screen.
   Phones get a 32–48px rhythm; page tops clear the 60px fixed header + 24px. */
@media (max-width: 767.98px) {
    /* Page tops (fixed header is 60px tall on phones) */
    body .contactSection,
    body .blogDetailSection,
    body .volunteerHeroSection,
    body .photoGallery .SectionPadding,
    body .container.SectionPadding { padding-top: 84px !important; }
    body .volunteerHeroSection h1,
    body .container.SectionPadding h1,
    body .blogDetailSection .blogTitle { margin-top: 0 !important; }
    body .blogDetailSection { padding-top: 72px !important; }
    body .top3 .splide__slide { padding-top: 0 !important; }
    body #image-slider.padding-top { padding-top: 68px !important; }
    body #image-slider .splide__slide { padding-top: 0 !important; }

    /* Section blocks */
    body .helpChildSec { padding-top: 32px !important; padding-bottom: 32px !important; }
    body .helpChildSec .splide,
    body .top3 .splide { margin-top: 20px !important; margin-bottom: 20px !important; }
    body .approachSecCircle2 { padding-top: 24px !important; }
    body .approachSec2 { padding-bottom: 40px !important; }
    body .impactSection { padding-top: 48px !important; padding-bottom: 48px !important; }
    body .qrsection { margin-top: 48px !important; margin-bottom: 48px !important; }
    body .testimonials { padding-bottom: 32px !important; }
    body .top3 { padding-top: 28px !important; padding-bottom: 28px !important; }
    body .aboutOurMissionSec { margin-top: 32px !important; margin-bottom: 32px !important; }
    body .aboutSectionTesti,
    body .aboutSectestimonials,
    body .globalPresenceSection { padding-top: 28px !important; padding-bottom: 28px !important; }
    body .approachHeroImg { margin-bottom: 32px !important; }
    body .aboutUsVideoSection { padding-top: 40px !important; padding-bottom: 40px !important; }
    body .volunteerFaqsSection { padding-top: 48px !important; padding-bottom: 48px !important; }
    body .blogsSecHeadingContainer { padding-top: 48px !important; }
}

/* Stories & Updates cards: white on #FFA500 was ~2:1 – dark text is ~9.6:1 */
body .updateSliderContentContainer .updateSliderContentHead,
body .updateSliderContentContainer .updateSliderContentDesc,
body .updateSliderContentContainer p,
body .updateSliderContentContainer h3 { color: var(--pwf-ink) !important; }
