/* ==========================================================================
   HANNOVER FACILITIES MANAGEMENT — SHARED LIQUID GLASS DESIGN SYSTEM
   100% REM-Based Units · Full Bilingual LTR/RTL · 7-Layer Responsive System
   Official Brand Palette: Gold (#eaa935), Cyan (#1898bf), Slate (#737374)
   ========================================================================== */

:root {
  --gold: #eaa935;
  --gold-light: #f6c85f;
  --cyan: #1898bf;
  --cyan-light: #38bdf8;
  --slate-brand: #737374;
  --glass-bg-top: rgba(82, 73, 56, 0.68);
  --glass-bg-mid: rgba(63, 56, 44, 0.74);
  --glass-bg-bot: rgba(73, 65, 50, 0.70);
  --glass-border: rgba(255, 248, 232, 0.24);
  --card-bg: rgba(255, 250, 240, 0.09);
  --card-bg-hover: rgba(255, 250, 240, 0.15);
  --card-border: rgba(255, 255, 255, 0.15);
  --blur-strength: 1.875rem;
  --window-radius: 1.75rem;
  --card-radius: 1.125rem;
  --container-max: 82rem;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 1rem;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f9f6f0;
  background-color: #231e17;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   RTL (ARABIC) TYPOGRAPHY & DIRECTIONAL MIRRORING
   ========================================================================== */
html[dir="rtl"] body {
  font-family: 'Tajawal', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0 !important;
}

html[dir="rtl"] [class*="tracking-"] {
  letter-spacing: 0 !important;
}

html[dir="rtl"] .text-left {
  text-align: right;
}

html[dir="rtl"] .sm\:text-right {
  text-align: left;
}

.ltr-num,
[dir="ltr"],
input[type="tel"] {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

.ltr-num {
  display: inline-block;
  text-align: left;
}

.dir-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

html[dir="rtl"] .dir-arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] #spatial-dock {
  left: auto;
  right: 0.875rem;
}

html[dir="rtl"] .watermark-emblem {
  right: auto;
  left: -2.5rem;
}

html[dir="rtl"] #glass-toast {
  right: auto;
  left: 1.25rem;
}

html[dir="rtl"] .badge-pos-start {
  left: auto;
  right: 0.625rem;
}

html[dir="rtl"] .hero-callout-start {
  left: auto;
  right: 0.25rem;
}

html[dir="rtl"] .hero-callout-end {
  right: auto;
  left: 0.25rem;
}

html[dir="rtl"] .-space-x-1\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
}

/* ==========================================================================
   FIXED ARCHITECTURAL ENVIRONMENT BACKGROUND
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("bg-lobby.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: background-image 0.55s ease-in-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.ambient-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 15%, rgba(234, 169, 53, 0.15), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(24, 152, 191, 0.13), transparent 50%),
    linear-gradient(180deg, rgba(28, 23, 16, 0.30) 0%, rgba(28, 23, 16, 0.48) 100%);
  pointer-events: none;
}

/* ==========================================================================
   LIQUID GLASS OUTER SPATIAL WINDOW
   ========================================================================== */
.glass-window {
  position: relative;
  border-radius: var(--window-radius);
  background: linear-gradient(145deg, var(--glass-bg-top) 0%, var(--glass-bg-mid) 52%, var(--glass-bg-bot) 100%);
  backdrop-filter: blur(var(--blur-strength)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(165%);
  border: 0.0625rem solid var(--glass-border);
  box-shadow:
    0 2.125rem 4.6875rem -0.9375rem rgba(0, 0, 0, 0.62),
    0 0 0 0.0625rem rgba(0, 0, 0, 0.18),
    inset 0 0.09375rem 0.0625rem rgba(255, 255, 255, 0.38),
    inset 0 -0.09375rem 0.0625rem rgba(255, 255, 255, 0.10);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease, border-color 0.35s ease;
}

/* Dynamic Liquid Specular Sheen inside windows */
.glass-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    43.75rem circle at var(--mx, 50%) var(--my, 20%),
    rgba(255, 250, 235, 0.14),
    rgba(234, 169, 53, 0.05) 35%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Chromatic Liquid Edge Refraction Highlights */
.glass-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--window-radius);
  padding: 0.075rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.48) 0%,
    rgba(234, 169, 53, 0.26) 28%,
    rgba(255, 255, 255, 0.06) 55%,
    rgba(24, 152, 191, 0.28) 82%,
    rgba(255, 255, 255, 0.38) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Enhanced SVG Liquid Refraction Mode */
body.refraction-boost .glass-window {
  --blur-strength: 2.625rem;
  background: linear-gradient(145deg, rgba(88, 78, 60, 0.54) 0%, rgba(58, 52, 41, 0.60) 52%, rgba(72, 63, 49, 0.56) 100%);
  box-shadow:
    0 2.375rem 5.3125rem -0.75rem rgba(0, 0, 0, 0.72),
    0 0 2.375rem -0.375rem rgba(234, 169, 53, 0.26),
    inset 0 0.125rem 0.1875rem rgba(255, 255, 255, 0.58),
    inset 0 -0.125rem 0.1875rem rgba(24, 152, 191, 0.28);
}

body.refraction-boost .ambient-bg {
  filter: url(#liquid-refraction) saturate(1.15);
  transform: scale(1.06);
}

.window-content {
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   INNER LIQUID GLASS CARDS + 3D SPATIAL TILT
   ========================================================================== */
.glass-card {
  position: relative;
  border-radius: var(--card-radius);
  background: linear-gradient(160deg, rgba(255, 252, 245, 0.12) 0%, rgba(255, 252, 245, 0.06) 100%);
  border: 0.0625rem solid var(--card-border);
  box-shadow:
    inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.26),
    0 0.625rem 1.625rem -0.5rem rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  transform-style: preserve-3d;
}

.glass-card-interactive:hover {
  background: linear-gradient(160deg, rgba(255, 252, 245, 0.18) 0%, rgba(255, 252, 245, 0.09) 100%);
  border-color: rgba(255, 255, 255, 0.32);
  transform: perspective(50rem) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-0.1875rem);
  box-shadow:
    inset 0 0.0625rem 0.09375rem rgba(255, 255, 255, 0.42),
    0 1.125rem 2.125rem -0.625rem rgba(0, 0, 0, 0.42);
}

/* Cyan-tinted glass card */
.glass-card-cyan {
  position: relative;
  border-radius: 1.25rem;
  background: linear-gradient(155deg, rgba(24, 152, 191, 0.38) 0%, rgba(19, 98, 128, 0.34) 100%);
  border: 0.0625rem solid rgba(125, 211, 252, 0.34);
  box-shadow:
    inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.32),
    0 1rem 2rem -0.5rem rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(1.125rem);
  -webkit-backdrop-filter: blur(1.125rem);
}

/* Dark floating callout badge */
.glass-card-dark {
  position: relative;
  border-radius: 1.25rem;
  background: linear-gradient(155deg, rgba(58, 54, 46, 0.84) 0%, rgba(42, 39, 33, 0.88) 100%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.28),
    0 1.125rem 2.25rem -0.5rem rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1.25rem);
  -webkit-backdrop-filter: blur(1.25rem);
}

/* Pill / Input Glass Controls */
.glass-pill {
  background: rgba(255, 250, 240, 0.11);
  border: 0.0625rem solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(0.875rem);
  -webkit-backdrop-filter: blur(0.875rem);
  transition: all 0.22s ease;
}

.glass-pill:hover {
  background: rgba(255, 250, 240, 0.19);
  border-color: rgba(255, 255, 255, 0.32);
}

.glass-pill.active-pill {
  background: rgba(234, 169, 53, 0.26);
  border-color: rgba(234, 169, 53, 0.70);
  color: #ffffff;
  box-shadow: 0 0 1.125rem rgba(234, 169, 53, 0.24), inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.38);
}

/* Main Navigation Links */
.nav-page-link {
  padding: 0.45rem 0.9rem;
  border-radius: 62.4375rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  transition: all 0.22s ease;
  white-space: nowrap;
}

.nav-page-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* Mobile menu: the 5 page links always stay on ONE row. Compact pills fit
   phones from about 360px wide; anything narrower scrolls sideways instead of wrapping. */
.mobile-nav-row {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav-row::-webkit-scrollbar {
  display: none;
}
.mobile-nav-row .nav-page-link {
  flex: 0 0 auto;
  padding: 0.42rem 0.6rem;
  font-size: 0.74rem;
}
@media (max-width: 389px) {
  .mobile-nav-row .nav-page-link {
    padding: 0.4rem 0.45rem;
    font-size: 0.7rem;
  }
}

.nav-page-link.active {
  color: #1e1910;
  font-weight: 600;
  background: linear-gradient(180deg, #f5c34d 0%, #eaa935 100%);
  box-shadow: 0 0.25rem 0.875rem rgba(234, 169, 53, 0.4), inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.65);
}

/* Gold CTA Button */
.btn-gold {
  background: linear-gradient(180deg, #f3bc44 0%, #e5a524 100%);
  color: #1e1910;
  font-weight: 600;
  border: 0.0625rem solid rgba(255, 242, 200, 0.65);
  box-shadow:
    0 0.5rem 1.25rem -0.25rem rgba(234, 169, 53, 0.45),
    inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.65);
  transition: all 0.22s ease;
}

.btn-gold:hover {
  background: linear-gradient(180deg, #f7c75b 0%, #eaa935 100%);
  transform: translateY(-0.0625rem);
  box-shadow:
    0 0.75rem 1.5rem -0.25rem rgba(234, 169, 53, 0.6),
    inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.8);
}

/* Cyan Secondary Button */
.btn-cyan {
  background: linear-gradient(180deg, rgba(24, 152, 191, 0.35) 0%, rgba(16, 118, 150, 0.42) 100%);
  border: 0.0625rem solid rgba(56, 189, 248, 0.5);
  color: #f0f9ff;
  font-weight: 500;
  box-shadow: inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.3), 0 0.5rem 1.25rem -0.375rem rgba(24, 152, 191, 0.35);
  transition: all 0.22s ease;
}

.btn-cyan:hover {
  background: linear-gradient(180deg, rgba(24, 152, 191, 0.5) 0%, rgba(16, 118, 150, 0.58) 100%);
  border-color: rgba(125, 211, 252, 0.75);
  transform: translateY(-0.0625rem);
}

/* WhatsApp Glass Button */
.btn-whatsapp {
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.26) 0%, rgba(18, 140, 126, 0.28) 100%);
  border: 0.0625rem solid rgba(74, 222, 128, 0.45);
  color: #ecfdf5;
  box-shadow: inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.3), 0 0.5rem 1.25rem -0.375rem rgba(16, 185, 129, 0.32);
  transition: all 0.22s ease;
}

.btn-whatsapp:hover {
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.38) 0%, rgba(18, 140, 126, 0.42) 100%);
  border-color: rgba(134, 239, 172, 0.7);
  transform: translateY(-0.0625rem);
}

/* Custom Range Slider */
input[type="range"].glass-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.375rem;
  border-radius: 62.4375rem;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

input[type="range"].glass-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #eaa935;
  border: 0.125rem solid #fff8e7;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

/* Custom Select Dropdown Chevron with Balanced Spacing (LTR & RTL) */
select:not(#schedule-filter) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f5c34d' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 0.9375rem 0.9375rem;
  background-position: right 0.875rem center;
  padding-right: 2.375rem !important;
  cursor: pointer;
}

html[dir="rtl"] select:not(#schedule-filter) {
  background-position: left 0.875rem center;
  padding-right: 0.875rem !important;
  padding-left: 2.375rem !important;
}

/* VisionOS Window Grab Handle */
.window-grab-bar {
  width: 5.75rem;
  height: 0.3125rem;
  border-radius: 62.4375rem;
  background: rgba(255, 255, 255, 0.36);
  margin: 0.875rem auto 0;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);
  transition: width 0.25s ease, background 0.25s ease;
}

.window-wrapper:hover .window-grab-bar {
  width: 7.25rem;
  background: rgba(255, 255, 255, 0.55);
}

/* Floating Spatial Dock */
.spatial-dock {
  background: linear-gradient(180deg, rgba(72, 64, 50, 0.78) 0%, rgba(52, 46, 36, 0.84) 100%);
  backdrop-filter: blur(1.625rem) saturate(170%);
  -webkit-backdrop-filter: blur(1.625rem) saturate(170%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 1.25rem 2.5rem -0.625rem rgba(0, 0, 0, 0.6),
    inset 0 0.0625rem 0.03125rem rgba(255, 255, 255, 0.35);
}

.dock-btn {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 62.4375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.68);
  transition: all 0.22s ease;
  position: relative;
}

.dock-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.dock-btn.active {
  color: #1e1910;
  background: linear-gradient(180deg, #f5c34d 0%, #eaa935 100%);
  box-shadow: inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.6), 0 0.25rem 0.75rem rgba(234, 169, 53, 0.4);
}

/* Preloader Splash Screen */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 45%, rgba(44, 52, 62, 0.94) 0%, rgba(25, 30, 36, 0.98) 100%);
  backdrop-filter: blur(1.75rem);
  -webkit-backdrop-filter: blur(1.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
}

#splash-screen.hidden-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-progress-track {
  width: 9.375rem;
  height: 0.1875rem;
  border-radius: 62.4375rem;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-top: 1rem;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 62.4375rem;
  background: linear-gradient(90deg, #eaa935 0%, #1898bf 100%);
  animation: loadProgress 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes loadProgress {
  0% { width: 10%; }
  60% { width: 82%; }
  100% { width: 100%; }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0rem); }
  50% { transform: translateY(-0.3125rem); }
}

.float-badge-1 { animation: floatSlow 4.5s ease-in-out infinite; }
.float-badge-2 { animation: floatSlow 5.2s ease-in-out 0.6s infinite; }
.float-badge-3 { animation: floatSlow 4.8s ease-in-out 1.2s infinite; }

/* Main Spatial Container Layout */
.spatial-main-container {
  width: 82%;
  max-width: var(--container-max);
  margin-inline: auto;
}

/* ==========================================================================
   7-LAYER RESPONSIVE SCREEN ARCHITECTURE (ALL REM UNITS)
   Layer 1 (xs):  0rem    – 29.9375rem (Compact Mobile)
   Layer 2 (sm):  30rem   – 39.9375rem (Standard Mobile / Phablet)
   Layer 3 (md):  40rem   – 47.9375rem (Portrait Tablet)
   Layer 4 (lg):  48rem   – 63.9375rem (Landscape Tablet / Small Laptop)
   Layer 5 (xl):  64rem   – 79.9375rem (Standard Desktop / Laptop)
   Layer 6 (2xl): 80rem   – 95.9375rem (Large Widescreen Desktop)
   Layer 7 (3xl): >= 96rem             (Ultra-Wide / 32in 2K & 4K Display)
   ========================================================================== */

/* Layer 1: Compact Mobile (< 30rem) */
@media (max-width: 29.9375rem) {
  html {
    font-size: 0.84375rem;
  }
  :root {
    --window-radius: 1.25rem;
    --card-radius: 0.9375rem;
    --container-max: 100%;
  }
  .spatial-main-container {
    width: 94%;
  }
  .hero-emblem-stage {
    flex-direction: column;
    gap: 0.75rem;
    min-height: auto !important;
  }
  .hero-callout-float {
    position: static !important;
    transform: none !important;
    width: 100% !important;
  }
}

/* Layer 2: Standard Mobile / Phablet (30rem – 39.9375rem) */
@media (min-width: 30rem) and (max-width: 39.9375rem) {
  html {
    font-size: 0.875rem;
  }
  :root {
    --window-radius: 1.375rem;
    --card-radius: 1rem;
    --container-max: 100%;
  }
  .spatial-main-container {
    width: 92%;
  }
}

/* Layer 3: Portrait Tablet (40rem – 47.9375rem) */
@media (min-width: 40rem) and (max-width: 47.9375rem) {
  html {
    font-size: 0.90625rem;
  }
  :root {
    --window-radius: 1.5rem;
    --card-radius: 1.0625rem;
    --container-max: 45rem;
  }
  .spatial-main-container {
    width: 90%;
  }
}

/* Layer 4: Landscape Tablet / Compact Laptop (48rem – 63.9375rem) */
@media (min-width: 48rem) and (max-width: 63.9375rem) {
  html {
    font-size: 0.9375rem;
  }
  :root {
    --window-radius: 1.625rem;
    --card-radius: 1.125rem;
    --container-max: 60rem;
  }
  .spatial-main-container {
    width: 88%;
  }
}

/* Layer 5: Standard Laptop / Desktop (64rem – 79.9375rem) */
@media (min-width: 64rem) and (max-width: 79.9375rem) {
  html {
    font-size: 0.9375rem;
  }
  :root {
    --window-radius: 1.75rem;
    --card-radius: 1.125rem;
    --container-max: 72rem;
  }
  .spatial-main-container {
    width: 85%;
  }
}

/* Layer 6: Large Widescreen Desktop (80rem – 95.9375rem) */
@media (min-width: 80rem) and (max-width: 95.9375rem) {
  html {
    font-size: 0.9375rem;
  }
  :root {
    --window-radius: 1.75rem;
    --card-radius: 1.1875rem;
    --container-max: 78rem;
  }
  .spatial-main-container {
    width: 82%;
  }
}

/* Layer 7: Ultra-Wide / 32in 2K & 4K Spatial Display (>= 96rem) */
@media (min-width: 96rem) {
  html {
    font-size: 0.96875rem;
  }
  :root {
    --window-radius: 1.875rem;
    --card-radius: 1.25rem;
    --container-max: 84rem;
  }
  .spatial-main-container {
    width: 80%;
  }
}

@media print {
  .spatial-dock, #splash-screen, .window-grab-bar {
    display: none !important;
  }
}

/* ==========================================================================
   HOME HERO, RIGHT COLUMN: TEAM CARD + "UPCOMING SHIFTS" TIMELINE
   Markup: index.html, inside .hero-tl. Dates, data-shift-day and the next
   shift pill are filled by site.js ("Live schedule dates").
   - The layout follows the column's own width (container queries), because
     the column is narrow on phones AND beside the hero card at 768px:
       under 410px  (phones, 768px): team card in two rows; each timeline
                    row stacks title, sub, then time + staff
       410px+       (900-1279px): team card in one row with an icon-only
                    WhatsApp button; time + staff become a column beside
                    the chevron, aligned across rows
       560px+       (1280px+): WhatsApp label back; the buttons grow into
                    the row so no empty band is left
     The heights are tuned so that, beside the hero card, both columns stay
     about the same height.
   - Spacing is in px on a 4px rhythm (the root font is 13.5px on phones, so
     rem steps would land off the grid). Type stays in rem, on the site scale.
   - Touch targets are at least 40px tall. Hover tints only apply where a
     pointer can hover, so a tap on iOS leaves no stuck tint; taps get an
     :active state instead.
   ========================================================================== */
.hero-tl {
  container: hero-tl / inline-size;
  --tl-ring: rgba(246, 200, 95, 0.85);
}

/* --- Your on-site team ---------------------------------------------------- */
.hero-tl .hero-team {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.hero-tl .hero-team-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hero-tl .hero-team-photo {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  overflow: hidden;
  background: #e7e5e4;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
}

.hero-tl .hero-team-sub {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

.hero-tl .hero-team-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-tl .hero-team-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.hero-tl #hero-whatsapp-btn {
  font-weight: 500;
}

.hero-tl .hero-team-ico {
  flex: none;
  width: 16px;
  height: 16px;
}

.hero-tl .hero-team-btn:active {
  transform: scale(0.97);
}

.hero-tl .hero-team-btn:focus-visible {
  outline: 2px solid var(--tl-ring);
  outline-offset: 2px;
}

/* --- Upcoming shifts: card + status row (clock, next shift) --------------- */
.hero-tl .hero-week {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.hero-tl .hero-week-status {
  display: flex;
  flex-wrap: wrap; /* only with very large text: the next pill drops a line */
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hero-tl .hero-clock-pill,
.hero-tl .hero-next-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.hero-tl .hero-clock-pill {
  flex: none;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 250, 240, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-tl #amman-clock {
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.hero-tl .hero-live-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}

@keyframes heroLivePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22); }
  50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-tl .hero-live-dot {
    animation: heroLivePulse 2.4s ease-in-out infinite;
  }
}

/* Next shift: a 24px pill with a 40px tap area (the ::before overhang) */
.hero-tl .hero-next-pill {
  position: relative;
  min-width: 0;
  padding: 0 8px 0 10px;
  color: #ffffff;
  background: rgba(234, 169, 53, 0.16);
  box-shadow: inset 0 0 0 1px rgba(246, 200, 95, 0.42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease;
}

html[dir="rtl"] .hero-tl .hero-next-pill {
  padding: 0 10px 0 8px;
}

.hero-tl .hero-next-pill::before {
  content: "";
  position: absolute;
  inset: -8px -2px;
}

.hero-tl .hero-next-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fcd34d;
}

.hero-tl .hero-next-when {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* The title shows once the column has room (below); until then screen
   readers still get it, and row 1 right below shows it on screen. */
.hero-tl .hero-next-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hero-tl .hero-next-chev {
  flex: none;
  width: 10px;
  height: 10px;
  color: #fcd34d;
}

.hero-tl .hero-next-pill:active {
  background-color: rgba(234, 169, 53, 0.28);
}

.hero-tl .hero-next-pill:focus-visible {
  outline: 2px solid var(--tl-ring);
  outline-offset: 2px;
}

/* --- Title row + filter ----------------------------------------------------- */
/* 12px: the next pill's 8px tap overhang ends exactly where the filter's
   4px tap overhang begins, so neither steals the other's taps. */
.hero-tl .hero-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

/* Filter pill: 32px on screen inside a 40px tap area (4px transparent
   border; the negative margins keep the row 32px tall and line the pill up
   with the card edge). Exactly one chevron: ours. The real <select> lies
   invisible on top of the whole 40px box with 16px text, so iOS Safari never
   zooms in when it is tapped, while the pill shows the label at the site's
   small size (.hero-filter-text, kept in sync by site.js). */
.hero-tl .hero-filter {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  max-width: 62%;
  height: 40px;
  margin-block: -4px;
  margin-inline-end: -4px;
  padding-inline: 12px 28px;
  border: 4px solid transparent;
  border-radius: 9999px;
  background-color: rgba(255, 250, 240, 0.08);
  background-clip: padding-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f5c34d' stroke-width='2.6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px 12px;
  background-position: right 10px center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

html[dir="rtl"] .hero-tl .hero-filter {
  background-position: left 10px center;
}

/* Own line height: the clip box (overflow, for the ellipsis) must hold the
   descenders and the Arabic dots, which line-height 1 would cut off. The
   pill height stays fixed by .hero-filter. */
.hero-tl .hero-filter-text {
  min-width: 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-tl #schedule-filter {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 9999px;
  opacity: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.hero-tl #schedule-filter::-ms-expand {
  display: none;
}

.hero-tl .hero-filter:has(> #schedule-filter:focus-visible) {
  box-shadow: inset 0 0 0 2px var(--tl-ring);
}

@supports not selector(:has(*)) {
  .hero-tl .hero-filter:focus-within {
    box-shadow: inset 0 0 0 2px var(--tl-ring);
  }
}

/* --- Timeline list -------------------------------------------------------------
   One grid for the whole list; each row is a subgrid, so the date chips share
   one width (the widest weekday) and the rail stays straight in any language
   or font size. Rows share spare height (lg, beside the hero card) only while
   all of them are shown; filtered rows sit at the top at their own height. */
.hero-tl .hero-tl-list {
  --tl-row-pad: 6px;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: [chip] auto [rail] 16px [body] minmax(0, 1fr) [chev] auto;
  column-gap: 8px;
  /* rows bleed into the card padding so their content lines up with the header */
  margin: 8px -8px -8px;
}

.hero-tl .hero-tl-list:has(> .shift-card.hidden) {
  align-content: start;
}

/* Two-column hero (768px+): keep the card height while filtering, so the
   hero card beside it and the page below do not jump. site.js sets
   --tl-lock to the list height with every row shown. */
@media (min-width: 48rem) {
  .hero-tl .hero-tl-list {
    min-height: var(--tl-lock, 0px);
  }
}

.hero-tl .tl-entry {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: auto auto;
  /* stretch, not center: when rows share spare height the tracks grow, so the
     rail spans the whole content box and meets the next row's rail. The
     content still sits centred (body hugs the end of track 1, meta the start
     of track 2). */
  align-content: stretch;
  align-items: center;
  row-gap: 4px;
  min-height: 56px;
  padding: var(--tl-row-pad) 8px;
  border-radius: 14px;
  text-align: start;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease;
}

/* No subgrid (Chrome/Edge < 117, Safari < 16, older WebViews): each row is
   its own grid. The row children are placed by line name, so the fallback
   must declare the same names; a missing name sends a child to an implicit
   track and the whole row piles up in one column. The chips then size per
   row (48px minimum) instead of sharing the widest one. */
@supports not (grid-template-columns: subgrid) {
  .hero-tl .tl-entry {
    grid-template-columns: [chip] minmax(48px, auto) [rail] 16px [body] minmax(0, 1fr) [chev] auto;
    column-gap: 8px;
  }
}

/* the schedule filter toggles Tailwind's .hidden; keep it winning over display:grid */
.hero-tl .shift-card.hidden {
  display: none !important;
}

.hero-tl .tl-entry:active {
  background-color: rgba(255, 250, 240, 0.1);
}

.hero-tl .tl-entry:focus-visible {
  outline: 2px solid var(--tl-ring);
  outline-offset: -2px;
}

/* Date chip: weekday / day / month in 3 lines on narrow columns; weekday
   over "day month" on wide ones (below) */
.hero-tl .tl-date {
  grid-column: chip;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  min-height: 48px; /* grows with its text (Arabic at 768-1023px needs it) */
  padding: 4px 6px;
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  line-height: 1;
  white-space: nowrap;
}

.hero-tl .tl-wd {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.62);
}

.hero-tl .tl-dm {
  display: contents;
}

.hero-tl .tl-dnum {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.hero-tl .tl-mon {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

/* Rail: one thin line through the visible rows, broken around each dot */
.hero-tl .tl-rail {
  grid-column: rail;
  grid-row: 1 / -1;
  align-self: stretch;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-tl .tl-rail::before,
.hero-tl .tl-rail::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
}

.hero-tl .tl-rail::before {
  top: calc(var(--tl-row-pad) * -1);
  bottom: calc(50% + 10px);
}

.hero-tl .tl-rail::after {
  top: calc(50% + 10px);
  bottom: calc(var(--tl-row-pad) * -1);
}

/* top half only when a visible row comes before; bottom half only when one comes after */
.hero-tl .shift-card:not(.hidden) ~ .shift-card:not(.hidden) .tl-rail::before {
  opacity: 1;
}

.hero-tl .shift-card:not(.hidden):has(~ .shift-card:not(.hidden)) .tl-rail::after {
  opacity: 1;
}

@supports not selector(:has(*)) {
  .hero-tl .shift-card:not(:last-child) .tl-rail::after {
    opacity: 1;
  }
}

.hero-tl .tl-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: currentColor;
}

.hero-tl .tl-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.22;
}

/* Row text: title + sub, then time + staff */
.hero-tl .tl-body {
  grid-column: body;
  grid-row: 1;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hero-tl .tl-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}

.hero-tl .tl-sub {
  font-size: 0.75rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.64);
  text-wrap: balance;
}

/* time and staff wrap as whole items, so nothing is left hanging */
.hero-tl .tl-meta {
  grid-column: body;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.hero-tl .tl-time {
  color: rgba(255, 255, 255, 0.84);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-tl .tl-staff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.hero-tl .tl-staff-ico {
  flex: none;
  width: 13px;
  height: 13px;
}

.hero-tl .tl-chev {
  grid-column: chev;
  grid-row: 1 / -1;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
}

/* Next shift (first card): amber tint, ring and date chip */
.hero-tl .tl-entry.tl-next {
  background-color: rgba(234, 169, 53, 0.12);
  box-shadow: inset 0 0 0 1px rgba(246, 200, 95, 0.34);
}

.hero-tl .tl-entry.tl-next:active {
  background-color: rgba(234, 169, 53, 0.22);
}

.hero-tl .tl-next .tl-date {
  background: rgba(234, 169, 53, 0.18);
  box-shadow: inset 0 0 0 1px rgba(246, 200, 95, 0.45);
}

.hero-tl .tl-next .tl-wd,
.hero-tl .tl-next .tl-mon {
  color: #fcd34d;
}

/* --- Hover: only where a pointer can hover --------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .hero-tl .tl-entry:hover {
    background-color: rgba(255, 250, 240, 0.07);
  }
  .hero-tl .tl-entry.tl-next:hover {
    background-color: rgba(234, 169, 53, 0.18);
  }
  .hero-tl .tl-entry:hover .tl-chev {
    color: rgba(255, 255, 255, 0.85);
  }
  .hero-tl .hero-next-pill:hover {
    background-color: rgba(234, 169, 53, 0.24);
  }
  .hero-tl .hero-filter:hover {
    background-color: rgba(255, 250, 240, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  }
}

/* --- Narrowest phones (viewport up to about 354px) -------------------------------
   The whole row is the button and the chevron is aria-hidden decoration, so
   its 22px (icon + gap) goes to the text, and the rail track narrows to 12px
   (the 16px dot halo just overlaps the gaps). Without this the second subtitle
   and the Arabic meta line wrap, and the three rows stop matching in height. */
@container hero-tl (max-width: 299px) {
  .hero-tl .hero-tl-list {
    grid-template-columns: [chip] auto [rail] 12px [body] minmax(0, 1fr) [chev];
  }
  .hero-tl .tl-chev {
    display: none;
  }
  @supports not (grid-template-columns: subgrid) {
    .hero-tl .tl-entry {
      grid-template-columns: [chip] minmax(48px, auto) [rail] 12px [body] minmax(0, 1fr) [chev];
    }
  }
}

/* --- Wider columns ------------------------------------------------------------ */
@container hero-tl (min-width: 400px) {
  .hero-tl .hero-next-title {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    color: rgba(255, 255, 255, 0.8);
  }
  .hero-tl .hero-next-title::before {
    content: "\00b7";
    margin-inline-end: 6px;
    color: rgba(255, 255, 255, 0.45);
  }
}

@container hero-tl (min-width: 410px) {
  /* Team card in one row; WhatsApp keeps only its icon (the label stays for
     screen readers) so both buttons fit beside the text. */
  .hero-tl .hero-team {
    flex-direction: row;
    align-items: center;
  }
  .hero-tl .hero-team-id {
    flex: 0 1 auto;
  }
  .hero-tl .hero-team-actions {
    display: flex;
    flex: none;
    margin-inline-start: auto;
  }
  .hero-tl .hero-team-btn {
    padding: 0 14px;
  }
  .hero-tl .hero-team-wa {
    width: 40px;
    padding: 0;
  }
  .hero-tl .hero-wa-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Timeline rows on one line: time + staff become a column beside the
     chevron (aligned across rows), on the same end edge as the filter and the
     next pill; the spare width goes to the text column, not to a void before
     a lone chevron. */
  .hero-tl .hero-tl-list {
    --tl-row-pad: 8px;
    grid-template-columns: [chip] auto [rail] 16px [body] minmax(0, 1fr) [meta] auto [chev] auto;
  }
  .hero-tl .tl-date {
    min-height: 40px;
  }
  .hero-tl .tl-dm {
    display: flex;
    align-items: baseline;
    gap: 3px;
  }
  .hero-tl .tl-entry {
    grid-template-rows: auto;
  }
  .hero-tl .tl-body {
    align-self: center;
  }
  .hero-tl .tl-meta {
    grid-column: meta;
    grid-row: 1;
    align-self: center;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-inline-start: 24px; /* minimum gutter after the longest text */
  }
  /* no-subgrid fallback (see the list above): the meta track needs its name too */
  @supports not (grid-template-columns: subgrid) {
    .hero-tl .tl-entry {
      grid-template-columns: [chip] minmax(48px, auto) [rail] 16px [body] minmax(0, 1fr) [meta] auto [chev] auto;
    }
  }
}

/* WhatsApp label back; both buttons grow into the row (capped) so no empty
   band is left between the text and the buttons. The 24px gap keeps the
   growing buttons off the title (only from 560px: at 410-559px the icon-only
   pair needs the room). */
@container hero-tl (min-width: 560px) {
  .hero-tl .hero-team {
    column-gap: 24px;
  }
  .hero-tl .hero-team-actions {
    flex: 1 1 auto;
    max-width: 360px;
  }
  .hero-tl .hero-team-btn {
    flex: 1 1 0;
    padding: 0 16px;
  }
  .hero-tl .hero-team-wa {
    width: auto;
  }
  .hero-tl .hero-wa-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}

/* --- Arabic: Tajawal runs small, and letter-spacing breaks letter joining;
   every small text is one step larger than in English --------------------- */
html[dir="rtl"] .hero-tl .tl-wd,
html[dir="rtl"] .hero-tl .hero-next-label {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .hero-tl .tl-wd,
html[dir="rtl"] .hero-tl .tl-mon,
html[dir="rtl"] .hero-tl .hero-clock-pill,
html[dir="rtl"] .hero-tl .hero-next-pill {
  font-size: 0.75rem;
}

html[dir="rtl"] .hero-tl .tl-title {
  font-size: 0.875rem;
}

html[dir="rtl"] .hero-tl .tl-time {
  font-size: 0.75rem;
}

html[dir="rtl"] .hero-tl .tl-sub,
html[dir="rtl"] .hero-tl .tl-meta,
html[dir="rtl"] .hero-tl .hero-team-sub,
html[dir="rtl"] .hero-tl .hero-team-btn,
html[dir="rtl"] .hero-tl .hero-filter {
  font-size: 0.8125rem;
}
/* ===================== END HOME HERO, RIGHT COLUMN ===================== */

/* ==========================================================================
   FORMER PROPOSAL BUTTONS, NOW LINKS TO /contact?service=CODE
   Chrome draws a link's default focus ring 1px further out than a button's;
   keep the button ring. :where() keeps this at zero specificity, so the
   hero's own :focus-visible rules above still win.
   ========================================================================== */
:where(a[data-open-service], a#hero-request-staff-btn, a#calc-apply-btn, a#proj-modal-proposal-btn):focus-visible {
  outline-offset: 0;
}

/* ==========================================================================
   CONTACT US FORM (contact.html, #contact-page-form; logic in site.js
   section 15): result line, fields the server or the form refused,
   the sending state and the hidden honeypot.
   ========================================================================== */
.cp-status[data-tone="ok"] {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 0 0 0.0625rem rgba(110, 231, 183, 0.42);
}

.cp-status[data-tone="error"] {
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.14);
  box-shadow: inset 0 0 0 0.0625rem rgba(252, 165, 165, 0.45);
}

#contact-page-form [aria-invalid="true"] {
  border-color: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 0 0.0625rem rgba(248, 113, 113, 0.55);
}

#cp-submit-btn:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* Honeypot: off screen for people, still in the form for bots. Clipped in
   place rather than pushed far left, so RTL pages get no sideways scroll. */
#contact-page-form .cp-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* ========================== END CONTACT US FORM ========================== */
