/* Home page theme styles. Public layout only. */

/*
 * Public home header: global `header.public` hides the logo and sets `nav.main`
 * flush to the edge (RTL: right:0), so the books mega-menu is clipped. Keep the
 * logo visible at scroll-top so nav keeps the same inset as the scrolled state.
 */
header.head.public:not(.mobilecontainer) .sitelogo {
  display: block !important;
}

header.head.public:not(.mobilecontainer) nav.main {
  left: auto !important;
  right: auto !important;
  inset-inline-start: 140px !important;
}

/*
 * Legacy sh.rtl.min.css declares `.page { width: 1010px }` *after* its own
 * @media (max-width: 1024px) rules, so fixed width wins and mobile gets horizontal
 * scroll. All home revamp sections wrap content in `.page` — force fluid width here.
 * (home-theme.css loads in Index head after bundle — !important beats source order.)
 */
section.sectionwrapper[class*="home-revamp"] .page {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Site main UI font for every home revamp block (matches sh.vars.less @arfontface / RTL bundle). */
.home-revamp-hero,
.home-revamp-benefits,
.home-revamp-pricing,
.home-revamp-features,
.home-revamp-discovery,
.home-revamp-bottom-cta,
.home-revamp-stats,
.home-revamp-how-it-works,
.home-revamp-heritage,
.home-revamp-mood,
.home-revamp-authors,
.home-revamp-reading-features {
  font-family:
    Droid Arabic Naskh,
    Segoe UI,
    Lucida Grande,
    Sans-serif;
  line-height: 1.8;
}

/* Global sh.rtl h1–h6 set HelveticaNeueLTW20-Ligh; inherit section font instead */
.home-revamp-hero h1,
.home-revamp-hero-lead,
.home-revamp-benefits h5,
.home-revamp-pricing h2,
.home-revamp-features h2,
.home-revamp-features h3,
.home-revamp-discovery h2,
.home-revamp-discovery h3,
.home-revamp-discovery h5,
.home-revamp-bottom-cta h2,
.home-revamp-authors h2,
.home-revamp-stat-number,
.home-revamp-how-it-works h2,
.home-revamp-how-it-works h3,
.home-revamp-how-lead,
.home-revamp-step-number,
.home-revamp-heritage h2,
.home-revamp-mood h2 {
  font-family: inherit;
}

.home-revamp-hero {
  position: relative;
  padding: 0;
  background: #1c1e22;
  color: #fff;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Beat global .sectionwrapper vertical padding on the home hero only */
section.sectionwrapper.home-revamp-hero {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.home-revamp-hero-inner {
  position: relative;
  width: 100%;
  overflow: hidden; /* keep overlay inside the video panel — no extra page scroll from hero */
}

/* In-flow video — match native 1920×540 so no extra dark band below the panel */
.home-revamp-hero-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 540;
  opacity: 0.72;
  filter: brightness(0.55) saturate(0.92);
}

@media only screen and (max-width: 768px) {
  .home-revamp-hero-video {
    aspect-ratio: unset;
  }
}

.home-revamp-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(18, 20, 24, 0.72), rgba(18, 20, 24, 0.55)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 72px,
      rgba(255, 255, 255, 0.015) 72px,
      rgba(255, 255, 255, 0.015) 144px
    );
}

.home-revamp-hero .page.home-revamp-hero-front {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  /* Fixed header is tall (logo + search + nav); keep hero fully below it */
  padding-top: calc(7rem + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(1.35rem, 4vw, 2.85rem);
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  pointer-events: none;
}

/* Story-style hero: daily pick card on the start side (physical left), copy RTL on the end */
.home-revamp-hero-split {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  width: 100%;
  max-width: min(1280px, 100%);
  min-width: 0;
  margin: 0 auto;
  pointer-events: none;
}

.home-revamp-hero-split--no-visual {
  max-width: 860px;
}

.home-revamp-hero-split > * {
  pointer-events: auto;
}

.home-revamp-hero-visual {
  display: flex;
  justify-content: center;
  order: -1;
  align-self: center;
}

/* Daily pick: full-bleed cover + text overlay (chip, title, author, stars) */
.home-revamp-hero-daily-card {
  display: block;
  width: min(288px, 88vw);
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  overflow: hidden;
  border: none;
  background: #2d1b4e;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
  padding: 0;
  text-decoration: none;
  color: #fff;
  direction: rtl;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-revamp-hero-daily-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.52);
}

.home-revamp-hero-daily-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #4c2d85 0%, #2d1b4e 55%, #1a0f30 100%);
}

.home-revamp-hero-daily-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-revamp-hero-daily-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(145deg, #4c2d85 0%, #2d1b4e 100%);
}

.home-revamp-hero-daily-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem 0.75rem 0.7rem;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(8, 6, 18, 0.55) 0%,
    rgba(8, 6, 18, 0.08) 42%,
    rgba(8, 6, 18, 0.75) 100%
  );
  pointer-events: none;
}

.home-revamp-hero-daily-overlay-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* RTL: chip + copy align to inline-start (physical right) */
  gap: 0.55rem;
  width: 100%;
}

.home-revamp-hero-daily-overlay-copy {
  width: 100%;
  min-width: 0;
  text-align: right;
}

.home-revamp-hero-daily-tag {
  display: inline-block;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: #ff8a00;
  color: #fff;
  font-size: clamp(0.78rem, 2.1vw, 0.92rem);
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.home-revamp-hero-daily-overlay .home-revamp-hero-daily-title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-revamp-hero-daily-overlay .home-revamp-hero-daily-author {
  margin: 0;
  font-size: clamp(0.84rem, 2.2vw, 0.98rem);
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-revamp-hero-daily-stars {
  align-self: flex-start; /* inline-start = physical right under RTL */
  color: #ff8a00;
  font-size: clamp(0.78rem, 1.95vw, 0.9rem);
  letter-spacing: 0.14em;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.home-revamp-hero .page.home-revamp-hero-front .home-revamp-hero-content {
  pointer-events: auto;
  width: 100%;
}

.home-revamp-hero-content {
  margin: 0 auto;
  max-width: 860px;
  min-width: 0;
  text-align: center;
}

@media only screen and (min-width: 992px) {
  .home-revamp-hero-split {
    display: grid;
    grid-template-columns: minmax(180px, 0.85fr) minmax(360px, 1.2fr);
    gap: clamp(1.5rem, 3vw, 3.25rem);
    max-width: min(1280px, 100%);
    width: 100%;
    direction: ltr;
  }

  .home-revamp-hero-split--no-visual {
    display: flex;
    align-items: start;
    max-width: 860px;
  }

  /* Book sits toward the left edge of the hero row */
  .home-revamp-hero-visual {
    order: 0;
    justify-self: start;
    align-self: start;
  }

  /* Slightly larger book — taller panel + relaxed height cap */
  .home-revamp-hero-daily-card {
    width: min(
      246px,
      25vw,
      calc(
        (
            100svh - 16.75rem - env(safe-area-inset-top, 0px) -
              env(safe-area-inset-bottom, 0px)
          ) *
          2 / 3
      )
    );
    max-width: 100%;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content {
    align-self: start;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* RTL: block + buttons share inline-start (right) */
    text-align: right;
  }

  .home-revamp-hero-content {
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  /* Wider copy column = headline/lede extend further left */
  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-hero-headline,
  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-hero-lead {
    width: min(52rem, 100%);
    max-width: none;
    box-sizing: border-box;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-hero-lead {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-hero-headline {
    margin-bottom: 1.1rem;
    flex: 0 0 auto;
    font-size: clamp(2.05rem, 4.5vw, 3.5rem);
    line-height: 1.12;
  }

  .home-revamp-hero-split--no-visual .home-revamp-hero-content {
    display: block;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
    align-items: stretch;
  }

  .home-revamp-hero-split--no-visual
    .home-revamp-hero-content
    .home-revamp-hero-headline,
  .home-revamp-hero-split--no-visual
    .home-revamp-hero-content
    .home-revamp-hero-lead {
    width: auto;
    max-width: none;
  }

  .home-revamp-hero-search {
    margin-inline: 0;
  }

  /* Badges: same width as copy, single row, flush to RTL start (physical right) */
  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-app-stores-wrap {
    display: block;
    margin-top: 1.35rem;
    padding-top: 0;
    width: min(52rem, 100%);
    max-width: none;
    box-sizing: border-box;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-app-stores-wrap
    .hero-stores {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    direction: ltr;
    width: 100%;
    margin-inline: 0;
  }

  .home-revamp-hero-split--no-visual .home-revamp-app-stores-wrap {
    justify-content: center;
    margin: 1.75rem auto 0;
    max-width: 520px;
  }

  .home-revamp-hero-split--no-visual .home-revamp-app-stores-wrap .hero-stores {
    justify-content: center;
    flex-wrap: wrap;
    direction: ltr;
    margin-inline-start: 0;
  }
}

/* Narrow desktop / short text column: allow badge row to wrap flush right */
@media only screen and (min-width: 992px) and (max-width: 1120px) {
  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-app-stores-wrap
    .hero-stores {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 10px;
  }
}

.home-revamp-hero-headline {
  margin: 0 0 1.35rem;
  color: #fff;
  font-size: clamp(1.95rem, 4.15vw, 3.2rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.home-revamp-hero-headline-line {
  display: block;
}

.home-revamp-hero-headline-line:not(:last-child) {
  margin-bottom: 0.3rem;
}

.home-revamp-hero-accent {
  color: #ff8a00;
  font-weight: 800;
}

.home-revamp-hero-lead {
  margin: 0 0 1.85rem;
  max-width: 36rem;
  color: rgba(244, 247, 250, 0.96);
  font-size: clamp(1.05rem, 1.85vw, 1.35rem);
  font-weight: 500;
  line-height: 1.58;
}

.home-revamp-hero-split--no-visual .home-revamp-hero-lead {
  margin-inline: auto;
  text-align: center;
}

.home-revamp-hero-search {
  --hero-search-h: 48px;
  margin: 0 auto 1.1rem;
  max-width: 560px;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

/* Wrapper: native ::placeholder clips Arabic in WebKit/Blink; hint is a real span, not a pseudo-element. */
.home-revamp-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  height: var(--hero-search-h);
  box-sizing: border-box;
}

.home-revamp-hero
  .home-revamp-hero-search
  .home-revamp-search-field
  input[type="text"] {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  font-family: inherit;
  font-size: 1.12rem;
  line-height: 1.45;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* Invisible placeholder so :placeholder-shown works; visible hint is .home-revamp-search-hint */
.home-revamp-hero
  .home-revamp-hero-search
  .home-revamp-search-field
  input[type="text"]::placeholder {
  color: transparent;
  opacity: 0;
}

.home-revamp-search-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: inherit;
  font-size: 1.12rem;
  line-height: 1.45;
  color: rgba(34, 34, 34, 0.48);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}

.home-revamp-search-field
  input:placeholder-shown:not(:focus)
  + .home-revamp-search-hint {
  opacity: 1;
}

.home-revamp-hero-search button {
  box-sizing: border-box;
  height: var(--hero-search-h);
  min-width: 5.5rem;
  padding: 0 1.1rem;
  border: none;
  border-radius: 999px;
  background: #6c7680;
  color: #fff;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/*
 * Mobile / narrow view: 32:9 aspect video is extremely short in height; overlay content
 * overflows. Use a taller hero box and fill it with cover video so text + search fit.
 */
@media only screen and (max-width: 768px) {
  .home-revamp-hero-inner {
    min-height: clamp(19rem, 92vw, 32rem);
  }

  .home-revamp-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }

  .home-revamp-hero .page.home-revamp-hero-front {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: calc(6rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .home-revamp-hero-split {
    gap: 0.85rem;
    max-width: 100%;
  }

  .home-revamp-hero-visual {
    width: 100%;
  }

  /* Daily pick: cover card, full width up to max */
  .home-revamp-hero-daily-card {
    width: 100%;
    max-width: 14rem;
    margin-inline: auto;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    -webkit-tap-highlight-color: transparent;
  }

  .home-revamp-hero-daily-overlay {
    padding: 0.7rem 0.65rem 0.6rem;
  }

  .home-revamp-hero-daily-overlay .home-revamp-hero-daily-title {
    font-size: clamp(1rem, 3.75vw, 1.22rem);
    -webkit-line-clamp: 4;
  }

  .home-revamp-hero-daily-overlay .home-revamp-hero-daily-author {
    font-size: clamp(0.82rem, 3.25vw, 0.96rem);
  }

  .home-revamp-hero-daily-overlay .home-revamp-hero-daily-tag {
    font-size: clamp(0.74rem, 2.8vw, 0.88rem);
    padding: 0.32rem 0.72rem;
  }

  /* Headline stack: large type, fits narrow screens */
  .home-revamp-hero-headline {
    margin: 0 0 0.85rem;
    font-size: clamp(1.22rem, 5.25vw, 2.05rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  .home-revamp-hero-lead {
    margin: 0 0 1.35rem;
    font-size: clamp(0.94rem, 3.35vw, 1.14rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  /* 44px min touch height; slightly smaller input text on narrow screens */
  .home-revamp-hero-search {
    --hero-search-h: 44px;
    margin: 0 auto 0.75rem;
    gap: 0.45rem;
    max-width: 100%;
  }

  .home-revamp-hero
    .home-revamp-hero-search
    .home-revamp-search-field
    input[type="text"] {
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    padding: 0 0.85rem;
  }

  .home-revamp-hero .home-revamp-search-hint {
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    padding: 0 0.85rem;
    white-space: normal;
    display: flex;
    align-items: center;
    line-height: 1.25;
  }

  .home-revamp-hero-search button {
    min-width: 4.5rem;
    padding: 0 0.85rem;
    font-size: clamp(0.88rem, 3.5vw, 0.98rem);
  }

  .home-revamp-app-stores-wrap {
    margin-top: 1.1rem;
  }

  /* Mobile: RTL copy + badges flush to same edge as headline */
  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-app-stores-wrap {
    display: flex;
    justify-content: flex-end;
    margin-inline: 0;
    max-width: none;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content
    .home-revamp-app-stores-wrap
    .hero-stores {
    justify-content: flex-end;
    direction: ltr;
  }
}

@media (hover: none) {
  .home-revamp-hero-daily-card:hover {
    transform: none;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.52);
  }
}

.home-revamp-hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.home-revamp-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.home-revamp-secondary-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.home-revamp-benefits {
  padding: 1rem 0;
  background: #fff;
  border-top: 1px solid #edebdf;
  border-bottom: 1px solid #edebdf;
}

.home-revamp-benefits h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.home-revamp-benefits-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.home-revamp-benefits-grid .benefit-item {
  flex: 1 1 200px;
  text-align: center;
  font-weight: 600;
  color: #333;
}

.home-revamp-pricing {
  padding: 2.5rem 0 2.25rem;
}

.home-revamp-pricing h2 {
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 12px;
  color: #2c2c2c;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.home-revamp-pricing .subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 50px;
  font-size: 1.15em;
  line-height: 1.6;
}

.home-revamp-pricing .plans-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 20px;
  margin: 0 auto 16px;
  max-width: 1200px;
  align-items: stretch;
}

.home-revamp-pricing .plan-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  direction: rtl;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-revamp-pricing .plan-card--free {
  border-color: #d1d5db;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.home-revamp-pricing .plan-price--free-block {
  margin-bottom: 8px;
}

.home-revamp-pricing .price-amount--literal-free {
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: #e96a2c;
}

.home-revamp-pricing .plan-features {
  list-style: none;
  margin: auto 0 20px;
  padding: 0;
  width: 100%;
  text-align: right;
  flex: 0 1 auto;
}

.home-revamp-pricing .plan-feat {
  position: relative;
  padding: 10px 2rem 10px 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.home-revamp-pricing .plan-feat:last-child {
  border-bottom: none;
}

.home-revamp-pricing .plan-feat--yes::before {
  content: "\2713";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: #16a34a;
  font-size: 1.15rem;
}

.home-revamp-pricing .plan-feat--no {
  color: #6b7280;
}

.home-revamp-pricing .plan-feat--no::before {
  content: "\2717";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #dc2626;
  font-size: 1.1rem;
}

.home-revamp-pricing .plan-period--muted {
  color: #9ca3af;
  font-size: 0.95rem;
}

.home-revamp-pricing .plan-monthly-equiv {
  color: #6b7280;
  font-size: 0.95em;
  margin-bottom: 4px;
  font-weight: 500;
  text-align: center;
  width: 100%;
  line-height: 1.4;
}

.home-revamp-pricing .plan-monthly-equiv .monthly-equiv-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #e96a2c;
  font-size: 1.15em;
}

.home-revamp-pricing .plan-monthly-equiv .monthly-equiv-currency {
  font-size: 0.9em;
  opacity: 0.9;
  margin-right: 2px;
  margin-left: 2px;
}

.home-revamp-pricing .plan-save-vs-monthly {
  color: #5fa015;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
  width: 100%;
  line-height: 1.35;
}

.home-revamp-pricing .plan-card.selected .plan-monthly-equiv {
  color: rgba(255, 255, 255, 0.88);
}

.home-revamp-pricing
  .plan-card.selected
  .plan-monthly-equiv
  .monthly-equiv-amount {
  color: #fde68a;
}

.home-revamp-pricing .plan-card.selected .plan-save-vs-monthly {
  color: #bbf7d0;
}

.home-revamp-pricing .plan-card.selected .plan-feat {
  color: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.home-revamp-pricing .plan-card.selected .plan-feat--yes::before {
  color: #86efac;
}

.home-revamp-pricing .plan-card.selected .plan-feat--no {
  color: rgba(255, 255, 255, 0.65);
}

.home-revamp-pricing .plan-card.selected .plan-feat--no::before {
  color: #fca5a5;
}

.home-revamp-pricing .plan-subscribe-btn--outline {
  background: #fff !important;
  color: #e96a2c !important;
  border: 2px solid #e96a2c;
  box-shadow: none;
}

.home-revamp-pricing .plan-subscribe-btn--outline:hover {
  background: #fff8f4 !important;
  color: #d45f26 !important;
}

.home-revamp-pricing .plan-card:hover {
  border-color: #e96a2c;
  box-shadow: 0 8px 24px rgba(233, 106, 44, 0.15);
  transform: translateY(-4px);
}

.home-revamp-pricing .plan-card.selected {
  border-color: #e96a2c;
  background: linear-gradient(135deg, #8b4c9f 0%, #6b2c7f 100%);
  color: #fff;
  box-shadow: 0 12px 32px rgba(139, 76, 159, 0.25);
  transform: translateY(-4px);
}

.home-revamp-pricing .plan-card.selected .plan-price,
.home-revamp-pricing .plan-card.selected .plan-period,
.home-revamp-pricing .plan-card.selected .plan-name {
  color: #fff;
}

.home-revamp-pricing .plan-badge {
  position: absolute;
  top: -14px;
  right: 24px;
  background: linear-gradient(135deg, #76bc19 0%, #5fa015 100%);
  color: #fff;
  padding: 6px 18px;
  border-radius: 24px;
  font-size: 0.85em;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(118, 188, 25, 0.3);
  letter-spacing: 0.3px;
  z-index: 10;
}

.home-revamp-pricing .plan-name {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1f2937;
  letter-spacing: -0.3px;
  text-align: center;
  width: 100%;
  min-height: 2.1em;
}

.home-revamp-pricing .plan-price {
  font-size: 3em;
  font-weight: 800;
  color: #e96a2c;
  margin-bottom: 8px;
  line-height: 1;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 1.25em;
}

.home-revamp-pricing .price-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-revamp-pricing .price-currency {
  font-size: 0.5em;
  font-weight: 600;
  opacity: 0.9;
  vertical-align: baseline;
  margin-right: 4px;
}

.home-revamp-pricing .plan-card.selected .price-currency {
  opacity: 0.95;
}

.home-revamp-pricing .plan-original-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 1.1em;
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  text-align: center;
  width: 100%;
}

.home-revamp-pricing .plan-card.selected .plan-original-price {
  color: rgba(255, 255, 255, 0.7);
}

.home-revamp-pricing .plan-period {
  color: #6b7280;
  font-size: 0.95em;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: center;
  width: 100%;
  min-height: 1.65em;
}

.home-revamp-pricing .plan-period:last-of-type {
  margin-bottom: 8px;
}

.home-revamp-pricing .plan-card.selected .plan-period {
  color: rgba(255, 255, 255, 0.9);
}

.home-revamp-pricing .plan-subscribe-btn {
  width: 100%;
  padding: 14px 24px;
  border: 2px solid #e96a2c;
  background: transparent;
  color: #e96a2c;
  border-radius: 10px;
  font-size: 1.05em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: auto;
  letter-spacing: 0.3px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  line-height: normal;
}

.home-revamp-pricing a.plan-subscribe-btn {
  text-decoration: none;
  box-sizing: border-box;
}

.home-revamp-pricing .plan-card.selected .plan-subscribe-btn {
  background: #fff;
  color: #8b4c9f;
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.home-revamp-pricing .plan-subscribe-btn:hover {
  background: #e96a2c;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(233, 106, 44, 0.3);
}

.home-revamp-pricing .plan-card.selected .plan-subscribe-btn:hover {
  background: #fff;
  color: #8b4c9f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

@media only screen and (max-width: 1100px) {
  .home-revamp-pricing .plans-container {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media only screen and (max-width: 520px) {
  .home-revamp-pricing .plans-container {
    grid-template-columns: 1fr;
  }
}

.home-revamp-features {
  padding: 1.75rem 0 2.25rem;
  background: #fff;
}

/* “لماذا أبجد؟” — larger than default h2 */
.home-revamp-features h2 {
  text-align: center;
  margin-bottom: 1.25rem;
  font-size: 3.05rem;
  font-weight: 700;
  color: #2c2c2c;
}

.home-revamp-feature-rows {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-revamp-feature-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 2rem;
  padding: 0;
  border-bottom: 1px solid #edebdf;
  position: relative;
  z-index: 0;
  min-height: 310px;
}

.home-revamp-feature-row > * {
  position: relative;
  z-index: 1;
}

.home-revamp-feature-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #ffffff;
  z-index: -1;
}

.home-revamp-feature-row:nth-child(odd) {
  background: transparent;
}

.home-revamp-feature-row:nth-child(odd)::before {
  background: #f6e9df;
}

.home-revamp-feature-row:nth-child(even)::before {
  background: #ffffff;
}

.home-revamp-feature-row:last-child {
  border-bottom: none;
}

.home-revamp-feature-row .media {
  width: clamp(330px, 39vw, 500px);
  height: 100%;
  flex: 0 0 clamp(330px, 39vw, 500px);
  max-width: 100%;
  padding: 0.75rem;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.home-revamp-feature-row:first-child .media {
  width: clamp(280px, 34vw, 420px);
  flex: 0 0 clamp(280px, 34vw, 420px);
  padding: 0.5rem;
}

.home-revamp-feature-row:nth-child(odd) .media {
  background: #f6e9df;
}

.home-revamp-feature-row:nth-child(even) .media {
  background: #ffffff;
}

.home-revamp-feature-row .media img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

.home-revamp-feature-row:nth-child(1) .media img,
.home-revamp-feature-row:nth-child(2) .media img {
  transform: none;
  object-fit: contain;
  /* Compensate for built-in transparent padding in some GIFs */
  object-position: center 62%;
}

.home-revamp-feature-row:nth-child(1) .media img {
  filter: none;
}

.home-revamp-feature-row .placeholder-media {
  border-radius: 8px;
  border: 1px dashed #b8bdc2;
  background: linear-gradient(135deg, #eceff3, #d6dbe1);
  color: #57606b;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  min-height: 100%;
}

.home-revamp-feature-row .copy {
  flex: 1 1 280px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-revamp-feature-row h3 {
  margin: 0 0 0.5rem;
  color: #e96a2c;
  font-weight: 700;
}

.home-revamp-feature-row .copy ul {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.55rem;
  line-height: 1.9;
}

.home-revamp-feature-row .copy ul li.check-mark {
  margin: 0 0 0.35rem;
}

.home-revamp-discovery {
  padding: 2.75rem 0 3rem;
}

.home-revamp-discovery-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.home-revamp-discovery-heading h2 {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 700;
  color: #2c2c2c;
}

.home-revamp-discovery-library-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---- Book rail ---- */
.home-book-rail {
  margin-bottom: 2.5rem;
}

.home-book-rail:last-of-type {
  margin-bottom: 0;
}

.home-book-rail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-book-rail-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: #2c2c2c;
  font-family:
    Droid Arabic Naskh,
    Segoe UI,
    Lucida Grande,
    Sans-serif;
}

.home-book-rail-title a {
  color: inherit;
  text-decoration: none;
}

.home-book-rail-title a:hover {
  color: #e96a2c;
}

.home-book-rail-more {
  flex-shrink: 0;
  color: #e96a2c;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  font-family:
    Droid Arabic Naskh,
    Segoe UI,
    Lucida Grande,
    Sans-serif;
}

.home-book-rail-more:hover {
  text-decoration: underline;
  color: #d45f26;
}

/* Horizontal scroll track */
.home-book-rail-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #ddd9cf transparent;
}

.home-book-rail-track::-webkit-scrollbar {
  height: 4px;
}

.home-book-rail-track::-webkit-scrollbar-track {
  background: transparent;
}

.home-book-rail-track::-webkit-scrollbar-thumb {
  background: #ddd9cf;
  border-radius: 999px;
}

/* Individual book card */
.home-book-card {
  flex: 0 0 150px;
  width: 150px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
}

.home-book-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
  color: inherit;
}

.home-book-cover {
  position: relative;
  width: 150px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  background: #ede8df;
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}

.home-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Audio / ebook format icons on cover (brand tints + icon color) */
.home-book-type-icons {
  position: absolute;
  bottom: 7px;
  inset-inline-end: 7px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.home-book-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  line-height: 0;
  flex-shrink: 0;
}

.home-book-type-icon svg {
  display: block;
}

.home-book-type-icon--audio {
  background: #efd9f5;
  color: #6b2a82;
  box-shadow: 0 1px 4px rgba(139, 76, 159, 0.18);
}

.home-book-type-icon--ebook {
  background: #ffe2c7;
  color: #8a3a05;
  box-shadow: 0 1px 4px rgba(242, 97, 1, 0.18);
}

.home-book-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.home-book-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1b1f2a;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family:
    Droid Arabic Naskh,
    Segoe UI,
    Lucida Grande,
    Sans-serif;
}

.home-book-author {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family:
    Droid Arabic Naskh,
    Segoe UI,
    Lucida Grande,
    Sans-serif;
}

.home-book-card:hover .home-book-title {
  color: #e96a2c;
}

@media only screen and (max-width: 640px) {
  .home-book-card {
    flex: 0 0 120px;
    width: 120px;
  }

  .home-book-cover {
    width: 120px;
  }

  .home-book-rail-title {
    font-size: 1.45rem;
  }

  .home-book-rail-track {
    gap: 10px;
  }
}

.home-revamp-library-full-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.85rem;
  border-radius: 999px;
  background: #e96a2c;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(233, 106, 44, 0.28);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.home-revamp-library-full-btn:hover {
  background: #d45f26;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(233, 106, 44, 0.35);
  transform: translateY(-1px);
}

/* Aligns with site-wide category chips (.tag on Lists / #edebdf) and home revamp accents. */
.home-revamp-categories-strip {
  padding: 2.25rem 0;
  background: transparent;
  border-top: 1px solid #edebdf;
  border-bottom: 1px solid #edebdf;
  color: #2c2c2c;
}

.home-revamp-categories-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-revamp-categories-strip-header h2 {
  margin: 0;
  color: #2c2c2c;
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.5px;
}

.home-revamp-categories-strip-header a {
  color: #e96a2c;
  font-weight: bold;
  text-decoration: underline;
}

.home-revamp-categories-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-revamp-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: #edebdf;
  color: #2c2c2c;
  text-decoration: none;
  font-size: 1.35rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.home-revamp-category-pill:hover {
  color: #fff;
  background: #f26101;
  border-color: #e96a2c;
}

.home-revamp-bottom-cta {
  padding: 2.5rem 0 3rem;
  text-align: center;
  background: linear-gradient(180deg, #faf9f7 0%, #fff 100%);
  border-top: none;
}

.home-revamp-bottom-cta .actions {
  margin-top: 1.25rem;
}

.home-revamp-bottom-cta .btndiff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.85rem;
  border-radius: 999px;
  background: #e96a2c;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(233, 106, 44, 0.28);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.home-revamp-bottom-cta .btndiff:hover,
.home-revamp-bottom-cta .btndiff:focus {
  background: #d45f26;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(233, 106, 44, 0.35);
  transform: translateY(-1px);
}

/* App store badges — same pattern as SubscriptionsCheckout .hero-stores (not footer text links). */
.home-revamp-app-stores-wrap {
  display: flex;
  justify-content: center;
  margin: 1.75rem auto 0;
  max-width: 520px;
}

.home-revamp-app-stores-wrap .hero-stores {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.home-revamp-app-stores-wrap .hero-stores .iphone,
.home-revamp-app-stores-wrap .hero-stores .android,
.home-revamp-app-stores-wrap .hero-stores .huawei {
  display: inline-block;
  width: 150px;
  height: 50px;
  min-width: 150px;
  max-width: 150px;
  min-height: 50px;
  max-height: 50px;
  flex-shrink: 0;
  flex-grow: 0;
  /* Empty anchors with background art — kill global link color / English fallback text */
  color: transparent !important;
  text-decoration: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  overflow: hidden;
  transition:
    transform 0.2s,
    opacity 0.2s;
  border: none;
  border-radius: 8px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.home-revamp-app-stores-wrap .hero-stores .iphone:hover,
.home-revamp-app-stores-wrap .hero-stores .android:hover,
.home-revamp-app-stores-wrap .hero-stores .huawei:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.home-revamp-app-stores-wrap .hero-stores a.iphone:focus-visible,
.home-revamp-app-stores-wrap .hero-stores a.android:focus-visible,
.home-revamp-app-stores-wrap .hero-stores a.huawei:focus-visible {
  outline: 2px solid #ff8a00;
  outline-offset: 2px;
}

.home-revamp-app-stores-wrap .hero-stores .iphone {
  background-image: url("../assets/img/stores/apple.png");
}

.home-revamp-app-stores-wrap .hero-stores .android {
  background-image: url("../assets/img/stores/google.png");
}

.home-revamp-app-stores-wrap .hero-stores .huawei {
  background-image: url("../assets/img/stores/huawei.png");
}

@media only screen and (max-width: 640px) {
  .home-revamp-pricing .plans-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-revamp-pricing .plan-card {
    padding: 24px 18px;
  }

  .home-revamp-pricing .plan-price {
    font-size: 2.3em;
  }

  .home-revamp-features h2 {
    font-size: 2.25rem;
  }

  .home-revamp-feature-row .copy ul {
    font-size: 1.38rem;
  }

  .home-revamp-feature-row,
  .home-revamp-feature-row:nth-child(even) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    min-height: 0;
  }

  .home-revamp-feature-row .media {
    width: 88%;
    height: auto;
    padding: 0.5rem;
  }

  .home-revamp-feature-row:first-child .media {
    width: 80%;
    padding: 0.4rem;
  }

  .home-revamp-feature-row .copy {
    padding: 0.25rem 1rem 1rem;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .home-revamp-feature-row .placeholder-media {
    min-height: 180px;
  }

  .home-revamp-app-stores-wrap .hero-stores {
    gap: 8px;
  }

  .home-revamp-app-stores-wrap .hero-stores .iphone,
  .home-revamp-app-stores-wrap .hero-stores .android,
  .home-revamp-app-stores-wrap .hero-stores .huawei {
    width: 110px;
    height: 35px;
    min-width: 110px;
    max-width: 110px;
    min-height: 35px;
    max-height: 35px;
  }
}

@media only screen and (max-width: 400px) {
  .home-revamp-app-stores-wrap .hero-stores {
    gap: 6px;
  }

  .home-revamp-app-stores-wrap .hero-stores .iphone,
  .home-revamp-app-stores-wrap .hero-stores .android,
  .home-revamp-app-stores-wrap .hero-stores .huawei {
    width: 100px;
    height: 32px;
    min-width: 100px;
    max-width: 100px;
    min-height: 32px;
    max-height: 32px;
  }
}

/* ============================================================
   Stats strip — dark continuation of hero
   ============================================================ */
section.sectionwrapper.home-revamp-stats {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.home-revamp-stats {
  background: #fff8f0;
  border-bottom: 1px solid rgba(233, 106, 44, 0.12);
}

.home-revamp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1040px;
  margin: 0 auto;
  /* Match reference layout: numbers left→+6M … #1 on an otherwise RTL page */
  direction: ltr;
}

.home-revamp-stat-item {
  text-align: center;
  padding: 4.25rem 1.75rem;
  min-height: 9.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-inline-start: 1px solid rgba(44, 44, 44, 0.08);
}

.home-revamp-stat-item:first-child {
  border-inline-start: none;
}

.home-revamp-stat-number {
  display: block;
  font-size: 2.55rem;
  font-weight: 800;
  color: #e96a2c;
  line-height: 1;
  margin-bottom: 0.65rem;
  overflow-wrap: anywhere;
  direction: ltr;
  unicode-bidi: embed;
}

.home-revamp-stat-label {
  display: block;
  font-size: 1.14rem;
  color: #4b5563;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  direction: rtl;
  text-align: center;
}

@media only screen and (max-width: 640px) {
  .home-revamp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: max(0.5rem, env(safe-area-inset-left, 0px))
      max(0.5rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .home-revamp-stat-item:nth-child(odd) {
    border-inline-start: none;
  }

  .home-revamp-stat-item:nth-child(n + 3) {
    border-top: 1px solid rgba(44, 44, 44, 0.08);
    padding-top: 2.75rem;
  }

  .home-revamp-stat-item {
    padding: 2.25rem 0.75rem;
    min-height: 7.5rem;
  }

  .home-revamp-stat-number {
    font-size: 2.08rem;
  }

  .home-revamp-stat-label {
    font-size: 1.05rem;
  }
}

/* ============================================================
   How it works — 3-step onboarding
   ============================================================ */
.home-revamp-how-it-works {
  padding: 3.25rem 0;
  background: #fff;
  border-top: none;
  border-bottom: 1px solid #f1efe9;
}

.home-revamp-how-it-works h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.home-revamp-how-lead {
  text-align: center;
  font-size: 1.2rem;
  color: #374151;
  line-height: 1.75;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.home-revamp-steps {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.home-revamp-step {
  flex: 1 1 220px;
  max-width: 270px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.home-revamp-step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e96a2c;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(233, 106, 44, 0.3);
}

.home-revamp-step-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.home-revamp-step-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c2c2c;
  margin: 0;
}

.home-revamp-step-desc {
  font-size: 1.2rem;
  color: #374151;
  line-height: 1.7;
  margin: 0;
}

@media only screen and (max-width: 640px) {
  .home-revamp-how-it-works h2 {
    font-size: 1.85rem;
    margin-bottom: 0.65rem;
  }

  .home-revamp-how-lead {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .home-revamp-steps {
    gap: 1.75rem;
  }

  .home-revamp-step {
    flex: 1 1 100%;
    max-width: 340px;
    flex-direction: row;
    text-align: start;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* ============================================================
   Heritage — Arabic classical literature promo
   ============================================================ */
section.sectionwrapper.home-revamp-heritage {
  padding-top: 7rem;
  padding-bottom: 7rem;
  margin-bottom: 0;
}

.home-revamp-heritage {
  padding: 0;
  background: linear-gradient(135deg, #1e1008 0%, #2e1a0e 50%, #1e1008 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-revamp-heritage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(233, 106, 44, 0.09) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(233, 106, 44, 0.06) 0%,
      transparent 60%
    );
}

.home-revamp-heritage-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.home-revamp-heritage-eyebrow {
  display: block;
  font-size: 1rem;
  color: #e96a2c;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
}

.home-revamp-heritage h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.25rem;
}

.home-revamp-heritage-desc {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
  margin: 0 auto 2.25rem;
  max-width: 580px;
}

.home-revamp-heritage-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.home-revamp-heritage-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(233, 106, 44, 0.45);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  background: rgba(233, 106, 44, 0.1);
  text-decoration: none;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.home-revamp-heritage-tag:hover {
  background: rgba(233, 106, 44, 0.25);
  border-color: #e96a2c;
  color: #fff;
  text-decoration: none;
}

.home-revamp-heritage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.8rem 2.75rem;
  border-radius: 999px;
  background: #e96a2c;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(233, 106, 44, 0.4);
  transition:
    background-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.home-revamp-heritage-btn:hover {
  background: #d45f26;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 106, 44, 0.45);
}

@media only screen and (max-width: 640px) {
  section.sectionwrapper.home-revamp-heritage {
    padding-top: 4.25rem;
    padding-bottom: 4.25rem;
  }

  .home-revamp-heritage h2 {
    font-size: 1.85rem;
  }

  .home-revamp-heritage-desc {
    font-size: 1.15rem;
  }
}

/* ============================================================
   Mood discovery — emotional entry points
   ============================================================ */
.home-revamp-mood {
  padding: 3.25rem 0;
  background: #fff;
  border-bottom: 1px solid #f1efe9;
}

.home-revamp-mood h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 0.6rem;
}

.home-revamp-mood-subtitle {
  text-align: center;
  color: #4b5563;
  font-size: 1.12rem;
  line-height: 1.75;
  margin: 0 auto 2.25rem;
  max-width: 38rem;
}

.home-revamp-mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 860px;
  margin: 0 auto;
}

.home-revamp-mood-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  border: 2px solid #edebdf;
  background: #faf9f7;
  color: #2c2c2c;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  min-height: 52px;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.home-revamp-mood-item:hover {
  border-color: #e96a2c;
  background: #fff8f4;
  color: #e96a2c;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(233, 106, 44, 0.13);
}

@media only screen and (max-width: 640px) {
  .home-revamp-mood h2 {
    font-size: 1.85rem;
  }

  .home-revamp-mood-item {
    font-size: 1.15rem;
    padding: 0.65rem 1.25rem;
  }
}

/* ============================================================
   Featured authors highlight strip
   ============================================================ */
.home-revamp-authors {
  padding: 3rem 0;
  background: #faf9f7;
  border-top: none;
  border-bottom: 1px solid #f1efe9;
}

.home-revamp-authors-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.home-revamp-authors-titles {
  flex: 1 1 280px;
  min-width: 0;
}

.home-revamp-authors-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: #5c6475;
  font-weight: 500;
  max-width: 40rem;
}

.home-revamp-authors-header h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #2c2c2c;
  letter-spacing: -0.3px;
}

.home-revamp-authors-more {
  flex-shrink: 0;
  color: #e96a2c;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.home-revamp-authors-more:hover {
  text-decoration: underline;
  color: #d45f26;
}

.home-revamp-authors-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem 1rem;
}

/* Individual author card */
.home-author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  gap: 0.6rem;
  transition: transform 0.18s ease;
}

.home-author-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
  color: inherit;
}

/* Circular avatar */
.home-author-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.11);
  background: #ede8df;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.home-author-card:hover .home-author-avatar {
  border-color: #e96a2c;
  box-shadow: 0 6px 20px rgba(233, 106, 44, 0.22);
}

.home-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback initial when no photo */
.home-author-avatar-initial {
  font-size: 2.4rem;
  font-weight: 700;
  color: #9ca3af;
  line-height: 1;
  user-select: none;
  font-family: inherit;
}

.home-author-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1b1f2a;
  margin: 0;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.home-author-card:hover .home-author-name {
  color: #e96a2c;
}

.home-author-readers {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

@media only screen and (max-width: 900px) {
  .home-revamp-authors-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-author-avatar {
    width: 90px;
    height: 90px;
  }
}

@media only screen and (max-width: 480px) {
  .home-revamp-authors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1rem;
  }

  .home-revamp-authors-header h2 {
    font-size: 1.6rem;
  }

  .home-author-avatar {
    width: 80px;
    height: 80px;
  }

  .home-author-name {
    font-size: 1.15rem;
  }
}

/* ============================================================
   Reading features — cards aligned with Articles listing UI
   (see Views/Article/Index.cshtml .article-card*)
   ============================================================ */
.home-revamp-reading-features {
  padding: 3.25rem 0;
  background: #f7f8fa;
  font-family:
    Droid Arabic Naskh,
    "Segoe UI",
    Tahoma,
    Arial,
    sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home-revamp-rf-header {
  text-align: center;
  margin-bottom: 2rem;
}

.home-revamp-rf-header h2 {
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
  font-family: inherit;
  line-height: 1.35;
}

.home-revamp-rf-subtitle {
  font-size: 1.0625rem;
  color: #6b7280;
  margin: 0 auto;
  max-width: 34rem;
  line-height: 1.7;
}

.home-revamp-rf-image {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: #f4f6fa;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* contain — show full artwork without aggressive crop (marketing: “الصورة مقطوعة ليه؟”) */
.home-revamp-rf-image img {
  width: 100%;
  height: auto;
  max-height: min(520px, 70vh);
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-revamp-rf-card-tagline {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  text-align: right;
  border-bottom: 1px solid #eceef3;
}

.home-revamp-rf-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Article-card shell + accent border on all sides (brand frame) */
.home-revamp-rf-details.home-revamp-rf-card {
  --rf-accent: #f26101;
  --rf-accent-rgb: 242, 97, 1;
  --rf-accent-soft: rgba(242, 97, 1, 0.1);

  margin: 0;
  padding: 0;
  border: 2px solid var(--rf-accent);
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  text-align: right;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.home-revamp-rf-details.home-revamp-rf-card--listening {
  --rf-accent: #8b4c9f;
  --rf-accent-rgb: 139, 76, 159;
  --rf-accent-soft: rgba(139, 76, 159, 0.12);
}

.home-revamp-rf-details.home-revamp-rf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(var(--rf-accent-rgb), 0.18);
  border-color: var(--rf-accent);
}

.home-revamp-rf-details.home-revamp-rf-card[open] {
  border-color: var(--rf-accent);
  box-shadow: 0 12px 28px rgba(var(--rf-accent-rgb), 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .home-revamp-rf-details.home-revamp-rf-card:hover {
    transform: none;
  }
}

@supports (interpolate-size: allow-keywords) {
  .home-revamp-rf-details.home-revamp-rf-card {
    interpolate-size: allow-keywords;
  }

  .home-revamp-rf-details.home-revamp-rf-card::details-content {
    transition: height 0.28s ease;
    overflow: clip;
  }
}

/* One control only: +/− drawn on summary::before; native marker fully hidden */
.home-revamp-rf-card-summary {
  list-style: none;
  list-style-type: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 16px;
  direction: ltr;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.home-revamp-rf-card-summary:hover {
  background: #fafbfc;
}

.home-revamp-rf-card-summary:focus {
  outline: none;
}

.home-revamp-rf-card-summary:focus-visible {
  outline: 2px solid var(--rf-accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.home-revamp-rf-details > .home-revamp-rf-card-summary::-webkit-details-marker,
.home-revamp-rf-details > .home-revamp-rf-card-summary::-moz-list-bullet {
  display: none;
}

.home-revamp-rf-details > .home-revamp-rf-card-summary::marker {
  display: none;
  content: "";
  font-size: 0;
}

.home-revamp-rf-details > .home-revamp-rf-card-summary {
  appearance: none;
  -webkit-appearance: none;
}

/* Round +/− (single instance — not a nested button) */
.home-revamp-rf-details > .home-revamp-rf-card-summary::before {
  content: "+";
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #eceef3;
  background: #f2f4f7;
  color: #344054;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 36px;
  text-align: center;
  box-sizing: border-box;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.home-revamp-rf-card-summary:hover::before {
  background: #fff;
  border-color: var(--rf-accent);
  color: var(--rf-accent);
}

.home-revamp-rf-details[open] > .home-revamp-rf-card-summary::before {
  content: "\2212";
  font-size: 1rem;
  background: #fff;
  border-color: var(--rf-accent);
  color: var(--rf-accent);
}

/* Title + icon: RTL, fills row to the right of ::before */
.home-revamp-rf-card-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  direction: rtl;
  text-align: right;
}

.home-revamp-reading-features .home-revamp-rf-card-heading {
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  color: #1b1f2a;
  text-align: right;
  font-family: inherit;
  unicode-bidi: plaintext;
}

.home-revamp-rf-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1;
  background: var(--rf-accent-soft);
  transition: transform 0.18s ease;
}

.home-revamp-rf-details.home-revamp-rf-card:hover .home-revamp-rf-card-icon {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .home-revamp-rf-details.home-revamp-rf-card:hover .home-revamp-rf-card-icon {
    transform: none;
  }
}

/* Body list — article-card-desc typography */
.home-revamp-rf-details .home-revamp-rf-list {
  list-style: none;
  margin: 0;
  padding: 0 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  direction: rtl;
  text-align: right;
}

.home-revamp-rf-list li {
  position: relative;
  margin: 0;
  padding: 12px 0;
  /* Room for check chip + comfortable gap before text (RTL: inline-start = right) */
  padding-inline-start: 3.5rem;
  font-size: 16px;
  line-height: 1.75;
  color: #475569;
  font-family: inherit;
  unicode-bidi: plaintext;
  border-top: 1px solid #eceef3;
  transition: color 0.15s ease;
}

.home-revamp-rf-list li:first-of-type {
  border-top: none;
}

.home-revamp-rf-details.home-revamp-rf-card:hover .home-revamp-rf-list li {
  color: #475569;
}

/* Check chip — readable, matches article meta pill language */
.home-revamp-rf-list li::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f2f4f7;
  color: var(--rf-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.home-revamp-rf-details.home-revamp-rf-card:hover
  .home-revamp-rf-list
  li::before {
  background: var(--rf-accent-soft);
}

@media only screen and (max-width: 640px) {
  .home-revamp-rf-image {
    max-height: 260px;
  }

  .home-revamp-rf-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-revamp-rf-card-summary {
    padding: 12px 12px 14px;
    gap: 12px;
  }

  .home-revamp-reading-features .home-revamp-rf-card-heading {
    font-size: 17px;
  }

  .home-revamp-rf-details .home-revamp-rf-list {
    padding: 0 12px 14px;
  }

  .home-revamp-rf-list li {
    font-size: 15px;
    padding: 10px 0;
    padding-inline-start: 3.15rem;
  }

  .home-revamp-rf-list li::before {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 11px;
    inset-inline-start: 0.4rem;
  }
}

/* ===================================================================
 * Home hero — flat-dark redesign (matches reference mock)
 * Appended last so cascade beats earlier .home-revamp-hero-* rules
 * without resorting to !important.
 * =================================================================== */

/* Flat dark background — fallback while/if the video is unavailable */
.home-revamp-hero {
  background: #0a0a0a;
}

/* Video becomes an absolute-fill background so the panel can grow with
 * content (no more 32:9 aspect-ratio constraint clipping the hero).
 */
.home-revamp-hero-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
  filter: brightness(0.5) saturate(0.9);
  z-index: 0;
  pointer-events: none;
}

/* Overlay = dark wash to keep headline legible + faint tile texture on top */
.home-revamp-hero-overlay {
  z-index: 1;
  background:
    linear-gradient(rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0.7)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.022) 0,
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px,
      transparent 140px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.022) 0,
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px,
      transparent 140px
    );
}

/* Inner panel: contains the absolute video/overlay; grows with the
 * in-flow front content (no fixed aspect ratio).
 */
.home-revamp-hero-inner {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.home-revamp-hero .page.home-revamp-hero-front {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  inset: auto;
  z-index: 2;
  min-height: clamp(36rem, 78vh, 52rem);
  display: flex;
  /* Stretch the split grid to the panel height so the content column
   * can grow vertically. Combined with `grid-template-rows: 1fr` and
   * `align-self: stretch` on the content cell, this gives the stores
   * row spare vertical space to consume via `margin-top: auto`.
   */
  align-items: stretch;
  justify-content: center;
  padding-top: clamp(7rem, 12vw, 9.5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* Desktop-only: stretch the grid row + content cell so stores can
 * actually reach the bottom of the hero panel. */
@media only screen and (min-width: 992px) {
  .home-revamp-hero-split {
    grid-template-rows: 1fr;
    align-items: stretch;
  }

  .home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
    .home-revamp-hero-content {
    align-self: stretch;
  }
}

/* Headline: 2-line, heavy weight; orange accents on "أبجد" and "العربي الأول".
 * Selector matches the >=992px desktop rule's specificity so this wins.
 */
.home-revamp-hero-headline,
.home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
  .home-revamp-hero-content
  .home-revamp-hero-headline {
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0;
  width: min(60rem, 100%);
  max-width: none;
  overflow-wrap: anywhere;
  margin-bottom: 1.4rem;
}

.home-revamp-hero-headline-line {
  display: block;
  margin-bottom: 0.08em;
}

.home-revamp-hero-headline-line:last-child {
  margin-bottom: 0;
}

/* Match brand orange used elsewhere in the site */
.home-revamp-hero-accent {
  color: #ff8a00;
  font-weight: 900;
}

/* Lead paragraph — bumped size, matches headline specificity */
.home-revamp-hero-lead,
.home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
  .home-revamp-hero-content
  .home-revamp-hero-lead {
  color: rgba(255, 255, 255, 0.62);
  max-width: 38rem;
  width: min(38rem, 100%);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.65;
}

/* ── Book card stack (3-card fan, real cover on front) ── */
.home-revamp-hero-visual {
  width: 100%;
}

.home-hero-stack {
  position: relative;
  width: min(260px, 24vw);
  aspect-ratio: 240 / 340;
  margin: 0 auto;
}

.home-hero-stack-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  box-sizing: border-box;
}

.home-hero-stack-card--back-left {
  background: linear-gradient(150deg, #5c2020, #3a1212);
  transform: rotate(-9deg) translate(-12%, 6%);
  z-index: 1;
}

.home-hero-stack-card--back-right {
  background: linear-gradient(150deg, #1e3f52, #0f2535);
  transform: rotate(9deg) translate(12%, 6%);
  z-index: 1;
}

.home-hero-stack-card--front {
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.1rem;
  /* Fallback gradient when no cover image is available */
  background: linear-gradient(145deg, #4c2d85 0%, #2d1b4e 55%, #1a0f30 100%);
  color: #fff;
  text-decoration: none;
  z-index: 2;
  direction: rtl;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-hero-stack-card--front:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  color: #fff;
}

/* Real book cover fills the card */
.home-hero-stack-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

/* Top + bottom dark gradient so badge / title / stars stay legible
 * over arbitrary cover artwork.
 */
.home-hero-stack-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8, 6, 18, 0.55) 0%,
    rgba(8, 6, 18, 0.05) 32%,
    rgba(8, 6, 18, 0.78) 100%
  );
  pointer-events: none;
}

.home-hero-stack-badge {
  align-self: flex-end;
  display: inline-block;
  background: #ff8a00;
  color: #fff;
  font-size: clamp(0.85rem, 1.45vw, 1rem);
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

.home-hero-stack-content {
  margin-top: auto;
  position: relative;
  z-index: 2;
  text-align: right;
  display: block;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.home-hero-stack-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.home-hero-stack-author {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.6rem;
}

/* Two-layer star rating: dim "empty" stars in the back, filled overlay
 * clipped to --rating-pct. `direction: ltr` so stars fill left→right
 * regardless of the surrounding RTL container.
 */
.home-hero-stack-stars {
  position: relative;
  display: inline-block;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  letter-spacing: 0.18em;
  line-height: 1;
  direction: ltr;
}

.home-hero-stack-stars-empty {
  color: rgba(255, 255, 255, 0.32);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.home-hero-stack-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--rating-pct, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: #ff8a00;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Wrap: flush to the column's right edge.
 * Base rule (line 1627) declares `margin: 1.75rem auto 0` — those `auto`
 * left/right margins survive the >=992px override (which only resets
 * margin-top), so the wrap was being centered/inset inside the flex
 * column. Force margin: 0 with matched specificity to kill the auto
 * margins, and stretch the wrap across the full column width.
 *
 * `margin-top: auto` pushes the row toward the bottom of the column flex
 * container, leaving generous breathing space between the lead and the
 * stores; `padding-top` keeps a baseline gap so it never glues onto the
 * lead on short viewports where the column has no spare height.
 */
.home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
  .home-revamp-hero-content
  .home-revamp-app-stores-wrap {
  display: block;
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  padding: 2.75rem 0 0;
  align-self: stretch;
  box-sizing: border-box;
}

/* ── Store buttons row: text + icon, flush to RTL start (right edge). ──
 * `direction: rtl; justify-content: flex-start` packs items against the
 * physical right; first markup child (AppGallery) ends up rightmost.
 */
.home-revamp-app-stores-wrap .hero-stores.hero-stores--text,
.home-revamp-hero-split:not(.home-revamp-hero-split--no-visual)
  .home-revamp-hero-content
  .home-revamp-app-stores-wrap
  .hero-stores.hero-stores--text {
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 12px;
  flex-wrap: wrap;
  direction: rtl;
  justify-content: flex-start;
}

.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .iphone,
.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .android,
.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .huawei {
  width: auto;
  height: auto;
  min-width: 148px;
  padding: 0.55rem 1rem;
  background: transparent;
  background-image: none;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-decoration: none;
  text-indent: 0;
  overflow: visible;
  direction: ltr;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .iphone:hover,
.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .android:hover,
.home-revamp-app-stores-wrap .hero-stores.hero-stores--text .huawei:hover {
  border-color: #6c6c6c;
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
  opacity: 1;
}

.hero-stores--text .hero-store-top {
  font-size: 10.5px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1.2;
}

.hero-stores--text .hero-store-bottom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-top: 2px;
}

.hero-stores--text .hero-store-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  line-height: 1;
}

.hero-stores--text .hero-store-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  color: #fff;
}

/* ── Mobile (≤768px): stack column, keep everything visible ── */
@media only screen and (max-width: 768px) {
  /* Let the panel grow with content; no clipping */
  .home-revamp-hero-inner {
    min-height: 0;
    overflow: visible;
  }

  .home-revamp-hero .page.home-revamp-hero-front {
    position: relative;
    inset: auto;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: calc(6rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }

  .home-revamp-hero-headline {
    font-size: clamp(1.65rem, 7.5vw, 2.4rem);
    line-height: 1.22;
  }

  .home-revamp-hero-lead {
    max-width: 100%;
    font-size: clamp(0.95rem, 3.4vw, 1.12rem);
  }

  .home-hero-stack {
    width: min(180px, 46vw);
    margin: 0 auto;
    /* Tighter shadow on mobile so it doesn't bleed into the headline below */
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  }

  .home-hero-stack .home-hero-stack-card {
    box-shadow: none;
  }

  /* Clear vertical separation between the book stack and the text below.
   * The back cards translate down ~6% and the front card's shadow blurs
   * a further ~24px, so without explicit space the headline reads as if
   * tucked under the artwork.
   */
  .home-revamp-hero-visual {
    margin-bottom: 2.25rem;
  }

  .home-revamp-hero-split {
    gap: 0;
  }

  /* All 3 store buttons must remain visible — fit in a single row on
   * narrow screens by relaxing min-width and tightening padding.
   */
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text {
    gap: 6px;
    justify-content: flex-start;
  }

  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .iphone,
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .android,
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .huawei {
    min-width: 0;
    flex: 1 1 0;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
  }

  .hero-stores--text .hero-store-top {
    font-size: 9px;
    letter-spacing: 0.04em;
  }

  .hero-stores--text .hero-store-bottom {
    font-size: 12px;
    gap: 0.35rem;
    margin-top: 1px;
  }

  .hero-stores--text .hero-store-icon {
    width: 1.1em;
    height: 1.1em;
  }
}

/* ── Very narrow (≤400px): give buttons a hair more breathing room ── */
@media only screen and (max-width: 400px) {
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text {
    gap: 4px;
  }

  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .iphone,
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .android,
  .home-revamp-app-stores-wrap .hero-stores.hero-stores--text .huawei {
    padding: 0.35rem 0.4rem;
  }

  .hero-stores--text .hero-store-bottom {
    font-size: 11px;
    gap: 0.25rem;
  }

  .hero-stores--text .hero-store-icon {
    width: 1.05em;
    height: 1.05em;
  }
}

/* ===================================================================
 * Unified section spacing — give every major home section consistent
 * vertical breathing room. Hero / stats / heritage are intentional
 * exceptions (full-bleed panels with their own internal padding).
 * =================================================================== */
.home-revamp-features,
.home-revamp-discovery,
.home-revamp-how-it-works,
.home-revamp-mood,
.home-revamp-authors,
.home-revamp-reading-features,
.home-revamp-pricing,
.home-revamp-bottom-cta {
  padding-top: clamp(3rem, 5.5vw, 5rem);
  padding-bottom: clamp(3rem, 5.5vw, 5rem);
}

@media only screen and (max-width: 768px) {
  .home-revamp-features,
  .home-revamp-discovery,
  .home-revamp-how-it-works,
  .home-revamp-mood,
  .home-revamp-authors,
  .home-revamp-reading-features,
  .home-revamp-pricing,
  .home-revamp-bottom-cta {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

/* Bump up small body text that read as cramped on the redesign */
.home-revamp-reading-features .home-revamp-rf-list li {
  font-size: 16px;
  line-height: 1.55;
}

@media only screen and (max-width: 640px) {
  .home-revamp-reading-features .home-revamp-rf-list li {
    font-size: 14px;
  }
}

/* Pricing — currency was 0.5em (≈ tiny), period was 0.95em — readable bumps */
.home-revamp-pricing .price-currency {
  font-size: 0.62em;
}

.home-revamp-pricing .plan-period,
.home-revamp-pricing .plan-period--muted {
  font-size: 1rem;
}

.home-revamp-pricing .plan-original-price {
  font-size: 0.95rem;
}

/* Discovery placeholder media — was 0.82rem, now matches body */
.home-revamp-feature-row .placeholder-media {
  font-size: 0.95rem;
}

/* ===================================================================
 * Section titles & subtitles — bumped ~15-18% for easier reading.
 * Uses matched specificity so the existing static rules don't win.
 * =================================================================== */
.home-revamp-pricing h2 {
  font-size: 2.6em;
}

.home-revamp-pricing .subtitle {
  font-size: 1.3em;
}

.home-revamp-features h2 {
  font-size: 3.5rem;
}

.home-revamp-discovery-heading h2 {
  font-size: 2.4rem;
}

.home-revamp-how-it-works h2 {
  font-size: 2.55rem;
}

.home-revamp-how-lead {
  font-size: 1.4rem;
}

.home-revamp-heritage h2 {
  font-size: 2.9rem;
}

.home-revamp-mood h2 {
  font-size: 2.55rem;
}

.home-revamp-mood-subtitle {
  font-size: 1.3rem;
}

.home-revamp-authors h2 {
  font-size: 2.55rem;
}

.home-revamp-authors-subtitle {
  font-size: 1.25rem;
}

.home-revamp-rf-subtitle {
  font-size: 1.25rem;
}

.home-revamp-bottom-cta h2 {
  font-size: 2.55rem;
}

/* Mobile cap so the bumped sizes don't overflow narrow viewports */
@media only screen and (max-width: 768px) {
  .home-revamp-pricing h2,
  .home-revamp-features h2,
  .home-revamp-discovery-heading h2,
  .home-revamp-how-it-works h2,
  .home-revamp-heritage h2,
  .home-revamp-mood h2,
  .home-revamp-authors h2,
  .home-revamp-bottom-cta h2 {
    font-size: 2.05rem;
  }

  .home-revamp-features h2 {
    font-size: 2.3rem;
  }

  .home-revamp-pricing .subtitle,
  .home-revamp-mood-subtitle,
  .home-revamp-authors-subtitle,
  .home-revamp-rf-subtitle,
  .home-revamp-how-lead {
    font-size: 1.1rem;
  }
}

/* ===================================================================
 * Alternating section backgrounds — clear visual separation between
 * sections. Two-tone rhythm: warm cream / pure white. Heritage stays
 * dark; bottom-cta keeps its gradient finish.
 * =================================================================== */
.home-revamp-stats {
  background: #fff5e6;
}

.home-revamp-reading-features {
  background: #ffffff;
}

.home-revamp-how-it-works {
  background: #fff5e6;
}

.home-revamp-discovery {
  background: #ffffff;
}

.home-revamp-mood {
  background: #fff5e6;
}

.home-revamp-authors {
  background: #ffffff;
}

.home-revamp-pricing {
  background: #fff5e6;
}

.home-revamp-bottom-cta {
  background: #ffffff;
}

/* Subtle hairline so adjacent same-tone sections (rare here, but a
 * safety net if the order changes) still have a defined boundary.
 */
.home-revamp-stats,
.home-revamp-how-it-works,
.home-revamp-mood,
.home-revamp-pricing {
  border-top: 1px solid rgba(233, 106, 44, 0.08);
  border-bottom: 1px solid rgba(233, 106, 44, 0.08);
}

/* ===================================================================
 * How-it-works — title + description alignment fix.
 *
 * Mobile (≤640px) flips each step to `flex-direction: row` ([circle]
 * [content]), but `.home-revamp-step-content` was left as default
 * `flex: 0 1 auto`, so it sized to the natural width of its tallest
 * child (the description). The title — short and stretching to that
 * width with the inherited `text-align: start` — visually read as
 * pushed in / out of sync with the wrapped description below it.
 *
 * Make the content column actually fill the remaining row space and
 * pin both title and desc to the same right edge.
 * =================================================================== */
.home-revamp-how-it-works .home-revamp-step-content {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

.home-revamp-how-it-works .home-revamp-step-title,
.home-revamp-how-it-works .home-revamp-step-desc {
  width: 100%;
  margin: 0;
}

@media only screen and (max-width: 640px) {
  .home-revamp-how-it-works .home-revamp-step,
  .home-revamp-how-it-works .home-revamp-step-content,
  .home-revamp-how-it-works .home-revamp-step-title,
  .home-revamp-how-it-works .home-revamp-step-desc {
    text-align: right;
  }
}

/* Reading-features collapsible cards (اقرأ / اسمع) — bigger heading + icon */
.home-revamp-reading-features .home-revamp-rf-card-heading {
  font-size: 24px;
  line-height: 1.4;
}

.home-revamp-reading-features .home-revamp-rf-card-icon {
  width: 52px;
  height: 52px;
  font-size: 1.7rem;
  border-radius: 14px;
}

@media only screen and (max-width: 640px) {
  .home-revamp-reading-features .home-revamp-rf-card-heading {
    font-size: 20px;
  }

  .home-revamp-reading-features .home-revamp-rf-card-icon {
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
    border-radius: 12px;
  }
}

/* ===================================================================
 * Readability bump — subtitles, body copy, captions were too small
 * on both mobile and desktop. Lift the lower bound across the home
 * page sections.
 * =================================================================== */
.home-revamp-rf-subtitle,
.home-revamp-how-lead,
.home-revamp-mood-subtitle,
.home-revamp-authors-subtitle,
.home-revamp-pricing .subtitle {
  font-size: 1.4rem;
  line-height: 1.75;
}

.home-revamp-stat-label {
  font-size: 1.25rem;
}

.home-revamp-step-desc {
  font-size: 1.3rem;
  line-height: 1.75;
}

.home-revamp-step-title {
  font-size: 1.65rem;
}

.home-book-title {
  font-size: 1.3rem;
  line-height: 1.5;
}

.home-book-author {
  font-size: 1.1rem;
}

.home-author-name {
  font-size: 1.2rem;
}

.home-author-readers {
  font-size: 1.05rem;
}

.home-revamp-pricing .plan-features li,
.home-revamp-pricing .plan-feat {
  font-size: 1.05rem;
}

/* Per-plan USP — gives each plan a reason to be picked over the next */
.home-revamp-pricing .plan-usp {
  display: inline-block;
  align-self: center;
  background: rgba(242, 97, 1, 0.1);
  color: #b04500;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 auto 12px;
  text-align: center;
  line-height: 1.4;
}

.home-revamp-pricing .plan-card.selected .plan-usp {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

@media only screen and (max-width: 640px) {
  .home-revamp-rf-subtitle,
  .home-revamp-how-lead,
  .home-revamp-mood-subtitle,
  .home-revamp-authors-subtitle,
  .home-revamp-pricing .subtitle {
    font-size: 1.18rem;
    line-height: 1.7;
  }

  .home-revamp-stat-label {
    font-size: 1.12rem;
  }

  .home-revamp-step-desc {
    font-size: 1.15rem;
  }

  .home-revamp-step-title {
    font-size: 1.4rem;
  }

  .home-book-title {
    font-size: 1.15rem;
  }

  .home-book-author {
    font-size: 1rem;
  }
}
