/* Generated by src/build.js (rtlcss) from css/components/guide.css — LTR version, do not edit: edit css/components/guide.css and rebuild */
/* ==========================================================================
   guide.css — "المحتوى الإرشادي": tab themes, tab bar, guidance card,
   and the card carousel used on the home and Arabic pages.
   The card (.guide-card) and tab bar (.guide-tabs) are reused by the
   guidance page (css/components/guidance-page.css).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tab themes — accent, focus ring, card tint & wash per content type
   -------------------------------------------------------------------------- */
.guide-theme--verses {
  --acc: var(--color-theme-verses);
  --acc-ring: rgba(46, 108, 168, .28);
  --g-tint: var(--color-theme-verses);
  --g-wash: var(--color-theme-verses-deep);
}

.guide-theme--hadith {
  --acc: var(--color-theme-hadith-acc);
  --acc-ring: rgba(31, 122, 77, .28);
  --g-tint: var(--color-theme-hadith);
  --g-wash: var(--color-theme-hadith-deep);
}

.guide-theme--benefits {
  --acc: var(--color-gold-900);
  --acc-ring: rgba(140, 97, 16, .28);
  --g-tint: var(--color-theme-benefits);
  --g-wash: var(--color-theme-benefits-deep);
}

.guide-theme--names {
  --acc: var(--color-theme-names-acc);
  --acc-ring: rgba(107, 63, 168, .28);
  --g-tint: var(--color-theme-names);
  --g-wash: var(--color-theme-names-deep);
}

/* --------------------------------------------------------------------------
   Section (home variant)
   -------------------------------------------------------------------------- */
.guide {
  background: var(--color-white);
}

.guide__inner {
  max-width: var(--cww, 1280px);
  margin: 0 auto;
  padding: 112px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.guide__head {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  text-align: center;
}

.guide__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: var(--fs-section-title);
  line-height: 1.2;
  color: var(--color-navy-700);
}

.guide__title-accent {
  color: var(--color-blue-500);
}

/* --------------------------------------------------------------------------
   Arabic-page variant (.guide--fp): continues the light-blue listing
   section of that page, separated by a hairline
   -------------------------------------------------------------------------- */
.guide--fp {
  background: var(--color-mist-100);
  padding: 24px 24px 112px;
}

.guide--fp .guide__inner {
  padding: 72px 0 0;
  border-top: 1px solid var(--color-line);
}

/* scroll target of the Arabic page's "jump to guidance" button */
.guide__anchor {
  display: block;
  position: relative;
  top: -56px;
  height: 0;
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   Tab bar (shared with the guidance page)
   -------------------------------------------------------------------------- */
.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 5px;
  background: var(--color-blue-100);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.guide-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--color-navy-700);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.guide-tabs__tab:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* each tab carries its own theme class, so --acc is that tab's colour */
.guide-tabs__tab[aria-selected="false"]:hover {
  background: var(--color-mist-200);
  background: color-mix(in srgb, var(--acc, var(--color-blue-500)) 18%, var(--color-white));
  color: var(--acc, var(--color-navy-700));
}

.guide-tabs__tab[aria-selected="true"] {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--color-white);
}

/* Phones & small tablets: the same pill bar, across the width (at most
   560px): equal tabs, except one whose label needs more (never cut) */
@media (max-width: 760px) {
  .guide-tabs {
    --tpx: 16px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    box-sizing: border-box;
    padding: 4px;
  }

  .guide-tabs__tab {
    flex: 1 1 0;
    min-width: max-content;
    justify-content: center;
    padding: 0 var(--tpx);
  }
}

@media (max-width: 520px) {
  .guide-tabs {
    --tpx: 10px;
  }
}

/* «أسماء الله الحسنى» is long: on small phones a slightly smaller label
   leaves the selected pill some room around its text */
@media (max-width: 400px) {
  .guide-tabs {
    --tpx: 7px;
  }

  .guide-tabs__tab {
    font-size: 13.5px;
  }
}

@media (max-width: 360px) {
  .guide-tabs {
    --tpx: 5px;
    gap: 0;
    padding: 3px;
  }

  .guide-tabs__tab {
    font-size: 13px;
  }
}

@media (max-width: 340px) {
  .guide-tabs {
    --tpx: 4px;
  }

  .guide-tabs__tab {
    font-size: 12.5px;
  }
}

/* --------------------------------------------------------------------------
   Carousel — position driven by --g-start (card index) and --g-drag (px)
   -------------------------------------------------------------------------- */
/* 4px of room around the cards (focus rings), 40px under them for the
   hover shadow — given back by the negative margin, so nothing moves */
.guide__viewport {
  overflow: hidden;
  margin: -4px -4px -40px;
  padding: 4px 4px 40px;
  touch-action: pan-y;
  cursor: grab;
}

.guide__viewport:active {
  cursor: grabbing;
}

.guide__track {
  --g-vis: 3;      /* visible cards: 3 / 2 / 1 by viewport width */
  --g-start: 0;    /* index of the first visible card */
  --g-drag: 0px;   /* live drag offset */
  display: flex;
  gap: 18px;
  transform: translateX(calc(-1*(var(--g-start) * (100% + 18px) / var(--g-vis) + var(--g-drag))));
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
  user-select: none;
  -webkit-user-select: none;
}

.guide__track.is-dragging {
  transition: none;
}

.guide__track > .guide-card {
  flex: 0 0 calc((100% - (var(--g-vis) - 1) * 18px) / var(--g-vis));
}

.guide__track img {
  -webkit-user-drag: none;
  pointer-events: none;
}

@media (max-width: 999px) {
  .guide__track {
    --g-vis: 2;
  }
}

@media (max-width: 699px) {
  .guide__track {
    --g-vis: 1;
  }
}

/* --------------------------------------------------------------------------
   Carousel controls: prev / "more" link / next
   -------------------------------------------------------------------------- */
.guide__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.guide__arrow,
.guide__more {
  box-sizing: border-box;
  border: 1px solid var(--acc);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.guide__arrow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--color-white);
  cursor: pointer;
}

.guide__arrow[aria-disabled="true"] {
  opacity: .35;
}

.guide__arrow svg {
  display: block;
}

.guide__more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--acc);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.guide__more svg {
  flex: none;
}

.guide__arrow svg,
.guide__more svg {
  fill: none;
  stroke: var(--acc);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}

.guide__arrow:hover,
.guide__more:hover {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--color-white);
}

.guide__arrow:hover svg,
.guide__more:hover svg {
  stroke: var(--color-white);
}

.guide__arrow:focus-visible,
.guide__more:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--acc-ring);
}

/* --------------------------------------------------------------------------
   Guidance card
   -------------------------------------------------------------------------- */
.guide-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  padding: 18px 18px 0;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-blue-line);
  border-radius: 32px;
  transition: border-color .2s ease, background-color .25s ease, box-shadow .3s ease;
}

/* hover: the card stands out in its tab's colour — a coloured edge, a light
   tint of it, a soft shadow under the card and the artwork a little
   brighter; colour and shadow only, no lift (the site's rule) */
.guide-card:hover {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 6%, var(--color-white));
  box-shadow: 0 22px 40px -24px rgba(26, 43, 69, .45);
}

/* artwork panel with the quote */
.guide-card__face {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 22px;
  overflow: hidden;
  text-align: center;
}

.guide-card__art {
  position: absolute;
  z-index: -2;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.guide-card__img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* focal points of the individual artworks */
.guide-card__img--y40 { object-position: 50% 40%; }
.guide-card__img--y45 { object-position: 50% 45%; }
.guide-card__img--y70 { object-position: 50% 70%; }

/* recolour the art in the tab colour, then darken it */
.guide-card__tint {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--g-tint);
  mix-blend-mode: color;
  opacity: .8;
}

.guide-card__wash {
  position: absolute;
  inset: 0;
  background: var(--g-wash);
  opacity: .72;
}

.guide-card__veil {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(75% 65%, rgba(10, 15, 25, .48) 0%, rgba(10, 15, 25, .18) 70%, rgba(10, 15, 25, 0) 100%),
    linear-gradient(rgba(10, 15, 25, .32), rgba(10, 15, 25, .32));
  transition: opacity .3s ease;
}

/* hover: the shade over the artwork thins a little, so the artwork brightens */
.guide-card:hover .guide-card__veil {
  opacity: .85;
}

/* quote text: Amiri bold by default, Lotus for Qur'an verses,
   Almarai for the large Names of Allah */
.guide-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Amiri', 'Thmanyah Serif Text', serif;
  font-weight: 700;
  font-size: 29px;
  line-height: 1.8;
  color: var(--color-white);
  text-shadow: 0 1px 12px rgba(10, 20, 35, .45);
}

.guide-card__text--long {
  font-size: 24px;
}

.guide-card__text--verse {
  font-family: 'Lotus', 'Amiri', serif;
  font-weight: 400;
}

.guide-card__text--big {
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-size: 56px;
}

.guide-card__ref {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-gold-200);
}

.guide-card__rule {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, .45);
}

.guide-card__exp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 94%;
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.85;
  color: rgba(255, 255, 255, .9);
}

/* footer: details link + copy / download / share */
.guide-card__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 0;
}

.guide-card__actions {
  display: flex;
}

.guide-card__details,
.guide-card__btn {
  box-sizing: border-box;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

/* "عرض البطاقة" — opens the card viewer (share window) */
.guide-card__details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--acc);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.guide-card__details:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring, rgba(59, 117, 150, .25));
}

/* The artwork opens the viewer too */
.guide-card__face {
  cursor: pointer;
}

.guide-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.guide-card__details svg,
.guide-card__btn svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--acc);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}

.guide-card__details svg {
  stroke: currentColor;
}

.guide-card__details:hover,
.guide-card__btn:hover {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--color-white);
}

.guide-card__details:hover svg,
.guide-card__btn:hover svg {
  stroke: var(--color-white);
}

.guide-card__details:focus-visible,
.guide-card__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--acc-ring);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .guide__inner {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .guide--fp {
    padding-bottom: 88px;
  }
}

@media (max-width: 640px) {
  .guide__inner {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .guide--fp {
    padding-bottom: 72px;
  }
}

@media (max-width: 420px) {
  .guide__more {
    gap: 6px;
    padding: 0 12px 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .guide--fp {
    padding-right: 12px;
    padding-left: 12px;
  }

  .guide-card {
    gap: 12px;
    padding: 14px;
  }

  .guide-card__foot {
    margin: auto -14px -14px;
    padding: 10px;
  }

  .guide-card__btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 350px) {
  .guide-card__btn {
    width: 34px;
    height: 34px;
  }

  .guide-card__exp {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide__track,
  .guide-card,
  .guide-card__veil {
    transition: none;
  }
}
