/* مدرستي — موقع تعريفي مستقل | لايت مود | ثيم العلم الفلسطيني */
:root {
    --red: #ce1126;
    --red-dark: #a50d1f;
    --green: #149954;
    --green-dark: #0e6b3c;
    --black: #1a1a1a;
    --ink: #1d2733;
    --muted: #66788c;
    --bg: #fafbfa;
    --card: #fff;
    --line: #e8eeea;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(18,53,36,.06), 0 10px 34px rgba(18,53,36,.07);
    --font: "Cairo", "SF Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, 92%); margin-inline: auto; }
section { padding: 4.5rem 0; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 2.8rem; }
.sec-head .eyebrow { color: var(--green); font-weight: 800; letter-spacing: 1px; font-size: .85rem; }
.sec-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin: .3rem 0; color: var(--black); }
.sec-head p { color: var(--muted); font-size: 1.05rem; }

/* ===== Navbar ===== */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--black); }
.brand img { width: 40px; height: 40px; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--red); }
.nav-cta { background: var(--red); color: #fff !important; padding: .55rem 1.4rem; border-radius: 999px; }
.nav-cta:hover { background: var(--red-dark); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--black); }

/* ===== Hero (لايت) ===== */
.hero {
    position: relative; padding: 4.5rem 0 5.5rem; overflow: hidden;
    background:
        radial-gradient(700px 340px at 88% 0%, rgba(206,17,38,.07), transparent 60%),
        radial-gradient(700px 380px at 8% 100%, rgba(20,153,84,.10), transparent 60%),
        linear-gradient(180deg, #fff, #f6faf7);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.3; color: var(--black); }
.hero h1 .hl { color: var(--red); }
.hero p.lead { color: var(--muted); font-size: 1.12rem; margin: 1.1rem 0 1.8rem; max-width: 540px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer;
    padding: .85rem 2rem; border-radius: 14px; font-weight: 700; font-size: 1.02rem;
    font-family: inherit; transition: transform .15s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(206,17,38,.25); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--green-dark); border: 2px solid var(--green); }
.btn-outline:hover { background: #f0f8f3; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
/* صورة البطل: نسبة صحيحة 16:10 بلا قص ولا ميلان */
.hero-shot { border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(18,53,36,.16); border: 1px solid var(--line); background: #fff; }
.hero-shot img { width: 100%; height: auto; aspect-ratio: 1440 / 900; object-fit: contain; }
.hero-flag { display: flex; gap: .4rem; margin-top: 1.8rem; }
.hero-flag span { height: 6px; border-radius: 3px; }
.hero-flag .f1 { width: 40px; background: var(--black); }
.hero-flag .f2 { width: 40px; background: #e6e9e7; }
.hero-flag .f3 { width: 40px; background: var(--green); }
.hero-flag .f4 { width: 26px; background: var(--red); }

/* ===== Stats ===== */
.stats {
    background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 20px;
    margin-top: -3.2rem; position: relative; z-index: 5; padding: 1.8rem 1rem;
    display: grid; grid-template-columns: repeat(4, 1fr); text-align: center;
}
.stat .v { font-size: 1.9rem; font-weight: 800; color: var(--black); }
.stat .l { color: var(--muted); font-size: .9rem; }

/* ===== بطاقات الموديلات ===== */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.3rem; }
.feat {
    background: var(--card); border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    cursor: pointer; position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feat::after {
    content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--green), var(--red));
    transform: scaleX(0); transform-origin: right; transition: transform .3s;
}
.feat:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(18,53,36,.13); border-color: transparent; }
.feat:hover::after { transform: scaleX(1); }
.feat .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: .9rem; }
.feat h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: .35rem; color: var(--black); }
.feat p { color: var(--muted); font-size: .92rem; }
.feat .more { display: inline-flex; align-items: center; gap: .3rem; margin-top: .8rem; color: var(--red); font-weight: 700; font-size: .85rem; }

/* ===== المودال (بوب-أب الموديل) ===== */
.modal-bk {
    position: fixed; inset: 0; z-index: 300; padding: 1.5rem;
    background: rgba(12, 24, 18, .48); backdrop-filter: blur(5px);
    display: grid; place-items: center;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-bk.open { opacity: 1; pointer-events: auto; }
.modal-card {
    background: #fff; width: 100%; max-width: 640px; max-height: 88vh;
    border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
    transform: translateY(34px) scale(.94); opacity: 0;
    transition: transform .38s cubic-bezier(.18, .9, .32, 1.18), opacity .28s ease;
}
.modal-bk.open .modal-card { transform: none; opacity: 1; }
.modal-head { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-head .ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 1.7rem; flex-shrink: 0; }
.modal-head h3 { font-size: 1.25rem; font-weight: 800; color: var(--black); }
.modal-head .sub { color: var(--muted); font-size: .85rem; }
.modal-close { margin-inline-start: auto; background: #f2f5f3; border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--muted); transition: .2s; flex-shrink: 0; }
.modal-close:hover { background: var(--red); color: #fff; }
.modal-body { padding: 1.4rem 1.5rem; overflow-y: auto; }
.modal-body .shot { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 1.2rem; }
.modal-body .shot img { width: 100%; aspect-ratio: 1440 / 900; object-fit: contain; background: #fff; }
.modal-body p.desc { color: var(--ink); margin-bottom: 1rem; }
.modal-body ul { padding-inline-start: 1.3rem; }
.modal-body li { margin-bottom: .5rem; color: #47586a; }
.modal-body li::marker { color: var(--green); }
/* أنيميشن تتابعي لعناصر القائمة */
.modal-bk.open .modal-body li { animation: liIn .45s both; }
.modal-bk.open .modal-body li:nth-child(1) { animation-delay: .10s }
.modal-bk.open .modal-body li:nth-child(2) { animation-delay: .17s }
.modal-bk.open .modal-body li:nth-child(3) { animation-delay: .24s }
.modal-bk.open .modal-body li:nth-child(4) { animation-delay: .31s }
.modal-bk.open .modal-body li:nth-child(5) { animation-delay: .38s }
.modal-bk.open .modal-body li:nth-child(6) { animation-delay: .45s }
.modal-bk.open .modal-body li:nth-child(7) { animation-delay: .52s }
@keyframes liIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ===== سلايدر اللقطات (الوصف تحت الصورة — لا قصّ) ===== */
.screens { background: #fff; border-block: 1px solid var(--line); }
.slider { position: relative; max-width: 980px; margin: 0 auto; }
.slider-frame {
    border-radius: 18px; overflow: hidden; background: #fff;
    box-shadow: var(--shadow); border: 1px solid var(--line); position: relative;
}
.slides { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; background: #fff; }
.slide img { width: 100%; aspect-ratio: 1440 / 900; object-fit: contain; background: #fff; cursor: zoom-in; }
.slide-cap { padding: 1rem 1.4rem; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.slide-cap h4 { font-size: 1.05rem; font-weight: 800; color: var(--black); }
.slide-cap p { font-size: .88rem; color: var(--muted); }
.slider-btn {
    position: absolute; top: 40%; transform: translateY(-50%); z-index: 6;
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
    background: rgba(255,255,255,.95); box-shadow: 0 4px 14px rgba(0,0,0,.12);
    font-size: 1.3rem; color: var(--black); display: grid; place-items: center;
}
.slider-btn.prev { inset-inline-start: -18px; }
.slider-btn.next { inset-inline-end: -18px; }
.slider-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1.3rem; flex-wrap: wrap; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: #d5ddd7; cursor: pointer; transition: .3s; }
.slider-dots button.on { background: var(--red); width: 28px; border-radius: 999px; }
.slider-thumbs { display: flex; gap: .6rem; overflow-x: auto; padding: 1.1rem .2rem .2rem; scrollbar-width: thin; }
.slider-thumbs img {
    height: 58px; width: 93px; object-fit: contain; background: #fff; border-radius: 8px;
    border: 2px solid var(--line); cursor: pointer; opacity: .65; transition: .2s; flex-shrink: 0;
}
.slider-thumbs img.on { border-color: var(--red); opacity: 1; }

/* ===== الأدوار ===== */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; }
.role-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; text-align: center; box-shadow: var(--shadow); }
.role-card .ic { font-size: 2.1rem; }
.role-card h4 { margin-top: .5rem; font-weight: 800; color: var(--black); }
.role-card p { color: var(--muted); font-size: .84rem; }

/* ===== التقنية (لايت) ===== */
.tech { background: #fff; border-block: 1px solid var(--line); }
.tech-chips { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; max-width: 800px; margin: 0 auto; }
.chip { background: #f4f8f5; border: 1px solid var(--line); color: var(--ink); padding: .5rem 1.2rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.chip:nth-child(3n) { border-color: rgba(206,17,38,.3); }
.chip:nth-child(3n+1) { border-color: rgba(20,153,84,.35); }

/* ===== CTA (لايت) ===== */
.cta-band {
    background: linear-gradient(150deg, #f2faf5, #fdf3f4);
    border: 1px solid var(--line); color: var(--black);
    border-radius: 24px; text-align: center; padding: 3.2rem 2rem;
}
.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
.cta-band p { color: var(--muted); margin: .6rem auto 1.8rem; max-width: 560px; }

/* ===== Footer (لايت) ===== */
footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); padding: 2.6rem 0 2rem; text-align: center; }
footer .brand { justify-content: center; margin-bottom: 1rem; }
footer .flinks { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
footer .flinks a { color: var(--muted); font-size: .9rem; }
footer .flinks a:hover { color: var(--red); }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; background: rgba(10,14,12,.92); z-index: 999; display: none; place-items: center; padding: 2rem; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 95%; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .close { position: absolute; top: 1.5rem; inset-inline-end: 2rem; color: #fff; font-size: 2.5rem; cursor: pointer; background: none; border: 0; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Install toast ===== */
.install-toast {
    position: fixed; bottom: 1.2rem; inset-inline: 1.2rem; z-index: 200; max-width: 420px; margin: 0 auto;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 1rem 1.2rem;
    display: none; align-items: center; gap: 1rem;
}
.install-toast.show { display: flex; }
.install-toast img { width: 40px; height: 40px; }

/* ===== الزر العائم للموديلات ===== */
.fab {
    position: fixed; bottom: 1.6rem; inset-inline-start: 1.6rem; z-index: 260;
    width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff; font-size: 1.7rem; display: grid; place-items: center;
    box-shadow: 0 12px 32px rgba(20,153,84,.4);
    transition: transform .3s cubic-bezier(.3,1.4,.5,1), background .25s, box-shadow .25s;
}
.fab:hover { transform: scale(1.08); }
.fab.open {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 12px 32px rgba(206,17,38,.4);
    transform: rotate(135deg);
}
.fab::before {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(20,153,84,.35); animation: fabPulse 2.2s infinite;
}
.fab.open::before { display: none; }
@keyframes fabPulse {
    0% { transform: scale(1); opacity: 1; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { opacity: 0; }
}
.fab-menu {
    position: fixed; bottom: 5.6rem; inset-inline-start: 1.6rem; z-index: 259;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 24px 60px rgba(18,53,36,.22);
    padding: 1rem; width: min(360px, calc(100vw - 3.2rem));
    max-height: min(64vh, 520px); overflow-y: auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem;
    opacity: 0; pointer-events: none; transform: translateY(18px) scale(.94);
    transform-origin: bottom right; transition: opacity .25s, transform .3s cubic-bezier(.2,.9,.35,1.15);
}
[dir="rtl"] .fab-menu { transform-origin: bottom right; }
.fab-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.fab-item {
    background: none; border: 0; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: .6rem .3rem; border-radius: 12px; transition: background .2s, transform .2s;
    opacity: 0; transform: translateY(10px);
}
.fab-menu.open .fab-item { animation: fabItemIn .35s both; }
.fab-item:hover { background: #f2f8f4; transform: translateY(-3px); }
.fab-item .ic {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 1.35rem;
}
.fab-item span { font-size: .68rem; font-weight: 700; color: var(--ink); line-height: 1.3; text-align: center; }
@keyframes fabItemIn { from { opacity: 0; transform: translateY(12px) scale(.8); } to { opacity: 1; transform: none; } }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero p.lead { margin-inline: auto; }
    .hero-btns, .hero-flag { justify-content: center; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
    .nav-links { position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column; padding: 1rem; box-shadow: var(--shadow); display: none; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .slider-btn.prev { inset-inline-start: 4px; }
    .slider-btn.next { inset-inline-end: 4px; }
    .modal-card { max-height: 92vh; }
}
