:root {
  --color-primary: #d97706;
  --color-primary-dark: #b45309;
  --color-primary-light: #fef3c7;
  --color-ink: #14213d;
  --color-ink-soft: #4b5563;
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --shadow-sm: 0 1px 3px rgba(20, 33, 61, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 33, 61, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 33, 61, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-en: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-ar: 'Cairo', 'Tahoma', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-en);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { font-family: var(--font-ar); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-ink);
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.brand-logo svg { width: 24px; height: 24px; }

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  font-weight: 500;
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--color-primary-dark); border-bottom-color: var(--color-primary); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px;
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  transition: background .2s, color .2s;
}

.lang-toggle button.active {
  background: var(--color-ink);
  color: white;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg { width: 20px; height: 20px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(217, 119, 6, 0.16), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(20, 33, 61, 0.10), transparent 40%),
    linear-gradient(180deg, #fffaf0 0%, var(--color-bg) 100%);
  padding: 64px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 6px 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero h1 span { color: var(--color-primary-dark); }

.hero p.lead {
  color: var(--color-ink-soft);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero-video {
  max-width: 720px;
  margin: 8px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Search / booking widget ===== */
.search-card {
  margin: 30px auto 0;
  max-width: 1040px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  border: 1px solid var(--color-border);
  text-align: start;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (min-width: 780px) {
  .search-grid { grid-template-columns: repeat(4, 1fr); }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field label svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--color-primary); }

.field select,
.field input[type="date"],
.field input[type="time"] {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--color-ink);
  background: var(--color-surface);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.field select:focus,
.field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.field.invalid select,
.field.invalid input {
  border-color: var(--color-error);
}

.field-error {
  font-size: 0.76rem;
  color: var(--color-error);
  min-height: 1em;
  display: none;
}

.field.invalid .field-error { display: block; }

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.search-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(217, 119, 6, 0.4); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }

.btn-full { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ===== Trust strip ===== */
.trust-strip {
  padding: 36px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 780px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

.trust-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.trust-item .icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-item .icon-badge svg { width: 22px; height: 22px; }

.trust-item strong { display: block; font-size: 0.92rem; }
.trust-item span { font-size: 0.8rem; color: var(--color-ink-soft); }

/* ===== Section headings ===== */
.section { padding: 46px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
}

.section-head .eyebrow {
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 6px 0 8px;
}

.section-head p { color: var(--color-ink-soft); margin: 0; }

/* ===== Filters ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.chip {
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  transition: all .15s;
}

.chip.active, .chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
}

/* ===== Car grid ===== */
.car-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 640px) { .car-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .car-grid { grid-template-columns: repeat(3, 1fr); } }

.car-card {
  perspective: 1600px;
  height: 580px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
  transform-style: preserve-3d;
}

.car-card.flipped .flip-inner,
.car-card:has(.flip-btn:hover) .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}

.car-card:hover .flip-face { box-shadow: var(--shadow-md); }

.flip-front { overflow: hidden; }
.flip-back { transform: rotateY(180deg); overflow-y: auto; }

.gallery { position: relative; }

.gallery-viewport {
  position: relative;
  height: 190px;
  background: linear-gradient(160deg, #fff7ed, #fef3c7 60%, #fff);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.gallery-viewport:active { cursor: grabbing; }

.gallery-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}

.gallery-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; z-index: 2; }
.gallery-slide svg, .gallery-slide img { width: 100%; height: 100%; }
.gallery-slide img { object-fit: cover; border-radius: inherit; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-ink);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 3;
  opacity: 0;
  transition: opacity .2s, background .2s;
}

.gallery:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: var(--color-primary); color: white; }
.gallery-arrow.prev { inset-inline-start: 10px; }
.gallery-arrow.next { inset-inline-end: 10px; }

.car-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: var(--color-ink);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  z-index: 3;
}

.flip-btn {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 4;
  transition: transform .2s, background .2s, color .2s;
}

.flip-btn:hover { background: var(--color-primary); color: white; transform: scale(1.08) rotate(20deg); }
.flip-btn svg { width: 16px; height: 16px; }

.gallery-thumbs { display: flex; gap: 6px; padding: 8px 14px 0; }

.thumb {
  width: 38px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  padding: 2px;
  opacity: 0.55;
  transition: opacity .2s, border-color .2s;
  flex-shrink: 0;
}

.thumb svg, .thumb img { width: 100%; height: 100%; }
.thumb img { object-fit: cover; border-radius: 3px; }
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--color-primary); }

.back-media { height: 110px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; flex-shrink: 0; }
.back-media svg, .back-media img { width: 100%; height: 100%; }
.back-media img { object-fit: cover; }

.back-body { padding: 14px 20px 20px; flex: 1; }
.back-body h3 { margin: 0 0 2px; font-size: 1.05rem; }
.back-body h4 { margin: 14px 0 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-primary-dark); }

.back-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 0.84rem; }
.back-spec-grid span:nth-child(odd) { color: var(--color-ink-soft); }
.back-spec-grid span:nth-child(even) { font-weight: 600; text-align: end; }

.feat-list { display: flex; flex-direction: column; gap: 6px; }
.feat-list li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--color-ink-soft); }
.feat-list li svg { width: 15px; height: 15px; color: var(--color-success); flex-shrink: 0; }

.policy-note { font-size: 0.78rem; color: var(--color-ink-soft); background: var(--color-bg); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }

.back-actions { display: flex; gap: 8px; margin-top: 14px; }
.back-actions .btn { flex: 1; padding: 11px 10px; font-size: 0.83rem; }

.car-body { padding: 4px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.car-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.car-title-row h3 { margin: 0; font-size: 1.1rem; }
.car-title-row p { margin: 2px 0 0; font-size: 0.82rem; color: var(--color-ink-soft); }

.car-price { text-align: end; flex-shrink: 0; }
.car-price strong { font-size: 1.25rem; color: var(--color-primary-dark); }
.car-price span { display: block; font-size: 0.72rem; color: var(--color-ink-soft); }

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.76rem;
  color: var(--color-ink-soft);
}

.spec-pill svg { width: 14px; height: 14px; }

.car-body .btn { margin-top: auto; }

/* ===== How it works ===== */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}

@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  position: relative;
}

.step .step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 12px;
}

.step h3 { font-size: 1rem; margin: 4px 0 6px; }
.step p { font-size: 0.85rem; color: var(--color-ink-soft); margin: 0; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.82);
  padding: 48px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-brand .brand { color: white; margin-bottom: 10px; }
.footer-brand p { font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); max-width: 280px; }

.footer-col h4 { font-size: 0.9rem; margin: 0 0 14px; color: white; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.87rem; color: rgba(255, 255, 255, 0.7); }
.footer-col ul li a:hover { color: var(--color-primary); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 61, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  background: var(--color-bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close svg { width: 16px; height: 16px; }

.modal h3 { margin: 0 0 4px; font-size: 1.2rem; }
.modal .modal-sub { color: var(--color-ink-soft); font-size: 0.85rem; margin: 0 0 18px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.9rem;
}

.summary-row span:first-child { color: var(--color-ink-soft); }
.summary-row span:last-child { font-weight: 600; }

.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 700;
}

.summary-total span:last-child { color: var(--color-primary-dark); }

.modal-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

.confirm-success {
  display: none;
  text-align: center;
  padding: 10px 0 4px;
}

.confirm-success.show { display: block; }

.confirm-success .icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.confirm-success .icon-badge svg { width: 30px; height: 30px; }

/* ===== WhatsApp floating button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  z-index: 1500;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: whatsappPulse 2.4s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.whatsapp-float svg { width: 30px; height: 30px; }

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(37, 211, 102, 0); }
}

@media (max-width: 480px) {
  .whatsapp-float { width: 50px; height: 50px; bottom: 16px; inset-inline-end: 16px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-ink);
  color: white;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== RTL adjustments ===== */
html[dir="rtl"] .toast { left: auto; right: 50%; transform: translateX(50%) translateY(20px); }
html[dir="rtl"] .toast.show { transform: translateX(50%) translateY(0); }

/* ===== Responsive nav ===== */
@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 10px 24px 18px;
    gap: 4px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .field-pair { grid-template-columns: 1fr 1fr; }
  .search-card { padding: 20px; }
  .car-card { height: 620px; }
}

/* ===== Lightbox ===== */
#lightbox { background: rgba(8, 11, 20, 0.92); }

.lightbox-inner {
  position: relative;
  width: min(720px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: lightboxIn .25s ease;
}

.lightbox-image svg, .lightbox-image img { width: 100%; height: 100%; }
.lightbox-image img { object-fit: contain; }

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-caption { color: white; font-size: 0.9rem; }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}

.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-arrow.prev { inset-inline-start: -64px; }
.lightbox-arrow.next { inset-inline-end: -64px; }

#lightbox .modal-close {
  position: absolute;
  top: -46px;
  inset-inline-end: 0;
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

@media (max-width: 820px) {
  .lightbox-arrow.prev { inset-inline-start: 6px; }
  .lightbox-arrow.next { inset-inline-end: 6px; }
  #lightbox .modal-close { top: 6px; inset-inline-end: 6px; background: rgba(255,255,255,0.2); }
}
