/* ══════════════════════════════════════════════════════════════
   Project Salama — Global Styles
   Shared across all pages.
   WordPress: enqueue this file via functions.php on every page.
   ══════════════════════════════════════════════════════════════ */

:root {
    /* Primary Brand Colors */
    --gs-primary: #662D91;
    --gs-primary-dark: #4A1F6B;
    --magenta-accent: #9E005D;

    /* Tinted Backgrounds */
    --gs-secondary: #E8DFF5;
    --pink-light: #F5E0EC;
    --purple-wash: #F5F0FA;

    /* Supporting Colors */
    --sage-green: #7B9E89;
    --success-green: #6B9D7B;

    /* Neutrals */
    --pure-white: #FFFFFF;
    --warm-gray: #5A5A5A;
    --deep-charcoal: #2F2F2F;

    /* Accent Colors */
    --orange-accent: #e07b00;
    --orange-accent-dark: #b35e00;
    --green-accent: #3d6b53;

    /* Callout Colors */
    --callout-warning-bg: #FFF3CD;
    --callout-warning-border: #F59E0B;
    --callout-warning-text: #92400E;

    /* Safety Bar Colors */
    --safety-bar-bg: #fff8e1;
    --safety-bar-border: #ffe082;
    --safety-bar-icon: #e8a000;
    --safety-bar-text: #5a4200;

    /* Functional */
    --emergency-red: #C85A54;

    /* Derived Darks (hover states) */
    --magenta-accent-dark: #7a0048;
    --quick-exit-bg: #B84D10;
    --quick-exit-bg-hover: #9A3E0C;

    /* Component Backgrounds */
    --gi-news-panel: #2D5A40;
    --services-bg: #f9f7fc;
    --form-success-bg: #f0f9f3;
    --form-error-bg: #fef2f2;

    /* Text Colors */
    --text-on-light: #2F2F2F;
    --text-on-purple: #FFFFFF;
    --stat-purple: #4A1F6B;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--warm-gray);
    line-height: 1.7;
    background: var(--pure-white);
}

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-md); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--gs-primary); color: white; padding: 8px; text-decoration: none; z-index: 100;
}
.skip-link:focus { top: 0; }

/* ── Header ──────────────────────────────────────────────── */
header { background: var(--pure-white); border-bottom: 1px solid var(--gs-secondary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); padding: var(--spacing-md) 0; position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img { height: 55px; width: auto; max-width: none; display: block; }
nav { flex: 1; display: flex; justify-content: center; }
nav ul { display: flex; list-style: none; gap: var(--spacing-lg); align-items: center; }
nav a { color: var(--warm-gray); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; white-space: nowrap; }
nav a:hover { color: var(--gs-primary); }
nav a[aria-current="page"] { color: var(--gs-primary); font-weight: 600; border-bottom: 2px solid var(--gs-primary); padding-bottom: 2px; }
.nav-donate { background: var(--magenta-accent); color: white !important; padding: 8px 20px; border-radius: 50px; font-weight: 600; transition: background 0.2s, transform 0.2s; }
.nav-donate:hover { background: var(--magenta-accent-dark) !important; color: white !important; transform: translateY(-1px); }
.nav-get-help { background: var(--gs-primary); color: white !important; padding: 8px 20px; border-radius: 50px; font-weight: 700; transition: background 0.2s, transform 0.2s; }
.nav-get-help:hover { background: var(--gs-primary-dark) !important; color: white !important; transform: translateY(-1px); }
.nav-secondary { font-size: 0.875rem !important; color: var(--warm-gray) !important; font-weight: 400 !important; }
.nav-secondary:hover { color: var(--gs-primary) !important; }

/* ── Language Switcher ───────────────────────────────────── */
.language-switcher { position: relative; }
.language-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: white; border: 2px solid var(--gs-primary); border-radius: 25px; cursor: pointer; transition: all 0.3s ease; color: var(--gs-primary); font-weight: 500; font-size: 0.9rem; font-family: inherit; }
.language-toggle:hover { background: var(--gs-primary); color: white; }
.language-toggle:focus { outline: 3px solid var(--magenta-accent); outline-offset: 3px; }
.globe-icon, .chevron-icon { flex-shrink: 0; }
.chevron-icon { transition: transform 0.3s ease; }
.language-toggle[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }
.current-language { white-space: nowrap; }
.language-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: white; border: 2px solid var(--gs-primary); border-radius: 12px; box-shadow: 0 8px 24px rgba(102,45,145,0.2); list-style: none; padding: 8px 0; min-width: 220px; max-height: 400px; overflow-y: auto; z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; }
.language-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.language-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: none; border: none; text-align: left; cursor: pointer; transition: background 0.2s ease; color: var(--deep-charcoal); font-size: 1rem; min-height: 48px; font-family: inherit; }
.language-option:hover { background: var(--gs-secondary); }
.language-option:focus { background: var(--gs-secondary); outline: 2px solid var(--magenta-accent); outline-offset: -2px; }
.language-option.active { background: var(--gs-primary); color: white; font-weight: 600; }
.language-option.active:hover { background: var(--gs-primary); }
.language-name { font-weight: 500; flex: 1; }
.language-english { font-size: 0.85rem; opacity: 0.7; font-weight: 400; }
.language-option.active .language-english { opacity: 0.9; }
.language-option[dir="rtl"] { flex-direction: row-reverse; }
.language-option[dir="rtl"] .language-name { text-align: right; }

/* ── Semantic Card Colour Modifiers ─────────────────────────
   Apply as a second class on any card element, e.g.:
     <div class="service-card card--green">
   WordPress: output via template logic or a custom field.
   The card's own CSS reads --card-color / --card-color-bg.
   ──────────────────────────────────────────────────────── */
.card--purple      { --card-color: var(--gs-primary);     --card-color-bg: rgba(102,45,145,0.10); }
.card--magenta     { --card-color: var(--magenta-accent);      --card-color-bg: rgba(158,0,93,0.10); }
.card--green       { --card-color: #3D6B4F;                    --card-color-bg: rgba(61,107,79,0.10); }
.card--dark-purple { --card-color: var(--gs-primary-dark); --card-color-bg: rgba(74,31,107,0.10); }
.card--sage        { --card-color: var(--sage-green);          --card-color-bg: rgba(123,158,137,0.12); }

/* ── Page Banner (inner pages) ───────────────────────────── */
.page-banner { background: linear-gradient(135deg, var(--gs-primary) 0%, var(--magenta-accent) 100%); color: white; padding: var(--spacing-xxl) 0; text-align: center; }
.page-banner h1 { font-size: 3rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.page-banner p { font-size: 1.2rem; opacity: 0.9; max-width: 620px; margin: 0 auto; }

/* ── Section Header ──────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: var(--spacing-xl); }
.section-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--gs-primary); margin-bottom: 12px; letter-spacing: -0.01em; }
.section-header p { color: var(--warm-gray); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 1rem; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none; font-family: inherit; }
.btn-purple { background: var(--gs-primary); color: white; }
.btn-purple:hover { background: var(--gs-primary-dark); transform: translateY(-2px); }
.btn-magenta { background: var(--magenta-accent); color: white; }
.btn-magenta:hover { background: var(--magenta-accent-dark); transform: translateY(-2px); }
.btn-white { background: white; color: var(--gs-primary); }
.btn-white:hover { background: var(--purple-wash); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--gs-primary); border: 2px solid var(--gs-primary); }
.btn-outline:hover { background: var(--gs-primary); color: white; transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: white; border: 2px solid white; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg, .btn-large { padding: 18px 40px; font-size: 1.1rem; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────── */
footer { background: var(--gs-primary-dark); color: white; padding: var(--spacing-xxl) 0 var(--spacing-lg); }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--spacing-xl); padding-bottom: var(--spacing-xl); border-bottom: 1px solid rgba(255,255,255,0.10); }
.footer-logo { height: 44px; width: auto; display: block; margin-bottom: var(--spacing-md); filter: brightness(0) invert(1); }
.footer-tagline { color: rgba(255,255,255,0.80); font-size: 0.9375rem; line-height: 1.65; margin: 0; }
.footer-col-label { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.80); margin-bottom: var(--spacing-md); }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 10px; }
.footer-section a { color: rgba(255,255,255,0.92); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s; }
.footer-section a:hover { color: white; }
.footer-bottom { padding-top: var(--spacing-md); display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-md); flex-wrap: wrap; }
.footer-charity { color: rgba(255,255,255,0.80); font-size: 0.8125rem; margin: 0; }
.footer-copy { color: rgba(255,255,255,0.72); font-size: 0.8125rem; margin: 0; text-align: center; }
.footer-made { color: rgba(255,255,255,0.80); font-size: 0.8125rem; margin: 0; font-style: italic; }
@media (max-width: 900px) { .footer-content { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-content { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; gap: 6px; } }

/* ── Hide Your Visit Dropdown ────────────────────────────── */
.hide-visit-wrapper { position: relative; }
.hide-visit-btn {
    display: flex; align-items: center; gap: 6px; padding: 7px 14px;
    border: 1.5px solid rgba(123,158,137,0.55); border-radius: 20px;
    background: transparent; color: var(--warm-gray); font-size: 0.8125rem;
    font-weight: 600; cursor: pointer; font-family: inherit;
    white-space: nowrap; transition: border-color 0.2s, color 0.2s;
}
.hide-visit-btn:hover { border-color: var(--green-accent); color: var(--green-accent); }
.hide-visit-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    width: 300px; background: white; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14); padding: 20px; z-index: 1001;
}
.hide-visit-dropdown.open { display: block; }
.hide-visit-dropdown h3 { font-size: 0.9375rem; color: var(--gs-primary); margin-bottom: 12px; font-weight: 700; }
.hide-visit-dropdown ul { list-style: none; padding: 0; margin: 0 0 14px; }
.hide-visit-dropdown li { padding: 5px 0 5px 22px; position: relative; font-size: 0.875rem; color: var(--warm-gray); line-height: 1.5; }
.hide-visit-dropdown li::before { content: "✓"; position: absolute; left: 0; color: var(--success-green); font-weight: 700; }
.hide-visit-callout { background: rgba(200,90,84,0.07); border-radius: 8px; padding: 10px 12px; font-size: 0.8125rem; color: var(--deep-charcoal); line-height: 1.5; }

/* ── Mobile Menu Toggle ──────────────────────────────────── */
.mobile-menu-toggle { display: none; background: none; border: none; color: var(--deep-charcoal); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        line-height: 1;
        padding: 4px;
    }
    .mobile-menu-toggle::after {
        content: 'MENU';
        font-size: 0.5rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: var(--deep-charcoal);
    }
    nav ul { display: none; }
    nav ul.nav-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: var(--spacing-md);
        box-shadow: 0 4px 8px rgba(0,0,0,0.12);
        z-index: 99;
        gap: 4px;
        border-top: 1px solid var(--gs-secondary);
    }
}

/* ── Mobile Header: Get Help visible, Hide Your Visit hidden ─ */
.mobile-header-gethelp { display: none !important; }
.header-content .mobile-header-gethelp { display: none !important; }
@media (max-width: 768px) {
    .mobile-header-gethelp {
        display: inline-flex !important;
        align-items: center;
        padding: 8px 16px !important;
        font-size: 0.8125rem !important;
    }
    .hide-visit-wrapper { display: none; }
    /* Language switcher: show globe icon only, no text label */
    .language-switcher { margin-left: 0; }
    .language-toggle { padding: 8px 10px; gap: 4px; }
    .current-language { display: none; }
    .chevron-icon { display: none; }
    /* Language dropdown: prevent overflow on narrow screens */
    .language-dropdown { max-width: calc(100vw - 32px); right: 0; left: auto; }
    /* Hide Get Help from hamburger dropdown since it's already in the header */
    nav ul li:first-child { display: none; }
}

/* ── Quick Exit Button ───────────────────────────────────── */
.quick-exit {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: var(--quick-exit-bg);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 14px 16px 14px 18px;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    box-shadow: -4px 0 16px rgba(232,99,26,0.4);
    transition: background 0.2s, padding 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.quick-exit:hover { background: var(--quick-exit-bg-hover); padding-left: 22px; }
.quick-exit:focus { outline: 3px solid white; outline-offset: -4px; }
@media (max-width: 768px) {
    .quick-exit {
        right: auto;
        left: 16px;
        top: auto;
        bottom: 24px;
        transform: none;
        border-radius: 50px;
        padding: 12px 20px;
        gap: 8px;
        box-shadow: 0 4px 20px rgba(184,77,16,0.45);
    }
    .quick-exit:hover { padding-left: 20px; }
    .quick-exit svg { width: 18px; height: 18px; flex-shrink: 0; }
}

/* ── End-of-Page CTA ────────────────────────────────────── */
.page-cta {
    background: var(--gs-primary-dark);
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.page-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-sm);
}

.page-cta p {
    color: rgba(255, 255, 255, 0.80);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.7;
}

/* ── Google Translate: hide native widget UI ─────────────── */
.gt-hidden { position: absolute; top: -9999px; left: -9999px; visibility: hidden; height: 1px; overflow: hidden; }
.goog-te-banner-frame.skiptranslate, iframe.goog-te-menu-frame { display: none !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-spinner-pos { display: none !important; }
