:root {
  --ink: #171717;
  --text: #404040;
  --muted: #737373;
  --line: #e5e5e5;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --soft-2: #fafafa;
  /* Colores bandera de España (oficiales) */
  --es-red: #c60b1e;
  --es-yellow: #ffc400;
  --red: var(--es-red);
  --gold: var(--es-yellow);
  --es-red-soft: rgba(198, 11, 30, 0.08);
  --es-yellow-soft: rgba(255, 196, 0, 0.12);
  --download-btn-text: #1a1a1a;
  --download-btn-sub: rgba(26, 26, 26, 0.62);
  --download-btn-bg: linear-gradient(135deg, #ffe066 0%, var(--es-yellow) 48%, #e6a800 100%);
  --download-btn-bg-hover: linear-gradient(135deg, #fff0a3 0%, #ffd633 48%, #f0b800 100%);
  --download-btn-shadow: 0 8px 24px rgba(230, 168, 0, 0.28);
  --download-btn-shadow-hover: 0 12px 28px rgba(230, 168, 0, 0.38);
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Tipografía árabe: Amiri (cuerpo) + Noto Nastaliq Urdu (títulos, estilo persa) */
  --arabic: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --arabic-display: "Noto Nastaliq Urdu", "Gulzar", "Amiri", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.flag-bar {
  display: flex;
  flex-direction: column;
  height: 12px;
  flex-shrink: 0;
}

.flag-bar span:nth-child(1),
.flag-bar span:nth-child(3) {
  flex: 1;
  background: var(--es-red);
}

.flag-bar span:nth-child(2) {
  flex: 2;
  background: var(--es-yellow);
}

/* Bandera España — CSS nítida (proporción 1:2:1) */
.flag-es {
  display: inline-block;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--es-red) 0% 25%,
    var(--es-yellow) 25% 75%,
    var(--es-red) 75% 100%
  );
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.flag-es-sm {
  width: 28px;
  height: 18px;
  border-radius: 3px;
}

.flag-es-md {
  width: 36px;
  height: 24px;
}

.flag-es-lg {
  width: 56px;
  height: 36px;
  border-radius: 6px;
}

.flag-es-xl {
  width: 72px;
  height: 48px;
  border-radius: 8px;
}

.card-flag-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--es-red-soft), var(--es-yellow-soft));
  border: 1px solid rgba(198, 11, 30, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--es-yellow-soft);
}

.site-header .nav.container {
  padding-right: clamp(84px, 11vw, 118px);
}

.site-header-flag {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: clamp(64px, 9vw, 96px);
  height: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  object-fit: cover;
  pointer-events: none;
}

.download-page-flag {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 30;
}

.header-presentation {
  padding: clamp(36px, 6vw, 56px) 0 clamp(28px, 5vw, 44px);
  background:
    linear-gradient(180deg, #fff 0%, var(--soft-2) 100%),
    linear-gradient(135deg, var(--es-red-soft) 0%, transparent 45%);
  border-bottom: 1px solid var(--line);
}

.header-presentation-inner {
  display: grid;
  gap: 28px;
}

.header-presentation-lead h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  max-width: 18ch;
}

.header-presentation-copy {
  max-width: 920px;
}

.header-presentation-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.header-presentation-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.header-presentation-card-featured {
  border-color: rgba(198, 11, 30, 0.22);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 196, 0, 0.08) 100%);
}

.header-presentation-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.presentation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.header-presentation-cta {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.header-presentation-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.download-intro-panel {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--es-red);
  border-radius: 16px;
  background: var(--soft-2);
}

.download-intro-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.download-intro-list li {
  display: grid;
  gap: 4px;
  padding-left: 18px;
  position: relative;
  line-height: 1.55;
}

.download-intro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--es-red), var(--es-yellow));
}

.download-intro-list .bi-es {
  font-weight: 600;
  color: var(--ink);
}

.download-intro-list .bi-ar {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.brand-text small,
.brand-text .bi-ar {
  direction: rtl;
  text-align: right;
  font-family: var(--arabic-display);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.brand-text .bi-es {
  font-weight: 700;
  font-size: 1rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.brand-flag {
  box-shadow: 0 2px 6px rgba(198, 11, 30, 0.18);
}

.download-badge {
  margin-bottom: 20px;
  max-width: 100%;
}

.download-brand .brand-flag {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
  color: var(--muted);
}

.nav-links a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links span {
  font-weight: 600;
  color: var(--text);
}

.nav-links small,
.nav-cta small {
  font-family: var(--arabic);
  font-size: 0.78rem;
  line-height: 1.65;
  font-weight: 400;
}

.nav-links small {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-links a:hover span {
  color: var(--es-red);
}

.nav-cta {
  padding: 11px 18px;
  background: var(--download-btn-bg);
  color: var(--download-btn-text);
  border: 1px solid rgba(198, 11, 30, 0.18);
  font-size: 0.9rem;
  white-space: nowrap;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
  text-align: center;
  box-shadow: var(--download-btn-shadow);
}

.nav-cta small {
  color: var(--download-btn-sub);
}

.button {
  padding: 14px 22px;
  font-size: 0.95rem;
}

.button:hover,
.nav-cta:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--download-btn-text);
  background: var(--download-btn-bg);
  border: 1px solid rgba(198, 11, 30, 0.18);
  box-shadow: var(--download-btn-shadow);
}

.button.primary:hover,
.nav-cta:hover {
  background: var(--download-btn-bg-hover);
  box-shadow: var(--download-btn-shadow-hover);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.button.secondary:hover {
  border-color: var(--es-yellow);
  background: linear-gradient(180deg, #fff 0%, var(--es-yellow-soft) 100%);
}

.hero {
  padding: 72px 0 80px;
  background:
    linear-gradient(135deg, var(--es-red-soft) 0%, transparent 42%),
    linear-gradient(225deg, var(--es-yellow-soft) 0%, transparent 38%),
    linear-gradient(180deg, var(--soft-2) 0%, var(--paper) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.hero-intro {
  width: 100%;
  max-width: 560px;
  margin-bottom: 4px;
}

.hero-academy-ar {
  margin: 0 0 10px;
  padding: 0 6px 2px;
  font-family: var(--arabic-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  text-align: right;
  direction: rtl;
}

.hero-badge {
  width: 100%;
  max-width: none;
  padding: 10px 14px;
  border: 1px solid rgba(198, 11, 30, 0.14);
  border-left: 4px solid var(--es-red);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 196, 0, 0.06) 0%, #fff 28%);
  box-shadow: 0 4px 16px rgba(198, 11, 30, 0.06);
}

.hero-badge-es {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-badge .bi-ar {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hero-flag-icon {
  width: 28px;
  height: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--es-red) 0%, var(--es-yellow) 100%);
  flex-shrink: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 600;
}

/* Títulos árabes: no usar fuente latina */
.bi-ar h1,
.bi-ar h2,
.bi-ar h3,
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3 {
  font-family: var(--arabic-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 2;
}

h1 {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.hero-text,
.section p {
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Bilingual alignment: Spanish left, Arabic right */
.bi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 28px;
  align-items: start;
  width: 100%;
}

.bi-row-tight {
  gap: 6px 20px;
}

.bi-row-center {
  text-align: center;
}

.bi-row-center .bi-es,
.bi-row-center .bi-ar {
  text-align: center;
}

.bi-es {
  margin: 0;
  text-align: left;
}

.bi-ar,
[lang="ar"] {
  font-family: var(--arabic);
  font-weight: 400;
  font-feature-settings: "liga" 1, "calt" 1;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.bi-ar {
  margin: 0;
  direction: rtl;
  text-align: right;
  color: var(--ink);
  font-size: 1.12em;
  line-height: 2.1;
}

.bi-heading {
  margin: 12px 0 0;
}

.bi-heading .bi-es {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 600;
}

.bi-heading .bi-ar {
  font-family: var(--arabic-display);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 2.2;
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
}

.section-heading .bi-heading .bi-es {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
}

.section-heading .bi-heading .bi-ar {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 2.25;
}

.bi-heading .bi-es {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.bi-block {
  margin-top: 16px;
}

.bi-block + .bi-block {
  margin-top: 14px;
}

.bi-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.bi-pill {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  align-items: center;
  min-width: min(100%, 280px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.bi-pill .bi-es,
.bi-pill .bi-ar {
  font-size: 0.84rem;
  line-height: 1.35;
}

.bi-pill .bi-es {
  color: var(--muted);
  font-weight: 500;
}

.bi-pill .bi-ar {
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.75;
}

.bi-pill-flag {
  border-color: rgba(198, 11, 30, 0.22);
  background: linear-gradient(90deg, var(--es-red-soft) 0%, var(--es-yellow-soft) 100%);
}

.bi-pill-flag .bi-es {
  color: var(--es-red);
  font-weight: 600;
}

.bi-level {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.bi-level strong {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.45rem;
}

.bi-level .bi-row-tight .bi-es {
  font-weight: 500;
  color: var(--text);
  font-size: 0.98rem;
}

.bi-level .bi-row-tight .bi-ar {
  font-size: 0.92rem;
  color: var(--muted);
}

.bi-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.bi-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.bi-list li:last-child {
  border-bottom: 0;
}

.bi-list .bi-es,
.bi-list .bi-ar {
  font-size: 0.98rem;
}

.bi-list .bi-ar {
  color: var(--muted);
  font-size: 0.92rem;
}

.bi-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bi-stack .bi-es {
  text-align: left;
}

.bi-stack .bi-ar {
  text-align: right;
}

.bi-caption {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}

.bi-caption .bi-es,
.bi-caption .bi-ar {
  font-size: 0.82rem;
  line-height: 1.45;
}

.bi-caption .bi-es {
  color: var(--muted);
  font-weight: 600;
}

.bi-caption .bi-ar {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink);
}

.brand-text.bi-row {
  gap: 4px 12px;
  align-items: baseline;
  grid-template-columns: 1fr;
}

.brand-text .bi-es {
  font-weight: 700;
  font-size: 1rem;
}

.download-brand .brand-text .bi-ar,
.download-brand .brand-text small {
  font-size: 1.05rem;
}

.nav-links a {
  min-width: 88px;
}

.section-dark .bi-ar {
  color: #e5e5e5;
}

.section-dark .bi-es {
  color: #d4d4d4;
}

.hero-text {
  max-width: 580px;
  margin: 20px 0 0;
  color: var(--text);
}

.hero-title-ar {
  margin: 14px 0 0;
  direction: rtl;
  text-align: right;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.85;
  font-weight: 700;
}

.hero-ar-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-ar-points span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.trust-row-ar {
  margin-top: 10px;
}

.trust-row-ar span {
  direction: rtl;
  font-weight: 700;
  color: var(--ink);
  background: var(--soft);
}

.download-button {
  flex-direction: column;
  gap: 3px;
}

.download-button span,
.button.secondary span,
.contact-whatsapp span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 700;
}

.button.primary.download-button span,
.nav-cta small,
.contact-download span,
.manual-download:not(.is-locked) span {
  color: var(--download-btn-sub);
}

.section-text-ar {
  margin-top: 14px;
  direction: rtl;
  text-align: right;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 700;
}

.center-ar {
  max-width: 640px;
  margin-inline: auto;
}

.pricing-ar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  direction: rtl;
  text-align: right;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.75;
}

.ar-on-dark-plain {
  color: #cbd5e1;
  font-weight: 600;
}

.ar-line,
.card-ar {
  direction: rtl;
  text-align: right;
  font-weight: 600;
}

.ar-line {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-right: 3px solid var(--es-red);
  border-left: 3px solid var(--es-yellow);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, var(--es-yellow-soft), var(--soft));
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.85;
}

.inline-ar {
  display: inline-block;
  width: 100%;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.84rem;
  font-weight: 500;
}

.heritage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
}

.heritage-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.heritage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heritage-large {
  grid-row: span 2;
  min-height: 340px;
}

.heritage-large img {
  min-height: 340px;
}

.heritage-book img {
  object-fit: contain;
  padding: 18px;
  background: var(--soft);
  min-height: 120px;
}

.heritage-app {
  padding: 10px;
  background: #fff;
}

.heritage-app img {
  border-radius: 12px;
  object-fit: contain;
  min-height: 120px;
}

.heritage-card figcaption {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
}

.heritage-card figcaption span {
  display: block;
  margin-top: 4px;
  direction: rtl;
  text-align: right;
  color: var(--ink);
  font-weight: 700;
}

.section {
  padding: 84px 0;
}

.section-muted {
  background: linear-gradient(180deg, var(--soft-2) 0%, #fff 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--es-yellow-soft);
}

.section-dark {
  background: var(--ink);
  color: #d4d4d4;
}

.section-dark h2,
.section-dark .eyebrow {
  color: #fff;
}

.section-dark .eyebrow {
  color: #a3a3a3;
}

.section-dark .ar-on-dark {
  background: rgba(255, 255, 255, 0.06);
  border-right-color: var(--gold);
  color: #e5e5e5;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading.center .ar-line,
.section-heading.center p {
  margin-inline: auto;
}

.two-column,
.feature-grid,
.contact-grid,
.founder-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.author-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.author-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.author-card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(198, 11, 30, 0.28);
  box-shadow: 0 22px 48px rgba(198, 11, 30, 0.1);
}

.author-card-link:hover img {
  filter: grayscale(0%);
}

.author-card-link:focus-visible {
  outline: 2px solid var(--es-red);
  outline-offset: 3px;
}

.author-card-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
}

.author-card-cta .bi-es {
  color: var(--es-red);
}

.author-card-cta .bi-ar {
  color: var(--es-red);
  font-size: 0.8rem;
}

.author-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(12%);
}

.author-card div {
  padding: 20px;
}

.author-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
}

.card-ar {
  margin-top: 10px !important;
  font-size: 0.9rem !important;
  color: var(--muted);
}

.levels {
  display: grid;
  gap: 12px;
}

.footer-tagline {
  max-width: 420px;
}

.footer-tagline .bi-es,
.footer-tagline .bi-ar {
  font-size: 0.9rem;
}

.image-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  max-width: 420px;
  justify-self: center;
}

.image-panel img {
  border-radius: 14px;
}

.check-list {
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 14px 0;
  padding-left: 22px;
  font-size: 1rem;
}

.check-ar {
  display: block;
  margin-top: 4px;
  padding-right: 0;
  direction: rtl;
  text-align: right;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.6;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--es-red), var(--es-yellow));
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.card-image {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  object-fit: contain;
}

.card-image-app {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.card-image-flag {
  width: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.pricing-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pricing-card.featured {
  border-color: var(--es-red);
  box-shadow: 0 12px 32px rgba(198, 11, 30, 0.1);
  background: linear-gradient(180deg, #fff 0%, var(--es-yellow-soft) 100%);
}

.pricing-card.featured .pricing-label {
  background: linear-gradient(135deg, var(--es-red), #a90919);
  color: #fff;
}

.pricing-label {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pricing-card h3 {
  margin-top: 16px;
}

.price {
  margin: 12px 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
}

.pricing-card ul {
  padding-left: 18px;
  margin: 10px 0 0;
  line-height: 1.65;
  font-size: 0.94rem;
}

.pricing-card p {
  font-size: 0.94rem;
  line-height: 1.65;
}

.founder-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.founder-photo {
  width: min(100%, 280px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.founder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.founder-tags span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--muted);
  background: var(--soft-2);
}

.contact-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.contact-card p {
  margin: 0 0 16px;
}

.contact-card a {
  color: #fff;
}

.contact-download,
.contact-whatsapp {
  width: 100%;
  margin-top: 10px;
}

.contact-whatsapp {
  background: transparent !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}

.footer {
  background: #0a0a0a;
  color: #737373;
  padding: 24px 0;
  border-top: none;
  position: relative;
}

.footer::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(
    to bottom,
    var(--es-red) 0% 25%,
    var(--es-yellow) 25% 75%,
    var(--es-red) 75% 100%
  );
  margin-bottom: 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.footer-inner [lang="ar"] {
  direction: rtl;
  font-weight: 700;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img,
.footer-brand .flag-es {
  flex-shrink: 0;
}

.footer-brand .flag-es-md {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Download page */
.download-page {
  min-height: 100vh;
  background: var(--soft-2);
}

.download-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 20px;
}

.download-panel {
  width: min(960px, 100%);
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.download-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--ink);
  font-weight: 700;
}

.download-brand img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}

.download-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
}

.download-ar {
  max-width: 100%;
}

.download-copy,
.download-note {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.download-note {
  margin: 18px 0 0;
  color: var(--muted);
}

.download-access {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft-2);
}

.download-access h2 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.download-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.download-access-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.download-access-card h3 {
  margin-top: 8px;
}

.download-access-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.65;
  color: var(--muted);
  font-size: 0.94rem;
}

.install-guide {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.guide-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.guide-step {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.guide-step h3 {
  margin-top: 16px;
}

.guide-ar {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  font-size: 0.92rem;
}

.phone-example {
  max-width: 200px;
  margin: 0 auto;
  padding: 10px;
  border: 6px solid var(--ink);
  border-radius: 26px;
  background: var(--ink);
}

.phone-top {
  width: 48px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #525252;
}

.phone-screen {
  min-height: 240px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 12px;
  border-radius: 18px;
  background: var(--soft-2);
}

.settings-title {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.settings-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.settings-row span {
  color: var(--muted);
  font-size: 0.74rem;
}

.settings-row strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.settings-row.active {
  border-color: var(--ink);
}

.toggle-on {
  width: 52px;
  height: 28px;
  justify-self: end;
  position: relative;
  border-radius: 999px;
  background: var(--ink);
}

.toggle-on::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}

.install-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
}

.install-card button {
  margin-top: 4px;
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.success-check {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 36px auto 4px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 700;
}

.guide-warning {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 14px;
  background: var(--soft-2);
  line-height: 1.65;
}

.guide-warning.bi-row-tight {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.guide-warning .bi-es,
.guide-warning .bi-ar {
  margin: 0;
  font-size: 0.96rem;
}

.guide-warning span {
  text-align: right;
  font-weight: 600;
}

.manual-download {
  width: 100%;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.manual-download span {
  color: var(--muted);
  font-size: 0.92rem;
}

.download-ad-gate {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--soft-2) 100%);
}

.download-ad-heading {
  margin-bottom: 14px;
}

.ad-slot {
  min-height: 120px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
}

.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
}

.ad-placeholder {
  display: grid;
  gap: 6px;
  padding: 18px;
  text-align: center;
}

.ad-placeholder .ad-label {
  display: inline-block;
  margin: 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ad-placeholder strong {
  font-size: 1rem;
}

.ad-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ad-placeholder code {
  font-size: 0.82rem;
}

.download-countdown {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.download-countdown.is-ready {
  color: var(--ink);
}

.manual-download.is-locked,
.manual-download[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.download-hero-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.download-hero-images {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 12px;
  align-items: end;
}

.download-hero-images img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
  aspect-ratio: 3 / 4;
  filter: grayscale(10%);
}

.download-hero-images .download-book {
  aspect-ratio: 1;
  object-fit: contain;
  padding: 16px;
  background: var(--soft);
  filter: none;
}

/* Author detail pages */
.author-page {
  min-height: 100vh;
  background: var(--soft-2);
}

.author-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 42px 20px 64px;
}

.author-panel {
  width: min(920px, 100%);
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.author-hero {
  display: grid;
  grid-template-columns: min(240px, 38vw) 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.author-hero img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(8%);
}

.author-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.author-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.author-meta-ar {
  margin: 6px 0 0;
  direction: rtl;
  text-align: right;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.author-section {
  margin-bottom: 32px;
}

.author-section-title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}

.author-section-title .bi-ar {
  font-family: var(--arabic-display);
  font-size: 1.2rem;
  line-height: 2;
}

.author-prose p {
  font-size: 1.02rem;
  line-height: 1.8;
}

.author-nav {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.author-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.author-nav-link {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.author-nav-link:hover {
  border-color: rgba(198, 11, 30, 0.28);
  background: linear-gradient(135deg, var(--es-red-soft), var(--es-yellow-soft));
  transform: translateY(-2px);
}

.author-nav-link .bi-es {
  font-weight: 600;
  color: var(--ink);
}

.author-nav-link .bi-ar {
  font-size: 0.88rem;
  font-weight: 700;
}

/* App tour — horizontal auto scroll */
.app-scroll-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.app-scroll-hint .bi-es,
.app-scroll-hint .bi-ar {
  font-size: 0.85rem;
  line-height: 1.5;
}

.app-scroll-hint .bi-ar {
  color: var(--muted);
}

.app-scroll-wrap {
  position: relative;
}

.app-scroll-wrap::before,
.app-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 28px;
  width: min(56px, 8vw);
  z-index: 2;
  pointer-events: none;
}

.app-scroll-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--soft-2) 15%, transparent);
}

.app-scroll-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--soft-2) 15%, transparent);
}

.app-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scroll-padding-inline: 20px;
  padding: 8px 4px 28px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.app-scroll.is-paused {
  scrollbar-color: var(--es-red) transparent;
}

.app-scroll::-webkit-scrollbar {
  height: 6px;
}

.app-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.app-slide {
  flex: 0 0 min(320px, 78vw);
  scroll-snap-align: start;
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-phone {
  position: relative;
  margin: 0 auto;
  width: min(220px, 100%);
  padding: 10px;
  border-radius: 28px;
  background: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.app-phone::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.app-phone img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  background: var(--soft);
}

.app-slide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-slide-text h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

.app-slide-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

.app-slide-text .bi-ar h3,
.app-slide-text .bi-ar p {
  text-align: right;
}

@media (max-width: 960px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .hero-grid,
  .two-column,
  .feature-grid,
  .founder-card,
  .contact-grid,
  .authors-grid,
  .cards,
  .pricing-grid,
  .guide-grid,
  .download-access-grid,
  .header-presentation-cards {
    grid-template-columns: 1fr;
  }

  .header-presentation-lead h1 {
    max-width: none;
  }

  .heritage-large {
    grid-row: auto;
    min-height: 240px;
  }

  .heritage-large img {
    min-height: 240px;
  }

  .bi-row,
  .bi-pill {
    grid-template-columns: 1fr;
  }

  .bi-pill {
    border-radius: 16px;
    min-width: 100%;
  }

  .bi-pill .bi-ar {
    text-align: right;
  }

  .bi-level {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .download-hero-row {
    grid-template-columns: 1fr;
  }

  .download-hero-images {
    max-width: 360px;
  }

  .author-hero {
    grid-template-columns: 1fr;
  }

  .author-hero img {
    max-width: 280px;
  }

  .author-nav-grid {
    grid-template-columns: 1fr;
  }

  .app-slide {
    flex-basis: min(280px, 86vw);
  }

  .section {
    padding: 64px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1140px);
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .bi-level {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
