/* ===== FONT ===== */
@font-face {
  font-family: 'El Messiri';
  src: url('fonts/ElMessiri-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'El Messiri';
  src: url('fonts/El Messiri Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* ===== ROOT ===== */
:root {
  --primary: #006d77;
  --accent: #08c5be;
  --light: #ebf6fa;
  --dark: #013e77;
  --text: #16232b;
  --muted: #4d626f;
  --radius: 18px;
  --shadow: 0 16px 36px rgba(1, 62, 119, 0.14);
  --header-height: 140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'El Messiri', serif;
  color: var(--text);
  line-height: 1.9;
  background: #fff;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== GLOBAL ===== */
.container {
  width: min(1280px, 94%);
  margin-inline: auto;
}

.section {
  padding: 104px 0;
}

.section-tight {
  padding: 40px 0;
}

.center {
  text-align: center;
}

h1,
h2,
h3,
h4 {
  font-family: 'El Messiri', serif;
  color: var(--primary);
  line-height: 1.35;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.65rem);
  margin-bottom: 10px;
}

h3 {
  font-size: clamp(1.28rem, 2.35vw, 1.72rem);
  margin-bottom: 8px;
}

p {
  color: var(--muted);
}

.eyebrow {
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-intro {
  margin-bottom: 34px;
}

.card {
  background: #fff;
  border: 1px solid rgba(0, 109, 119, 0.13);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 44px rgba(1, 62, 119, 0.18);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  direction: ltr;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.topbar-info {
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topbar-info-wrap {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.84);
}

.topbar-meta a,
.topbar-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.topbar-sep {
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.24);
}

.top-icon {
  color: rgba(8, 197, 190, 0.95);
  font-size: 12px;
}

.topbar-social {
  display: inline-flex;
  align-items: center;
}

.topbar-social a {
  width: 40px;
  height: 44px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.topbar-social a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-social a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  opacity: 1;
}

.topbar-main {
  display: grid;
  grid-template-columns: minmax(280px, 30vw) 1fr;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
}

.brand-block {
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  min-height: 106px;
  padding: 18px 22px;
}

.brand-logo {
  width: auto;
  max-width: 88%;
  max-height: 62px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-wrap {
  width: 100%;
  margin: 0;
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  padding-inline: clamp(28px, 3.2vw, 58px);
}

.mobile-shortcuts {
  display: none;
}

.mobile-social {
  display: none;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 2.7vw, 38px);
  flex-wrap: nowrap;
  direction: rtl;
}

.nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.nav a.active,
.nav a:not(.menu-cta):hover {
  color: var(--primary);
}

.menu-cta {
  background: var(--dark);
  color: #fff;
  padding: 13px 28px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.08rem;
  box-shadow: 0 8px 20px rgba(1, 62, 119, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-cta:hover {
  color: #fff;
  background: #012f5a;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(1, 62, 119, 0.24);
}

.header-cta {
  align-self: center;
  margin: 0;
  flex: 0 0 auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(1, 62, 119, 0.18);
  background: #f4fbff;
  color: var(--dark);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.locale-switch:hover {
  background: #e9f8ff;
  box-shadow: 0 12px 24px rgba(1, 62, 119, 0.1);
  transform: translateY(-1px);
}

.locale-switch[hidden] {
  display: none !important;
}

.nav-wrap-compact {
  min-height: 106px;
  justify-content: flex-end;
}

.nav .menu-cta-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #1f2330;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
}

.btn.outline {
  border-color: var(--primary);
  color: var(--primary);
  padding: 12px 24px;
}

.btn.light {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  padding: 12px 24px;
}

.btn.small {
  padding: 8px 14px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ===== HERO ===== */
.hero.section {
  padding: 0;
}

.hero {
  position: relative;
  background: url('images/hero-mosque-unsplash.jpg') center 43%/cover no-repeat;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 56%, rgba(255, 255, 255, 0.82) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(247, 248, 250, 0.68) 38%, rgba(255, 255, 255, 0.8) 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
}

.hero-content {
  width: min(1120px, 96%);
  margin-inline: auto;
  text-align: center;
  direction: rtl;
  padding: clamp(82px, 15vh, 132px) 18px clamp(60px, 10vh, 92px);
}

.hero-title {
  color: var(--dark);
  font-size: clamp(2.35rem, 4.9vw, 4.15rem);
  font-weight: 700;
  line-height: 1.32;
  text-shadow: 0 1px 7px rgba(255, 255, 255, 0.32);
}

.hero-subtitle {
  margin-top: 10px;
  color: var(--primary);
  font-size: clamp(2.05rem, 4.5vw, 3.55rem);
  font-weight: 700;
  line-height: 1.31;
}

.hero-overview {
  margin-top: 24px;
  max-width: 1040px;
  margin-inline: auto;
  color: var(--text);
  font-size: clamp(1.16rem, 1.95vw, 1.72rem);
  font-weight: 500;
  line-height: 1.82;
  text-shadow: 0 1px 7px rgba(255, 255, 255, 0.28);
}

.hero-cta {
  margin-top: 30px;
  display: inline-flex;
  width: min(640px, 100%);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 52%, var(--dark) 100%);
  box-shadow: 0 14px 30px rgba(1, 62, 119, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hero-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(1, 62, 119, 0.3);
  opacity: 0.98;
}

/* ===== QUOTE ===== */
.quote-strip {
  position: relative;
  background: var(--dark);
  overflow: hidden;
}

.quote-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(202, 224, 255, 0.2) 45%, transparent 100%);
  transform: translateX(-120%);
  animation: quoteSweep 5.8s ease-in-out infinite;
  pointer-events: none;
}

.quote-strip .container {
  position: relative;
  z-index: 1;
  animation: quoteRise 0.9s ease both;
}

.quote-ar {
  color: #fff;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  margin-bottom: 6px;
  animation: quotePulse 3.6s ease-in-out infinite;
}

.quote-ref {
  color: #cae0ff;
}

@keyframes quoteSweep {
  0% { transform: translateX(-120%); }
  40% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@keyframes quoteRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quotePulse {
  0%, 100% { text-shadow: 0 0 0 rgba(202, 224, 255, 0); }
  50% { text-shadow: 0 0 14px rgba(202, 224, 255, 0.32); }
}

/* ===== PRODUCTS SHOWCASE ===== */
.products-showcase {
  padding: clamp(84px, 9vw, 116px) 0;
  background:
    radial-gradient(circle at 8% 16%, rgba(8, 197, 190, 0.11), transparent 44%),
    radial-gradient(circle at 90% 8%, rgba(1, 62, 119, 0.1), transparent 38%),
    linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.products-showcase h2 {
  color: var(--dark);
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.products-showcase .section-intro {
  max-width: 860px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.85;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  justify-content: center;
  gap: clamp(24px, 2.7vw, 32px);
  max-width: 1240px;
  margin: 34px auto 0;
}

.product-tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 440px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 40px rgba(1, 62, 119, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.product-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tile-image) center center/cover no-repeat;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.product-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.56) 100%);
  transition: background 0.3s ease;
}

.product-tile:hover {
  box-shadow: 0 24px 48px rgba(1, 62, 119, 0.22);
}

.product-tile:hover::before {
  transform: scale(1.05);
}

.product-tile:hover::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.64) 100%);
}

.tile-content {
  position: relative;
  z-index: 1;
  width: min(86%, 430px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.tile-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 30px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.tile-icon i {
  color: #fff;
}

.product-tile h3 {
  color: #fff;
  margin: 0;
  font-size: clamp(1.65rem, 2.9vw, 2.15rem);
  line-height: 1.32;
}

.product-tile p {
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.75;
}

.tile-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--dark);
  background: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.product-tile:hover .tile-btn {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(8, 197, 190, 0.35);
}

@media (max-width: 940px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 22px;
    max-width: 900px;
  }

  .product-tile {
    min-height: 400px;
  }
}

@media (max-width: 780px) {
  .products-showcase {
    padding: 84px 0;
  }

  .products-grid {
    grid-template-columns: 1fr;
    max-width: 540px;
    gap: 20px;
  }

  .product-tile {
    min-height: 360px;
  }
}

/* ===== STATS ===== */
.stats {
  background: linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.stat-card {
  text-align: center;
}

.stat-number {
  color: var(--primary);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* ===== ABOUT ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
}

.history-about {
  background:
    radial-gradient(circle at 8% 20%, rgba(8, 197, 190, 0.13), transparent 36%),
    radial-gradient(circle at 86% 0%, rgba(1, 62, 119, 0.12), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
}

.about-head {
  margin-inline: auto;
  max-width: 900px;
}

.about-history {
  position: relative;
  max-width: 1080px;
  margin: 20px auto 50px;
  padding: 10px 0;
  display: grid;
  gap: 18px;
}

.history-line {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  width: 2px;
  transform: translateX(50%);
  background: rgba(0, 109, 119, 0.14);
  overflow: hidden;
}

.history-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 109, 119, 0.38) 0%, rgba(0, 109, 119, 0.82) 62%, rgba(1, 62, 119, 0.32) 100%);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.1s ease;
}

.about-history.active .history-line::after {
  transform: scaleY(1);
}

.history-item {
  position: relative;
  width: calc(50% - 34px);
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.7s ease, opacity 0.7s ease, box-shadow 0.28s ease;
}

.history-item:nth-child(2n) {
  margin-right: auto;
}

.history-item:nth-child(2n + 1) {
  margin-left: auto;
}

.history-item::before {
  content: "";
  position: absolute;
  top: 33px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(8, 197, 190, 0.18);
}

.history-item:nth-child(2n)::before {
  left: -42px;
}

.history-item:nth-child(2n + 1)::before {
  right: -42px;
}

.history-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--dark));
  font-weight: 700;
  font-size: 0.92rem;
}

.history-item p {
  margin-top: 8px;
}

.history-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-values {
  max-width: 1180px;
  margin-inline: auto;
}

.values-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
}

.value-card {
  text-align: center;
  padding-top: 24px;
  padding-bottom: 24px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.value-card h3 {
  color: var(--dark);
}

.value-card p {
  margin-top: 6px;
}

.value-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GALLERY ===== */
.gallery {
  background: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 20px;
}

.gallery-card {
  padding: 12px;
}

.gallery-card img {
  border-radius: 14px;
  margin-bottom: 10px;
  min-height: 280px;
  object-fit: cover;
  transition: transform 0.34s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-card figcaption {
  color: var(--muted);
  font-size: 15px;
  padding: 0 6px 4px;
}

/* ===== LISTING SECTIONS ===== */
.lessons {
  padding: clamp(84px, 9vw, 102px) 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(8, 197, 190, 0.12), transparent 34%),
    linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
}

.lessons .container {
  max-width: 1280px;
}

.lessons .section-intro {
  max-width: 860px;
  margin-bottom: 10px;
}

.lessons-stack {
  margin-top: 28px;
  display: grid;
  gap: clamp(60px, 7vw, 80px);
}

.lesson-row {
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  grid-template-areas: "image content";
  align-items: center;
  gap: clamp(32px, 4vw, 48px);
  direction: ltr;
}

.lesson-row.is-reverse {
  grid-template-areas: "content image";
}

.lesson-image {
  grid-area: image;
}

.lesson-image.is-zoomed {
  overflow: hidden;
  border-radius: 10px;
}

.lesson-image img {
  width: 100%;
  height: clamp(250px, 28vw, 320px);
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.lesson-image.is-zoomed img {
  transform: scale(1.07);
  transform-origin: center;
}

.lesson-content {
  grid-area: content;
  direction: rtl;
  text-align: right;
}

.lesson-content h3 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.34;
}

.lesson-content p {
  margin-top: 12px;
  color: var(--text);
  line-height: 1.75;
}

.lesson-content ul {
  margin-top: 14px;
  padding-right: 20px;
}

.lesson-content li {
  margin-bottom: 7px;
  color: var(--text);
  line-height: 1.7;
}

.lesson-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lesson-btn:hover {
  background: #05a8a2;
  transform: translateY(-1px);
}

#courses {
  background:
    radial-gradient(circle at 92% 14%, rgba(1, 62, 119, 0.1), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.media-cards {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
}

.media-card {
  overflow: hidden;
  padding: 0;
  border-color: rgba(1, 62, 119, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-visual {
  position: relative;
  min-height: 200px;
}

.media-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 62, 119, 0.04) 0%, rgba(1, 62, 119, 0.42) 100%);
}

.media-visual img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.media-card:hover .media-visual img {
  transform: scale(1.06);
}

.media-content {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.media-content p {
  color: var(--text);
  margin: 0;
}

.media-tagline {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.75;
}

.media-content .lesson-btn {
  margin-top: auto;
  align-self: flex-start;
}

.card ul {
  margin-top: 10px;
  padding-right: 20px;
}

.card li {
  color: var(--text);
  margin-bottom: 5px;
}

.card-note {
  margin-top: 10px;
}

.why,
.testimonials,
.faq {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.why {
  background:
    radial-gradient(circle at 12% 12%, rgba(8, 197, 190, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.why-head {
  max-width: 880px;
  margin-inline: auto;
}

.why-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.why-card {
  height: 100%;
  text-align: center;
  padding: 26px 22px 24px;
  border-color: rgba(1, 62, 119, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.why-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(8, 197, 190, 0.14), rgba(1, 62, 119, 0.1));
  color: var(--primary);
  font-size: 1.35rem;
}

.why-card h3 {
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 1.22rem;
}

.why-card p {
  color: var(--muted);
  line-height: 1.8;
}

.why-actions {
  margin-top: 24px;
}

.testimonials {
  background:
    radial-gradient(circle at 94% 20%, rgba(8, 197, 190, 0.12), transparent 38%),
    linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.testimonial-card .media-content p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.95;
}

.testimonials .card p {
  color: var(--text);
}

.testimonials .testimonial-card .media-content p {
  color: var(--muted);
}

.testimonials .card h4 {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--dark);
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 14px;
}

.faq details {
  padding: 18px 18px;
  border-color: rgba(0, 109, 119, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin-top: 10px;
}

.reveal-section .media-card,
.reveal-section .why-card,
.reveal-section .faq details {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

.reveal-section.in-view .media-card,
.reveal-section.in-view .why-card,
.reveal-section.in-view .faq details {
  opacity: 1;
  transform: translateY(0);
}

.reveal-section.in-view .media-card:nth-child(1),
.reveal-section.in-view .why-card:nth-child(1),
.reveal-section.in-view .faq details:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal-section.in-view .media-card:nth-child(2),
.reveal-section.in-view .why-card:nth-child(2),
.reveal-section.in-view .faq details:nth-child(2) {
  transition-delay: 0.12s;
}

.reveal-section.in-view .media-card:nth-child(3),
.reveal-section.in-view .why-card:nth-child(3),
.reveal-section.in-view .faq details:nth-child(3) {
  transition-delay: 0.19s;
}

.reveal-section.in-view .media-card:nth-child(4),
.reveal-section.in-view .why-card:nth-child(4),
.reveal-section.in-view .faq details:nth-child(4) {
  transition-delay: 0.26s;
}

/* ===== CTA ===== */
.cta-final {
  background: var(--primary);
}

.cta-final h2,
.cta-final p {
  color: #fff;
}

.cta-final p {
  margin-bottom: 18px;
}

/* ===== CONTACT ===== */
.contact {
  background: #fff;
}

.contact form {
  display: grid;
  gap: 10px;
}

.contact input,
.contact select,
.register-form input,
.register-form select {
  width: 100%;
  border: 1px solid rgba(1, 62, 119, 0.24);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.contact input:focus,
.contact select:focus,
.register-form input:focus,
.register-form select:focus {
  outline: 2px solid rgba(8, 197, 190, 0.35);
  border-color: var(--accent);
}

.trust-list {
  margin-top: 14px;
  padding-right: 20px;
}

.trust-list li {
  margin-bottom: 6px;
  color: var(--dark);
}

.form-note {
  color: #6c7e89;
  font-size: 13px;
}

.form-note a {
  color: var(--primary);
  font-weight: 700;
}

.register-page-main {
  background:
    radial-gradient(circle at 12% 10%, rgba(8, 197, 190, 0.08), transparent 30%),
    linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
}

.register-hero {
  min-height: calc(100vh - 170px);
  display: flex;
  align-items: center;
}

.register-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 26px;
  align-items: start;
}

.register-copy h1,
.thank-you-panel h1,
.legal-card h1 {
  color: var(--dark);
  margin-bottom: 12px;
}

.register-intro,
.legal-card p,
.legal-list li,
.thank-you-panel p {
  color: var(--text);
  line-height: 1.95;
}

.register-form {
  display: grid;
  gap: 12px;
}

.selected-program-card {
  margin-top: 20px;
}

/* ===== PROGRAM PAGES ===== */
.program-page-main {
  background:
    radial-gradient(circle at 12% 10%, rgba(8, 197, 190, 0.08), transparent 30%),
    linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
}

.program-shell {
  width: min(1260px, 94%);
  margin-inline: auto;
}

.program-hero {
  padding: clamp(138px, 16vw, 172px) 0 50px;
}

.program-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.program-breadcrumb:hover {
  color: var(--dark);
}

.program-hero-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  align-items: center;
}

.program-copy h1 {
  color: var(--dark);
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.26;
  margin-bottom: 10px;
}

.program-subtitle {
  color: var(--primary);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.8;
}

.program-summary {
  margin-top: 16px;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.95;
}

.program-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.program-visual {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(1, 62, 119, 0.14);
  min-height: 360px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(232, 246, 248, 0.72)),
    linear-gradient(90deg, rgba(8, 197, 190, 0.16), rgba(1, 62, 119, 0.12));
}

.program-visual.is-loading {
  position: relative;
}

.program-visual.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.7) 50%, transparent 88%);
  transform: translateX(-100%);
  animation: image-shimmer 1.4s infinite;
}

.program-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.program-visual img.is-ready {
  opacity: 1;
}

.program-facts {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.program-fact {
  padding: 18px 16px;
  border: 1px solid rgba(1, 62, 119, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(1, 62, 119, 0.08);
  text-align: center;
}

.program-fact-label {
  display: block;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.program-fact-value {
  display: block;
  margin-top: 8px;
  color: var(--text);
  line-height: 1.75;
}

.program-section {
  padding: 18px 0 92px;
}

.program-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.program-side {
  display: grid;
  gap: 20px;
}

.program-panel {
  padding: 28px 24px;
}

.program-panel h2 {
  color: var(--dark);
  margin-bottom: 10px;
}

.program-panel p {
  color: var(--text);
}

.program-list {
  margin-top: 14px;
  padding-right: 20px;
}

.program-list li {
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.82;
}

.program-note {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
}

.program-rights {
  border: 1px solid rgba(0, 109, 119, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #eefaf8 100%);
}

.program-cta-buttons {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--light);
  border-top: 1px solid rgba(1, 62, 119, 0.1);
  padding: 28px 0 20px;
}

.site-footer p {
  color: var(--dark);
  font-size: 14px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.footer-brand h2,
.footer-links h3 {
  margin: 0 0 10px;
  color: var(--dark);
}

.footer-brand p {
  margin: 0;
  line-height: 1.9;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(1, 62, 119, 0.12);
  box-shadow: 0 10px 18px rgba(1, 62, 119, 0.08);
}

.site-footer-bottom {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(1, 62, 119, 0.08);
}

.site-footer-bottom p {
  margin: 0;
}

.legal-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(8, 197, 190, 0.08), transparent 28%),
    linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
}

.legal-shell {
  width: min(1120px, 94%);
  margin-inline: auto;
}

.legal-card,
.thank-you-panel {
  padding: 32px 28px;
}

.legal-card h2 {
  margin: 28px 0 10px;
  color: var(--dark);
}

.legal-list {
  margin: 10px 0 0;
  padding-right: 22px;
}

.legal-list li {
  margin-bottom: 8px;
}

.register-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes image-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ===== WHATSAPP ===== */
.whatsapp {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #25d366;
  color: #fff;
  padding: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: 50;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.whatsapp:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.05);
}

.whatsapp svg {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
  transform: translateY(0.5px);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 50;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.is-ltr {
  text-align: left;
}

body.is-ltr .topbar {
  direction: ltr;
}

body.is-ltr .nav {
  direction: ltr;
}

body.is-ltr .hero-grid,
body.is-ltr .hero-content,
body.is-ltr .lesson-content,
body.is-ltr .media-content,
body.is-ltr .footer-links,
body.is-ltr .footer-brand,
body.is-ltr .register-copy,
body.is-ltr .thank-you-panel,
body.is-ltr .legal-card {
  direction: ltr;
  text-align: left;
}

body.is-ltr .card ul,
body.is-ltr .lesson-content ul,
body.is-ltr .program-list,
body.is-ltr .trust-list,
body.is-ltr .legal-list {
  padding-right: 0;
  padding-left: 20px;
}

body.is-ltr .media-content .lesson-btn {
  align-self: flex-start;
}

/* ===== REVEAL ===== */
.reveal-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 940px) {
  .topbar-main {
    grid-template-columns: minmax(170px, 28vw) 1fr;
  }

  .topbar-meta {
    font-size: 12px;
    gap: 11px;
  }

  .brand-subtitle {
    letter-spacing: 0.08em;
  }

  .brand-logo {
    max-height: 50px;
  }

  .nav-wrap {
    padding-inline: 20px;
  }

  .nav {
    gap: 18px;
  }

  .nav a {
    font-size: 1.04rem;
  }

  .header-cta {
    padding: 11px 18px;
    font-size: 1rem;
  }

  .lesson-row,
  .lesson-row.is-reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "content";
    gap: 22px;
  }

  .lessons-stack {
    gap: 54px;
  }

  .contact-wrap,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .program-hero-grid,
  .program-detail-grid,
  .register-grid,
  .site-footer-grid {
    grid-template-columns: 1fr;
  }

  .program-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-cards {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-line {
    right: 18px;
    transform: none;
  }

  .history-item,
  .history-item:nth-child(2n),
  .history-item:nth-child(2n + 1) {
    width: calc(100% - 42px);
    margin-inline: 0 auto;
  }

  .history-item::before,
  .history-item:nth-child(2n)::before,
  .history-item:nth-child(2n + 1)::before {
    right: -30px;
    left: auto;
  }

  .values-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 0px;
  }


  .lessons {
    padding: 84px 0;
  }

  .lesson-image img {
    height: 240px;
  }

  .lesson-content h3 {
    font-size: clamp(1.35rem, 5.6vw, 1.7rem);
  }

  .lesson-btn {
    min-width: 124px;
    padding: 9px 18px;
  }

  .program-hero {
    padding: 148px 0 42px;
  }

  .program-copy h1 {
    font-size: clamp(1.85rem, 7.4vw, 2.45rem);
  }

  .program-subtitle {
    font-size: 1.06rem;
    line-height: 1.85;
  }

  .program-summary {
    font-size: 0.98rem;
  }

  .program-facts {
    grid-template-columns: 1fr;
  }

  .program-panel {
    padding: 24px 20px;
  }

  .program-visual img {
    min-height: 260px;
  }

  .program-visual {
    min-height: 260px;
  }

  .section {
    padding: 76px 0;
  }

  .topbar-info {
    display: block;
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar-info-wrap {
    min-height: 36px;
    justify-content: flex-start;
    direction: ltr;
  }

  .topbar-meta {
    display: none;
  }

  .topbar-info .topbar-social {
    display: inline-flex;
    align-items: center;
  }

  .topbar-info .topbar-social a {
    width: 34px;
    height: 36px;
    font-size: 13px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .topbar-info .topbar-social a:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .topbar {
    position: sticky;
    background: #fff;
    direction: rtl;
  }

  .topbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "nav logo";
    align-items: center;
    row-gap: 0;
    padding: 12px 4% 8px;
    border-bottom: 0;
    background: transparent;
    direction: ltr;
  }

  .brand-block {
    grid-area: logo;
    min-height: auto;
    padding: 0;
    background: transparent;
    flex-direction: row;
    justify-content: flex-end;
    flex: 0 0 auto;
    justify-self: end;
  }

  .brand-logo {
    width: auto;
    max-width: 100%;
    max-height: 54px;
    filter: none;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-wrap {
    grid-area: nav;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: auto;
    width: min(100%, 100%);
    justify-content: flex-start;
    gap: 10px;
    padding: 0;
    border-top: 0;
    direction: ltr;
    justify-self: start;
  }

  .mobile-social {
    display: none;
  }

  .mobile-social a {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 109, 119, 0.24);
    border-left: 1px solid rgba(0, 109, 119, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--dark);
    font-size: 16px;
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 24px rgba(1, 62, 119, 0.08);
  }

  .mobile-social a:last-child {
    border-right: 1px solid rgba(0, 109, 119, 0.24);
  }

  .mobile-social a:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.96);
  }

  .header-cta {
    display: none;
  }

  .mobile-shortcuts {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 109, 119, 0.24);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    justify-self: center;
  }

  .mobile-shortcuts a {
    text-decoration: none;
    color: var(--dark);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    padding: 14px 12px;
    white-space: nowrap;
  }

  .mobile-shortcuts a + a {
    border-right: 1px solid rgba(0, 109, 119, 0.26);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 48px;
    border: 1px solid rgba(0, 109, 119, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--dark);
    font-size: 32px;
    backdrop-filter: blur(4px);
  }

  .header-actions {
    justify-self: end;
    gap: 8px;
  }

  .locale-switch {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.96rem;
  }

  .nav {
    flex: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    width: min(320px, 92%);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 8px 4px;
    justify-content: space-between;
  }

  .nav .menu-cta-mobile {
    display: flex;
    width: 100%;
    margin-top: 8px;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
  }

  .hero {
    min-height: calc(100vh - var(--header-height));
    background-position: center 34%;
  }

  .hero-grid {
    min-height: calc(100vh - var(--header-height));
    justify-content: center;
    direction: rtl;
  }

  .hero-content {
    width: min(760px, 100%);
    text-align: center;
    padding: 150px clamp(18px, 5vw, 28px) 46px;
  }

  .hero-title {
    max-width: 10ch;
    margin-inline: auto;
    font-size: clamp(1.56rem, 7.2vw, 2.08rem);
    line-height: 1.36;
    text-wrap: balance;
  }

  .hero-subtitle {
    max-width: 12ch;
    margin: 10px auto 0;
    font-size: clamp(1.36rem, 6.6vw, 1.82rem);
    line-height: 1.38;
    text-wrap: balance;
  }

  .hero-overview {
    margin-top: 20px;
    font-size: clamp(0.98rem, 4.3vw, 1.18rem);
    line-height: 1.9;
    max-width: 18.5em;
    margin-inline: auto;
    text-wrap: balance;
  }

  .hero-cta {
    margin-top: 24px;
    width: min(100%, 520px);
    border-radius: 18px;
    font-size: clamp(1.32rem, 6.8vw, 1.72rem);
    padding: 14px 16px;
  }

  .back-to-top {
    right: 14px;
    bottom: 86px;
  }

  .media-cards {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    grid-template-columns: auto auto;
  }

  .mobile-shortcuts {
    display: none;
  }

  .header-actions {
    justify-self: start;
  }
}
