/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
    --accent:      #e8603c;
    --accent-dark: #c44e2c;
    --dark:        #1e2d3d;
    --text:        #6b7280;
    --light-bg:    #f9fafb;
    --white:       #ffffff;
    --border:      #e5e7eb;
    --shadow:      0 4px 20px rgba(0, 0, 0, .08);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    color: var(--dark);
    line-height: 1.3;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 90px 0; }
.section-light { background: var(--light-bg); }

.empty-state { text-align: center; color: var(--text); }

.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-header .overline {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-header h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 14px; }
.section-header p   { max-width: 580px; margin: 0 auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 13px 32px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all .25s;
    cursor: pointer;
    border: none;
    font-family: 'Nunito', sans-serif;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,96,60,.35); }

.btn-outline { border: 2px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }

.btn-white { background: var(--white); color: var(--accent); }
.btn-white:hover { background: var(--accent); color: var(--white); }

.btn-donate {
    display: inline-block;
    padding: 9px 22px;
    background: var(--accent);
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-family: 'Nunito', sans-serif;
    transition: background .2s, transform .2s;
}
.btn-donate:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0, 0, 0, .07);
}

.header-placeholder {
    position: relative;
    height: 122px;
}

.header-top {
    background: var(--dark);
    padding: 9px 0;
    font-size: 13px;
}
.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-top a { color: rgba(255,255,255,.75); transition: color .2s; }
.header-top a:hover { color: var(--white); }
.header-top .contact-info { display: flex; gap: 24px; }
.header-top .contact-info i { color: var(--accent); margin-right: 6px; }
.header-top .social-links { display: flex; gap: 14px; }

.header-main { padding: 15px 0; }
.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.site-logo {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--dark);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-logo .logo-icon {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}
.site-logo .logo-text span { color: var(--accent); display: block; }
.site-logo-img { max-height: 52px; max-width: 200px; width: auto; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: color .2s;
    font-family: 'Nunito', sans-serif;
}
.main-nav a:hover { color: var(--accent); }

/* hamburger — hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--dark);
    font-size: 22px;
    line-height: 1;
    margin-left: 4px;
}
.hamburger-icon { pointer-events: none; }
.hamburger-close { display: none; }
.site-header.nav-open .hamburger-open { display: none; }
.site-header.nav-open .hamburger-close { display: inline; }

/* backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 98;
}
.site-header.nav-open .nav-backdrop { display: block; }

/* ============================================================
   CAUSE CARD COMPONENT  (home preview + causes page)
   ============================================================ */
.causes-stats {
    display: flex;
    margin-bottom: 56px;
    background: var(--dark);
    border-radius: 8px;
    overflow: hidden;
}
.stat-item {
    flex: 1; text-align: center;
    padding: 40px 24px;
    border-right: 1px solid rgba(255,255,255,.08);
}
.stat-item:last-child { border-right: none; }
.stat-number {
    font-family: 'Nunito', sans-serif;
    font-size: 2.8rem; font-weight: 900;
    color: var(--accent); line-height: 1;
    display: block; margin-bottom: 8px;
}
.stat-label {
    display: block; font-size: 12px;
    color: rgba(255,255,255,.6);
    text-transform: uppercase; letter-spacing: 1.5px;
}

.causes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.cause-card {
    background: var(--white); border-radius: 8px;
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform .3s;
    display: flex; flex-direction: column;
}
.cause-card:hover { transform: translateY(-6px); }
.cause-card-image { aspect-ratio: 3/2; position: relative; flex-shrink: 0; }
.cause-tag {
    position: absolute; top: 14px; left: 14px;
    background: var(--accent); color: var(--white);
    font-size: 10px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; padding: 4px 12px;
    border-radius: 20px; font-family: 'Nunito', sans-serif;
}
.cause-card-body {
    padding: 22px; flex: 1;
    display: flex; flex-direction: column;
}
.cause-card-body h3 { font-size: .95rem; font-weight: 800; margin-bottom: 10px; line-height: 1.45; }
.cause-card-body > p { font-size: 13px; margin-bottom: 18px; flex: 1; }
.cause-progress { margin-bottom: 18px; }
.progress-bar {
    height: 5px; background: var(--border);
    border-radius: 3px; margin-bottom: 10px; overflow: hidden;
}
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.progress-meta {
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: var(--text);
}
.progress-meta strong { color: var(--dark); font-weight: 700; }
.causes-footer { text-align: center; margin-top: 44px; }

/* ============================================================
   EVENT CARD COMPONENT  (home preview + events page)
   ============================================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.event-card {
    background: var(--white); border-radius: 8px;
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform .3s;
}
.event-card:hover { transform: translateY(-6px); }
.event-card-image { aspect-ratio: 16/9; position: relative; }
.event-date-badge {
    position: absolute; top: 14px; right: 14px;
    background: var(--accent); color: var(--white);
    text-align: center; padding: 8px 14px; border-radius: 4px;
    font-family: 'Nunito', sans-serif; font-weight: 800;
}
.event-date-badge .day   { font-size: 1.5rem; line-height: 1; display: block; }
.event-date-badge .month { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.event-card-body { padding: 24px; }
.event-card-body h3 { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.event-meta { font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.event-meta-item { display: flex; align-items: flex-start; gap: 10px; color: var(--text); }
.event-meta-item i { color: var(--accent); width: 14px; margin-top: 3px; flex-shrink: 0; }
.event-meta-item strong { color: var(--dark); }
.events-footer { text-align: center; margin-top: 44px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.65);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.6fr;
    gap: 48px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo {
    display: flex; align-items: center;
    gap: 10px; margin-bottom: 18px;
}
.footer-logo .logo-icon {
    width: 40px; height: 40px; background: var(--accent);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: white; font-size: 18px; flex-shrink: 0;
}
.footer-logo .logo-text {
    color: var(--white);
    font-family: 'Nunito', sans-serif;
    font-weight: 800; font-size: 16px;
}
.footer-logo .logo-text span { color: var(--accent); display: block; }
.footer-logo-img { max-height: 48px; width: auto; object-fit: contain; }
.footer-brand > p { font-size: 13.5px; line-height: 1.85; margin-bottom: 24px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.65); font-size: 14px; transition: all .2s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.footer-col h4 {
    color: var(--white); font-size: 15px; font-weight: 800;
    margin-bottom: 22px; padding-bottom: 12px; position: relative;
}
.footer-col h4::after {
    content: ''; position: absolute;
    bottom: 0; left: 0; width: 28px; height: 2px;
    background: var(--accent);
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,.65); font-size: 13.5px;
    transition: color .2s, padding-left .2s;
}
.footer-links a:hover { color: var(--accent); padding-left: 6px; }

.footer-contact-item {
    display: flex; gap: 12px; margin-bottom: 14px;
    font-size: 13.5px; align-items: flex-start;
}
.footer-contact-item i { color: var(--accent); margin-top: 3px; width: 14px; flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,.65); transition: color .2s; }
.footer-contact-item a:hover { color: var(--accent); }

.footer-donate-box {
    background: rgba(255,255,255,.05); border-radius: 10px;
    padding: 28px; border: 1px solid rgba(255,255,255,.07);
}
.donate-box-title {
    font-size: 1.1rem; font-weight: 800;
    color: var(--white); margin-bottom: 10px;
}
.footer-donate-box > p { font-size: 13.5px; margin-bottom: 18px; line-height: 1.7; }
.footer-donate-box form { display: flex; flex-direction: column; gap: 0; }
.donate-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.amount-btn {
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,.2); border-radius: 20px;
    background: transparent; color: rgba(255,255,255,.65);
    font-size: 12px; font-weight: 700;
    font-family: 'Nunito', sans-serif; cursor: pointer; transition: all .2s;
}
.amount-btn:hover,
.amount-btn.active { background: var(--accent); border-color: var(--accent); color: var(--white); }
.donate-custom-amount {
    display: flex; align-items: center; gap: 0;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}
.donate-custom-amount input {
    flex: 1; padding: 11px 14px;
    background: transparent; border: none; outline: none;
    color: var(--white); font-size: 14px; font-weight: 600;
    font-family: 'Nunito', sans-serif;
}
.donate-custom-amount input::placeholder { color: rgba(255,255,255,.35); }
.donate-currency {
    padding: 0 14px;
    font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.45);
    letter-spacing: .5px;
    border-left: 1px solid rgba(255,255,255,.1);
}
.footer-donate-box .btn { display: block; text-align: center; width: 100%; margin-bottom: 14px; }
.footer-sms-hint { text-align: center; font-size: 12px; color: rgba(255,255,255,.45); margin-top: 6px; }
.footer-sms-hint strong { color: rgba(255,255,255,.7); }

.footer-bottom {
    padding: 20px 0;
    display: flex; justify-content: space-between;
    align-items: center; font-size: 12.5px;
    flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,.65); transition: color .2s; }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom-links { display: flex; gap: 6px; align-items: center; }
.footer-bottom-links .sep { color: rgba(255,255,255,.2); }

/* ============================================================
   CARD IMAGE PLACEHOLDER BACKGROUNDS
   ============================================================ */
.cause-img--1 { background: linear-gradient(135deg, #1b4332, #2d6a4f); }
.cause-img--2 { background: linear-gradient(135deg, #0d2040, #1a3a6a); }
.cause-img--3 { background: linear-gradient(135deg, #3d2a0a, #6a4a1a); }
.cause-img--4 { background: linear-gradient(135deg, #2a0d40, #4a1a6a); }
.event-img--1  { background: linear-gradient(135deg, #0a1a30, #1e3a5f); }
.event-img--2  { background: linear-gradient(135deg, #300a14, #5f1e2f); }
.event-img--3  { background: linear-gradient(135deg, #0a3014, #1e5f2f); }

/* ============================================================
   PAGE BANNER
   ============================================================ */
.page-banner {
    background: var(--dark);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .25;
    pointer-events: none;
}

.page-banner .container { position: relative; z-index: 1; }
.page-banner .overline {
    display: inline-block;
    font-size: 12px; font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
}
.page-banner h1 { color: var(--white); font-size: 2.4rem; font-weight: 900; margin-bottom: 14px; }
.page-banner p  { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto; }

/* ============================================================
   RESPONSIVE — shared components
   ============================================================ */
@media (max-width: 1024px) {
    .causes-grid   { grid-template-columns: repeat(2, 1fr); }
    .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .page-banner   { padding: 60px 0 40px; }
    .header-placeholder { height: 64px; }
    .section       { padding: 64px 0; }
    .events-grid   { grid-template-columns: 1fr; }
    .causes-stats  { flex-direction: column; }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.08);
        padding: 28px;
    }
    .stat-item:last-child { border-bottom: none; }
    .stat-number   { font-size: 2.2rem; }
    .header-top    { display: none; }
    .footer-grid   { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 576px) {
    .causes-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; align-items: center; justify-content: center; }
    .header-donate-btn { display: inline-flex; }
    .header-cart { display: none; }

    .main-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
        z-index: 99;
        padding: 8px 0 16px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
    }
    .main-nav a {
        padding: 14px 24px;
        font-size: 14px;
        border-bottom: 1px solid var(--border);
    }
    .main-nav a:last-child { border-bottom: none; }

    .site-header.nav-open .main-nav {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .header-main .container { position: relative; }
}

/* ============================================================
   FLASH TOASTS — global, fixed top-right
   ============================================================ */
.flash-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.flash-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    pointer-events: all;
    animation: flash-in .3s ease;
}

@keyframes flash-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.flash-toast--success { background: #d1fae5; border-left: 4px solid #10b981; }
.flash-toast--error   { background: #fee2e2; border-left: 4px solid #ef4444; }
.flash-toast--warning { background: #fef9c3; border-left: 4px solid #f59e0b; }
.flash-toast--info    { background: #dbeafe; border-left: 4px solid #3b82f6; }

.flash-toast-icon {
    font-size: 18px;
    margin-top: 1px;
    flex-shrink: 0;
}

.flash-toast--success .flash-toast-icon { color: #10b981; }
.flash-toast--error   .flash-toast-icon { color: #ef4444; }
.flash-toast--warning .flash-toast-icon { color: #f59e0b; }
.flash-toast--info    .flash-toast-icon { color: #3b82f6; }

.flash-toast-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flash-toast-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #374151;
}

.flash-toast-message {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.5;
}

.flash-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.flash-toast-close:hover { color: #374151; }

@media (max-width: 480px) {
    .flash-container { top: 16px; right: 16px; left: 16px; }
    .flash-toast { min-width: 0; max-width: 100%; }
}

/* ─── HEADER CART ICON ───────────────────────────────────────────── */

.header-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #374151;
    font-size: 1.15rem;
    text-decoration: none;
    transition: color .2s;
}

.header-cart:hover { color: var(--color-accent, #e67e22); }

.header-cart__badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--color-accent, #e67e22);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ─── SHARED BUTTON VARIANTS ─────────────────────────────────────── */

.btn--sm {
    padding: .35rem .75rem;
    font-size: .82rem;
}

.btn--lg {
    padding: .8rem 1.75rem;
    font-size: 1rem;
}

.btn--outline {
    background: transparent;
    border: 2px solid currentColor;
    color: #374151;
    padding: .55rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s, color .2s;
}

.btn--outline:hover {
    background: #374151;
    color: #fff;
}
