/* ============================================================
   NGO SITE — COMPLETE RESPONSIVE CSS
   site.css — replaces responsive.css for public pages
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { overflow-x: hidden; min-width: 320px; font-family: var(--font-body, 'Inter', sans-serif); }
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* ════════════════════════════════════
   HEADER
   ════════════════════════════════════ */
.site-header {
    background: var(--header-bg);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: box-shadow 0.2s;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0.75rem;
}
/* Prevent flex children from overflowing */
.header-inner > * { min-width: 0; }

/* Logo */
.site-logo { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 1; min-width: 0; max-width: 50%; }
.logo-icon {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 900; font-size: 1.1rem;
    flex-shrink: 0;
}
.site-logo-text {
    font-family: var(--font-head);
    font-size: 1.2rem; font-weight: 800;
    color: var(--header-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Desktop nav */
.main-nav { display: flex; align-items: center; flex: 1; justify-content: center; }
.nav-list {
    display: flex; align-items: center;
    gap: 0; list-style: none;
    flex-wrap: nowrap;
}
.nav-list a {
    display: block;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    color: var(--header-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
    white-space: nowrap;
}
.nav-list a:hover { background: rgba(255,255,255,0.15); color: var(--header-text); }

/* Header right buttons */
.header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.hdr-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}
.hdr-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.hdr-btn-primary:hover { background: var(--primary-dark); color: #fff; }
.hdr-btn-outline { background: transparent; color: var(--header-text); border-color: rgba(255,255,255,0.4); }
.hdr-btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--header-text); }

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--header-text);
    border-radius: 2px;
    transition: all 0.25s;
    transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--header-bg);
    z-index: 999;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.mobile-nav.open {
    display: block;
    transform: translateY(0);
    opacity: 1;
}
.mobile-nav ul { list-style: none; padding: 0.5rem 0; }
.mobile-nav a {
    display: block;
    padding: 0.9rem 1.5rem;
    color: var(--header-text);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.1); color: var(--header-text); }
.mobile-nav-actions { padding: 1rem 1.5rem !important; border-top: 1px solid rgba(255,255,255,0.15); }

/* Nav overlay */
.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.nav-overlay.show { display: block; }

/* ════════════════════════════════════
   HERO SLIDER
   ════════════════════════════════════ */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--primary-dark);
}
.slide {
    display: none;
    position: relative;
    min-height: 85vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, color-mix(in srgb, var(--secondary) 30%, var(--primary)) 100%);
    overflow: hidden;
}
.slide.active { display: flex; animation: slideIn 0.6s ease; }
.slide-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0.25;
    z-index: 0;
}
.slide-content {
    position: relative; z-index: 1;
    text-align: center; color: #fff;
    padding: 3rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.slide-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    padding: 0.35rem 1.1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.slide-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}
.slide-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.slide-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.slide-btns .btn-white {
    background: #fff; color: var(--primary);
    padding: 0.75rem 2rem; border-radius: var(--radius);
    font-weight: 700; font-size: 1rem;
    transition: all 0.2s;
}
.slide-btns .btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.slide-btns .btn-ghost {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.75rem 2rem; border-radius: var(--radius);
    font-weight: 700; font-size: 1rem;
    transition: all 0.2s;
}
.slide-btns .btn-ghost:hover { background: rgba(255,255,255,0.15); }

/* Slider controls */
.slider-prev, .slider-next {
    position: absolute; top: 50%; z-index: 10;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 1.5rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }
.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,0.3); }

/* Dots */
.slider-dots {
    position: absolute; bottom: 1.5rem; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 0.5rem; z-index: 10;
}
.slider-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.slider-dot.active { background: #fff; transform: scale(1.3); }

/* Slider stats strip */
.slider-stats {
    display: flex; justify-content: center;
    gap: 0; background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative; z-index: 2;
}
.slider-stat {
    flex: 1; max-width: 200px;
    padding: 1rem;
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.slider-stat:last-child { border-right: none; }
.slider-stat-val { font-size: 1.5rem; font-weight: 900; font-family: var(--font-head); }
.slider-stat-lbl { font-size: 0.78rem; opacity: 0.75; margin-top: 0.15rem; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ════════════════════════════════════
   SECTIONS
   ════════════════════════════════════ */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section-label  { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.82rem; margin-bottom: 0.5rem; }
.section-title  { font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin-bottom: 1rem; }
.section-text   { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }

/* ════════════════════════════════════
   CARDS & GRIDS
   ════════════════════════════════════ */
.projects-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.75rem; }
.testimonials-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.impact-grid      { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1.5rem; text-align: center; }

.project-card { border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--border); transition: all 0.3s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-img  { height: 200px; object-fit: cover; width: 100%; }
.project-body { padding: 1.5rem; }

.progress-bar  { background: var(--border); border-radius: 100px; height: 6px; overflow: hidden; margin: 0.75rem 0 0.35rem; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 100px; transition: width 1.2s ease-out; }

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1.25rem 1.5rem; text-align: center; font-size: 0.85rem; opacity: 0.6; max-width: 1200px; margin: 2rem auto 0; }
.footer-title { font-weight: 700; color: #fff; margin-bottom: 1.25rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--footer-text); opacity: 0.75; font-size: 0.9rem; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; color: var(--secondary); }

/* ════════════════════════════════════
   UTILITIES
   ════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Dashboard tabs */
.dashboard-tabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.dashboard-tabs::-webkit-scrollbar { display: none; }

/* ════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .hamburger { display: flex; }
    .header-right .hdr-btn { display: none; }
    .header-right .hamburger { display: flex; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .section { padding: 3.5rem 0; }
    .slide { min-height: 70vh; }
    .slider-stat-val { font-size: 1.2rem; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .header-inner { height: 60px; padding: 0 1rem; }
    .site-logo-text { font-size: 0.95rem; max-width: calc(100vw - 180px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-nav { top: 60px; max-height: calc(100vh - 60px); }

    .slide { min-height: 60vh; }
    .slide-content { padding: 2rem 1rem; }
    .slide-btns { flex-direction: column; align-items: center; }
    .slide-btns a { width: 100%; max-width: 260px; text-align: center; }
    .slider-prev { left: 0.5rem; width: 38px; height: 38px; font-size: 1.1rem; }
    .slider-next { right: 0.5rem; width: 38px; height: 38px; font-size: 1.1rem; }
    .slider-stats { flex-wrap: wrap; }
    .slider-stat  { min-width: 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }

    .section { padding: 2.5rem 0; }
    .container { padding: 0 1rem; }
    .projects-grid    { grid-template-columns: 1fr; }
    .testimonials-grid{ grid-template-columns: 1fr; }
    .impact-grid      { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .footer-grid      { grid-template-columns: 1fr; gap: 1.5rem; }
    .section-title    { font-size: 1.6rem; }
}

/* ── Small phone ── */
@media (max-width: 380px) {
    .slide { min-height: 55vh; }
    .slide-title { font-size: 1.6rem; }
    .impact-grid { grid-template-columns: repeat(2, 1fr); }
    .container   { padding: 0 0.85rem; }
}

/* ════════════════════════════════════
   LOGIN DROPDOWN BOX
   ════════════════════════════════════ */
.login-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.login-drop-box {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.18);
    z-index: 9999;
    overflow: hidden;
    animation: dropFadeIn 0.18s ease;
}
.login-drop-box.open { display: block; }

@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-drop-title {
    padding: 1rem 1.1rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.login-drop-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}
.login-drop-item:last-of-type { border-bottom: none; }
.login-drop-item:hover { background: var(--bg-alt); }

.ldi-icon {
    font-size: 1.35rem;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.login-drop-mail .ldi-icon { background: #eff6ff; }
.login-drop-user .ldi-icon { background: var(--primary-light); }
.login-drop-admin .ldi-icon { background: #fef2f2; }

.ldi-label { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.ldi-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.ldi-arrow { margin-left: auto; font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }

.login-drop-footer {
    padding: 0.75rem 1.1rem;
    background: var(--bg-alt);
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}
.login-drop-footer a { color: var(--primary); font-weight: 600; }

/* Mobile login items */
.mob-login-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--header-text);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    text-decoration: none;
    transition: background 0.15s;
}
.mob-login-item:hover { background: rgba(255,255,255,0.15); color: var(--header-text); }

/* Backdrop to close dropdown on outside click */
.login-drop-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 9998;
}
.login-drop-backdrop.show { display: block; }
