/* ============================================
   ALBASAER — HOMEPAGE CSS (English / LTR)
   Figma: vmTA4IVgGrXqZYp0eeWe2h  node 331-761
   ============================================ */


/* ============================================
   HERO
   ============================================ */
.hero {
  background: #faf9f6;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: stretch;
}

  .hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: rgba(138,21,56,0.05);
    filter: blur(120px);
    top: -73px;
    left: 200px;
    pointer-events: none;
  }

  .hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(254,243,198,0.4);
    filter: blur(100px);
    top: 256px;
    left: -100px;
    pointer-events: none;
  }

.hero__inner {
  max-width: 1387px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 16px) 64px 0;
  display: grid;
  grid-template-columns: 1fr 528px;
  gap: 48px;
  align-items: start;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 620px;
  min-width: 0;
  padding-bottom: 120px;
  align-self: center;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 17px;
  background: #fff;
  border: 1px solid rgba(138,21,56,0.1);
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 32px;
}

.hero__badge-text {
  font-size: 14px;
  font-weight: 600;
  color: #8a1538;
  letter-spacing: -0.15px;
  white-space: nowrap;
}

/* Heading */
.hero__heading {
  /* Fluid: scales with viewport so it stays within one screen at 125% zoom
     (zoom shrinks the CSS viewport -> vw shrinks -> heading shrinks). */
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 700;
  color: #101828;
  letter-spacing: -1.53px;
  line-height: 1.05;
  margin: 0 0 32px;
  max-width: 590px;
  overflow-wrap: break-word;
}

.hero__heading-accent {
  color: #8a1538;
}

/* Description */
.hero__desc {
  font-size: clamp(17px, 1.35vw, 20px);
  color: #4a5565;
  line-height: 1.625;
  letter-spacing: -0.45px;
  max-width: 561px;
  margin: 0 0 48px;
}

/* Buttons */
.hero__buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.hero__btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 28px;
  background: #8a1538;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.44px;
  border-radius: 16px;
  box-shadow: 0 10px 15px rgba(138,21,56,0.2), 0 4px 6px rgba(138,21,56,0.2);
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

  .hero__btn-primary:hover {
    opacity: 0.9;
    color: #fff;
  }

.hero__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  padding: 0 33px;
  background: #fff;
  color: #1e2939;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.44px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
  transition: border-color 0.2s ease;
}

  .hero__btn-secondary:hover {
    border-color: #8a1538;
    color: #1e2939;
  }

/* Social proof */
.hero__social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__avatars {
  position: relative;
  width: 152px;
  height: 40px;
  flex-shrink: 0;
}

.hero__avatar {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(-135deg, #d1d5db, #9ca3af);
}
img.hero__avatar { object-fit: cover; }
.hero__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(-135deg, #8a1538, #b91c4b);
}

  .hero__avatar:nth-child(1) {
    right: 0;
  }

  .hero__avatar:nth-child(2) {
    right: 28px;
  }

  .hero__avatar:nth-child(3) {
    right: 56px;
  }

  .hero__avatar:nth-child(4) {
    right: 84px;
  }

  .hero__avatar:nth-child(5) {
    right: 112px;
  }

.hero__proof-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hero__stars-rating {
  font-size: 12px;
  color: #6a7282;
  margin-right: 4px;
}

.hero__proof-text {
  font-size: 14px;
  font-weight: 700;
  color: #4a5565;
  letter-spacing: -0.15px;
}

.hero__proof-text {
  text-align: start;
}
/* Hero image column */
.hero__image-col {
  position: relative;
  height: auto;
  display: flex;
  align-items: flex-start;
  align-self: stretch; /* fills full grid row = 100vh - padding-top */
  justify-content: flex-end; /* right-align book so badge lands at container edge */
}

.hero__circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__circle {
  position: absolute;
  border-radius: 50%;
}

.hero__circle--outer {
  width: 600px;
  height: 600px;
  border: 1px solid rgba(138,21,56,0.1);
  top: 37px;
  right: -4px;
}

.hero__circle--inner {
  width: 500px;
  height: 500px;
  border: 1px solid rgba(138,21,56,0.05);
  top: 87px;
  right: 46px;
}

.hero__book-outer {
  position: relative;
  width: 450px;
  height: calc(100% - 80px); /* 100vh - padding-top - 80px margin-bottom ≈ 675px at Figma ref */
  z-index: 1;
  cursor: pointer;
}

/* Dark back cover — sticks out on the right (spine side) to show book depth */
.hero__book-back-cover {
  position: absolute;
  width: 96%;
  height: 96%;
  top: 2%;
  left: 16px;
  background: #1a1a1a;
  border-radius: 24px;
  box-shadow: -3px 3px 8px rgba(0,0,0,0.35);
  z-index: 0;
}

/* Pages stack behind the cover, right-anchored to spine */
.hero__book-inside {
  position: absolute;
  width: 90%;
  height: 94%;
  top: 3%;
  left: 5%;
  z-index: 1;
}


.hero__book-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 98%;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px 16px 16px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transform-origin: left center;
  z-index: 1;
}

/* Cover image — Arabic: spine on right, transform-origin right */
.hero__book-image {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: rgba(138,21,56,0.25) 0px 20px 20px -5px, rgba(138,21,56,0.15) 0px 40px 40px -10px;
  transform-origin: left center;
  will-change: transform, box-shadow;
  z-index: 10;
  overflow: hidden;
}

.hero__book-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px 16px 16px 4px;
}

/* Spine crease — right edge (Arabic binding) */
.hero__book-effect {
  position: absolute;
  width: 24px;
  height: 100%;
  top: 0;
  left: 0;
  margin-left: 12px;
  border-left: 2px solid rgba(0,0,0,0.08);
  background-image: linear-gradient(-270deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
  z-index: 5;
  pointer-events: none;
  will-change: margin-right;
}

/* Light shimmer overlay */
.hero__book-light {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(-270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 100%);
  opacity: 0.12;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: overlay;
  will-change: opacity;
}

/* Floating badges */
.hero__float-badge {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 16px;
  box-shadow: 0 20px 25px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.1);
  padding: 14px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.hero__float-badge--bestseller {
  right: -41px;
  top: 92px;
  background: rgba(255,255,255,0.9);
}

.hero__float-badge--special {
  left: -64px;
  bottom: 135px;
  background: rgba(255,255,255,0.97);
}

.hero__float-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef3c6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero__float-icon--brand {
  width: 40px;
  height: 40px;
  background: rgba(138,21,56,0.1);
}

.hero__float-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hero__float-icon--brand img {
  width: 20px;
  height: 20px;
}

.hero__float-title {
  font-size: 14px;
  font-weight: 700;
  color: #101828;
  line-height: 1.4;
  white-space: nowrap;
}

.hero__float-sub {
  font-size: 12px;
  color: #6a7282;
  white-space: nowrap;
}



/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  color: inherit;
}

  .cat-card:hover {
    border-color: rgba(138,21,56,0.25);
    box-shadow: 0 4px 16px rgba(138,21,56,0.08);
    transform: translateY(-2px);
  }

.cat-card__icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.cat-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #101828;
  margin: 0 0 6px;
  line-height: 1.3;
}

.cat-card__count {
  font-size: 14px;
  color: #6a7282;
  margin: 0;
}

/* ============================================
   AUTHORS
   ============================================ */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding-top: 20px;
}

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: inherit;
}

  .author-card:hover .author-card__name {
    color: #8a1538;
  }

.author-card__img-wrap {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(-135deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 50%;
}

.author-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #101828;
  margin: 0;
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}

.author-card__specialty {
  font-size: 14px;
  color: #4a5565;
  margin: 0;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  background: #faf9f6;
  padding: 65px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 17px 64px;
  gap: 16px;
}

.feature-card--mid {
  border-right: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

.feature-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

  .feature-card__icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

.feature-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #101828;
  margin: 0;
  letter-spacing: -0.2px;
}

.feature-card__desc {
  font-size: 14px;
  color: #4a5565;
  margin: 0;
  line-height: 1.6;
  max-width: 240px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Prevent any element from causing horizontal scroll */
html, body {
  overflow-x: hidden;
}

.hero {
  overflow: hidden;
}

/* ── 1425px: start pulling special badge inward ── */
@media (max-width: 1425px) {
  .hero__float-badge--special {
    left: -40px;
  }
}

/* ── 1200px ── */
@media (max-width: 1200px) {
  .hero__inner {
    grid-template-columns: 1fr 420px;
    padding-right: 48px;
    padding-left: 48px;
  }

  .hero__book-outer {
    width: 360px;
    height: calc(100% - 80px);
  }

  .hero__circle--outer {
    width: 480px;
    height: 480px;
  }

  .hero__circle--inner {
    width: 390px;
    height: 390px;
  }

  .hero__float-badge--special {
    left: -20px;
  }

  /* heading size handled fluidly via clamp() */

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card {
    padding: 17px 40px;
  }
}

/* ── 1024px ── */
@media (max-width: 1024px) {
  .section-inner {
    padding-right: 40px;
    padding-left: 40px;
  }

  .hero__inner {
    grid-template-columns: 1fr 340px;
    padding-right: 40px;
    padding-left: 40px;
    gap: 32px;
  }

  .hero__book-outer {
    width: 300px;
    height: calc(100% - 80px);
  }

  .hero__circle--outer {
    width: 380px;
    height: 380px;
  }

  .hero__circle--inner {
    width: 300px;
    height: 300px;
  }

  .hero__float-badge--special {
    left: -20px;
  }

  .hero__heading {
    letter-spacing: -1px;
  }
  /* heading & desc sizes handled fluidly via clamp() */

  .authors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── 768px: mobile layout — image top, text below ── */
@media (max-width: 870px) {
  /* Hero: single column, image first (order -1), then text */
  .hero {
    min-height: auto;
    align-items: flex-start;
    overflow: visible;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    padding: calc(var(--header-height) + 24px) 0 48px;
    gap: 0;
  }

  /* Image column: show at top, fixed Figma height */
  .hero__image-col {
    display: flex;
    order: -1;
    height: 400px;
    align-self: auto;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
    position: relative;
    margin-bottom: 32px;
  }

  .hero__circles {
    display: none;
  }

  /* Book: centered, aspect-ratio width, full Figma height */
  .hero__book-outer {
    width: 267px;
    height: 400px;
  }

  /* Badges: repositioned as small overlays on the book corners */
  .hero__float-badge {
    display: flex;
    padding: 10px 13px;
    gap: 8px;
  }

  .hero__float-icon {
    width: 36px;
    height: 36px;
  }

  .hero__float-icon--brand {
    width: 30px;
    height: 30px;
  }

  .hero__float-title {
    font-size: 12px;
  }

  .hero__float-sub {
    font-size: 10px;
  }

  /* Bestseller: top-left corner of book */
  .hero__float-badge--bestseller {
    right: -12px;
    top: 16px;
    left: auto;
    bottom: auto;
  }
  /* Special Edition: bottom-right corner of book */
  .hero__float-badge--special {
    left: -12px;
    bottom: 20px;
    right: auto;
    top: auto;
  }

  /* Text content: centered, padded */
  .hero__content {
    max-width: 100%;
    text-align: center;
    padding: 32px 16px 0;
    order: 0;
  }

  .hero__badge {
    margin-right: auto;
    margin-left: auto;
  }

  .hero__heading {
    font-size: 36px;
    letter-spacing: -0.6px;
    margin-bottom: 20px;
  }

  .hero__desc {
    font-size: 16px;
    max-width: 100%;
    margin-bottom: 32px;
  }

  .hero__buttons {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
  }

  .hero__btn-primary,
  .hero__btn-secondary {
    flex: 1;
    justify-content: center;
    font-size: 17px;
    height: 56px;
    border-radius: 14px;
  }

  .hero__social-proof {
    justify-content: center;
  }

  /* Categories: 2 cols */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cat-card {
    padding: 20px 12px;
  }

  .cat-card__icon-wrap {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
  }

  .cat-card__name {
    font-size: 14px;
  }

  /* Authors: 2 cols */
  .authors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .author-card__img-wrap {
    width: 90px;
    height: 90px;
  }

  .author-card__name {
    font-size: 15px;
  }

  .author-card__specialty {
    font-size: 13px;
  }

  /* Features: 1 col */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 28px 24px;
  }

  .feature-card--mid {
    border-right: none;
    border-left: none;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
  }
}

/* ── Short viewports: landscape phones, small tablets in landscape ── */
@media (max-height: 640px) {
  .hero {
    min-height: auto;
    padding-bottom: 0;
  }

  .hero__inner {
    padding-bottom: 48px;
  }
}

/* ── 480px ── */
@media (max-width: 480px) {
  .hero__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__btn-primary,
  .hero__btn-secondary {
    flex: none;
    width: 100%;
  }

  .hero__image-col {
    height: 360px;
  }

  .hero__book-outer {
    width: 240px;
    height: 360px;
  }

  .hero__heading {
    font-size: 32px;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .cat-card {
    padding: 14px 6px;
  }

  .cat-card__icon-wrap {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
  }

  .cat-card__name {
    font-size: 12px;
  }

  .cat-card__count {
    display: none;
  }
}

/* ── 360px and below (supports 320px) ── */
@media (max-width: 360px) {
  .hero__heading {
    font-size: 28px;
  }

  .hero__desc {
    font-size: 14px;
  }

  .hero__image-col {
    height: 320px;
  }

  .hero__book-outer {
    width: 213px;
    height: 320px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .authors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .author-card__img-wrap {
    width: 72px;
    height: 72px;
  }

  .section-title {
    font-size: 22px;
  }

  .section {
    padding: 40px 0;
  }
}

/* ============================================
   RTL OVERRIDES (Arabic)
   ============================================ */

/* ── Hero layout: text right, image left ── */
.hero__inner { direction: rtl; }
.hero__image-col { align-self: stretch; justify-content: flex-start; }
.hero__content { text-align: right; }

/* ── Decorative blurs flip to right side ── */
.hero::before { left: auto;  right: 200px; }
.hero::after  { left: auto;  right: -100px; }

/* ── Book: back cover peeks out on the right (Arabic spine side) ── */
.hero__book-back-cover {
  left: auto;
  right: 16px;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.35);
}

/* ── Book pages: rounded corners on left (cover side), flat on right (spine) ── */
.hero__book-page {
  left: auto;
  right: 0;
  border-radius: 16px 4px 4px 16px;
  transform-origin: right center;
}

/* ── Cover image: hinge from right (Arabic spine) ── */
.hero__book-image { transform-origin: right center; }

/* ── Cover image border-radius: round on left, flat on right ── */
.hero__book-img { border-radius: 16px 4px 4px 16px; }

/* ── Spine crease: move to right edge ── */
.hero__book-effect {
  left: auto;
  right: 0;
  margin-left: 0;
  margin-right: 12px;
  border-left: none;
  border-right: 2px solid rgba(0,0,0,0.08);
  background-image: linear-gradient(270deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
  will-change: margin-left;
}

/* ── Light shimmer: flip gradient direction ── */
.hero__book-light {
  background-image: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 100%);
}

/* ── Decorative circles: move to left (image is now on left) ── */
.hero__circle--outer { right: auto; left: -4px; }
.hero__circle--inner { right: auto; left: 46px; }

/* ── Floating badges: flip sides ── */
.hero__float-badge--bestseller { right: auto; left: -41px; }
.hero__float-badge--special   { left: auto;  right: -64px; }

/* ── CTA arrow: flip direction ── */
.hero__btn-primary svg { transform: scaleX(-1); }

/* ── Responsive badge positions ── */
@media (max-width: 1425px) {
  .hero__float-badge--special { right: -40px; }
}
@media (max-width: 1200px) {
  .hero__float-badge--special { right: -20px; }
}
@media (max-width: 1024px) {
  .hero__float-badge--special { right: -20px; }
}
@media (max-width: 870px) {
  .hero__float-badge--bestseller { left: -12px;  right: auto; }
  .hero__float-badge--special    { right: -12px; left: auto; }
  .hero__content { text-align: right; }
}
