/*
 * MS Agri Trust: site stylesheet.
 *
 * One design system for the Blade site and the React app (frontend/public/assets/css/style.css is a copy:
 * edit this file, then run `npm --prefix frontend run sync-css`). Markup and class names are unchanged;
 * everything below is presentation only.
 *
 * Sections: 1 tokens, 2 base, 3 buttons, 4 forms, 5 header (topbar, nav, page header), 6 home sections,
 * 7 cards and lists, 8 footer, 9 content pages, 10 utilities and motion.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- 1. Tokens ---------- */
:root {
    --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', 'Open Sans', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;

    /* Brand. #1f7a45 on white is 5.3:1 (AA); the old #27ae60 was 2.9:1. */
    --primary: #1f7a45;
    --primary-dark: #17623a;
    --primary-rgb: 31, 122, 69;
    --primary-light: #e8f3ec;

    /* Neutrals */
    --ink: #0f1f16;
    --text-dark: #1d2b22;
    --text-gray: #54635a;
    --white: #ffffff;
    --bg-light: #f5f8f6;
    --border: #e2e8e4;
    --border-strong: #cfd8d2;

    /* Deep greens for dark bands */
    --forest-900: #0b2115;
    --forest-800: #11331f;

    /* Shape and elevation */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 31, 22, 0.06), 0 1px 3px rgba(15, 31, 22, 0.04);
    --shadow-md: 0 8px 20px -6px rgba(15, 31, 22, 0.12), 0 2px 6px -2px rgba(15, 31, 22, 0.06);
    --shadow-lg: 0 24px 48px -16px rgba(15, 31, 22, 0.22);
    --ring: 0 0 0 4px rgba(var(--primary-rgb), 0.16);

    /* Form fields: square, fully boxed corners; focus is a thin, light-green border.
       #4fa677 is about 3:1 against white, the minimum for a visible focus indicator. */
    --radius-input: 0;
    --focus-border: #4fa677;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    /* Point Bootstrap's own colour variables at the brand so utility classes
       (border-primary, bg-primary, text-primary, links) stop falling back to Bootstrap blue. */
    --bs-primary: #1f7a45;
    --bs-primary-rgb: 31, 122, 69;
    --bs-success: #1f7a45;
    --bs-success-rgb: 31, 122, 69;
    --bs-link-color: #1f7a45;
    --bs-link-color-rgb: 31, 122, 69;
    --bs-link-hover-color: #17623a;
    --bs-link-hover-color-rgb: 23, 98, 58;
    --bs-body-font-family: var(--font);
    --bs-border-color: var(--border);
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text-gray);
    background-color: var(--white);
    overflow-x: hidden;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.015em;
}

p { margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}

img { max-width: 100%; }

::selection { background: rgba(var(--primary-rgb), 0.18); }

/* Keyboard focus: always visible, never hidden under a fixed header. */
:focus { outline: none; }
:focus-visible {
    outline: 3px solid rgba(var(--primary-rgb), 0.45);
    outline-offset: 2px;
}
/* Text fields signal focus with their border instead (see the form section), so no thick outline
   and no rounded corners appear on them. */
input:not([type='checkbox']):not([type='radio']):focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 0; }
html { scroll-padding-top: 90px; }

/* Brand colour helpers used in the markup */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-light-bg { background-color: var(--bg-light); }
.text-gray { color: var(--text-gray); }

/* ---------- 3. Buttons ---------- */
.btn-primary-custom,
.btn-outline-custom,
.btn-donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.005em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}

.btn-primary-custom,
.btn-donate {
    background-color: var(--primary);
    color: var(--white) !important;
    border: 1px solid var(--primary);
    box-shadow: 0 1px 2px rgba(15, 31, 22, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary-custom:hover,
.btn-donate:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-primary-custom:active,
.btn-donate:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn-primary-custom:disabled,
.btn-primary-custom[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-donate { min-height: 40px; padding: 8px 20px; font-size: 13.5px; }

.btn-outline-custom {
    background-color: var(--white);
    color: var(--primary) !important;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-outline-custom:active { transform: translateY(0); }

/* Bootstrap's outline-success hardcodes #198754; bring it onto the brand. */
.btn-outline-success {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: var(--primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-color: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}
/* "Read More" buttons carry .text-primary (!important), which left green text on a green hover. */
.btn-outline-success.text-primary:hover,
.btn-outline-success.text-primary:focus-visible,
.btn-outline-success.text-primary:active { color: var(--white) !important; }

.btn-outline-secondary { border-radius: var(--radius-sm); font-weight: 500; }
.btn-link { color: var(--primary); }
.btn-link:hover { color: var(--primary-dark); }

/* ---------- 4. Forms ---------- */
.form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.form-control,
.form-select {
    min-height: 44px;
    padding: 9px 14px;
    font-family: var(--font);
    font-size: 14.5px;
    color: var(--ink);
    background-color: var(--white);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-input);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
textarea.form-control { min-height: 0; }
.form-control::placeholder { color: #8a978f; }
.form-control::file-selector-button { border-radius: 0; }
.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled) { border-color: #b3c0b8; }
/* Focus: a light-green 2px border, drawn as the 1px border plus a 1px inset line so nothing shifts
   or overlaps its neighbours. No glow and no outline. */
.form-control:focus,
.form-select:focus {
    border-color: var(--focus-border);
    box-shadow: inset 0 0 0 1px var(--focus-border);
    outline: 0;
    background-color: var(--white);
}
.form-control:disabled,
.form-control[readonly] { background-color: #f1f5f2; color: var(--text-gray); }
.form-control.is-invalid:focus,
.form-select.is-invalid:focus { border-color: #c62828; box-shadow: inset 0 0 0 1px #c62828; }

.input-group-text {
    background-color: #f1f5f2;
    color: var(--text-dark);
    font-weight: 500;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-input);
}
/* The prefix and the field share one box, so the prefix picks up the focus colour too. */
.input-group:focus-within > .input-group-text { border-color: var(--focus-border); box-shadow: inset 0 0 0 1px var(--focus-border); }
.input-group > .form-control,
.input-group > .form-select,
.input-group > .btn { border-radius: var(--radius-input); }
/* Neighbours in a group overlap by 1px (Bootstrap), so the focused field's border is raised above them. */
.input-group > .form-control:focus,
.input-group > .form-select:focus { position: relative; z-index: 3; }

.form-check-input { border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
/* Checkboxes and radios keep a thin ring so keyboard users can still see where they are. */
.form-check-input:focus { border-color: var(--focus-border); box-shadow: none; outline: 2px solid var(--focus-border); outline-offset: 1px; }
.form-check-label { color: var(--text-dark); }
.form-text { color: var(--text-gray); font-size: 12.5px; }
.invalid-feedback { font-size: 12.5px; }

/* Form section headings (h5 with a bottom rule) */
form h5.border-bottom { border-color: var(--border) !important; letter-spacing: -0.01em; }

/* Feedback */
.alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}
.alert-success { background: #eef8f1; border-color: #c9e7d3; border-left-color: var(--primary); color: #14532d; }
.alert-danger { background: #fdf0f1; border-color: #f4cdd1; border-left-color: #c62828; color: #7a1d22; }
.alert-link { color: inherit; text-decoration: underline; font-weight: 600; }
.spinner-border.text-primary { color: var(--primary) !important; }

/* Donation amount presets (previously only inline in the Blade donate view) */
.amount-preset-btn {
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-input);
    padding: 12px 10px;
    font-weight: 700;
    color: var(--ink);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.amount-preset-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.amount-preset-btn.active,
.amount-preset-btn.active:hover { border-color: var(--primary); background: var(--primary); color: var(--white); transform: none; }

/* ---------- 4b. Registration and contact forms ---------- */
/* Valid state: brand-coloured border and tick (Bootstrap's default is its own green). */
:root { --bs-form-valid-border-color: var(--primary); --bs-form-valid-color: var(--primary-dark); }
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%231f7a45' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}
.form-control.is-valid:focus,
.form-select.is-valid:focus { border-color: var(--focus-border); box-shadow: inset 0 0 0 1px var(--focus-border); }
.form-check-input[type='checkbox'] { border-radius: 0; }

/* The form card */
/* Flat: no outer border, shadow or rounding. The form simply spans its container, so its
   fields line up with the page header and footer edges. */
.form-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 36px;
}
/* Buttons inside forms are square too, to match the fields they sit beside. */
.form-card .btn-primary-custom,
.form-card .btn-outline-secondary,
.form-card .btn-outline-danger,
.form-card .btn-outline-success,
.form-card .btn-link { border-radius: var(--radius-input); }
.form-card-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 28px 0 20px;
    border-bottom: 1px solid var(--border);
}
.form-card-head h2 { font-size: 1.3rem; margin: 0; letter-spacing: -0.02em; }
.form-card-head p { margin: 4px 0 0; font-size: 13.5px; }
.form-legend { font-size: 12.5px; color: var(--text-gray); white-space: nowrap; }
.form-legend .req, .form-card .text-danger { color: #c62828 !important; }

/* Numbered sections; optional ones collapse (native <details>) */
.form-section { padding: 28px 0 8px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.form-section-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}
.form-section-title { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.form-section-note {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f1f5f2;
    color: var(--text-gray);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
details.form-section > summary { list-style: none; cursor: pointer; margin-bottom: 0; padding-bottom: 20px; border-radius: var(--radius-sm); }
details.form-section > summary::-webkit-details-marker { display: none; }
details.form-section > summary .form-section-title { flex: 1; }
details.form-section > summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free', sans-serif;
    font-weight: 900;
    font-size: 11px;
    color: var(--text-gray);
    transition: transform 0.2s var(--ease);
}
details.form-section[open] > summary::after { transform: rotate(180deg); }
details.form-section > summary:hover .form-section-title { color: var(--primary-dark); }
details.form-section > summary:focus-visible { outline: 3px solid rgba(var(--primary-rgb), 0.45); outline-offset: 2px; }
details.form-section[open] > summary { padding-bottom: 0; margin-bottom: 22px; }
details.form-section[open] > summary .form-section-note { display: none; }

/* Single- and multi-choice answers as compact chips (the real radio/checkbox stays focusable) */
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.choice-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-input);
    color: var(--text-dark);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.choice:hover .choice-label { border-color: var(--primary); }
.choice input:checked + .choice-label { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.choice input:checked + .choice-label::before { content: '\f00c'; font-family: 'Font Awesome 6 Free', sans-serif; font-weight: 900; font-size: 10px; }
.choice input:focus-visible + .choice-label { outline: 0; border-color: var(--focus-border); box-shadow: inset 0 0 0 1px var(--focus-border); }
.choice input:checked:focus-visible + .choice-label { border-color: var(--primary-dark); box-shadow: inset 0 0 0 1px var(--primary-dark); }

/* Phone / email verification: button inline with the field, code area below, tick when verified */
.phone-field .input-group { flex-wrap: nowrap; }
.phone-field .input-group > .form-control { min-width: 0; }
.btn-otp {
    flex-shrink: 0;
    min-width: 112px;
    padding: 0 18px;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--white);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--radius-input);
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.btn-otp:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-otp:disabled { background: #8fb9a0; border-color: #8fb9a0; color: var(--white); opacity: 1; cursor: not-allowed; }
.btn-otp:focus-visible { outline: 3px solid rgba(var(--primary-rgb), 0.45); outline-offset: 2px; }
.verified-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-left: 0;
    border-radius: var(--radius-input);
    color: var(--primary-dark);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}
.phone-field.is-verified .input-group-text { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }

.otp-panel {
    margin-top: 12px;
    padding: 16px 18px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-input);
    animation: otp-in 0.25s var(--ease);
}
@keyframes otp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.otp-panel-head { display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; color: var(--text-dark); line-height: 1.5; }
.otp-panel-head i { margin-top: 3px; color: var(--primary); }
.otp-panel-head strong { color: var(--ink); white-space: nowrap; }
.otp-code-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.otp-code {
    flex: 1 1 170px;
    max-width: 240px;
    padding-left: 0.5em;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    font-variant-numeric: tabular-nums;
}
.otp-code::placeholder { letter-spacing: 0.35em; color: #b4bfb8; font-weight: 500; }
.otp-verify-btn { min-height: 44px; padding: 0 22px; font-size: 14px; }
.otp-meta { margin-top: 10px; font-size: 12.5px; color: var(--text-gray); }

.field-status { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12.5px; line-height: 1.4; }
.field-status.ok { color: var(--primary-dark); font-weight: 500; }
.field-status.ok i { color: var(--primary); }
.field-status.error { color: #c62828; }
.otp-panel .field-status { margin-top: 10px; }

/* Public Farmer ID verification page (opened by scanning the QR on the card) */
.verify-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); overflow: hidden; }
.verify-banner { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px; }
.verify-banner > i { margin-top: 2px; font-size: 1.6rem; }
.verify-banner strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.verify-banner span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.5; }
.verify-banner-ok { background: var(--primary-light); color: var(--primary-dark); border-bottom: 1px solid rgba(var(--primary-rgb), 0.2); }
.verify-banner-ok > i { color: var(--primary); }
.verify-banner-bad { background: #fdf0f1; color: #7a1d22; }
.verify-banner-bad > i { color: #c62828; }
.verify-body { display: flex; align-items: center; gap: 18px; padding: 24px 22px 8px; }
.verify-photo {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--primary-light);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-sm);
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 700;
}
.verify-photo img { width: 100%; height: 100%; object-fit: cover; }
.verify-identity h2 { margin: 0 0 6px; font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.verify-status { display: inline-block; padding: 2px 10px; background: var(--primary); color: var(--white); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.verify-details { margin: 0; padding: 12px 22px 22px; }
.verify-details > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.verify-details > div:last-child { border-bottom: 0; }
.verify-details dt { color: var(--text-gray); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 2px; }
.verify-details dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.verify-details dd.verify-id { color: var(--primary-dark); font-size: 1.1rem; letter-spacing: 0.02em; }
@media (max-width: 575px) {
    .verify-body { flex-direction: column; text-align: center; padding-top: 22px; }
    .verify-details > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Calendar picker (DatePicker component): a field that opens a popover from any click */
.datepicker { position: relative; }
.datepicker .form-control[readonly] { background-color: var(--white); color: var(--ink); cursor: pointer; padding-right: 44px; caret-color: transparent; }
.datepicker .form-control[readonly]::placeholder { color: #8a978f; }
.datepicker .form-control[readonly]:hover { border-color: #b3c0b8; }
.datepicker .form-control[readonly]:focus { background-color: var(--white); }
.datepicker-icon { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: var(--text-gray); font-size: 14px; pointer-events: none; }
.datepicker .form-control[aria-expanded='true'] ~ .datepicker-icon,
.datepicker .form-control:focus ~ .datepicker-icon { color: var(--primary); }

.datepicker-popover {
    position: absolute;
    z-index: 1060;
    top: calc(100% + 6px);
    left: 0;
    width: 320px;
    max-width: calc(100vw - 24px);
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    box-shadow: 0 24px 48px -12px rgba(15, 31, 22, 0.28), 0 4px 12px rgba(15, 31, 22, 0.08);
    animation: otp-in 0.18s var(--ease);
}
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.dp-nav {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.dp-nav:hover:not(:disabled) { background: var(--primary-light); color: var(--primary-dark); }
.dp-nav:disabled { color: #c1cbc5; cursor: not-allowed; }
.dp-selects { flex: 1; display: flex; gap: 6px; min-width: 0; }
.dp-select {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.dp-select:first-child { flex: 1.5; }
.dp-select:hover { border-color: var(--border-strong); }
.dp-select:focus { outline: 0; border-color: var(--focus-border); box-shadow: inset 0 0 0 1px var(--focus-border); }
.dp-weekdays, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-weekdays span { padding: 6px 0; text-align: center; color: var(--text-gray); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.dp-day {
    aspect-ratio: 1;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font);
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.dp-day:hover:not(:disabled):not(.is-selected) { background: var(--primary-light); color: var(--primary-dark); }
.dp-day.is-today { box-shadow: inset 0 0 0 1px var(--primary); font-weight: 700; }
.dp-day.is-selected { background: var(--primary); color: var(--white); font-weight: 700; }
.dp-day:disabled { color: #c1cbc5; cursor: not-allowed; }
.dp-day:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--focus-border); }
.dp-day.is-selected:focus-visible { box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 4px var(--primary-dark); }
.dp-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.dp-link { padding: 4px 6px; border: 0; background: transparent; color: var(--primary); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; }
.dp-link:hover:not(:disabled) { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.dp-link:disabled { color: #c1cbc5; cursor: not-allowed; }
.dp-link:focus-visible, .dp-nav:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -2px; }
@media (max-width: 575px) {
    .datepicker-popover { width: 100%; padding: 14px 12px; }
    .dp-day { min-height: 40px; }
}

/* Profile photo: preview beside the file input */
.photo-upload { display: flex; align-items: center; gap: 20px; padding: 16px 18px; background: var(--bg-light); border: 1px dashed var(--border-strong); border-radius: var(--radius-input); }
.photo-upload-preview {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--white);
    background: #e6ede8;
    box-shadow: var(--shadow-sm);
    color: #9db0a4;
    font-size: 30px;
}
.photo-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-body { flex: 1; min-width: 0; }
.photo-upload-body .form-control { max-width: 340px; }
@media (max-width: 575px) {
    .photo-upload { flex-direction: column; align-items: stretch; text-align: left; }
    .photo-upload-preview { align-self: center; }
    .photo-upload-body .form-control { max-width: none; }
}

/* Declaration / consent box */
.consent-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
}
.consent-box .form-check-input { margin-top: 3px; flex-shrink: 0; width: 1.15em; height: 1.15em; }
.consent-box label { font-size: 13.5px; line-height: 1.55; cursor: pointer; }

/* Submit row */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 24px; margin-top: 12px; border-top: 1px solid var(--border); }
.form-actions .form-hint { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--text-gray); }
.form-actions .form-hint i { margin-right: 6px; color: #b9770e; }

/* Single-purpose cards (donor and farmer login) have no sections, so less padding */
.form-card-compact { padding: 8px 0 32px; }

@media (max-width: 767px) {
    .form-card { padding: 0 0 24px; }
    .form-card.form-card-compact { padding: 4px 0 24px; }
    .form-card-head { padding: 22px 0 16px; }
    .form-section { padding-top: 24px; }
    .form-actions .btn-primary-custom { flex: 1 1 100%; }
    .otp-code-row .otp-verify-btn { flex: 1 1 100%; }
    .otp-code { max-width: none; }
}
@media (max-width: 400px) {
    /* Keep the number readable beside the button on the narrowest phones. */
    .btn-otp { min-width: 0; padding: 0 12px; font-size: 13px; }
    .otp-long-label { display: none; }
    .verified-badge { padding: 0 10px; font-size: 13px; }
    .phone-field .input-group-text { padding-left: 10px; padding-right: 10px; }
    .phone-field .form-control:not(.otp-code) { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 5. Header ---------- */
/* Topbar */
.topbar {
    background-color: var(--forest-900);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12.5px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar a { color: rgba(255, 255, 255, 0.92); margin-right: 22px; font-weight: 500; }
.topbar a:hover { color: var(--white); }
/* A <button> (Farmer Logout) styled to look exactly like the topbar links beside it. */
.topbar .topbar-link {
    padding: 0;
    margin-right: 22px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}
.topbar .topbar-link:hover { color: var(--white); }
.topbar form { display: inline; margin: 0; }
.topbar .social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    margin: 0 3px;
    font-size: 11px;
}
.topbar .social a:hover { background: var(--white); color: var(--forest-900); transform: translateY(-1px); }

/* Navbar */
.navbar {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px rgba(15, 31, 22, 0.04);
}
.navbar-brand img { height: 40px; margin-right: 10px; }
.brand-text h1 { font-size: 1.1rem; margin: 0; color: var(--primary); }
.brand-text p { font-size: 10px; margin: 0; color: #b9770e; font-weight: 600; letter-spacing: 0.5px; }
.nav-link {
    position: relative;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin: 0 4px;
    padding: 8px 12px !important;
    font-size: 13.5px;
    letter-spacing: 0.005em;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--primary) !important; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 10px; }
.navbar-toggler:focus { box-shadow: var(--ring); }

@media (max-width: 991px) {
    .navbar-collapse { padding: 12px 0 8px; }
    .nav-link { padding: 12px 4px !important; margin: 0; border-bottom: 1px solid var(--border); }
    .nav-link::after { display: none; }
    .navbar .btn-donate { width: 100%; margin-top: 12px; }
    .navbar .btn-donate + * , .navbar .d-flex.gap-3 { width: 100%; }
}

/* Page header band (inline styles in the views set size and colour, so these use !important) */
.page-header {
    position: relative;
    background: linear-gradient(180deg, #f1f7f3 0%, #ffffff 100%) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 56px 0 44px !important;
}
.page-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 120px;
    height: 3px;
    background: var(--primary);
}
.page-header h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem) !important;
    letter-spacing: -0.025em !important;
    color: var(--ink) !important;
}
.page-header p { color: var(--text-gray); }

/* ---------- 6. Home sections ---------- */
.section-title-sm {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
    display: block;
}
.section-title-lg {
    font-size: clamp(1.7rem, 2.6vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}
.leaf-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    color: var(--primary);
}
.leaf-divider::before, .leaf-divider::after {
    content: '';
    height: 1px;
    width: 56px;
    background: linear-gradient(90deg, transparent, var(--primary));
    margin: 0 16px;
}
.leaf-divider::after { background: linear-gradient(270deg, transparent, var(--primary)); }

/* Hero */
.hero {
    background:
        linear-gradient(105deg, rgba(248, 251, 249, 0.96) 0%, rgba(240, 247, 242, 0.9) 55%, rgba(240, 247, 242, 0.78) 100%),
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3') center/cover;
    padding: 88px 0;
    position: relative;
    overflow: hidden;
}
.hero-tag {
    background: var(--white);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.hero p { font-size: 16.5px; line-height: 1.7; margin-bottom: 32px; max-width: 34rem; color: var(--text-gray); }
.hero-farmer {
    max-width: 100%;
    position: relative;
    z-index: 2;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.slider-nav:hover { background: var(--primary); color: var(--white); }
.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }
/* Used in the testimonial row, where the arrows sit in the flow, not over the section. */
.transform-none { transform: none !important; top: auto !important; }

/* About */
.about-images { position: relative; height: 450px; }
.about-dot-pattern {
    position: absolute;
    top: 0; left: 0;
    width: 150px; height: 150px;
    background-image: radial-gradient(var(--primary) 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.18;
    z-index: 0;
}
.about-img-1 {
    position: absolute;
    top: 30px; left: 30px;
    width: 280px; height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 10px solid var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 2;
}
.about-img-2 {
    position: absolute;
    bottom: 20px; left: 100px;
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--white);
    box-shadow: var(--shadow-md);
    z-index: 3;
}
.about-img-3 {
    position: absolute;
    top: 140px; right: 0;
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--white);
    box-shadow: var(--shadow-md);
    z-index: 1;
}
.about-icon-box {
    display: flex;
    gap: 14px;
    padding: 16px;
    margin-bottom: 0;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}
.about-icon-box:hover { border-color: rgba(var(--primary-rgb), 0.35); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.about-icon {
    width: 44px; height: 44px;
    background: var(--primary-light);
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.05rem;
    flex-shrink: 0;
}
.about-icon-box h6 { margin: 0 0 4px 0; font-weight: 700; font-size: 14.5px; }
.about-icon-box p { margin: 0; font-size: 13px; line-height: 1.5; }

/* Impact */
.impact {
    background:
        linear-gradient(rgba(11, 33, 21, 0.94), rgba(11, 33, 21, 0.94)),
        url('https://images.unsplash.com/photo-1592982537447-6f296338b9f6?ixlib=rb-4.0.3') center/cover;
    padding: 64px 0;
}
.impact-card {
    background: rgba(255, 255, 255, 0.06);
    padding: 28px 12px;
    text-align: center;
    border-radius: var(--radius);
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;  /* markup adds Bootstrap's border-primary classes */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.25s ease, transform 0.25s var(--ease), border-color 0.25s ease;
}
.impact-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.28) !important; }
.impact-icon { color: #7fd1a0; font-size: 1.6rem; margin-bottom: 12px; display: block; }
.impact-num { font-size: 2.1rem; font-weight: 800; color: var(--white); font-family: var(--font); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.impact-text { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.72); text-transform: uppercase; letter-spacing: 0.08em; }

/* Testimonials (no fixed background: it janks on mobile) */
.testimonials {
    background: linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)), url('https://images.unsplash.com/photo-1595841696677-6489ff3f8cd1?ixlib=rb-4.0.3') center/cover;
    padding: 80px 0;
}
.testi-card {
    background: var(--white);
    padding: 36px 36px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    text-align: left;
}
.testi-quote { color: var(--primary); opacity: 0.35; font-size: 1.6rem; position: absolute; top: 26px; left: 28px; }
.testi-text { font-size: 16px; font-style: italic; color: var(--text-dark); margin: 0 0 24px 38px; line-height: 1.7; }
.testi-author { display: flex; align-items: center; margin-left: 38px; }
.testi-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin-right: 14px; border: 2px solid var(--white); box-shadow: var(--shadow-sm); }
.testi-author h6 { margin: 0; font-weight: 700; color: var(--ink); font-size: 14.5px; }
.testi-author p { margin: 0; font-size: 12.5px; }

/* Gallery */
.gallery-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.gallery-img:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Support */
.support { background: linear-gradient(135deg, var(--forest-900) 0%, var(--forest-800) 45%, #1d6b3f 100%); padding: 72px 0; color: var(--white); }
.support h6 { letter-spacing: 0.14em; opacity: 0.85; font-size: 12px; }
.support-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 18px;
    text-align: center;
    color: var(--text-dark);
    height: 100%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.support-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.support-icon { font-size: 1.7rem; color: var(--primary); margin-bottom: 14px; }
.support-box h5 { font-weight: 700; margin-bottom: 8px; font-size: 16px; }
.support-box p { font-size: 13px; color: var(--text-gray); margin: 0; }

/* ---------- 7. Cards and lists ---------- */
.program-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    height: 100%;
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(var(--primary-rgb), 0.3); }
.program-img { width: 100%; height: 190px; object-fit: cover; transition: transform 0.5s var(--ease); }
.program-card:hover .program-img { transform: scale(1.03); }
.program-card { isolation: isolate; }
.program-body { padding: 24px; text-align: left; }
.program-body i { font-size: 1.15rem; }
.program-body h4 { font-size: 1.05rem; margin-bottom: 10px; font-weight: 700; line-height: 1.3; }
.program-body p { font-size: 13.5px; line-height: 1.65; margin-bottom: 16px; }
.read-more { color: var(--primary); font-weight: 600; font-size: 13px; }
.read-more:hover { color: var(--primary-dark); }
.read-more i { transition: transform 0.2s var(--ease); }
.read-more:hover i { transform: translateX(3px); }

/* Events and news */
.event-card {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}
.event-card:hover { background-color: var(--bg-light); }
.event-date {
    background: var(--primary-light);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    padding: 8px 12px;
    text-align: center;
    border-radius: var(--radius);
    margin-right: 16px;
    min-width: 70px;
}
.event-date .d { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.event-date .m { font-size: 11px; font-weight: 700; color: var(--primary-dark); letter-spacing: 0.08em; margin-top: 2px; }
.event-info h5 { font-size: 15px; margin-bottom: 4px; font-weight: 700; }
.event-info p { font-size: 13px; margin: 0; }
.news-card {
    display: flex;
    padding: 14px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}
.news-card:hover { background-color: var(--bg-light); }
.news-card:hover h6 { color: var(--primary); }
.news-img { width: 96px; height: 70px; object-fit: cover; border-radius: var(--radius); margin-right: 16px; flex-shrink: 0; }
.news-info h6 { font-size: 14px; line-height: 1.4; margin-bottom: 4px; font-weight: 700; transition: color 0.2s ease; }
.news-info p { font-size: 13px; }
.news-info span { font-size: 12px; color: var(--primary); font-weight: 600; }
.view-all { color: var(--primary); font-weight: 600; font-size: 13px; float: right; }
.view-all:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Tables, badges, pagination */
.table { color: var(--text-dark); }
.table-bordered { border-color: var(--border); }
.table-bordered > :not(caption) > * > * { border-color: var(--border); padding: 12px 14px; }
.table-light, .table > thead.table-light th { background: #f3f7f4 !important; color: var(--ink); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.table-responsive { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.table-responsive > .table { margin-bottom: 0; }
.badge { font-weight: 600; letter-spacing: 0.02em; padding: 0.4em 0.75em; border-radius: 999px; }
.page-link { color: var(--primary); border-color: var(--border); }
.page-link:hover { color: var(--primary-dark); background: var(--primary-light); border-color: var(--border); }
.page-link:focus { box-shadow: var(--ring); }
.page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---------- 8. Footer ---------- */
.footer { background: var(--forest-900); color: #b7c5bd; padding: 72px 0 0; font-size: 13.5px; }
.footer p { color: #b7c5bd; }
.footer-logo { display: flex; align-items: center; margin-bottom: 20px; }
.footer-logo img { height: 40px; margin-right: 10px; }
.footer-logo h2 { color: var(--white); font-size: 1.1rem; margin: 0; }
.footer-title { color: var(--white); font-size: 14px; margin-bottom: 18px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: #b7c5bd; }
.footer-links a:hover { color: var(--white); padding-left: 3px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; margin-bottom: 14px; gap: 12px; line-height: 1.55; }
.contact-list i { color: #7fd1a0; margin-top: 4px; font-size: 12px; width: 14px; flex-shrink: 0; }
.newsletter input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    border-radius: var(--radius-input);
    margin-bottom: 10px;
    font-size: 13.5px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.newsletter input::placeholder { color: #8da197; }
.newsletter input:focus { outline: none; border-color: #7fd1a0; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px #7fd1a0; }
.footer .btn-success { border-radius: var(--radius-input); font-weight: 600; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px 0;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12.5px;
    color: #8da197;
}
.footer-bottom a { color: #b7c5bd; }
.footer-bottom a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

.whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25d366;
    color: var(--white);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 6px 18px rgba(15, 31, 22, 0.25);
    z-index: 99;
}
.whatsapp-btn:hover { color: var(--white); transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 24px rgba(15, 31, 22, 0.3); }

/* ---------- 9. Content pages ---------- */
/* Long-form text (news and event bodies) */
.rich-content { color: var(--text-dark); }
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.25rem 0; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 2rem 0 0.75rem; }
.rich-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.rich-content ul, .rich-content ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
.rich-content blockquote { border-left: 4px solid var(--primary); background: var(--bg-light); padding: 16px 20px; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; }

/* Legal policy pages */
.policy-content { color: var(--text-dark); line-height: 1.8; font-size: 16px; }
.policy-content .policy-h { font-family: var(--font); font-weight: 700; color: var(--ink); margin: 36px 0 12px; letter-spacing: -0.015em; }
.policy-content h2.policy-h { font-size: 2rem; margin-top: 0; }
.policy-content h3.policy-h { font-size: 1.6rem; }
.policy-content h4.policy-h { font-size: 1.3rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.policy-content h5.policy-h { font-size: 1.05rem; margin-top: 24px; }
.policy-content ul { padding-left: 1.4rem; margin-bottom: 1.1rem; }
.policy-content li { margin-bottom: 6px; }
.policy-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.policy-content blockquote {
    text-align: center;
    font-style: italic;
    color: var(--text-dark);
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px 24px;
    margin: 28px 0;
}
.policy-content blockquote p { margin: 0; }

/* ---------- 10. Responsive and motion ---------- */
@media (max-width: 991px) {
    .about-images { height: auto; margin-bottom: 40px; }
    .about-img-1 { position: static; width: 100%; height: auto; border-width: 5px; border-radius: var(--radius-lg); }
    .about-img-2, .about-img-3, .about-dot-pattern { display: none; }
    .slider-nav { display: none; }
    .hero { padding: 56px 0; }
    .hero p { max-width: none; }
    .impact, .support { padding: 52px 0; }
    .testimonials { padding: 56px 0; }
}

@media (max-width: 575px) {
    body { font-size: 14.5px; }
    .page-header { padding: 40px 0 32px !important; }
    .btn-primary-custom, .btn-outline-custom { width: 100%; }
    .testi-card { padding: 28px 22px 24px; }
    .testi-text { margin-left: 0; margin-top: 28px; }
    .testi-author { margin-left: 0; }
    .event-card { flex-wrap: wrap; gap: 12px; }
    .event-card > .ms-3 { margin-left: 0 !important; }
}

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