/* ============================================================
   ASSAM RISING FOUNDATION — FULLY RESPONSIVE STYLESHEET
   Breakpoints: 480px | 640px | 768px | 1024px | 1280px
   ============================================================ */

:root {
    --primary: #1a5c37;
    --primary-light: #2d8a56;
    --secondary: #f97316;
    --accent: #fbbf24;
    --text: #111827;
    --text-muted: #4b5563;
    --bg: #fdfdfd;
    --white: #ffffff;
    --glass: rgba(255,255,255,0.7);
    --glass-border: rgba(255,255,255,0.3);
    --shadow: 0 20px 40px rgba(0,0,0,0.05);
    --transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
    --nav-h: 70px;
}

[data-theme="dark"] {
    --bg: #0a0f0c;
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --white: #111827;
    --glass: rgba(17,24,39,0.7);
    --glass-border: rgba(255,255,255,0.1);
    --shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ── Reset & Base ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
    font-family:'Inter', sans-serif;
    background-color:var(--bg);
    color:var(--text);
    overflow-x:hidden;
    line-height:1.7;
    transition:background-color 0.5s;
}
h1,h2,h3,h4 { font-family:'Playfair Display', serif; font-weight:900; line-height:1.15; }
img { max-width:100%; display:block; }
a { text-decoration:none; }
ul { list-style:none; }
input,select,textarea,button { font-family:inherit; }

/* ── Utilities ── */
.text-center { text-align:center; }
.bg-white    { background:var(--white); }

/* ── Progress Bar ── */
#scroll-progress {
    position:fixed; top:0; left:0; height:4px;
    background:linear-gradient(90deg,var(--primary),var(--secondary));
    z-index:10001; width:0%;
    transition:width 0.1s;
}

/* ── Cursor Glow (desktop only) ── */
#cursor-glow {
    position:fixed; width:300px; height:300px;
    background:radial-gradient(circle,rgba(26,92,55,0.15) 0%,transparent 70%);
    border-radius:50%; pointer-events:none; z-index:9999;
    transform:translate(-50%,-50%); display:none;
}

/* ── Loader ── */
#loader {
    position:fixed; inset:0; background:#0a0f0c;
    z-index:99999; display:flex; align-items:center; justify-content:center;
}
.loader-logo { width:80px; animation:pulse 2s infinite; }
@keyframes pulse {
    0%   { opacity:0.5; transform:scale(0.9); }
    50%  { opacity:1;   transform:scale(1.1); }
    100% { opacity:0.5; transform:scale(0.9); }
}

/* ── Navbar ── */
nav {
    position:fixed; top:0; width:100%; z-index:1000;
    padding:20px 0; transition:var(--transition);
}
nav.scrolled {
    background:var(--glass); backdrop-filter:blur(20px);
    padding:12px 0; box-shadow:var(--shadow);
}
.nav-content {
    display:flex; justify-content:space-between; align-items:center;
    max-width:1400px; margin:0 auto; padding:0 clamp(16px,4vw,40px);
    position:relative;
}
.nav-logo {
    display:flex; align-items:center; gap:12px;
    font-weight:900; font-size:clamp(1rem,2.5vw,1.4rem);
    color:var(--primary); font-family:'Playfair Display', serif;
}
.nav-logo img { height:clamp(36px,5vw,50px); }

/* Desktop nav links */
.nav-links {
    display:flex; gap:clamp(14px,2vw,30px);
    list-style:none; align-items:center;
}
.nav-links a {
    color:var(--text); font-weight:500;
    font-size:clamp(0.8rem,1.1vw,0.9rem); transition:0.3s;
}
.nav-links a:hover { color:var(--primary); }

/* Hamburger */
.hamburger {
    display:none; flex-direction:column; justify-content:center;
    gap:5px; cursor:pointer; padding:8px; border:none;
    background:none; z-index:1100;
}
.hamburger span {
    display:block; width:26px; height:2.5px;
    background:var(--text); border-radius:2px;
    transition:var(--transition); transform-origin:center;
}
.hamburger.open span:nth-child(1) { transform:translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity:0; transform:scaleX(0); }
.hamburger.open span:nth-child(3) { transform:translateY(-7.5px) rotate(-45deg); }

/* Theme toggle */
.theme-switch { cursor:pointer; font-size:1.3rem; padding:6px; }

/* ── Mobile Nav Drawer ── */
@media (max-width:768px) {
    .hamburger { display:flex; }
    .nav-links {
        position:fixed; top:0; right:-100%; width:min(280px,80vw);
        height:100vh; flex-direction:column; justify-content:center;
        gap:32px; background:var(--bg);
        box-shadow:-4px 0 30px rgba(0,0,0,0.12);
        padding:80px 40px 40px; transition:right 0.4s ease;
        z-index:1050;
    }
    .nav-links.open { right:0; }
    .nav-links a { font-size:1.1rem; }
    .nav-links .btn { width:100%; text-align:center; }

    /* Overlay behind drawer */
    .nav-overlay {
        display:none; position:fixed; inset:0;
        background:rgba(0,0,0,0.45); z-index:1040;
    }
    .nav-overlay.open { display:block; }
}

/* ── Floating Socials ── */
.social-float {
    position:fixed; left:24px; top:50%;
    transform:translateY(-50%); z-index:100;
    display:flex; flex-direction:column; gap:18px;
}
.social-float a {
    font-size:1.1rem; color:var(--text-muted); transition:0.3s;
}
.social-float a:hover { color:var(--primary); transform:translateX(4px); }

/* ── Buttons ── */
.btn {
    display:inline-block; padding:clamp(12px,2vw,16px) clamp(22px,3vw,36px);
    border-radius:50px; font-weight:600; cursor:pointer;
    transition:0.3s; border:none; font-size:clamp(0.85rem,1.5vw,1rem);
    white-space:nowrap;
}
.btn-primary  { background:var(--primary); color:white !important; }
.btn-secondary{ background:var(--secondary); color:white !important; }
.btn-primary:hover  { transform:translateY(-3px); box-shadow:0 10px 20px rgba(26,92,55,0.3); }
.btn-secondary:hover{ transform:translateY(-3px); box-shadow:0 10px 20px rgba(249,115,22,0.3); }

/* ── Hero ── */
.hero {
    min-height:100svh; position:relative; overflow:hidden;
    display:flex; align-items:center;
}
.hero-video { position:absolute; inset:0; z-index:-1; }
.hero-video img { width:100%; height:100%; object-fit:cover; filter:brightness(0.42); }
.hero-content {
    width:100%; max-width:1400px; margin:0 auto;
    padding:clamp(100px,15vw,140px) clamp(16px,5vw,60px) clamp(60px,8vw,80px);
    color:white;
}
.hero-eyebrow {
    color:var(--accent); font-weight:700;
    text-transform:uppercase;
    letter-spacing:clamp(2px,0.5vw,4px);
    font-size:clamp(0.7rem,1.5vw,0.9rem);
    display:block; margin-bottom:16px;
}
.hero h1 {
    font-size:clamp(2.2rem,6vw,5.5rem);
    line-height:1.1; margin-bottom:clamp(16px,2vw,30px);
}
.hero p {
    font-size:clamp(0.95rem,1.8vw,1.3rem);
    max-width:650px; opacity:0.9;
    margin-bottom:clamp(24px,4vw,40px); line-height:1.7;
}
.hero-btns {
    display:flex; flex-wrap:wrap;
    gap:clamp(12px,2vw,20px);
}
.hero-btns .btn {
    padding:clamp(13px,2vw,18px) clamp(24px,3vw,44px);
    font-size:clamp(0.9rem,1.5vw,1.1rem);
}

/* ── Sections ── */
.section { padding:clamp(60px,10vw,150px) 0; }
section  { padding:clamp(60px,10vw,150px) 0; }
.container { max-width:1200px; margin:0 auto; padding:0 clamp(16px,4vw,20px); }

/* ── Stats ── */
.stats-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(200px,45%),1fr));
    gap:clamp(24px,5vw,50px);
}
.stat-item { padding:clamp(20px,3vw,30px) 0; }
.stat-item h2 {
    font-size:clamp(2rem,6vw,4rem);
    color:var(--primary); line-height:1;
}
.stat-item p {
    font-weight:600; text-transform:uppercase;
    letter-spacing:2px; font-size:clamp(0.65rem,1vw,0.8rem);
    margin-top:8px; color:var(--text-muted);
}

/* ── About ── */
.about-flex {
    display:flex; gap:clamp(40px,7vw,100px);
    align-items:center; flex-wrap:wrap;
}
.about-text {
    flex:1; min-width:min(340px,100%);
}
.about-img-wrap {
    flex:1; min-width:min(340px,100%);
    position:relative; margin-top:clamp(40px,0px,0px);
}
.about-text h2 {
    font-size:clamp(2rem,4.5vw,3.5rem);
    margin-bottom:clamp(16px,2.5vw,30px);
}
.about-text p {
    font-size:clamp(0.95rem,1.5vw,1.2rem);
    color:var(--text-muted); margin-bottom:clamp(20px,3vw,30px);
}
.about-img-wrap img {
    width:100%; border-radius:clamp(20px,3vw,40px);
    box-shadow:var(--shadow);
}
.about-badge {
    position:absolute;
    bottom:clamp(-20px,-3vw,-30px);
    left:clamp(-16px,-2vw,-30px);
    background:var(--secondary); color:white;
    padding:clamp(20px,3vw,40px);
    border-radius:clamp(16px,2vw,30px);
    box-shadow:var(--shadow);
}
.about-badge h4 { font-size:clamp(1.4rem,3vw,2.5rem); }
.about-badge p  { font-size:clamp(0.75rem,1.2vw,0.95rem); }

/* ── Programs Cards ── */
.section-heading {
    margin-bottom:clamp(40px,6vw,80px);
}
.section-heading h2 {
    font-size:clamp(1.9rem,4.5vw,3.5rem);
}
.section-heading p {
    max-width:700px; margin:20px auto 0;
    color:var(--text-muted); font-size:clamp(0.9rem,1.5vw,1rem);
}
.programs-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));
    gap:clamp(20px,3vw,40px);
}

/* ── Glass Card ── */
.glass-card {
    background:var(--glass); backdrop-filter:blur(20px);
    border:1px solid var(--glass-border);
    border-radius:clamp(16px,2.5vw,30px);
    padding:clamp(28px,4vw,50px);
    box-shadow:var(--shadow); transition:var(--transition);
}
.glass-card:hover { transform:translateY(-12px); box-shadow:0 40px 80px rgba(0,0,0,0.1); }
.glass-card h3 { font-size:clamp(1.1rem,2vw,1.4rem); margin-bottom:8px; }
.card-icon {
    font-size:clamp(2rem,4vw,3rem);
    margin-bottom:clamp(16px,2.5vw,25px);
}
.card-checklist {
    display:grid; grid-template-columns:1fr 1fr;
    gap:10px; font-size:0.9rem; font-weight:600;
    margin-top:clamp(12px,2vw,20px);
}

/* ── Flood Section ── */
.flood-flex {
    display:flex; gap:clamp(30px,6vw,80px);
    align-items:center; flex-wrap:wrap;
}
.flood-text { flex:1; min-width:min(300px,100%); }
.flood-card { flex:1; min-width:min(300px,100%); }
.flood-text h2 {
    font-size:clamp(2rem,5vw,4rem); margin-bottom:clamp(16px,2vw,20px);
}
.flood-text p {
    font-size:clamp(0.95rem,1.8vw,1.3rem);
    margin-bottom:clamp(24px,4vw,40px); opacity:0.9;
}
.progress-label {
    display:flex; justify-content:space-between;
    margin-bottom:10px; font-weight:700;
    font-size:clamp(0.8rem,1.3vw,1rem);
}
.progress-bar {
    height:12px; background:rgba(255,255,255,0.15);
    border-radius:10px; overflow:hidden; margin-bottom:clamp(24px,4vw,40px);
}
.progress-fill {
    width:75%; height:100%;
    background:var(--secondary); border-radius:10px;
}
.flood-ops-list { display:flex; flex-direction:column; gap:15px; }
.flood-ops-list li { font-size:clamp(0.9rem,1.5vw,1rem); }
.flood-ops-list li i { margin-right:10px; }

/* ── Gallery ── */
.gallery-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(240px,45%),1fr));
    gap:clamp(12px,2vw,20px);
}
.gallery-item { border-radius:clamp(12px,2vw,20px); overflow:hidden; }
.gallery-item img {
    width:100%; aspect-ratio:4/3; object-fit:cover;
    transition:transform 0.5s;
}
.gallery-item:hover img { transform:scale(1.07); }
.gallery-title {
    font-size:clamp(1.9rem,4.5vw,3.5rem);
    margin-bottom:clamp(30px,5vw,60px);
}

/* ── Donate Section ── */
.donate-flex {
    display:flex; gap:clamp(40px,7vw,100px);
    align-items:center; flex-wrap:wrap;
}
.donate-text { flex:1; min-width:min(300px,100%); }
.donate-qr   { flex:1; min-width:min(280px,100%); text-align:center; }
.donate-text h2 { font-size:clamp(2rem,5vw,4rem); margin-bottom:clamp(14px,2vw,20px); }
.donate-text p  { font-size:clamp(0.9rem,1.5vw,1.2rem); opacity:0.9; margin-bottom:clamp(16px,2.5vw,30px); }

.donation-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:clamp(10px,1.5vw,15px); margin:clamp(16px,2.5vw,30px) 0;
}
.amount-btn {
    padding:clamp(12px,2vw,20px);
    border:2px solid rgba(255,255,255,0.5);
    border-radius:15px; background:none;
    color:white; font-weight:700; cursor:pointer;
    transition:0.3s; font-size:clamp(0.85rem,1.5vw,1rem);
}
.amount-btn.active,
.amount-btn:hover { background:rgba(255,255,255,0.2); border-color:white; }

.donate-input {
    width:100%; padding:clamp(14px,2vw,20px);
    border-radius:15px; border:none;
    margin-bottom:clamp(16px,2.5vw,25px); outline:none;
    font-size:clamp(0.9rem,1.5vw,1.1rem); color:var(--text);
}
.donate-submit {
    width:100%; padding:clamp(16px,2.5vw,25px);
    font-size:clamp(1rem,1.8vw,1.3rem); color:white;
    border-radius:15px; border:none;
    background:var(--secondary); cursor:pointer;
    font-weight:700; transition:0.3s;
}
.donate-submit:hover { transform:translateY(-3px); }
.donate-note {
    margin-top:16px; font-size:clamp(0.78rem,1.2vw,0.9rem);
    text-align:center; opacity:0.8;
}

/* ── Volunteer Form ── */
.volunteer-card {
    max-width:900px; margin:0 auto;
    padding:clamp(32px,6vw,80px);
}
.volunteer-card h2 { font-size:clamp(1.8rem,4vw,3rem); margin-bottom:12px; }
.volunteer-card > .text-center { margin-bottom:clamp(28px,4vw,50px); }
.volunteer-card p { color:var(--text-muted); }
.vol-form {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:clamp(16px,2.5vw,30px);
}
.vol-form input,
.vol-form select,
.vol-form textarea {
    padding:clamp(14px,2vw,20px);
    border-radius:15px; border:1px solid #eee;
    background:var(--bg); outline:none;
    font-size:clamp(0.85rem,1.4vw,1rem); width:100%;
    color:var(--text); transition:border-color 0.3s;
}
.vol-form input:focus,
.vol-form select:focus,
.vol-form textarea:focus { border-color:var(--primary); }
.vol-form textarea    { grid-column:span 2; height:clamp(120px,18vw,150px); resize:vertical; }
.vol-form .vol-submit { grid-column:span 2; }
.vol-submit {
    width:100%; padding:clamp(16px,2.5vw,25px);
    font-size:clamp(0.95rem,1.5vw,1.1rem); color:white;
}

/* ── Footer ── */
footer {
    background:#0a0f0c; color:#888;
    padding:clamp(60px,8vw,100px) 0 clamp(30px,4vw,40px);
}
.footer-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));
    gap:clamp(32px,5vw,80px);
    margin-bottom:clamp(40px,5vw,80px);
}
footer h4 {
    color:white; margin-bottom:clamp(16px,2.5vw,30px);
    font-size:clamp(0.95rem,1.5vw,1.1rem);
}
footer p  { font-size:clamp(0.8rem,1.2vw,0.95rem); line-height:1.8; }
footer ul { line-height:2.5; }
footer a  { color:#aaa; transition:0.3s; }
footer a:hover { color:var(--secondary); }
.footer-logo { height:clamp(40px,5vw,60px); filter:brightness(0) invert(1); margin-bottom:clamp(16px,2.5vw,30px); }
.footer-bottom {
    font-size:clamp(0.75rem,1.2vw,0.85rem);
    color:#666; text-align:center;
}

/* ── WhatsApp FAB ── */
.whatsapp-fab {
    position:fixed; bottom:clamp(20px,4vw,40px); right:clamp(16px,3vw,40px);
    background:#25d366; color:white;
    width:clamp(52px,7vw,70px); height:clamp(52px,7vw,70px);
    border-radius:50%; display:flex; align-items:center; justify-content:center;
    font-size:clamp(1.6rem,3vw,2.5rem);
    box-shadow:0 10px 30px rgba(0,0,0,0.3);
    z-index:1000; transition:transform 0.3s;
}
.whatsapp-fab:hover { transform:scale(1.1); }

/* ── Responsive Breakpoints ── */

/* Large Desktop */
@media (min-width:1400px) {
    .hero-content { max-width:1400px; }
}

/* Laptop / Small Desktop */
@media (max-width:1024px) {
    .social-float { left:12px; }
    .about-badge {
        bottom:-16px; left:-16px;
        padding:clamp(16px,2.5vw,28px);
    }
}

/* Tablet */
@media (max-width:768px) {
    /* Nav */
    .social-float { display:none; }

    /* Hero */
    .hero-content { padding-top:100px; }
    .hero h1      { font-size:clamp(1.9rem,7vw,3rem); }

    /* About */
    .about-flex { flex-direction:column; gap:40px; }
    .about-img-wrap { padding-bottom:40px; }
    .about-badge {
        position:static; margin-top:20px;
        display:inline-block; border-radius:16px;
    }

    /* Flood */
    .flood-flex { flex-direction:column; gap:32px; }

    /* Donate */
    .donate-flex { flex-direction:column; gap:40px; }
    .donate-qr   { width:100%; }

    /* Volunteer Form */
    .vol-form {
        grid-template-columns:1fr;
    }
    .vol-form textarea,
    .vol-form .vol-submit { grid-column:span 1; }

    /* Footer */
    .footer-grid { gap:40px; }
}

/* Mobile */
@media (max-width:640px) {
    /* Hero buttons stack */
    .hero-btns { flex-direction:column; gap:12px; }
    .hero-btns .btn { width:100%; text-align:center; }

    /* Stats */
    .stats-grid { grid-template-columns:1fr 1fr; gap:20px; }

    /* Programs */
    .programs-grid { grid-template-columns:1fr; }

    /* Gallery */
    .gallery-grid { grid-template-columns:1fr 1fr; }

    /* Donation buttons */
    .donation-grid { grid-template-columns:1fr 1fr 1fr; }

    /* Flood background-attachment fix for iOS */
    section#flood {
        background-attachment:scroll !important;
    }
}

/* Extra Small */
@media (max-width:480px) {
    .gallery-grid   { grid-template-columns:1fr; }
    .donation-grid  { grid-template-columns:1fr; }
    .stats-grid     { grid-template-columns:1fr; }
    .card-checklist { grid-template-columns:1fr; }

    .volunteer-card { padding:28px 20px; }

    /* Increase touch targets */
    .btn { min-height:48px; }
    .amount-btn { min-height:52px; }

    /* Ensure no overflow */
    .about-img-wrap { overflow:visible; }
}

/* ── iOS safari fixes ── */
@supports (-webkit-touch-callout: none) {
    .hero { min-height:-webkit-fill-available; }
    section#flood { background-attachment:scroll !important; }
}
