/* Home page */
.center { text-align: center; }

.hero { position: relative; background: var(--green-800); color: #eaf3ee; overflow: hidden; isolation: isolate; padding-block: var(--space-6) var(--space-7); }
.hero::before { content: ''; position: absolute; inset: 0; background: var(--pattern); opacity: .28; z-index: -1; }
.hero::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 8px; background: linear-gradient(to left, var(--teal-500), var(--gold-500), var(--teal-500)); }
.hero__inner { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.15fr .85fr; } }
.hero__tag { display: inline-block; background: rgba(255,255,255,.1); color: var(--gold-300); padding: .2rem 1rem; border-radius: 999px; font-size: .95rem; margin-bottom: var(--space-3); }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.35; }
.hero__accent { color: var(--gold-500); }
.hero__text p { font-size: 1.15rem; max-width: 560px; color: #cfe2d6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); padding: 0; margin: var(--space-5) 0 0; color: #b9cfc1; }
.hero__facts strong { font: 700 1.8rem var(--font-head); color: var(--gold-500); margin-inline-end: .25rem; }

.hero__art { position: relative; justify-self: center; width: min(78vw, 360px); aspect-ratio: 4 / 5; container-type: inline-size; }
.hero__arch {
  position: absolute; inset: 0; border-radius: 999px 999px 28px 28px; border: 2px solid var(--gold-500); padding: 12px;
  background: linear-gradient(160deg, var(--green-700), var(--green-900)); box-shadow: var(--shadow-lg);
}
.hero__arch::before { content: ''; position: absolute; inset: 12px; border-radius: inherit; border: 1px solid rgba(201,162,75,.5); background: var(--pattern); opacity: .6; }
.hero__star { position: relative; width: 100%; height: 100%; padding: 14% 8%; animation: float 8s ease-in-out infinite; }
/* Orbs orbit «أثر»: each starts at its own angle (--a) and the whole set turns via --spin.
   Only the position moves, so the words stay upright. */
@property --spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
.hero__art { --rx: 52cqw; --ry: 58cqw; --orb: 84px; animation: orbit 60s linear infinite; }
.hero__art:hover { animation-play-state: paused; }
@keyframes orbit { to { --spin: 360deg; } }
.hero__orb {
  --t: calc(var(--a, 0deg) + var(--spin));
  position: absolute; top: 50%; left: 50%; z-index: 2;
  display: grid; place-items: center; width: var(--orb); height: var(--orb); border-radius: 50%;
  background: var(--bg); color: var(--heading); font: 600 1.05rem var(--font-head); box-shadow: var(--shadow-md); border: 3px solid var(--gold-500);
  transform: translate(-50%, -50%) translate(calc(cos(var(--t)) * var(--rx)), calc(sin(var(--t)) * var(--ry)));
}
@media (max-width: 520px) { .hero__art { --rx: 45cqw; --orb: 68px; } .hero__orb { font-size: .92rem; } }
@media (prefers-reduced-motion: reduce) { .hero__art { animation: none !important; } }
@keyframes float { 50% { transform: translateY(-8px); } }

.houses { margin-bottom: var(--space-4); }
.house { padding: var(--space-5) var(--space-4); }
.house__arch { width: 84px; height: 96px; border-radius: 999px 999px 16px 16px; display: grid; place-items: center; margin-bottom: var(--space-3); color: var(--white); }
.house__arch svg { width: 44px; height: 44px; }
.house__arch--school { background: var(--teal-600); }
.house__arch--college { background: var(--green-800); }
.house__arch--library { background: var(--gold-600); }
.house__arch--maqra { background: var(--green-600); }
.house__more { display: inline-block; margin-top: var(--space-2); color: var(--accent); font-weight: 600; }
.house:hover .house__more { color: var(--heading); }
.halls .hall { border-inline-start: 6px solid var(--gold-500); }

.levels { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: var(--space-4); position: relative; }
.level { background: rgba(255,255,255,.07); border: 1px solid rgba(201,162,75,.4); border-radius: var(--r-md); padding: var(--space-4); position: relative; }
.level__no { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-500); color: var(--green-900); font: 700 1.5rem var(--font-head); margin-bottom: var(--space-2); }
.level p { margin: 0; color: #cfe2d6; }
@media (min-width: 900px) {
  .levels { grid-template-columns: repeat(4, 1fr); }
  .level:nth-child(2) { margin-top: 28px; } .level:nth-child(3) { margin-top: 56px; } .level:nth-child(4) { margin-top: 84px; }
}

.finder { display: grid; gap: var(--space-4); max-width: 820px; text-align: center; }
.finder__form { display: flex; gap: var(--space-2); }
.finder__form input { flex: 1; border-radius: 999px; padding-inline: 1.4rem; min-height: 56px; font-size: 1.05rem; }
.finder__form .btn { min-height: 56px; padding-inline: 2rem; }
.finder__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.finder__chips .chip { text-decoration: none; }
@media (max-width: 480px) { .finder__form { flex-direction: column; } }

.stats .stat { background: var(--surface); }
.cta { text-align: center; margin-top: var(--space-6); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.cta .btn--ghost { color: var(--heading); }

/* ---- animation additions ---- */
.hero__bg-star { position: absolute; inset-inline-start: -120px; top: -80px; width: 520px; opacity: .18; pointer-events: none; z-index: -1; }
.hero__bg-star svg { width: 100%; }
.marquee-band { background: var(--green-900); padding-block: .9rem; border-bottom: 3px solid var(--gold-500); }
.marquee__item { color: var(--gold-300); font: 600 1.15rem var(--font-head); white-space: nowrap; padding-inline: 1.2rem; position: relative; }
.marquee__item::after { content: '✦'; position: absolute; inset-inline-end: -.5rem; color: var(--teal-500); font-size: .8rem; top: .45rem; }
.house__arch { transition: transform .5s var(--ease-out), border-radius .5s var(--ease-out); }
.house:hover .house__arch { transform: translateY(-6px) scale(1.06); border-radius: 999px 999px 40px 40px; }
.hero__mark { filter: drop-shadow(0 0 6px rgba(232,210,154,.35)); }
@media (min-width: 640px) and (max-width: 899.98px) {
  .levels { grid-template-columns: repeat(2, 1fr); }
}
