/* ==========================================================================
   Sacred Bloom Health Foundation – Mobile-First Optimized CSS (2026)
   ========================================================================== */

:root {
    --primary:       #ed3176;
    --primary-dark:  #d42a67;
    --secondary:     #7fc142;
    --dark:          #2c3e50;
    --light:         #f8f9fa;
    --gray:          #6c757d;

    --font-size-base: clamp(1rem,   0.5rem + 2vw, 1.125rem);
    --font-size-h1:   clamp(2.1rem, 6vw + 1rem,   3.6rem);
    --font-size-h2:   clamp(1.7rem, 5vw + 0.8rem, 2.6rem);
    --font-size-h3:   clamp(1.35rem,4vw + 0.6rem, 1.9rem);

    --spacing-xs: 0.75rem;
    --spacing-sm: 1.25rem;
    --spacing-md: 2rem;
    --spacing-lg: clamp(3rem, 6vw, 5rem);

    --shadow-sm: 0 3px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark);
    background: #fff;
}


/* ==========================================================================
   TYPOGRAPHY & REUSABLES (mobile base)
   ========================================================================== */

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: var(--font-size-h1); margin-block-end: 1rem; }
h2 { font-size: var(--font-size-h2); margin-block: 0 1.25rem; position: relative; }
h3 { font-size: var(--font-size-h3); }

h2:after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.text-center h2:after { left: 50%; transform: translateX(-50%); }

p {
    margin-block-end: 1.25rem;
    font-size: 1.05rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 48px;
    min-width: 140px;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus-visible { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: var(--secondary); color: white; }
.btn-outline    { border: 2px solid var(--primary); color: var(--primary); background: transparent; }

.btn-outline:hover,
.btn-outline:focus-visible { background: var(--primary); color: white; }

/* Focus & motion */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; transform: none !important; }
}

/* ==========================================================================
   HEADER & NAVIGATION (mobile hamburger first)
   ========================================================================== */

/* ==========================================================================
   HEADER & NAVIGATION (enhanced mobile-first + nonprofit best practices)
   ========================================================================== */

.site-header {  /* Use a class like .site-header on your <header> for specificity */
    position: sticky;               /* Better than fixed in most cases – allows natural flow */
    inset-block-start: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    box-shadow: var(--shadow-sm);
    padding-block: 0.2rem;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    padding-block: 0.65rem;
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

/* Container layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; /* Safety for very small screens */
}

/* Logo – make whole thing clickable if using <a> wrapper */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    /* max-height: 80px;           */
    width: 110px;
    height: auto;
}

.logo h1 {
    font-size: clamp(1.4rem, 4.5vw, 1.8rem);
    margin-inline-start: 0.75rem; /* If keeping text beside logo */
    white-space: nowrap;
}

.logo span { color: var(--primary); }
.logo .bloom { color: var(--secondary); }

/* Mobile toggle – larger touch target, accessible */
.mobile-toggle {
    background: none;
    border: none;
    font-size: 1.9rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.75rem;          /* ≥44px touch target */
    margin-inline-start: auto; /* Push to right if needed */
    display: flex;
    align-items: center;
}

.mobile-toggle:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Navigation – hidden on mobile */
nav {
    display: none;
}

nav.active {
    display: block;
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    background: white;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md) var(--spacing-sm);
    max-height: calc(100vh - var(--header-height, 70px)); /* Prevent overflow */
    overflow-y: auto;
}

/* Optional: Backdrop overlay when menu open */
nav.active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

/* Menu list */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

nav a {
    color: var(--dark);
    font-weight: 500;
    text-decoration: none;
    font-size: 1.15rem;
    padding: 0.8rem 1rem;
    display: block;
    transition: color 0.2s;
}

nav a:hover,
nav a:focus-visible {
    color: var(--primary);
}

/* Donate button – always visible on desktop, in menu or separate on mobile */
.nav-cta .btn-primary {
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(237, 49, 118, 0.25);
}

/* Desktop layout – full nav + CTA */
@media (min-width: 768px) {
    .mobile-toggle { display: none; }

    nav {
        display: flex;
        position: static;
        flex-grow: 1;
        justify-content: flex-end;
    }

    nav ul {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
    }

    nav a {
        padding: 0.5rem 0;
        font-size: 1.05rem;
    }

    .header-container {
        flex-wrap: nowrap;
    }

    /* Push Donate further right */
    .nav-cta {
        margin-inline-start: 1.5rem;
    }
}

/* ==========================================================================
   Mobile: Donate button BETWEEN logo and hamburger
   ========================================================================== */

@media (max-width: 767px) {

    .header-container {
        position: relative;
        justify-content: space-between;
        align-items: center;
        padding-inline: 1rem;
    }

    /* Logo stays on the left */
    .logo {
        flex-shrink: 0;
        z-index: 12;
    }

    /* Donate button centered (visually between logo and hamburger) */
    .nav-cta {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    /* Hamburger stays on the far right */
    .mobile-toggle {
        margin-left: auto;
        flex-shrink: 0;
        z-index: 11;                    /* slightly above donate if overlap risk */
        padding: 0.8rem;                /* good touch target */
    }

    /* Make Donate button more compact on mobile */
    .donate-btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.95rem;
        min-width: 110px;
        box-shadow: 0 3px 10px rgba(237, 49, 118, 0.3);
        white-space: nowrap;
    }

    /* Optional: even smaller screens → icon-only button */
    @media (max-width: 360px) {
        .donate-btn {
            padding: 0.6rem 0.9rem;
            font-size: 0.9rem;
            min-width: 90px;
        }

        .donate-btn i {
            margin-right: 0.4rem;
        }
    }
}

/* Desktop layout remains unchanged (your existing rules) */
@media (min-width: 768px) {
    .nav-cta {
        position: static;
        transform: none;
        margin-left: 1.5rem;
    }

    .mobile-toggle {
        display: none;
    }

    .donate-btn {
        padding: 0.9rem 1.8rem;
        font-size: 1.05rem;
    }
}

/* Extra small screens – ensure nothing overflows */
@media (max-width: 480px) {
    .header-container {
        padding-inline: 0.75rem;
    }

    .logo img {
        max-height: 42px;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Contact Hero Section */
.contact-hero {
    padding: clamp(8rem, 15vh, 12rem) 0 6rem;
    background: linear-gradient(rgba(44,62,80,0.7), rgba(44,62,80,0.5)), url('https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?w=1600') center/cover;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.contact-hero h1 {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    color: var(--primary);
}

.contact-main {
    padding-block: clamp(5rem, 10vw, 8rem);
}

.contact-details .detail-item {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
    font-size: 1.1rem;
    text-decoration: none;
}

.contact-details i {
    font-size: 1.8rem;
    color: var(--primary);
    flex-shrink: 0;
}

.map-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ==========================================================================
   CONTACT FORM – Modern, clean, narrow & elegant
   ========================================================================== */

.contact-form-wrapper {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.contact-form-wrapper h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    margin-bottom: 1rem;
}

.form-intro {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.form-group {
    flex: 1 1 45%;
    min-width: 280px;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.98rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.95rem 1.3rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    background: #f9fafb;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(237, 49, 118, 0.15);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    align-self: flex-start;
    padding: 1rem 2.4rem;
    font-size: 1.08rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(237, 49, 118, 0.25);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(237, 49, 118, 0.35);
}

/* Responsive */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column;
        gap: 1.4rem;
    }

    .form-group {
        flex: 1 1 100%;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   FOOTER
   Modern, informative, mobile-friendly, nonprofit style
   ========================================================================== */
.site-footer {
    background: #0f172a; /* deep navy - modern dark base */
    color: #cbd5e1;
    padding-block: 5rem 3rem;
    font-size: 0.95rem;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem 2rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-block-end: 4rem;
    padding-block-end: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
    max-width: 340px;
}

.footer-brand .logo img {
    max-height: 130px;
    width: auto;
    margin-block-end: 1.2rem;
}

.footer-tagline {
    line-height: 1.6;
    opacity: 0.85;
}

.footer-newsletter h4 {
    color: white;
    margin-block-end: 1rem;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 380px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px 0 0 50px;
    background: rgba(255,255,255,0.05);
    color: white;
}

.newsletter-form button {
    border-radius: 0 50px 50px 0;
    padding: 0 1.6rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.25s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem 2rem;
}

.footer-col h3 {
    color: white;
    font-size: 1.15rem;
    margin-block-end: 1.2rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-block-end: 0.7rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

/* Bottom */
.footer-bottom {
    text-align: center;
    margin-block-start: 3.5rem;
    padding-block-start: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.copyright {
    opacity: 0.75;
    margin-block-end: 0.6rem;
}

.footer-legal a {
    color: #94a3b8;
    margin: 0 0.8rem;
    text-decoration: none;
}

.footer-legal a:hover {
    color: white;
}

/* Mobile tweaks */
@media (max-width: 767px) {
    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-newsletter {
        width: 100%;
        max-width: 420px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        border-radius: 50px;
    }
}