/* =====================================================================
   EXTRAS  |  تصميم الميزات الإضافية
   ===================================================================== */
.open-now { font-weight: 700; color: var(--mute); margin-bottom: 6px; }
.open-now.on { color: #1a9c4b; }

.to-top {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 20px; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.to-top[hidden] { display: none; }

.reveal { opacity: 0; translate: 0 16px; transition: opacity .5s ease, translate .5s ease, transform .15s; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; } }

/* ---------- Home hero: gym photos behind the text | الهيرو بصور الجيم ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  min-height: clamp(420px, 68svh, 640px);
  text-align: center;
  isolation: isolate;
}
.hero > .hero-bg {
  position: absolute; inset: 0; z-index: -1; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hero > .hero-bg img {
  width: 100%; height: 100%; min-height: 0;
  object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: none; mask-image: none;
}
/* dark layer so the text is always readable + a red glow from the logo color */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(196, 30, 30, .45), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .78) 100%);
}
.hero > .hero-content { padding: 64px 24px; width: 100%; }
.hero h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero p { max-width: 46ch; margin: 16px auto 26px; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .btn-ghost { color: var(--on-dark); border-color: rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .25); }
.paths { margin: 26px 0 8px; }
@media (max-width: 900px) {
  .hero > .hero-bg { grid-template-columns: repeat(2, 1fr); }
  .hero > .hero-bg img:nth-child(3) { display: none; }
}
@media (max-width: 600px) {
  .hero { min-height: clamp(380px, 62svh, 520px); }
  .hero > .hero-bg { grid-template-columns: 1fr; }
  .hero > .hero-bg img:nth-child(n+2) { display: none; }
  .hero > .hero-content { padding: 44px 18px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Logo | اللوجو ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; flex: none; }

/* ---------- Tools: timer, tracker, hints, share ---------- */
button.chip { font: inherit; color: var(--ink); cursor: pointer; }
.timer-time { font-family: var(--font-heading); font-size: 72px; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.timer .contact-actions { margin-top: 14px; }
.chart { width: 100%; height: auto; display: block; }
.chart polyline { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; }
.chart circle { fill: var(--accent); }
#logChart { margin-top: 12px; }
.hint { font-size: 14px; color: var(--mute); margin-top: -4px; }
.plan.pop .hint { color: var(--bg); opacity: .85; }

/* ---------- Hours status + copy address ---------- */
#openNow .open-now { display: block; margin: 0 0 6px; }
.linkbtn { font: inherit; font-weight: 700; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Language button + Arabic (RTL) mode | زرار اللغة ووضع العربي ---------- */
.lang-btn { font-size: 16px; font-weight: 700; font-family: "Cairo", system-ui, sans-serif; }
html[lang="ar"] { --font-body: Cairo, system-ui, sans-serif; --font-heading: Cairo, system-ui, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .logo { letter-spacing: 0; }
html[lang="ar"] .logo { direction: ltr; }
html[lang="ar"] .timer-time, html[lang="ar"] .chart { direction: ltr; }
html[lang="ar"] .ribbon { right: auto; left: 16px; }

/* ---------- Hero: single coach photo as background | صورة الكوتش خلفية الهيرو ---------- */
.hero > .hero-bg { grid-template-columns: 1fr; }
.hero > .hero-bg img { object-position: 50% 38%; }
@media (max-width: 900px) { .hero > .hero-bg { grid-template-columns: 1fr; } }
.hero::after {
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(196, 30, 30, .35), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .6) 100%);
}
