/* =========================================================
   Da'am Foundation — v2 Professional Design System
   Brand: Blue #004aad · Gold #ffae00 · Green #28a745
   ========================================================= */

:root {
    /* Brand */
    --primary: #004aad;
    --primary-dark: #00337a;
    --primary-light: #e8f0fc;
    --accent: #ffae00;
    --accent-dark: #e09900;
    --secondary: #1f9d57;
    --secondary-light: #e7f6ee;

    /* Neutrals */
    --ink: #0f1b2d;
    --body: #4a5568;
    --muted: #8a97a8;
    --line: #e7ebf0;
    --bg: #ffffff;
    --bg-soft: #f6f9fd;
    --bg-deep: #0b1f3a;

    /* Effects */
    --shadow-sm: 0 2px 10px rgba(15, 27, 45, 0.05);
    --shadow: 0 12px 30px rgba(15, 27, 45, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 27, 45, 0.12);
    --radius: 16px;
    --radius-lg: 24px;
    --container: 1200px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.3; font-weight: 800; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ---------- Section rhythm ---------- */
.section { padding: 100px 0; }
.section-sm { padding: 70px 0; }
.bg-soft { background: var(--bg-soft); }
.text-center { text-align: center; }

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 7px 16px;
    border-radius: 100px;
    margin-bottom: 18px;
}
.eyebrow.gold { color: var(--accent-dark); background: #fff5e0; }
.eyebrow.green { color: var(--secondary); background: var(--secondary-light); }

.section-head { max-width: 680px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 16px; }
.section-head p { color: var(--body); font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 30px; border-radius: 100px;
    font-family: inherit; font-weight: 700; font-size: 1rem;
    cursor: pointer; border: 2px solid transparent;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(0, 74, 173, 0.28); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 14px 30px rgba(0, 74, 173, 0.35); }
.btn-accent { background: var(--accent); color: var(--ink); box-shadow: 0 10px 24px rgba(255, 174, 0, 0.32); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); }
.btn-lg { padding: 17px 40px; font-size: 1.08rem; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; top: 0; inset-inline: 0; z-index: 1000;
    transition: background .35s var(--ease), box-shadow .35s, padding .35s;
    padding: 18px 0;
}
.site-header.scrolled { background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); padding: 10px 0; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 54px; transition: height .35s; }
.site-header.scrolled .nav-logo img { height: 46px; }
/* White logo over the dark hero, colored logo once header turns solid */
.nav-logo .logo-light { filter: brightness(0) invert(1); }
.nav-logo .logo-dark { display: none; }
.site-header.scrolled .nav-logo .logo-light { display: none; }
.site-header.scrolled .nav-logo .logo-dark { display: block; }

.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a {
    font-weight: 700; font-size: 0.97rem; color: #fff;
    padding: 9px 14px; border-radius: 100px; position: relative;
    transition: color .25s, background .25s; white-space: nowrap;
}
.site-header.scrolled .nav-menu a { color: var(--ink); }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); background: var(--primary-light); }
.site-header.scrolled .nav-menu a:hover, .site-header.scrolled .nav-menu a.active { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: 0.9rem; color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4); padding: 8px 14px; border-radius: 100px;
    transition: all .25s;
}
.site-header.scrolled .lang-switch { color: var(--ink); border-color: var(--line); }
.lang-switch:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 3px; transition: .3s; }
.site-header.scrolled .nav-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(11,20,33,0.92) 0%, rgba(16,30,48,0.85) 50%, rgba(22,40,62,0.62) 100%);
}
.hero-inner { max-width: 760px; padding: 120px 0 80px; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.15; margin-bottom: 22px; }
.hero h1 .hl { color: var(--accent); }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.9); max-width: 600px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .num { font-size: 2.4rem; font-weight: 800; color: #fff; }
.hero-stats .lbl { font-size: 0.95rem; color: rgba(255,255,255,0.75); }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 1.4rem; animation: bounce 2s infinite; z-index: 1; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(10px)} }

/* ---------- Stats band ---------- */
.stats-band { background: var(--bg-deep); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat-item { text-align: center; padding: 10px; }
.stat-item .num { font-size: 2.8rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-item .num span { color: var(--accent); }
.stat-item .lbl { margin-top: 10px; color: rgba(255,255,255,0.82); font-weight: 500; }
.stat-item i { font-size: 1.8rem; color: var(--accent); margin-bottom: 12px; }

/* ---------- Cards: programs ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; align-items: center; }

.feature-card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 40px 32px; transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 100%; height: 4px;
    background: var(--primary); transform: scaleX(0); transform-origin: inline-start; transition: transform .4s var(--ease);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card.green::before { background: var(--secondary); }
.feature-card.gold::before { background: var(--accent); }
.feature-icon {
    width: 66px; height: 66px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: var(--primary); background: var(--primary-light); margin-bottom: 24px;
}
.feature-card.green .feature-icon { color: var(--secondary); background: var(--secondary-light); }
.feature-card.gold .feature-icon { color: var(--accent-dark); background: #fff5e0; }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 14px; }
.feature-card p { margin-bottom: 20px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary); transition: gap .25s; }
.feature-card.green .link-arrow { color: var(--secondary); }
.feature-card.gold .link-arrow { color: var(--accent-dark); }
.link-arrow:hover { gap: 14px; }

/* ---------- Media / project cards ---------- */
.media-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s; display: flex; flex-direction: column; }
.media-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.media-card .thumb { height: 220px; overflow: hidden; position: relative; }
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.media-card:hover .thumb img { transform: scale(1.07); }
.media-card .tag { position: absolute; top: 16px; inset-inline-start: 16px; background: var(--accent); color: var(--ink); font-size: 0.78rem; font-weight: 800; padding: 5px 13px; border-radius: 100px; }
.media-card .body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.media-card .date { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.media-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.media-card p { flex: 1; margin-bottom: 18px; }

/* ---------- Split / about ---------- */
.split-img { position: relative; }
.split-img img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split-badge { position: absolute; bottom: -22px; inset-inline-start: -22px; background: var(--accent); color: var(--ink); padding: 20px 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-badge .big { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.split-text h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 20px; }
.check-list { margin: 24px 0; }
.check-list li { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.check-list i { color: var(--secondary); font-size: 1.2rem; margin-top: 4px; flex-shrink: 0; }
.check-list strong { color: var(--ink); }

/* ---------- Page header (inner pages) ---------- */
.page-hero { position: relative; padding: 180px 0 90px; color: #fff; text-align: center; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; z-index: -2; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(11,20,33,0.9), rgba(20,38,60,0.72)); }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 620px; margin: 0 auto; }
.breadcrumb { display: flex; gap: 10px; justify-content: center; margin-top: 18px; font-size: 0.92rem; color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Impact stats strip ---------- */
.impact-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.impact-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 20px; text-align: center; box-shadow: var(--shadow-sm); }
.impact-box .big { font-size: 2.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.impact-box:nth-child(2) .big { color: var(--accent-dark); }
.impact-box:nth-child(3) .big { color: var(--secondary); }
.impact-box .cap { color: var(--muted); margin-top: 8px; }

/* ---------- Partners ---------- */
.partners-row { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; align-items: center; }
.partners-row .chip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 34px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow-sm); }

/* ---------- Testimonials ---------- */
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); position: relative; }
.quote-card .mark { font-size: 3rem; color: var(--primary-light); line-height: 1; font-family: Georgia, serif; }
.quote-card p { color: var(--ink); font-size: 1.05rem; margin: 6px 0 24px; }
.quote-who { display: flex; align-items: center; gap: 14px; }
.quote-who .av { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.quote-who .nm { font-weight: 800; color: var(--ink); }
.quote-who .rl { font-size: 0.85rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--bg-deep); color: #fff; border-radius: var(--radius-lg); padding: 64px; text-align: center; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(0,74,173,0.5), transparent 50%), radial-gradient(circle at 10% 90%, rgba(255,174,0,0.18), transparent 45%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,0.82); max-width: 560px; margin: 0 auto 30px; font-size: 1.1rem; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: var(--radius-lg); padding: 44px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: 0.95rem; }
.field .req { color: #e53e3e; }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px;
    font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--bg-soft); transition: border-color .25s, background .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.checks label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; color: var(--body); }
.checks input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- Contact info cards ---------- */
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s; }
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.info-card .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 18px; }
.info-card h4 { margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.faq-q { padding: 22px 26px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q i { transition: transform .3s; color: var(--primary); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s; padding: 0 26px; color: var(--body); }
.faq-item.open .faq-a { max-height: 320px; padding: 0 26px 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); color: rgba(255,255,255,0.75); padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 50px; }
.site-footer h4 { color: #fff; margin-bottom: 22px; font-size: 1.1rem; }
.site-footer .f-logo { height: 60px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.site-footer ul li { margin-bottom: 12px; }
.site-footer ul a:hover { color: var(--accent); padding-inline-start: 6px; transition: .25s; }
.f-contact li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.f-contact i { color: var(--accent); margin-top: 5px; }
.f-social { display: flex; gap: 12px; margin-top: 20px; }
.f-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; transition: .25s; }
.f-social a:hover { background: var(--accent); color: var(--ink); transform: translateY(-3px); }
.f-news { display: flex; gap: 10px; margin-top: 16px; }
.f-news input { flex: 1; padding: 12px 16px; border: none; border-radius: 100px; font-family: inherit; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 24px 0; text-align: center; font-size: 0.9rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 860px) {
    .nav-menu {
        position: fixed; inset: 0 0 0 auto; width: min(82%, 340px); flex-direction: column;
        background: #fff; padding: 100px 28px 40px; gap: 6px; align-items: stretch;
        transform: translateX(100%); transition: transform .4s var(--ease); box-shadow: var(--shadow-lg);
    }
    html[dir=ltr] .nav-menu { inset: 0 auto 0 0; transform: translateX(-100%); }
    .nav-menu.open { transform: translateX(0); }
    .nav-menu a { color: var(--ink); font-size: 1.05rem; padding: 13px 16px; }
    .nav-toggle { display: flex; z-index: 1001; }
    .nav-toggle.active span { background: var(--ink) !important; }
    .nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .desktop-cta { display: none; }
    .grid-3, .grid-2, .impact-strip, .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-stats { gap: 28px; }
    .cta-band { padding: 44px 24px; }
    .section { padding: 70px 0; }
    .split-badge { inset-inline-start: 16px; bottom: 16px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
}
