/* ============================================================
   styles.css — خلفية بيضاء + نص أسود + تحسينات الموبايل
   ============================================================ */

/* ============ Reset / Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background: #ffffff;
  color: #000000;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: padding-bottom .2s ease;
}
body.has-compare-bar { padding-bottom: 88px; }
img { max-width: 100%; display: block; height: auto; }
a { color: #0e6b4f; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
body.no-scroll { overflow: hidden; }

button, a, input, select, [role="button"] { -webkit-tap-highlight-color: transparent; }
button, .btn, .icon-btn, .page-btn, .nav-link {
  touch-action: manipulation;
  min-height: 44px;
  min-width: 44px;
}

/* ============ Variables ============ */
:root {
  --brand: #0e6b4f;
  --brand-dark: #0a5240;
  --brand-light: #e6f3ee;
  --accent: #d4a017;
  --danger: #c0392b;
  --warning: #e6a700;
  --success: #1e8e5a;
  --text: #000000;
  --text-soft: #333333;
  --muted: #666666;
  --border: #e5e5e5;
  --bg: #ffffff;
  --card: #ffffff;
  --input-bg: #fafafa;
  --hover-bg: #f5f5f5;
  --footer-bg: #0e2420;
  --footer-text: #d8e4e1;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
}

/* ============ Skip Link ============ */
.skip-link {
  position: absolute; top: -40px; inset-inline-start: 0;
  background: var(--brand); color: #fff; padding: 8px 16px;
  z-index: 10000; border-radius: 0 0 8px 0; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ============ Skeleton ============ */
.skeleton {
  background: linear-gradient(90deg, #f1f1f1 25%, #e5e5e5 50%, #f1f1f1 75%);
  background-size: 200% 100%;
  animation: sk 1.5s infinite;
  border-radius: 8px;
}
@keyframes sk {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skeleton-card .sk-img { height: 200px; width: 100%; }
.skeleton-card .sk-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-card .sk-line { height: 14px; }
.skeleton-card .sk-line.w60 { width: 60%; }
.skeleton-card .sk-line.w40 { width: 40%; }
.skeleton-card .sk-line.w80 { width: 80%; }

/* ============ Branded Loading ============ */
.branded-loading {
  display: flex; flex-direction: column; gap: 20px; padding: 8px 0 0;
}
.branded-loading-header {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 24px 16px 8px;
}
.branded-loading-logo {
  width: 64px; height: 64px; object-fit: contain;
  border-radius: 14px; background: #fff; padding: 6px;
  box-shadow: 0 4px 16px rgba(14,107,79,.12);
  animation: brandedPulse 1.6s ease-in-out infinite;
}
.branded-loading-name {
  font-size: 1.5rem; font-weight: 800;
  color: var(--brand-dark); letter-spacing: -.5px;
}
.branded-loading-sub {
  font-size: .92rem; color: var(--muted); font-weight: 500;
}
.branded-loading-bar {
  width: 180px; height: 4px; background: var(--brand-light);
  border-radius: 999px; overflow: hidden; position: relative; margin-top: 4px;
}
.branded-loading-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: brandedBar 1.4s linear infinite;
}
@keyframes brandedPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.94); opacity: .85; }
}
@keyframes brandedBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transform: translateZ(0);
}
.site-header .header-inner {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 8px 16px;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 800; flex-shrink: 0;
}
.logo-img {
  height: 34px; width: auto; max-width: 60px;
  object-fit: contain; border-radius: 8px; display: block;
}
.logo-text {
  font-size: 1.25rem; line-height: 1; color: #000;
}
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-link {
  padding: 8px 12px; border-radius: 10px; color: #000;
  font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.nav-link:hover { background: var(--brand-light); text-decoration: none; }
.nav-link.active { background: var(--brand); color: #fff; }
.header-search { flex: 1; max-width: 280px; }
.search-input {
  width: 100%; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--input-bg);
  color: #000; font-family: inherit; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
.search-input:focus { outline: none; border-color: var(--brand); background: #fff; }
.search-input::placeholder { color: #999; }
.menu-toggle {
  display: none; background: none; border: none;
  font-size: 1.5rem; color: var(--brand);
  padding: 8px 12px; border-radius: 10px;
  min-width: 44px; min-height: 44px;
}
.menu-toggle:hover { background: var(--brand-light); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none; position: absolute;
    top: 100%; right: 0; left: 0;
    background: #fff; flex-direction: column;
    padding: 8px 16px 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 80px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav .nav-link {
    width: 100%; padding: 14px 16px;
    border-radius: 10px; font-size: 1rem;
  }
  .header-search { max-width: none; flex: 1 1 auto; }
  .site-header .header-inner { flex-wrap: wrap; gap: 10px; }
  .logo-text { font-size: 1.1rem; }
  .logo-img { height: 30px; }
}

/* ============ Install App Button ============ */
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
  min-height: 40px;
  animation: installBtnPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
  margin-inline-start: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.install-btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,107,79,.25);
}
.install-btn:active { transform: scale(.97); }
.install-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.install-btn-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
  font-weight: 900;
}
.install-btn-text { line-height: 1; }

@keyframes installBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14,107,79,.5); }
  50% { box-shadow: 0 0 0 6px rgba(14,107,79,0); }
}

@media (max-width: 600px) {
  .install-btn {
    padding: 8px 10px;
    min-height: 38px;
    margin-inline-start: 4px;
  }
  .install-btn-text { display: none; }
  .install-btn-icon { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .install-btn { animation: none; }
}

/* ============ Install Instructions Modal ============ */
.install-instructions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #000;
}
.install-intro {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.install-steps {
  margin: 0;
  padding-inline-start: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: .95rem;
  line-height: 1.8;
}
.install-steps li { padding: 8px 0; }
.install-steps strong { color: var(--brand-dark); font-weight: 700; }
.install-note {
  margin: 0;
  padding: 12px 14px;
  background: var(--brand-light);
  border-radius: 10px;
  font-size: .88rem;
  color: var(--brand-dark);
  line-height: 1.6;
  border: 1px solid rgba(14,107,79,.15);
}
.ios-share-icon,
.ios-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f0f4f2;
  color: var(--brand);
  font-weight: 900;
  font-size: .9rem;
  margin: 0 4px;
  vertical-align: middle;
  border: 1px solid var(--border);
}

/* ============ Live Indicator ============ */
.live-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: .78rem; font-weight: 700;
  cursor: pointer; user-select: none;
  transition: all .15s ease;
  margin-inline-start: 8px;
  border: 1px solid transparent; min-height: 36px;
}
.live-indicator:hover { border-color: var(--brand); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1e8e5a;
  box-shadow: 0 0 0 0 rgba(30,142,90,.6);
  animation: livePulse 2s infinite;
}
.live-indicator.live-syncing .live-dot {
  background: #e6a700;
  box-shadow: 0 0 0 0 rgba(230,167,0,.6);
  animation: livePulse .8s infinite;
}
.live-indicator.live-error .live-dot {
  background: #c0392b; box-shadow: none; animation: none;
}
.live-indicator.live-paused { background: #f2f2f2; color: var(--muted); }
.live-indicator.live-paused .live-dot { background: #9aa8a5; animation: none; }

@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,142,90,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(30,142,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,142,90,0); }
}

@media (max-width: 900px) {
  .live-indicator { padding: 4px 8px; font-size: .72rem; min-height: 32px; }
  .live-indicator .live-text { display: none; }
  .live-dot { width: 10px; height: 10px; }
}

/* ============ Page Layout ============ */
.page-root {
  min-height: 60vh;
  padding: 24px 0 48px;
  padding-bottom: calc(48px + var(--safe-bottom));
}
.page-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
  align-items: start;
}
.filters-col { position: sticky; top: 76px; }
.page-title {
  font-size: 1.75rem; margin: 0 0 16px;
  color: var(--brand-dark); font-weight: 800;
}
.results-host { display: flex; flex-direction: column; gap: 16px; }
.results-count { color: var(--muted); font-size: .9rem; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

/* ============ Filters ============ */
.filters-panel {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
}
.filters-title { margin: 0 0 4px; font-size: 1.05rem; color: var(--brand-dark); }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: .85rem; color: var(--text-soft); font-weight: 600; }
.checkbox-line {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: .95rem;
  min-height: 44px; padding: 4px 0; color: #000;
}
.checkbox-line input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--brand); cursor: pointer;
}
.range-wrap { display: flex; flex-direction: column; gap: 6px; }
.range-wrap input[type=range] {
  width: 100%; accent-color: var(--brand);
  height: 32px; cursor: pointer;
}
.range-value { font-size: .85rem; color: var(--brand-dark); font-weight: 700; }

/* ============ Searchable Select ============ */
.ss-wrap { position: relative; }
.ss-input {
  width: 100%; padding: 10px 36px 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: #000;
  font-family: inherit; font-size: 16px; min-height: 44px;
  -webkit-appearance: none; appearance: none;
}
.ss-input:focus { outline: none; border-color: var(--brand); }
.ss-input::placeholder { color: #999; }
.ss-clear {
  position: absolute; inset-inline-end: 6px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none;
  font-size: 1.3rem; color: var(--muted);
  line-height: 1; padding: 0 10px;
  min-width: 36px; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.ss-clear:hover { background: var(--brand-light); }
.ss-list {
  position: absolute; z-index: 30; top: calc(100% + 4px);
  inset-inline: 0; max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.ss-item {
  padding: 12px 14px; cursor: pointer;
  font-size: .95rem; min-height: 44px;
  display: flex; align-items: center; color: #000;
}
.ss-item:hover,
.ss-item.highlighted { background: var(--brand-light); }
.ss-item.active { font-weight: 700; color: var(--brand-dark); }
.ss-empty { padding: 12px; color: var(--muted); font-size: .85rem; text-align: center; }

/* ============ Cards ============ */
.program-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
  contain: layout style;
}
.program-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
@media (hover: none) {
  .program-card:hover { transform: none; }
}
.card-image {
  width: 100%; height: 200px; object-fit: cover; background: #f5f5f5;
}
.card-placeholder {
  height: 180px; display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; color: var(--muted); font-size: .9rem;
}
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); }
.card-company { display: flex; align-items: center; gap: 8px; }
.company-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #f5f5f5; }
.company-name { font-weight: 700; font-size: .95rem; color: #000; }
.company-meta { font-size: .78rem; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: .78rem;
  font-weight: 700; background: var(--brand-light); color: var(--brand-dark);
  width: fit-content;
}
.badge-discount { background: var(--danger); color: #fff; }
.badge-category { background: #f2f2f2; color: var(--brand-dark); }
.badge-airline { background: #f2f4ff; color: #333; }
.seats-red { background: #fdecea; color: var(--danger); }
.seats-yellow { background: #fff7e0; color: #8a6400; }
.seats-green { background: #e7f7ef; color: var(--success); }

.card-flight, .card-hotels { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: #000; }
.flight-line { color: #222; }
.flight-date { color: var(--muted); }
.card-airline { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: #000; }
.airline-logo { width: 26px; height: 26px; object-fit: contain; }
.hotel-line { font-size: .88rem; color: #000; }
.hotel-area { color: var(--muted); }

/* ============ Price Block ============ */
.price-block { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: .9rem;
}
.price-new {
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1.2rem;
}
.price-expire { font-size: .78rem; color: var(--danger); }

@media (max-width: 600px) {
  .price-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2px;
  }
  .price-new { font-size: 1.3rem; line-height: 1.2; }
  .price-old { font-size: .85rem; }
}

/* ============ Action Icons ============ */
.action-icons {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff;
  color: var(--muted); text-decoration: none;
  cursor: pointer; transition: all .15s ease;
  padding: 0; flex-shrink: 0;
  -webkit-appearance: none; appearance: none;
}
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  text-decoration: none;
}
@media (hover: none) {
  .icon-btn:hover { transform: none; box-shadow: none; }
}
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-btn:active { transform: scale(.95); }

.icon-wa       { background: #25d366; border-color: #25d366; color: #fff; }
.icon-wa:hover { background: #1eb955; border-color: #1eb955; }
.icon-ms       { background: #0084ff; border-color: #0084ff; color: #fff; }
.icon-ms:hover { background: #0070db; border-color: #0070db; }
.icon-ph       { background: var(--brand); border-color: var(--brand); color: #fff; }
.icon-ph:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.icon-details  { background: var(--accent); border-color: var(--accent); color: #3a2c00; }
.icon-details:hover { background: #c0900d; border-color: #c0900d; }
.icon-share    { background: #f5f5f5; border-color: var(--border); color: var(--brand-dark); }
.icon-share:hover { background: var(--brand-light); }
.icon-compare  { background: #f2f4ff; border-color: #dfe3ff; color: #3849b5; }
.icon-compare:hover { background: #e0e5ff; }
.icon-compare.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.icon-btn.disabled { opacity: .45; pointer-events: none; filter: grayscale(.6); }

.icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: #1c2b2a; color: #fff;
  font-size: .72rem; padding: 4px 8px;
  border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease; z-index: 10;
}
@media (hover: hover) {
  .icon-btn[data-tooltip]:hover::after { opacity: 1; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent;
  font-size: .9rem; font-weight: 700;
  text-decoration: none; line-height: 1;
  min-height: 44px;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 8px 12px; font-size: .85rem; min-height: 40px; }
.btn-secondary { background: #f5f5f5; color: var(--brand-dark); border-color: var(--border); }
.btn-secondary:hover { background: var(--brand-light); }
.btn-phone { background: var(--brand); color: #fff; }
.btn-phone:disabled { opacity: .5; cursor: not-allowed; }

/* ============ Pagination ============ */
.pagination {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 8px; justify-content: center;
}
.page-btn {
  border: 1px solid var(--border); background: #fff; color: #000;
  padding: 8px 14px; border-radius: 9px;
  font-size: .85rem; font-weight: 700;
  min-height: 44px; min-width: 44px;
}
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn:disabled { opacity: .5; cursor: not-allowed; }
.page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ============ Gallery ============ */
.gallery {
  position: relative; overflow: hidden;
  background: #f5f5f5; touch-action: pan-y;
}
.gallery-track { display: flex; transition: transform .35s ease; }
.gallery-slide { min-width: 100%; }
.gallery-slide img { width: 100%; height: 220px; object-fit: cover; cursor: zoom-in; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px;
}
.gallery-arrow.prev { inset-inline-start: 8px; }
.gallery-arrow.next { inset-inline-end: 8px; }
.gallery-counter {
  position: absolute; bottom: 8px; inset-inline-end: 8px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .75rem; padding: 3px 10px; border-radius: 999px;
}
.gallery-dots {
  position: absolute; bottom: 8px; inset-inline-start: 50%;
  transform: translateX(-50%); display: flex; gap: 6px;
}
.gallery-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.55); border: none; padding: 0;
  min-width: 10px; min-height: 10px;
}
.gallery-dot.active { background: #fff; }
.gallery-empty {
  display: flex; align-items: center; justify-content: center;
  height: 180px; color: var(--muted); font-size: .9rem;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  touch-action: pan-y;
}
.lightbox-img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: calc(16px + var(--safe-top)); inset-inline-end: 16px;
  background: transparent; border: none; color: #fff;
  font-size: 2rem; line-height: 1;
  min-width: 44px; min-height: 44px;
}
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: #fff; border: none;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.8rem; min-width: 48px; min-height: 48px;
}
.lightbox-arrow.prev { inset-inline-start: 16px; }
.lightbox-arrow.next { inset-inline-end: 16px; }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  padding-top: calc(16px + var(--safe-top));
  padding-bottom: calc(16px + var(--safe-bottom));
}
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 720px;
  max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); overflow: hidden; color: #000;
}
.modal-lg { max-width: 960px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { margin: 0; font-size: 1.1rem; color: var(--brand-dark); }
.modal-close {
  background: none; border: none;
  font-size: 1.6rem; line-height: 1; color: var(--muted);
  min-width: 44px; min-height: 44px; border-radius: 8px;
}
.modal-close:hover { background: #f5f5f5; }
.modal-body {
  padding: 16px 18px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ============ Details ============ */
.details-content { display: flex; flex-direction: column; gap: 14px; color: #000; }
.details-title { margin: 0; color: var(--brand-dark); font-size: 1.35rem; }
.details-hero { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; }
.details-company { display: flex; align-items: center; gap: 10px; }
.details-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.details-city { font-weight: 700; color: var(--brand-dark); }
.details-section {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; background: #fafafa;
}
.details-section h4 { margin: 0 0 8px; color: var(--brand-dark); font-size: 1rem; }
.details-table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem; table-layout: fixed;
  word-wrap: break-word; color: #000;
}
.details-table th, .details-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  text-align: start; vertical-align: top;
}
.details-table th { background: #f2f6f4; color: var(--brand-dark); font-weight: 700; width: 40%; }
.details-table tr:last-child th, .details-table tr:last-child td { border-bottom: none; }

.rich-text {
  white-space: pre-line; direction: rtl;
  text-align: start; line-height: 1.8;
  color: #222; font-size: .92rem;
  word-break: break-word;
}

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.service-item {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; font-size: .85rem; color: #000;
}
.service-logo { width: 28px; height: 28px; object-fit: contain; }
.stars { color: var(--accent); font-size: 1rem; }
.domestic-city { font-weight: 700; color: var(--brand-dark); font-size: .9rem; }
.meta-line { font-size: .88rem; color: #222; }

/* ============ Compare Bar ============ */
.compare-bar {
  position: fixed;
  bottom: 16px; bottom: calc(16px + var(--safe-bottom));
  inset-inline: 16px; max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; z-index: 800;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.compare-bar-info {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--brand-dark); font-size: .95rem;
}
.compare-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 8px;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: .85rem; font-weight: 800;
}
.compare-bar-actions { display: flex; gap: 8px; }

@media (max-width: 600px) {
  .compare-bar {
    inset-inline: 8px; padding: 10px 12px;
    flex-direction: column; gap: 8px;
  }
  .compare-bar-info { font-size: .85rem; justify-content: center; width: 100%; }
  .compare-bar-actions { width: 100%; justify-content: center; }
  .compare-bar .btn { flex: 1; padding: 8px 12px; font-size: .85rem; }
}

/* ============ Compare Modal ============ */
.compare-content { display: flex; flex-direction: column; gap: 14px; }
.compare-hint { margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }
.compare-table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: 12px; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.compare-table {
  width: 100%; border-collapse: collapse;
  font-size: .88rem; min-width: 500px; color: #000;
}
.compare-table th, .compare-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  text-align: start; vertical-align: top;
}
.compare-table thead th {
  background: var(--brand-light); color: var(--brand-dark);
  font-weight: 800; position: sticky; top: 0; z-index: 1;
  border-bottom: 2px solid var(--brand);
}
.compare-feature-col {
  width: 130px; min-width: 130px; background: #f2f6f4;
  color: var(--brand-dark); font-weight: 700; font-size: .85rem;
  position: sticky; inset-inline-start: 0; z-index: 2;
}
.compare-program-col { min-width: 200px; text-align: center; }
.compare-program-name { font-weight: 800; color: var(--brand-dark); font-size: .92rem; margin-bottom: 2px; }
.compare-company { font-size: .75rem; color: var(--muted); font-weight: 500; }
.compare-price { display: flex; flex-direction: column; gap: 2px; }
.compare-table tbody tr:hover { background: #fafafa; }
.compare-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-top: 8px;
}
.compare-action-cell {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; background: #fafafa;
  border: 1px solid var(--border); border-radius: 10px;
}
.compare-action-title {
  font-weight: 700; color: var(--brand-dark);
  font-size: .85rem; text-align: center;
}
.compare-action-cell .action-icons {
  border-top: none; padding-top: 0;
  justify-content: center; margin-top: 0;
}

/* ============ Toast ============ */
.toast-host {
  position: fixed; bottom: 20px; bottom: calc(20px + var(--safe-bottom));
  inset-inline-start: 50%; transform: translateX(-50%);
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; max-width: 90vw;
}
body.has-compare-bar .toast-host {
  bottom: calc(100px + var(--safe-bottom));
}
.toast {
  background: #1c2b2a; color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px);
  animation: toastIn .25s forwards;
  max-width: 90vw; text-align: center; word-wrap: break-word;
}
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: #2b1f00; }
.toast-success { background: var(--success); }
.toast-out { animation: toastOut .25s forwards; }
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ============ Loading / Empty / Error ============ */
.loading-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px 0; color: var(--muted);
}
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--brand-light); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px 16px;
  color: var(--muted); text-align: center;
}
.empty-icon { font-size: 2.5rem; }
.error-block .empty-icon { color: var(--danger); }
.empty-hint {
  font-size: .85rem; color: var(--muted);
  max-width: 400px; line-height: 1.6;
}

/* ============ About ============ */
.about-page .about-hero { text-align: center; padding: 24px 0; }
.about-logo { width: 90px; height: 90px; border-radius: 20px; margin: 0 auto 12px; object-fit: cover; }
.about-hero h2 { margin: 0; color: var(--brand-dark); }
.about-content { max-width: 780px; margin: 0 auto; font-size: 1rem; color: #222; line-height: 1.9; }
.about-features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-top: 24px;
}
.about-feature {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.about-feature-icon { font-size: 2rem; margin-bottom: 6px; }
.about-feature h3 { margin: 0 0 6px; color: var(--brand-dark); font-size: 1.05rem; }
.about-feature p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ============ Footer ============ */
.site-footer {
  background: var(--footer-bg); color: var(--footer-text);
  margin-top: 40px; padding-bottom: var(--safe-bottom);
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 24px; padding: 36px 16px;
}
.footer-brand h3 { margin: 8px 0 6px; color: #fff; }
.footer-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.footer-links h4, .footer-social h4 { color: var(--accent); margin: 0 0 10px; font-size: 1rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-links a {
  color: var(--footer-text);
  display: inline-flex; align-items: center; min-height: 40px;
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #fff;
  font-size: 1rem; min-width: 44px; min-height: 44px;
}
.social-link:hover { background: var(--brand); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 0; font-size: .82rem; color: #a4b8b4; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .filters-col { position: static; }
  .filters-panel { max-height: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-links ul { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .footer-links a { min-height: 36px; }
}

@media (max-width: 600px) {
  .container { padding: 0 12px; }
  .site-header .header-inner { padding: 8px 12px; gap: 8px; min-height: 56px; }
  .page-title { font-size: 1.4rem; }
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-slide img { height: 200px; }
  .modal { max-height: 96vh; max-height: 96dvh; border-radius: 14px; }
  .modal-body { padding: 14px; }
  .modal-head { padding: 12px 14px; }
  .details-table th { width: 45%; font-size: .82rem; }
  .details-table td { font-size: .82rem; }
  .details-table th, .details-table td { padding: 6px 8px; }
  .card-body { padding: 12px; gap: 8px; }
  .card-image { height: 180px; }
  .action-icons { gap: 6px; }
  .icon-btn { width: 42px; height: 42px; border-radius: 10px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .about-features { grid-template-columns: 1fr; }
  .compare-actions { grid-template-columns: 1fr; }
  .pagination { gap: 4px; }
  .page-btn { padding: 6px 10px; font-size: .8rem; min-width: 40px; min-height: 40px; }
  .details-section { padding: 10px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-bar { bottom: 8px; bottom: calc(8px + var(--safe-bottom)); }
  .toast { font-size: .85rem; padding: 10px 16px; }
  .branded-loading-logo { width: 56px; height: 56px; }
  .branded-loading-name { font-size: 1.3rem; }
}

@media (max-width: 380px) {
  .logo-text { font-size: 1rem; }
  .logo-img { height: 26px; }
  .card-title { font-size: .98rem; }
  .price-new { font-size: 1.15rem; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .services-grid { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ============ Focus Visibility ============ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ Reduced Data ============ */
@media (prefers-reduced-data: reduce) {
  .card-image, .gallery-slide img { display: none; }
}

/* ============ Print ============ */
@media print {
  .site-header, .site-footer, .filters-col,
  .compare-bar, .toast-host, .action-icons,
  .install-btn { display: none !important; }
  .page-layout { grid-template-columns: 1fr; }
  .program-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}