/* ==========================================================================
   Gift Tales home page: header, hero slideshow, trust strip, categories,
   Royal band. Used by index.html and ar.html (v1, Oct 2026).
   All classes use the "hm-" prefix so nothing clashes with Bootstrap or the
   existing gallery, contact and footer styles.
   ========================================================================== */

/* Arabic font with Western digits: digits fall back to Montserrat */
@font-face {
  font-family: "GTAr";
  src: url(../fonts/GE-Thameen-Book/GE-Thameen-Book.ttf) format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-002F, U+003A-009F, U+00A1-10FFFF;
}
@font-face {
  font-family: "GTAr";
  src: url(../fonts/GE-Thameen-DemiBold/GE-Thameen-DemiBold.ttf) format("truetype");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-002F, U+003A-009F, U+00A1-10FFFF;
}

:root {
  --hm-blue: #76C4D5;
  --hm-gray: #56565A;
  --hm-sage: #D1E0D7;
  --hm-ink: #20242A;
  --hm-gold: #C9AE72;
  --hm-gold-2: #D9C38F;
  --hm-char: #1D1F22;
  --hm-head: 72px;
}

.hm-scope, .hm-scope * { box-sizing: border-box; }
.hm-scope {
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  color: var(--hm-ink);
  text-align: left;
}
html[lang="ar"] .hm-scope { font-family: "GTAr", "Montserrat", "Segoe UI", Arial, sans-serif; text-align: right; }
.hm-scope a { color: inherit; text-decoration: none; }
.hm-scope h1, .hm-scope h2, .hm-scope h3, .hm-scope p { margin: 0; }
.hm-scope img { max-width: 100%; display: block; }
.hm-num { font-family: "Montserrat", "Segoe UI", Arial, sans-serif; unicode-bidi: isolate; }

/* --------------------------------------------------------------------------
   Header (same pattern as the inner pages)
   -------------------------------------------------------------------------- */
.hm-site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid #E3E9E5;
}
.hm-site .hm-wrap {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: var(--hm-head);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hm-logo img { height: 44px; width: auto; }
.hm-cats { display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
.hm-cats a { color: var(--hm-gray); padding: 6px 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.hm-cats a:hover { color: var(--hm-ink); border-bottom-color: var(--hm-blue); }
.hm-lang { display: inline-flex; align-items: center; gap: 8px; color: var(--hm-gray); white-space: nowrap; font-size: 15px; }
.hm-lang:hover { color: var(--hm-ink); }
.hm-lang .hm-flag { flex: 0 0 auto; width: 1.35em; height: 1.35em; }
html[lang="en"] .hm-lang { font-family: "GTAr", "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 16px; }
html[lang="ar"] .hm-lang { font-family: "Montserrat", "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 14px; }
html[lang="ar"] .hm-cats { font-size: 15px; }
@media (max-width: 1150px) { .hm-cats { gap: 14px; font-size: 13px; } }
@media (max-width: 1023px) { .hm-cats { display: none; } }
/* phones: same header as the inner pages (72px, 44px logo, 24px side padding) */

/* --------------------------------------------------------------------------
   Hero slideshow
   -------------------------------------------------------------------------- */
.hm-hero { position: relative; overflow: hidden; color: #fff; background: #1D1F22; }
/* Desktop: every slide has the same size: full screen width, at the photos' own shape
   (1.736 : 1). The top is never cut; on short screens the bottom continues below the
   fold and is reached by scrolling. */
.hm-stage {
  position: relative;
  height: calc(100vw / 1.736);
  overflow: hidden;
}
.hm-layer {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; transition: opacity 1.2s ease;
}
.hm-layer.is-visible { opacity: 1; }
.hm-fill, .hm-img { position: absolute; display: block; background-repeat: no-repeat; background-image: var(--img); }
.hm-fill { display: none; }
.hm-img { inset: 0; background-size: cover; background-position: var(--pos, 50% 50%); }
.hm-stage::after {
  content: ""; position: absolute; top: var(--iy, 0px); left: var(--ix, 0px); width: var(--iw, 100%); height: var(--ih, 100%);
  z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 48% 60% at 22% 55%, rgba(15, 18, 22, .55) 0%, rgba(15, 18, 22, .25) 55%, rgba(15, 18, 22, 0) 100%);
  opacity: 0; transition: opacity .8s ease;
}
.hm-stage.is-shaded::after { opacity: 1; }

.hm-copies { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hm-copy {
  position: absolute; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s;
}
.hm-copy.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .7s ease .25s, visibility 0s; }
.hm-copy.is-full {
  left: calc(var(--ix, 0px) + var(--iw, 100vw) * .07); top: calc(var(--iy, 0px) + var(--ih, 100%) * .5); transform: translateY(-55%); max-width: 520px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .5);
}
html[lang="ar"] .hm-copy.is-full { width: max-content; max-width: 470px; text-align: right; }
.hm-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
}
.hm-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--hm-blue); flex: 0 0 auto; }
.hm-copy.is-gold .hm-eyebrow::before { background: var(--hm-gold); }
html[lang="ar"] .hm-eyebrow { letter-spacing: 0; text-transform: none; font-size: 15px; }
.hm-copy h2 { font-size: 46px; line-height: 1.12; font-weight: 700; margin: 14px 0 16px; color: #fff; }
html[lang="ar"] .hm-copy h2 { font-size: 42px; line-height: 1.3; font-weight: 600; }
.hm-copy p { font-size: 17px; line-height: 1.55; margin: 0 0 28px; opacity: .95; }
html[lang="ar"] .hm-copy p { font-size: 18px; max-width: 430px; margin-left: auto; margin-right: 0; }
.hm-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hm-btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1.2; text-shadow: none;
  transition: background .2s, color .2s, border-color .2s;
}
html[lang="ar"] .hm-btn { font-size: 15px; }
.hm-btn.is-fill { background: var(--hm-blue); color: #fff; }
.hm-btn.is-fill:hover { background: #5FB3C6; color: #fff; }
.hm-btn.is-line { border: 1.5px solid rgba(255, 255, 255, .85); color: #fff; }
.hm-btn.is-line:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.hm-copy.is-gold .hm-btn.is-fill { background: var(--hm-gold); color: var(--hm-char); }
.hm-copy.is-gold .hm-btn.is-fill:hover { background: var(--hm-gold-2); }
.hm-copy.is-pin { transform: none; }
.hm-copy.is-pin .hm-mob { display: none; }

/* controls */
.hm-ctrl {
  position: absolute; z-index: 4; left: calc(var(--ix, 0px) + var(--iw, 100vw) * .07); top: calc(var(--iy, 0px) + var(--ih, 100%) - var(--cb, 16px)); transform: translateY(-100%);
  display: flex; align-items: center; gap: 14px; direction: ltr;
  padding: 6px 8px; border-radius: 999px;
  background: rgba(20, 24, 28, .42); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif; font-size: 13px; color: #fff;
}
html[lang="ar"] .hm-ctrl { flex-direction: row-reverse; }
.hm-arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5);
  background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0;
}
.hm-arrow:hover { background: rgba(255, 255, 255, .15); }
.hm-count b { font-size: 15px; font-weight: 700; }
.hm-count i { font-style: normal; opacity: .85; margin-left: 2px; }
.hm-bars { display: flex; gap: 5px; align-items: center; }
html[lang="ar"] .hm-bars { flex-direction: row-reverse; }
.hm-bar {
  width: 18px; height: 14px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center;
}
.hm-bar span { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); position: relative; overflow: hidden; }
.hm-bar span::after {
  content: ""; position: absolute; inset: 0; background: var(--hm-blue);
  transform-origin: left center; transform: scaleX(var(--p, 0));
}
html[lang="ar"] .hm-bar span::after { transform-origin: right center; }
.hm-bar.is-active { width: 34px; }
.hm-bar.is-done span::after { transform: scaleX(1); }
.hm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* smaller desktops and tablets: a more compact control bar so it stays clear of the photos' own text */
@media (min-width: 768px) and (max-width: 1150px) {
  .hm-ctrl { --cb: 10px; padding: 4px 6px; gap: 10px; }
  .hm-arrow { width: 30px; height: 30px; }
  .hm-bar { width: 12px; }
  .hm-bar.is-active { width: 24px; }
}

/* phone: photo on top, text panel below */
@media (max-width: 767px) {
  .hm-hero { background: #fff; color: var(--hm-ink); }
  .hm-stage { height: auto; min-height: 0; aspect-ratio: 390 / 560; }
  .hm-stage::after { display: none; }

  .hm-copies { position: relative; inset: auto; display: grid; padding: 22px 22px 26px; pointer-events: auto; }
  .hm-copy, .hm-copy.is-full, html[lang="ar"] .hm-copy.is-full {
    position: relative; grid-area: 1 / 1; left: auto !important; top: auto !important; right: auto !important;
    transform: none !important; width: auto; max-width: none; text-shadow: none;
  }
  .hm-eyebrow { color: var(--hm-gray); }
  .hm-copy h2 { font-size: 31px; color: var(--hm-ink); margin: 12px 0 14px; }
  html[lang="ar"] .hm-copy h2 { font-size: 30px; }
  .hm-copy p { font-size: 15px; color: var(--hm-gray); margin-bottom: 20px; opacity: 1; }
  html[lang="ar"] .hm-copy p { font-size: 16px; max-width: none; }
  .hm-btn { padding: 13px 22px; }
  .hm-btn.is-line { border-color: var(--hm-gray); color: var(--hm-ink); }
  .hm-btn.is-line:hover { background: rgba(32, 36, 42, .06); color: var(--hm-ink); }
  .hm-ctrl {
    left: 16px; right: 16px; top: auto; bottom: 16px; transform: none; justify-content: center; white-space: nowrap;
    background: rgba(20, 24, 28, .16); border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  }
  .hm-arrow { display: none; }
  .hm-copy.is-pin .hm-mob { display: block; }
  .hm-copy.is-pin .hm-eyebrow.hm-mob { display: flex; }
  .hm-copy.is-pin .hm-btn.hm-mob { display: inline-block; }
  .hm-bar { width: 10px; }
  .hm-bar.is-active { width: 22px; }
  .hm-bar span { background: rgba(255, 255, 255, .55); box-shadow: 0 0 2px rgba(0, 0, 0, .35); }
}

/* --------------------------------------------------------------------------
   Trust strip
   -------------------------------------------------------------------------- */
.hm-trust { background: var(--hm-sage); }
.hm-trust .hm-in { max-width: 1300px; margin: 0 auto; padding: 22px 7%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hm-trust .hm-in > div { display: flex; flex-direction: column; gap: 3px; }
.hm-trust b { font-size: 20px; font-weight: 700; color: var(--hm-ink); line-height: 1.3; }
html[lang="ar"] .hm-trust b { font-weight: 600; }
.hm-trust span { font-size: 13px; color: var(--hm-gray); line-height: 1.4; }
html[lang="ar"] .hm-trust span { font-size: 14px; }
.hm-trust b .hm-num { color: var(--hm-ink); font-size: 1em; font-weight: 700; }

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */
.hm-sec { max-width: 1300px; margin: 0 auto; padding: 64px 7%; }
.hm-sec h2 { font-size: 30px; font-weight: 700; color: var(--hm-ink); margin: 0 0 6px; }
html[lang="ar"] .hm-sec h2 { font-weight: 600; }
.hm-sec .hm-lead { color: var(--hm-gray); margin: 0 0 30px; font-size: 15px; }
html[lang="ar"] .hm-sec .hm-lead { font-size: 16px; }
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hm-card { border-radius: 14px; overflow: hidden; background: #F4F6F5; position: relative; aspect-ratio: 4 / 3; display: block; }
.hm-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hm-card:hover img { transform: scale(1.04); }
.hm-card .hm-lab {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 18px 16px;
  background: linear-gradient(0deg, rgba(20, 24, 28, .75), rgba(20, 24, 28, 0));
  color: #fff; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
}
html[lang="ar"] .hm-card .hm-lab { font-weight: 600; }
.hm-card .hm-lab small { font-weight: 500; font-size: 12px; opacity: .85; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Royal band
   -------------------------------------------------------------------------- */
.hm-royal { background: var(--hm-char); color: #fff; }
.hm-royal .hm-in { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; }
.hm-royal .hm-rt { padding: 60px 7%; }
.hm-royal .hm-eyebrow { color: var(--hm-gold-2); }
.hm-royal .hm-eyebrow::before { background: var(--hm-gold); }
.hm-royal h2 { font-size: 36px; margin: 14px 0; font-weight: 700; color: #fff; line-height: 1.2; }
html[lang="ar"] .hm-royal h2 { font-weight: 600; line-height: 1.4; }
.hm-royal p { color: #CFCFCF; line-height: 1.6; max-width: 460px; font-size: 15px; }
html[lang="ar"] .hm-royal p { font-size: 16px; }
.hm-royal .hm-btns { margin-top: 24px; }
.hm-royal .hm-btn.is-fill { background: var(--hm-gold); color: var(--hm-char); }
.hm-royal .hm-btn.is-fill:hover { background: var(--hm-gold-2); }
.hm-royal .hm-btn.is-line { border: 1.5px solid var(--hm-gold); color: var(--hm-gold-2); }
.hm-royal .hm-btn.is-line:hover { background: rgba(201, 174, 114, .12); }
.hm-royal img { width: 100%; height: auto; }

@media (max-width: 767px) {
  .hm-trust .hm-in { grid-template-columns: 1fr 1fr; padding: 20px 22px; gap: 16px; }
  .hm-sec { padding: 44px 18px; }
  .hm-sec h2 { font-size: 24px; }
  .hm-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hm-card { aspect-ratio: 1 / 1; }
  .hm-card .hm-lab { font-size: 14px; padding: 26px 12px 11px; }
  .hm-card .hm-lab small { display: none; }
  .hm-royal .hm-in { grid-template-columns: 1fr; }
  .hm-royal .hm-rt { padding: 40px 22px 10px; }
  .hm-royal h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-layer, .hm-copy, .hm-stage::after, .hm-card img { transition: none; }
}

/* Arabic home page: the product gallery uses the brand Arabic font with Western digits
   (GE Thameen alone would draw 0-9 as Arabic-Indic digits) */
html[lang="ar"] .gtg[data-lang="ar"],
html[lang="ar"] .gtg-lb[dir="rtl"] { font-family: "GTAr", "Montserrat", "Segoe UI", Arial, sans-serif; }
