@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* ألوان الموقع مأخوذة من شعار المدرسة: أخضر وذهبي */
:root {
    --primary: #0B6B3C;
    --primary-dark: #07492A;
    --accent: #D4A03C;
    --accent-dark: #8A6116;
    --background: #FAF7EF;
    --text: #1F2A24;
    --header-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { font-family: 'Cairo', Tahoma, sans-serif; background: var(--background); color: var(--text); line-height: 1.9; }

.header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-height); padding: 0 4%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--background); transition: box-shadow .3s; }
.header.scrolled { box-shadow: 0 4px 25px rgba(0,0,0,.2); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); line-height: 1.4; }
.logo strong, .logo small { display: block; white-space: nowrap; }
.logo-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--accent); color: var(--primary-dark); }
.logo-image { height: 56px; width: auto; }
.navbar { display: flex; gap: 18px; }
.navbar a { position: relative; text-decoration: none; color: var(--text); font-size: 14px; white-space: nowrap; }
.navbar a::after { content: ''; position: absolute; bottom: -4px; inset-inline: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .3s; }
.navbar a:hover::after, .navbar a.active::after { transform: scaleX(1); }
.lang-switch { border: 1px solid var(--accent); border-radius: 30px; padding: 4px 16px; text-decoration: none; color: var(--primary); font-size: 14px; font-weight: 700; transition: .3s; }
.lang-switch:hover { background: var(--primary); color: var(--background); }
.menu-button { display: none; background: none; border: 0; font-size: 28px; color: var(--primary); cursor: pointer; }

.hero { min-height: 100vh; min-height: 100svh; padding: calc(var(--header-height) + 40px) 8% 60px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--background); background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.hero.has-photo { text-shadow: 0 2px 8px rgba(0,0,0,.6); background: linear-gradient(rgba(4,30,18,.55), rgba(4,30,18,.65)), var(--hero-photo) center 40% / cover no-repeat; }
.hero-content { max-width: 760px; animation: rise .9s ease both; }
.welcome { display: inline-block; border: 1px solid var(--accent); border-radius: 30px; padding: 6px 18px; font-size: 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.6; margin: 22px 0; }
.hero h1 span { display: block; color: var(--accent); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.button { text-shadow: none; padding: 11px 30px; border-radius: 8px; text-decoration: none; font-weight: 700; border: 1px solid var(--accent); transition: transform .3s, box-shadow .3s; }
.button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.button-gold { background: var(--accent); color: var(--primary-dark); }
.button-line { color: var(--background); }

.block { padding: 80px 8%; }
.light { background: var(--background); }
.dark { background: var(--primary); }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-size: clamp(25px, 4vw, 33px); }
.section-heading h2::after { content: ''; display: block; width: 70px; height: 3px; margin: 8px auto 0; background: var(--accent); }
.dark .section-heading h2, .dark .sub-heading, .dark .empty { color: var(--background); }
.sub-heading { text-align: center; margin: 45px 0 20px; font-size: 22px; }
.narrow { max-width: 780px; margin: auto; text-align: center; font-size: 17px; }
.chips { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.chips span { background: #fff; border: 1px solid var(--accent); border-radius: 30px; padding: 5px 18px; font-size: 14px; }
.empty { text-align: center; }

.grid { display: grid; gap: 24px; }
.two { grid-template-columns: repeat(2, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--accent); border-radius: 18px; padding: 28px; text-align: center; transition: transform .35s, box-shadow .35s, opacity .6s; }
.card:hover { transform: translateY(-7px); box-shadow: 0 15px 30px rgba(0,0,0,.18); }
.card h3 { color: var(--primary); margin-bottom: 8px; }
.card-date { color: var(--accent-dark); font-size: 13px; font-weight: 700; margin-block: 8px; }
.goals { list-style: none; }
.goals li { color: var(--background); border-inline-start: 4px solid var(--accent); background: var(--primary-dark); border-radius: 10px; padding: 16px 18px; }

.activity-card { overflow: hidden; }
.photo { display: block; width: calc(100% + 56px); margin: -28px -28px 18px; padding: 0; border: 0; background: none; overflow: hidden; cursor: zoom-in; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 35%; transition: transform .5s; }
.photo:hover img { transform: scale(1.07); }
.viewer { margin: auto; border: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: hidden; }
.viewer::backdrop { background: rgba(0,0,0,.85); }
.viewer img { display: block; max-width: 94vw; max-height: 90vh; border-radius: 10px; }

.contact-container { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; }
.contact-info { background: var(--primary); color: var(--background); border-radius: 18px; padding: 32px; }
.contact-info h3 { margin-bottom: 14px; }
.contact-info p { margin-bottom: 10px; }
.contact-info a { color: var(--background); }
.contact-form { grid-column: 1 / -1; background: #fff; border-radius: 18px; padding: 30px; border: 1px solid var(--accent); }
.contact-form input, .contact-form textarea { width: 100%; padding: 13px; margin-bottom: 14px; border: 1px solid #E3D3AC; border-radius: 8px; font: inherit; text-align: start; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); }
[dir="rtl"] input[type="tel"] { direction: rtl; }
.contact-form button { width: 100%; padding: 13px; border: 0; border-radius: 8px; background: var(--primary); color: var(--background); font: inherit; font-weight: 700; cursor: pointer; transition: .3s; }
.contact-form button:hover { background: var(--primary-dark); transform: translateY(-2px); }
.form-message { padding: 12px; border-radius: 8px; margin-bottom: 14px; text-align: center; }
.form-message.ok { background: #DDEBDD; color: #294735; }
.form-message.bad { background: #F8DDDA; color: #873331; }

/* الحركات: تعمل فقط مع JavaScript */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .6s, translate .6s, transform .35s, box-shadow .35s; }
.js .reveal.visible { opacity: 1; translate: 0 0; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; translate: 0 0; }
}

@media (max-width: 1200px) {
    .menu-button { display: block; order: 3; }
    .lang-switch { margin-inline-start: auto; }
    .navbar { display: none; position: absolute; top: var(--header-height); inset-inline: 0; flex-direction: column; gap: 0; background: var(--background); padding: 8px 6% 16px; box-shadow: 0 12px 20px rgba(0,0,0,.2); max-height: calc(100vh - var(--header-height)); overflow-y: auto; }
    .navbar.open { display: flex; }
    .navbar a { padding: 8px 0; }
}
@media (max-width: 900px) {
    .two, .three, .contact-container { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .logo strong { font-size: 13px; }
    .logo small { font-size: 11px; }
    .logo-icon { width: 38px; height: 38px; }
    .lang-switch { padding: 2px 10px; font-size: 12px; }
}

@media (max-width: 900px) { .hero.has-photo { background-position: 25% center; } }

/* صور الواجهة المتبدلة */
.hero { position: relative; isolation: isolate; }
.slides { position: absolute; inset: 0; z-index: -1; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center 40%; opacity: 0; transition: opacity 1.4s; }
.slide.active { opacity: 1; }
.slides::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(4,30,18,.55), rgba(4,30,18,.65)); }
@media (max-width: 900px) { .slide:first-child { background-position: 25% center; } }

/* الدخول من اليمين واليسار (على الشاشات العريضة) */
main { overflow-x: clip; }
@media (min-width: 901px) {
    .js .grid > .reveal:nth-child(odd), .js .contact-info.reveal { translate: 60px 0; }
    .js .grid > .reveal:nth-child(even), .js .js .map.reveal { translate: -60px 0; }
    .js .grid > .reveal.visible, .js .contact-container > .reveal.visible { translate: 0 0; }
}

/* تغير لون البطاقة عند مرور المؤشر */
.card { transition: transform .35s, box-shadow .35s, background-color .35s, color .35s, opacity .6s, translate .6s; }
.js .card.reveal { transition: transform .35s, box-shadow .35s, background-color .35s, color .35s, opacity .6s, translate .6s; }
.card h3, .card-date { transition: color .35s; }
.card:hover { background: var(--primary-dark); color: #fff; border-color: var(--accent); }
.card:hover h3, .card:hover .card-date { color: var(--accent); }

.map { display: block; width: 100%; height: 100%; min-height: 360px; border: 1px solid var(--accent); border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .js .grid > .reveal, .js .contact-container > .reveal { translate: 0 0; } }

/* نهاية الموقع */
.footer { background: #101713; color: #b9c2bc; padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: 0 6% 50px; }
.footer a { color: inherit; text-decoration: none; transition: color .3s, background-color .3s; }
.footer h3 { color: #fff; font-size: 17px; margin-bottom: 24px; }
.footer h3::after { content: ''; display: block; width: 24px; height: 2px; margin-top: 6px; background: var(--accent); }
.footer nav a { display: block; width: fit-content; margin-bottom: 8px; }
.footer nav a:hover, .contact-line:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { height: 70px; width: 56px; object-fit: contain; background: #fff; border-radius: 12px; padding: 5px; }
.footer-brand strong, .footer-brand small { display: block; }
.footer-brand strong { color: #fff; font-size: 19px; }
.footer h4 { color: #fff; font-size: 14px; margin: 18px 0 12px; }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #38443d; border-radius: 10px; color: #fff; font-size: 22px; }
.social a:hover { background: var(--primary); }
.social svg { width: 22px; height: 22px; }
.contact-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.contact-line i { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #38443d; color: var(--accent); }
.contact-line svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #27302b; padding: 20px 6%; padding-inline-end: 100px; font-size: 13px; }
.designer-badge { border: 1px solid #38443d; border-radius: 8px; padding: 4px 14px; }
.floating { position: fixed; z-index: 90; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.floating a { display: grid; place-items: center; border-radius: 50%; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .3s; }
.floating a:hover { transform: scale(1.1); }
.to-top { width: 40px; height: 40px; background: #fff; color: var(--primary); font-size: 20px; }
.float-chat { width: 56px; height: 56px; background: #25D366; color: #fff; animation: pulse 2.5s infinite; }
.float-chat svg { width: 30px; height: 30px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.6); } 70%, 100% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* من نحن */
.about { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; max-width: 1100px; margin: auto; }
.about.no-photo { grid-template-columns: 1fr; }
.about-photo { position: relative; margin: 0 0 30px; }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 120px 18px 18px 18px; box-shadow: 0 18px 40px rgba(7,73,42,.22); }
.about-photo figcaption { position: absolute; inset-inline-start: 24px; bottom: -30px; background: var(--accent); color: var(--primary-dark); border: 5px solid var(--background); border-radius: 18px; padding: 12px 28px; text-align: center; }
.about-photo small, .about-lang small { display: block; font-size: 14px; }
.about-photo strong { display: block; font-size: 24px; }
.about-body h3 { color: var(--primary); font-size: clamp(22px, 3vw, 30px); margin-bottom: 16px; }
.about-body p { font-size: 18px; line-height: 2; margin-bottom: 24px; }
.about-lang { background: var(--primary); color: #fff; border-radius: 14px; border-inline-start: 6px solid var(--accent); padding: 16px 22px; margin-top: 12px; }
.about-lang strong { display: block; color: var(--accent); font-size: 20px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 28px; } .about-photo img { border-radius: 70px 18px 18px 18px; } }
