:root {
  --ewan-green: #17a564;
  --ewan-green-dark: #0f5937;
  --ewan-green-light: #0bcc6c;
  --ewan-navy: #1a2d40;
  --ewan-navy-2: #192a54;
  --ewan-gray: #f3f4f5;
  --ewan-gray-2: #f5f5f5;
  --ewan-text: #1a2d40;
  --ewan-muted: #7288a2;
  --site-font: "Noto Kufi Arabic", "ABeeZee", system-ui, sans-serif;
  --header-h: 76px;
}

html[lang="en"] { --site-font: "ABeeZee", "Noto Kufi Arabic", system-ui, sans-serif; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--site-font);
  color: var(--ewan-text);
  background: #fff;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { color: var(--ewan-green); font-weight: 700; }
p { color: var(--ewan-text); line-height: 1.9; }
a { color: var(--ewan-green); text-decoration: none; }
a:hover { color: var(--ewan-navy-2); }
img { max-width: 100%; height: auto; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #198754; }
::-webkit-scrollbar-thumb:hover { background: var(--ewan-navy-2); }

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 0; z-index: 2000;
  background: var(--ewan-green); color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { inset-inline-start: 1rem; color: #fff; }

/* ---------- Top bar ---------- */
.topbar { background: #f4f4f4; font-size: .85rem; border-bottom: 1px solid #ececec; }
.topbar .container { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; padding-block: 6px; }
.topbar a { color: var(--ewan-text); display: inline-flex; align-items: center; gap: .5rem; }
.topbar a:hover { color: var(--ewan-green); }
.topbar .ic {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ewan-green); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
.lang-toggle { display: inline-flex; border: 1px solid #dcdcdc; border-radius: 20px; overflow: hidden; }
.lang-toggle a { padding: 2px 12px; font-size: .8rem; color: var(--ewan-text); }
.lang-toggle a.active { background: var(--ewan-green); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: #fdfdfd; box-shadow: 0 3px 6px rgba(214, 214, 214, .35);
}
.site-header .navbar { min-height: var(--header-h); padding-block: 6px; }
.site-header .navbar-brand img { height: 58px; width: auto; }
.site-header .nav-link {
  position: relative; color: #000; font-size: .92rem; padding-inline: .9rem !important;
}
.site-header .nav-link::after {
  content: ""; position: absolute; inset-inline-start: .9rem; bottom: 2px;
  width: 0; height: 3px; border-radius: 10px; background: var(--ewan-green);
  transition: width .35s ease;
}
.site-header .nav-link:hover::after,
.site-header .nav-link.active::after { width: 40px; }
.site-header .nav-link.active, .site-header .nav-link:hover { color: var(--ewan-green); }
.site-header .navbar-toggler { border: none; color: var(--ewan-green); font-size: 1.6rem; box-shadow: none; }

.btn-join-header {
  background: var(--ewan-green); color: #fff !important; border-radius: 10px;
  padding: 7px 18px; font-size: .88rem; font-weight: 600; letter-spacing: .5px;
  border: 1px solid transparent; transition: all .2s ease-in-out; white-space: nowrap;
}
.btn-join-header:hover {
  background: var(--ewan-navy);
  box-shadow: 0 1px 5px var(--ewan-green), 0 0 5px #868686, 2px 0 0 var(--ewan-green);
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-login-header {
  background: #fff; color: var(--ewan-green) !important; border-radius: 10px;
  padding: 7px 18px; font-size: .88rem; font-weight: 600; letter-spacing: .5px;
  border: 1px solid var(--ewan-green); transition: all .2s ease-in-out; white-space: nowrap;
}
.btn-login-header:hover { background: var(--ewan-green); color: #fff !important; }
@media (max-width: 991.98px) {
  .header-actions { padding: 8px 0 12px; }
}

/* ---------- Buttons ---------- */
.btn-ewan {
  display: inline-block; padding: 10px 30px; border-radius: 10px;
  background: var(--ewan-green); color: #fff; font-weight: 600; font-size: 1.05rem;
  border: 1px solid transparent; transition: background .2s ease-in, box-shadow .2s ease-in;
}
.btn-ewan:hover { background: var(--ewan-navy); color: #fff; box-shadow: 1px 1px 10px #fff; }
.btn-ewan.btn-ewan-outline { background: transparent; border-color: #fff; }
.btn-ewan.btn-ewan-outline:hover { background: #fff; color: var(--ewan-navy); }

.btn-slide {
  position: relative; z-index: 1; overflow: hidden; display: inline-block;
  min-width: 140px; padding: 9px 25px; border-radius: 5px; border: none;
  background: var(--ewan-green); color: #fff; font-weight: 600; cursor: pointer;
  box-shadow: inset 2px 2px 2px 0 rgba(255,255,255,.5), 7px 7px 20px 0 rgba(0,0,0,.1), 4px 4px 5px 0 rgba(0,0,0,.1);
  transition: color .3s ease;
}
.btn-slide::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 0; z-index: -1; border-radius: 5px;
  background-color: var(--ewan-navy); background-image: linear-gradient(315deg, #023e7a 0%, #819ab4 74%);
  transition: all .3s ease;
}
.btn-slide:hover { color: #fff; }
.btn-slide:hover::after { top: auto; bottom: 0; height: 100%; }
.btn-slide:active { transform: translateY(2px); }

/* ---------- Section titles ---------- */
.section { padding-block: 4.5rem; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { color: var(--ewan-green); font-size: 2.1rem; font-weight: 900; margin: 0; }
.section-title p { max-width: 720px; margin: .75rem auto 0; font-size: 1rem; color: var(--ewan-text); }
.wave { display: block; width: 100%; height: 120px; object-fit: fill; }
@media (min-width: 992px) { .wave { height: 200px; } }

/* ---------- Home hero ---------- */
.home-hero {
  position: relative; min-height: 640px; color: #fff;
  background-size: cover; background-position: center top; background-repeat: no-repeat;
  display: flex; align-items: center; overflow: hidden;
}
.home-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .58); }
.home-hero > .container { position: relative; z-index: 2; }
.home-hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
.home-hero h2 { color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.6rem); font-weight: 600; line-height: 1.5; }
.home-hero .lead { color: #e9eef2; max-width: 560px; }
.hero-collage { position: relative; height: 520px; }
.hero-collage img {
  position: absolute; width: 210px; border-radius: 14px;
  filter: drop-shadow(8px 10px 6px rgba(0,0,0,.45));
  animation: float 9s ease-in-out infinite;
}
.hero-collage .img-1 { top: 10px; inset-inline-start: 18%; }
.hero-collage .img-2 { top: 110px; inset-inline-start: 62%; animation-delay: -2s; }
.hero-collage .img-3 { top: 300px; inset-inline-start: 6%; animation-delay: -4s; }
.hero-collage .img-4 { top: 340px; inset-inline-start: 52%; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) { .hero-collage img { animation: none; } }

.social-rail {
  position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; flex-direction: column; gap: 12px;
}
.social-rail a {
  width: 42px; height: 42px; border-radius: 50%; background: var(--ewan-green); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .2s ease-in;
}
.social-rail a:hover { background: var(--ewan-navy); box-shadow: 1px 1px 10px #fff; color: #fff; }

/* ---------- Achievements ---------- */
.achievement-img img { width: 100%; max-height: 400px; object-fit: cover; filter: saturate(.5); border-radius: 6px; }
.achievement-cards { display: flex; flex-wrap: wrap; justify-content: space-evenly; gap: 1rem; margin-top: -75px; position: relative; z-index: 5; }
.achievement-card {
  width: 180px; height: 180px; border-radius: 10px; background: var(--ewan-navy); color: #fff;
  box-shadow: 1px 1px 10px grey; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.achievement-card i {
  width: 58px; height: 58px; border-radius: 50%; background: #fff; color: #192e40;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: .5rem;
}
.achievement-card .num { color: #fff; font-size: 1.7rem; font-weight: 700; margin: 0; font-family: system-ui, sans-serif; }
.achievement-card .num::after { content: "+"; }
.achievement-card p { color: #fff; margin: 0; font-size: .95rem; }

/* ---------- Facilities slider ---------- */
.facilities { background: var(--ewan-gray); }
.offer-card { background: var(--ewan-gray); display: flex; align-items: center; gap: 2rem; padding: 1.5rem; text-align: start; }
.offer-card .offer-img { flex: 0 0 min(40%, 380px); }
.offer-card .offer-img img { border-radius: 20px; filter: drop-shadow(0 5px 9px grey); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.offer-card h3 { color: var(--ewan-navy); font-size: 1.4rem; }
.offer-card p { text-align: justify; margin: 0; }
@media (max-width: 767.98px) {
  .offer-card { flex-direction: column; }
  .offer-card .offer-img { flex-basis: auto; width: 100%; }
}

.swiper-button-next, .swiper-button-prev {
  width: 44px !important; height: 44px !important; border-radius: 50%;
  background: #000; color: #fff !important;
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 16px !important; font-weight: 700; }
.swiper-pagination-bullet-active { background: var(--ewan-green) !important; }

/* ---------- Pricing ---------- */
.box-price {
  background: #fafafa; box-shadow: 1px 1px 10px #e3e3e3; border-radius: 20px;
  padding: 40px 22px; height: 100%; text-align: center; transition: transform .3s ease;
}
.box-price:hover { transform: translateY(-6px); }
@media (min-width: 992px) { .box-price.featured { transform: scale(1.06); } .box-price.featured:hover { transform: scale(1.06) translateY(-6px); } }
.box-price h3 { color: var(--ewan-green); margin-bottom: .25rem; }
.box-price .from { font-size: .8rem; color: var(--ewan-muted); margin: 0; }
.box-price .icon {
  width: 76px; height: 76px; border-radius: 50%; background: var(--ewan-green); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin: 14px auto;
}
.box-price .price { color: var(--ewan-green); font-size: 2rem; font-weight: 800; }
.box-price .price small { font-size: .8rem; font-weight: 400; color: var(--ewan-muted); }
.box-price ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; text-align: start; }
.box-price li { display: flex; justify-content: space-between; align-items: center; padding: 6px 5px; border-bottom: 1px dashed #e5e5e5; }
.box-price li i { color: green; }

/* ---------- Reviews ---------- */
.review-card {
  position: relative; text-align: center; background: var(--ewan-gray); border-radius: 10px;
  margin-top: 60px; padding: 70px 26px 26px; min-height: 360px;
}
.review-card img {
  position: absolute; top: -50px; inset-inline-start: 50%; transform: translateX(-50%);
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid #fff;
}
[dir="rtl"] .review-card img { transform: translateX(50%); }
.review-card h4 { color: var(--ewan-navy); font-size: 1.05rem; padding-top: 10px; }
.review-card p { font-size: .95rem; margin: 0; }
.reviews-swiper { padding-bottom: 50px !important; }

/* ---------- FAQ ---------- */
.faq-section { background: var(--ewan-gray); }
.faq-section .accordion-item { background: transparent; border: none; border-bottom: 1px solid #e5e5e5; }
.faq-section .accordion-button {
  background: transparent; color: var(--ewan-muted); font-size: 1.08rem; box-shadow: none; padding-inline: 0;
}
.faq-section .accordion-button:not(.collapsed) { color: var(--ewan-green); border-bottom: 1px solid var(--ewan-green); }
.faq-section .accordion-button::after { margin-inline-start: auto; margin-inline-end: 0; }
.faq-section .accordion-body { padding-inline: 0; }

/* ---------- Page banners ---------- */
.page-banner {
  position: relative; color: #fff; padding-block: 120px 100px; text-align: center;
  background-size: cover; background-position: center; background-color: var(--ewan-navy);
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .58); }
.page-banner > .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); }
.page-banner p { color: #fff; font-size: 1.15rem; max-width: 820px; margin: 0 auto; }
.page-banner.plain::before { display: none; }

/* ---------- About ---------- */
.about-tabs { background: var(--ewan-navy); }
.about-tabs .nav { justify-content: center; gap: .25rem; padding-block: .75rem; border: none; }
.about-tabs .nav-link { color: #fff; border: none; border-radius: 5px; padding: 14px 18px; }
.about-tabs .nav-link.active, .about-tabs .nav-link:hover { background: var(--ewan-green); color: #fff; }
.about-tab-content { background: var(--ewan-navy); color: #fff; padding: 50px; margin: 50px auto; border-radius: 10px; }
.about-tab-content ul { margin: 0; padding-inline-start: 1.6rem; }
.about-tab-content li { list-style: none; position: relative; }
.about-tab-content li::before {
  content: ""; position: absolute; inset-inline-start: -1.6rem; top: .55rem;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
}
.about-tab-content p { color: #fff; font-size: 1.08rem; text-align: justify; }
@media (max-width: 575.98px) { .about-tab-content { padding: 28px 22px; } }

/* ---------- Programs (register) ---------- */
.program-row { padding-block: 3rem; align-items: center; }
.program-row img { border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.program-row h2 { color: var(--ewan-green); }
.program-row ul { padding-inline-start: 1.2rem; }
.program-row li { list-style: disc; margin-bottom: .25rem; }
.cta-strip { background: var(--ewan-navy); color: #fff; border-radius: 16px; padding: 2.5rem; }
.cta-strip h2, .cta-strip p { color: #fff; }

/* ---------- Contact ---------- */
.contact-section { background: var(--ewan-navy); padding-block: 90px; }
.contact-info h1 { color: var(--ewan-green); }
.contact-info p { color: #fff; font-size: 1.2rem; font-weight: 300; }
.contact-info ul { list-style: none; padding: 0; }
.contact-info li { display: flex; gap: .75rem; align-items: baseline; padding: 8px 0; color: #fff; }
.contact-info li a { color: #fff; font-weight: 300; }
.contact-info li a:hover { color: var(--ewan-green); }
.contact-form-card { background: #fff; border-radius: 10px; padding: 36px; }
.contact-form-card h2 { color: var(--ewan-green); font-weight: 400; font-size: 1.5rem; text-align: center; }
.contact-form-card label { color: var(--ewan-text); font-size: .92rem; margin-bottom: .25rem; }
.contact-form-card .form-control { background: var(--ewan-gray-2); border: 1px solid transparent; border-radius: 5px; padding: 10px 12px; }
.contact-form-card .form-control:focus { border-color: var(--ewan-green); box-shadow: 0 0 0 .2rem rgba(23,165,100,.15); background: #fff; }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.map-embed { display: block; width: 100%; height: 320px; border: 0; }

/* ---------- Gallery / blog cards ---------- */
.page-gray { background: var(--ewan-gray-2); }
.content-card {
  background: #fff; border-radius: 10px; overflow: hidden; height: 100%;
  box-shadow: 0 3px 6px rgba(0,0,0,.16); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease;
}
.content-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.content-card .thumb { aspect-ratio: 4/3; background: #e9ecef; overflow: hidden; }
.content-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.content-card .body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.content-card h2, .content-card h3 { color: var(--ewan-green); font-size: 1.1rem; }
.content-card p { font-size: .95rem; flex: 1; }
.content-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--ewan-muted); border-top: 1px solid #eee; padding-top: 10px; }
.share-fb { color: #1877f2; }

.gallery-main-swiper { background: #111; border-radius: 12px; }
.gallery-main-swiper .swiper-slide { display: flex; align-items: center; justify-content: center; height: min(70vh, 640px); }
.gallery-main-swiper img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.gallery-thumbs .swiper-slide { opacity: .45; cursor: pointer; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.gallery-thumbs .swiper-slide-thumb-active { opacity: 1; outline: 3px solid var(--ewan-green); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.blog-tabs .nav-link { color: var(--ewan-text); border-radius: 30px; padding: 8px 20px; }
.blog-tabs .nav-link.active { background: var(--ewan-green); color: #fff; }
.article-body { font-size: 1.05rem; line-height: 2; }
.article-body img { border-radius: 10px; margin-block: 1rem; height: auto; }
.article-body h2, .article-body h3 { margin-top: 1.5rem; }
.related-card { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; }
.related-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.related-card h4 { font-size: .98rem; color: var(--ewan-navy); margin: 0 0 .25rem; }
.breadcrumb-ewan { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; font-size: .92rem; }
.breadcrumb-ewan a { color: #fff; opacity: .9; }
.breadcrumb-ewan span { color: #fff; opacity: .6; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--ewan-muted); }
.empty-state i { font-size: 3rem; color: var(--ewan-green); margin-bottom: 1rem; }

/* ---------- Legal ---------- */
.legal { max-width: 900px; margin: 0 auto; }
.legal h2 { font-size: 1.3rem; margin-top: 1.75rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ewan-navy); color: #fff; }
.site-footer .footer-top { padding-block: 80px 40px; }
.site-footer h3 { color: #fff; font-size: 1.2rem; margin-bottom: 1.25rem; }
.site-footer .brand-title { display: inline-block; border-bottom: 2px solid #fff; padding-bottom: 12px; }
.site-footer p { color: #fff; text-align: justify; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; }
.site-footer a { color: #fff; font-size: .92rem; transition: color .2s; }
.site-footer a:hover { color: var(--ewan-green-light); }
.footer-contact li { display: flex; gap: .7rem; align-items: baseline; }
.footer-contact i { color: var(--ewan-green-light); width: 18px; text-align: center; }
.footer-bottom { border-top: 2px solid #fff; padding-block: 15px; text-align: center; }
.footer-bottom span, .footer-bottom a { padding-inline: 14px; }
.footer-bottom a + a, .footer-bottom span + a { border-inline-start: 2px solid #fff; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); margin-inline-end: 6px;
}
.footer-social a:hover { background: var(--ewan-green); color: #fff; }

/* ---------- 404 / QR landing ---------- */
.state-page { min-height: 62vh; display: flex; align-items: center; text-align: center; background: var(--ewan-gray); }
.state-page .code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 900; color: var(--ewan-green); line-height: 1; }
.app-card { background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 2.5rem 2rem; max-width: 560px; margin: 0 auto; }
.app-card .book-cover { width: 160px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.18); margin-bottom: 1rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: .6rem; background: #000; color: #fff; border-radius: 10px;
  padding: 10px 20px; margin: .35rem; min-width: 200px; justify-content: center;
}
.store-btn:hover { background: var(--ewan-navy); color: #fff; }
.store-btn i { font-size: 1.5rem; }

/* ---------- Floating join (mobile) ---------- */
.floating-join {
  position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 1020;
  background: var(--ewan-green); color: #fff; border-radius: 30px; padding: 12px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); font-weight: 600;
}
.floating-join:hover { color: #fff; background: var(--ewan-navy); }

@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding-block: 1rem; }
  .site-header .nav-link::after { display: none; }
  .home-hero { min-height: 520px; padding-block: 80px; text-align: center; }
  .home-hero .lead { margin-inline: auto; }
  .social-rail { display: none; }
  .topbar .container { gap: 1rem; justify-content: space-between; }
  .topbar .hide-sm { display: none !important; }
}
