@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Tajawal:wght@500;600;700;800&display=swap');

:root {
  /* Real MS Tidal Brand Palette derived from assets/img/logo.jpeg */
  --bg: #0b0e17;
  --bg-panel: #131929;
  --bg-panel-2: #1a2238;
  --bg-card: #151c2e;
  --line: #24304c;
  --line-light: #324164;
  
  /* Primary Accent: Logo Teal ("MS" & "KSA") */
  --teal: #2ca89a;
  --teal-hover: #33baa9;
  --teal-dim: #208a7e;
  --teal-glow: rgba(44, 168, 154, 0.18);
  
  /* Secondary Accent: Logo Electric / Royal Blue (Wave inner arc & "Transport Services") */
  --blue: #1e70eb;
  --blue-hover: #3b82f6;
  --blue-glow: rgba(30, 112, 235, 0.18);
  
  /* Brand Purple: Logo Purple (Top Wave crest & "Tidal") */
  --purple: #5533d1;
  --purple-light: #724ff0;
  --purple-glow: rgba(85, 51, 209, 0.2);
  
  /* Warm Saudi Luxury Accent */
  --gold: #d4a359;
  --gold-light: #e6b86f;
  --gold-glow: rgba(212, 163, 89, 0.18);
  
  /* Core Semantics & Backward Compatibility */
  --primary: var(--teal);
  --primary-hover: var(--teal-hover);
  --lime: var(--teal);
  --lime-dim: var(--teal-dim);
  
  --text: #f0f4f8;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --danger: #ef4444;
  --success: #22c55e;
  
  --radius: 12px;
  --radius-sm: 8px;
  --font-head: 'Cairo', 'Tajawal', 'Space Grotesk', sans-serif;
  --font-body: 'Cairo', 'Tajawal', 'Inter', sans-serif;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.5);
}

html[lang="ar"], html[dir="rtl"] {
  --font-head: 'Cairo', 'Tajawal', sans-serif;
  --font-body: 'Cairo', 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
}

html[lang="en"], html[dir="ltr"] {
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  direction: ltr;
  text-align: left;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, .brand { font-family: var(--font-head); }
a { color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ---- Header & Navigation ---- */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 14, 23, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  padding-top: max(0px, env(safe-area-inset-top));
}

.site-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text);
  min-height: 44px;
}

.brand-logo {
  height: 40px;
  width: auto;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  object-fit: contain;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.brand:hover .brand-logo {
  transform: scale(1.03);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}
.brand-title .brand-ms { color: var(--teal); }
.brand-title .brand-tidal { color: var(--purple-light); }
.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
nav.main-nav a {
  font-size: .90rem;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
}
nav.main-nav a:hover, nav.main-nav a.active {
  color: var(--teal);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: flex;
  gap: 3px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 3px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  min-height: 38px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.lang-btn.active {
  background: var(--teal);
  color: #0b0e17;
}

/* Mobile Hamburger Menu Button */
.menu-toggle {
  display: none;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s ease, background 0.2s ease;
  z-index: 105;
}
.menu-toggle:hover, .menu-toggle:focus {
  border-color: var(--teal);
  outline: none;
}
.menu-toggle .bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.2s ease;
  transform-origin: center;
}
.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--teal);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--teal);
}

/* Mobile Navigation Breakpoint (<= 768px) */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  nav.main-nav {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 16px;
    width: calc(100% - 32px);
    max-width: 380px;
    background: rgba(19, 25, 41, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    display: none;
    z-index: 200;
    animation: navSlideDown 0.2s ease-out;
  }
  nav.main-nav.open {
    display: flex;
  }
  nav.main-nav a {
    font-size: 0.98rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    min-height: 48px;
    border-bottom: 1px solid rgba(36, 48, 76, 0.5);
  }
  nav.main-nav a:last-child {
    border-bottom: none;
  }
  nav.main-nav a:hover, nav.main-nav a.active {
    background: rgba(44, 168, 154, 0.12);
    color: var(--teal);
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  padding: 68px 20px 48px;
  text-align: center;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero h1 em {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 50%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
.hero p {
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

/* ---- Service Switcher Tabs ---- */
.service-tabs {
  display: inline-flex;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--teal-glow);
}

/* ---- Cards / Panels ---- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

/* ---- Search Forms ---- */
.search-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr .8fr auto;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 920px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
}
@media(max-width:880px){ .search-form { grid-template-columns: 1fr 1fr; } }
@media(max-width:540px){ .search-form { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; text-align: start; }
.field label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  font-weight: 700;
}
input, select, textarea {
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 16px; /* Explicit 16px to prevent iOS Safari auto-zoom on focus */
  font-family: var(--font-body);
  min-height: 46px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal);
  color: #0b0e17;
  border: none;
  padding: 12px 22px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .94rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.btn:hover {
  background: var(--teal-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--teal-glow);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(44, 168, 154, 0.05);
}
.btn.primary-blue {
  background: var(--blue);
  color: #ffffff;
}
.btn.primary-blue:hover {
  background: var(--blue-hover);
  box-shadow: 0 6px 18px var(--blue-glow);
}
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Login Screen & Centered Glass Card ---- */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  padding: 40px 16px;
  width: 100%;
}
.login-box {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  position: relative;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .login-wrap {
    min-height: calc(100vh - 120px);
    padding: 24px 12px;
  }
  .login-box {
    padding: 24px 18px;
  }
}
.login-box h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.login-box p {
  color: var(--text-dim);
  font-size: 0.90rem;
  margin: 0 0 20px;
  line-height: 1.5;
}
.login-box .field {
  margin-bottom: 16px;
}
.login-box .btn {
  margin-top: 8px;
}

/* ---- Results & Vehicle Cards ---- */
.trip-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.trip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  flex-wrap: wrap;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.trip-card:hover {
  border-color: var(--line-light);
  transform: translateY(-2px);
}
.vehicle-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 68px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  flex-shrink: 0;
}
.vehicle-media img, .vehicle-media svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.trip-route { font-size: 1.2rem; font-weight: 700; }
.trip-meta { color: var(--text-dim); font-size: .86rem; margin-top: 4px; line-height: 1.45; }
.trip-price { font-size: 1.35rem; font-weight: 700; color: var(--teal); }
.trip-price small { display: block; font-size: .72rem; color: var(--text-dim); font-weight: 500; }

@media (max-width: 640px) {
  .trip-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .trip-card .vehicle-media {
    width: 100%;
    height: 76px;
  }
  .trip-card > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: start !important;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 6px;
    width: 100%;
    gap: 12px;
  }
  .trip-card > div:last-child .btn {
    margin-top: 0 !important;
    flex-shrink: 0;
  }
}

.badge {
  display: inline-block;
  font-size: .72rem;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--text-dim);
}
.badge.gold {
  background: rgba(212, 163, 89, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.badge.blue {
  background: rgba(30, 112, 235, 0.15);
  border-color: var(--blue);
  color: var(--blue-hover);
}
.badge.purple {
  background: rgba(85, 51, 209, 0.15);
  border-color: var(--purple-light);
  color: var(--purple-light);
}

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
@media(max-width:800px){ .checkout-grid { grid-template-columns: 1fr; } }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.summary-row.total { font-weight: 700; font-size: 1.15rem; color: var(--teal); border-bottom: none; padding-top: 14px; }

/* ---- Receipt & Ticket ---- */
.ticket {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  max-width: 540px;
  margin: 24px auto;
  box-shadow: var(--shadow-lg);
  width: 100%;
}
.ticket-head {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ticket-body { padding: 20px; }
.ticket-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .92rem; border-bottom: 1px dashed var(--line); flex-wrap: wrap; gap: 4px; }
.ticket-ref { font-family: monospace; font-size: 1.05rem; letter-spacing: .05em; color: var(--gold); }
.check-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: #0b0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 auto 14px;
  box-shadow: 0 0 20px var(--teal-glow);
}

/* ---- Tables & Mobile Responsive Table Cards ---- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: var(--bg-panel);
}
.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--line-light);
  border-radius: 3px;
}

table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 500px; }
th, td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-panel-2); white-space: nowrap; }
tr:hover td { background: rgba(26, 34, 56, 0.6); }

/* Responsive Card Table for Screens <= 768px */
@media (max-width: 768px) {
  .responsive-card-table {
    min-width: 100% !important;
  }
  .responsive-card-table thead {
    display: none;
  }
  .responsive-card-table,
  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .responsive-card-table tr {
    background: var(--bg-panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .responsive-card-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: end;
    font-size: 0.90rem;
    min-height: 40px;
  }
  .responsive-card-table td:last-child {
    border-bottom: none;
    padding-top: 12px;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }
  .responsive-card-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: start;
    padding-inline-end: 12px;
    flex-shrink: 0;
  }
  .responsive-card-table td button,
  .responsive-card-table td .btn,
  .responsive-card-table td a {
    min-height: 44px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.status-pill { padding: 4px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; display: inline-block; }
.status-pill.confirmed { background: rgba(44, 168, 154, .15); color: var(--teal); border: 1px solid rgba(44, 168, 154, .3); }
.status-pill.boarded, .status-pill.gold { background: rgba(212, 163, 89, .15); color: var(--gold); border: 1px solid rgba(212, 163, 89, .3); }
.status-pill.blue { background: rgba(30, 112, 235, .15); color: var(--blue-hover); border: 1px solid rgba(30, 112, 235, .3); }
.status-pill.danger { background: rgba(239, 68, 68, .15); color: var(--danger); border: 1px solid rgba(239, 68, 68, .3); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.18s ease;
}
.stat-card:hover { border-color: var(--line-light); }
.stat-card .n { font-size: 1.65rem; font-weight: 700; color: var(--teal); font-family: var(--font-head); }
.stat-card .l { font-size: .80rem; color: var(--text-dim); margin-top: 4px; }

/* ---- Autocomplete Suggestions ---- */
.suggest-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 4px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow-md);
}
.suggest-item { padding: 12px 14px; font-size: .88rem; cursor: pointer; border-bottom: 1px solid var(--line); text-align: start; min-height: 44px; display: flex; align-items: center; }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: var(--bg-panel); color: var(--teal); }

/* ---- Contact Page Components ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media(max-width:800px){ .contact-grid { grid-template-columns: 1fr; } }

.contact-card-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  min-height: 52px;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-word;
}
.contact-card-item:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}
.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(44, 168, 154, 0.12);
  border: 1px solid rgba(44, 168, 154, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--teal);
  flex-shrink: 0;
}
.contact-icon-box.whatsapp {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.25);
  color: #25d366;
}
.contact-icon-box.blue {
  background: rgba(30, 112, 235, 0.12);
  border-color: rgba(30, 112, 235, 0.25);
  color: var(--blue-hover);
}
.contact-icon-box.purple {
  background: rgba(85, 51, 209, 0.12);
  border-color: rgba(85, 51, 209, 0.25);
  color: var(--purple-light);
}

#contactMap {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  z-index: 10;
  touch-action: pan-x pan-y pinch-zoom;
}

/* ---- Document Modal / Lightbox ---- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 14, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---- Duration Selector Grid ---- */
.duration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 420px) {
  .duration-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.duration-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 8px;
  min-height: 52px;
  cursor: pointer;
  transition: all .14s ease;
  text-align: center;
  user-select: none;
}
.duration-card:hover { border-color: var(--teal-dim); background: rgba(44, 168, 154, 0.05); }
.duration-card.selected {
  border-color: var(--teal);
  background: rgba(44, 168, 154, 0.14);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
  font-weight: 700;
}
.duration-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  inset-inline-end: max(20px, env(safe-area-inset-right));
  background: var(--bg-panel);
  border: 1px solid var(--teal);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 2000;
  max-width: calc(100vw - 40px);
}
.toast.show { display: block; }

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 28px 20px max(32px, env(safe-area-inset-bottom));
  color: var(--text-dim);
  font-size: .88rem;
  margin-top: 60px;
}
footer.site a { color: var(--teal); text-decoration: none; padding: 4px; }
footer.site a:hover { text-decoration: underline; }

.section-title { font-size: 1.45rem; margin-bottom: 4px; line-height: 1.25; }
.section-sub { color: var(--text-dim); font-size: .92rem; margin-bottom: 20px; line-height: 1.5; }

/* Universal Typography & Non-Destructive Word Wrapping */
html, body, button, input, select, textarea {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.panel, .card, p, h1, h2, h3, h4, span, div, a, label, li {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Badges, Pills and Action Tags should never wrap mid-phrase */
.category-tag,
.badge,
.status-pill,
.pay-badge,
.lang-btn,
.brand,
.brand-text,
.quote-tab-btn,
.tab-btn {
  white-space: nowrap !important;
  flex-shrink: 0;
  overflow-wrap: normal;
  word-break: normal;
}
