/* ── LuxAtlas Global Theme ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --bg-primary:   #ffffff;
  --bg-secondary: #f5f3ef;
  --bg-tertiary:  #eceae4;
  --bg-card:      rgba(245,243,239,0.92);
  --card-border:  rgba(180,155,80,0.2);
  --text-primary:   #1a1806;
  --text-secondary: #4a4535;
  --text-muted:     rgba(74,69,53,0.52);
  --text-nav:       rgba(26,24,6,0.65);
  --nav-scrolled-bg: rgba(255,255,255,0.95);
  --mobile-nav-bg:   rgba(255,255,255,0.97);
  --scrollbar-track: #f0ede6;
  --modal-field-bg:  #f0ede6;
  --modal-field-text: #1a1806;
  --modal-field-placeholder: rgba(26,24,6,0.3);
  --modal-bg: rgba(248,246,244,0.99);
}

[data-theme="dark"] {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #0d0d0c;
  --bg-tertiary:  #111110;
  --bg-card:      rgba(20,20,20,0.55);
  --card-border:  rgba(212,175,55,0.15);
  --text-primary:   #e8e0d0;
  --text-secondary: rgba(232,224,208,0.72);
  --text-muted:     rgba(232,224,208,0.45);
  --text-nav:       rgba(232,224,208,0.6);
  --nav-scrolled-bg: rgba(10,10,10,0.92);
  --mobile-nav-bg:   rgba(10,10,10,0.97);
  --scrollbar-track: #111;
  --modal-field-bg:  #1a1a1a;
  --modal-field-text: #e5e7eb;
  --modal-field-placeholder: rgba(232,224,208,0.3);
  --modal-bg: #0a0a0a;
}

/* ── Font Overrides ───────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', 'Inter', sans-serif !important;
}
h1, h2, h3, h4, h5, h6,
.font-playfair {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif !important;
}

/* ── Dark Mode Toggle Button ──────────────────────────────────────────── */
#theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.4);
  background: transparent;
  color: #d4af37;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
  padding: 0;
}
#theme-toggle:hover {
  background: rgba(212,175,55,0.12);
  border-color: #d4af37;
}
#theme-toggle svg { width: 15px; height: 15px; pointer-events: none; }
.lux-icon-sun  { display: none; }
.lux-icon-moon { display: none; }
html:not([data-theme="dark"]) .lux-icon-moon { display: block; }
[data-theme="dark"] .lux-icon-sun { display: block; }

/* ── Body / Background ───────────────────────────────────────────────── */
html:not([data-theme="dark"]) body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Dark section backgrounds → light */
html:not([data-theme="dark"]) [style*="background:#0a0a0a"],
html:not([data-theme="dark"]) [style*="background: #0a0a0a"] {
  background-color: var(--bg-primary) !important;
}
html:not([data-theme="dark"]) [style*="background:#111"],
html:not([data-theme="dark"]) [style*="background: #111"] {
  background-color: var(--bg-secondary) !important;
}
html:not([data-theme="dark"]) [style*="background:#0d0d0c"],
html:not([data-theme="dark"]) [style*="background: #0d0d0c"] {
  background-color: var(--bg-secondary) !important;
}
html:not([data-theme="dark"]) [style*="background:#1a1a1a"],
html:not([data-theme="dark"]) [style*="background: #1a1a1a"] {
  background-color: var(--bg-tertiary) !important;
}
html:not([data-theme="dark"]) [style*="background:#000"],
html:not([data-theme="dark"]) [style*="background: #000"] {
  background-color: var(--bg-secondary) !important;
}

/* ── Text Overrides (non-hero sections) ───────────────────────────────── */
/* Override cream text in non-hero sections */
html:not([data-theme="dark"]) section:not(.hero-bg):not(.pkg-hero) [style*="color:rgba(232,224,208"],
html:not([data-theme="dark"]) div:not(.hero-content):not(.pkg-hero-inner) [style*="color:rgba(232,224,208"] {
  color: var(--text-secondary) !important;
}
/* Protect hero text — always stays readable over dark images */
html:not([data-theme="dark"]) .hero-bg [style*="color:rgba(232,224,208"],
html:not([data-theme="dark"]) .hero-content [style*="color:rgba(232,224,208"],
html:not([data-theme="dark"]) .pkg-hero [style*="color:rgba(232,224,208"],
html:not([data-theme="dark"]) .pkg-hero-inner [style*="color:rgba(232,224,208"] {
  color: rgba(255,255,255,0.82) !important;
}
/* Nav links */
html:not([data-theme="dark"]) #header nav [style*="color:rgba(232,224,208"],
html:not([data-theme="dark"]) #header [style*="color:rgba(232,224,208"] {
  color: var(--text-nav) !important;
}

/* ── Scrolled Header ─────────────────────────────────────────────────── */
html:not([data-theme="dark"]) #header.scrolled {
  background: var(--nav-scrolled-bg) !important;
  border-bottom-color: rgba(180,155,80,0.2) !important;
}
html:not([data-theme="dark"]) .nav-link { color: var(--text-nav) !important; }

/* ── Mobile Nav ──────────────────────────────────────────────────────── */
html:not([data-theme="dark"]) .mobile-nav {
  background: var(--mobile-nav-bg) !important;
}
html:not([data-theme="dark"]) #mobile-nav {
  background: var(--mobile-nav-bg) !important;
}
html:not([data-theme="dark"]) .mobile-link {
  color: var(--text-primary) !important;
}
html:not([data-theme="dark"]) .mobile-link:hover { color: #b8941f !important; }

/* ── Glass Cards (index.html) ────────────────────────────────────────── */
html:not([data-theme="dark"]) .glass {
  background: #ffffff !important;
  border-color: rgba(180,155,80,0.22) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.05);
}
html:not([data-theme="dark"]) .glass-hover:hover {
  background: #ffffff !important;
  border-color: rgba(212,175,55,0.45) !important;
  box-shadow: 0 14px 36px rgba(212,175,55,0.14), 0 4px 14px rgba(0,0,0,0.06) !important;
}
html:not([data-theme="dark"]) .glass p,
html:not([data-theme="dark"]) .glass li,
html:not([data-theme="dark"]) .glass span { color: #3a3530 !important; }
html:not([data-theme="dark"]) .glass h3,
html:not([data-theme="dark"]) .glass .font-playfair { color: #1a1806 !important; }
html:not([data-theme="dark"]) .cta-border {
  background: rgba(255,252,245,0.85) !important;
  border-color: rgba(180,155,80,0.2) !important;
}

/* ── Package Cards (Packages.html) ───────────────────────────────────── */
html:not([data-theme="dark"]) .pkg-card {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .pkg-card.featured {
  background: linear-gradient(180deg, #f0ede5 0%, #e8e4da 100%) !important;
  border-color: rgba(212,175,55,0.45) !important;
}
html:not([data-theme="dark"]) .pkg-title { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) .pkg-desc  { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) .pkg-list li { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) .pkg-price .lbl,
html:not([data-theme="dark"]) .pkg-price .unit { color: var(--text-muted) !important; }
html:not([data-theme="dark"]) .faq-q { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) .faq-a  { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) .faq-item { border-bottom-color: var(--card-border) !important; }

/* Why / Testimonial cards */
html:not([data-theme="dark"]) .why-card {
  background: var(--bg-card) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .why-card:hover {
  background: rgba(245,243,239,0.99) !important;
}
html:not([data-theme="dark"]) .test-card {
  background: var(--bg-card) !important;
  border-color: var(--card-border) !important;
}

/* ── Excursion Cards ─────────────────────────────────────────────────── */
html:not([data-theme="dark"]) .exc-card {
  background: var(--bg-secondary) !important;
  border-color: var(--card-border) !important;
}

/* ── Service Cards (CarRental.html) ──────────────────────────────────── */
html:not([data-theme="dark"]) .svc-card {
  background: var(--bg-secondary) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .contact-link {
  color: var(--text-secondary) !important;
}
html:not([data-theme="dark"]) .contact-link:hover { color: var(--text-primary) !important; }

/* ── Package Detail (package-detail.css pages) ───────────────────────── */
html:not([data-theme="dark"]) .day {
  background: var(--bg-card) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .inc {
  background: var(--bg-card) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .day-title { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) .day-list li { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) .inc b { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) .inc p { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) .info-bar {
  background: var(--bg-secondary) !important;
  border-color: var(--card-border) !important;
}
html:not([data-theme="dark"]) .info-lbl { color: var(--text-muted) !important; }
html:not([data-theme="dark"]) .info-val { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) .info-val small { color: var(--text-muted) !important; }

/* ── Form Inputs ─────────────────────────────────────────────────────── */
html:not([data-theme="dark"]) .f-input,
html:not([data-theme="dark"]) .modal-field {
  background: var(--modal-field-bg) !important;
  color: var(--modal-field-text) !important;
  border-color: rgba(180,155,80,0.3) !important;
}
html:not([data-theme="dark"]) .f-input::placeholder,
html:not([data-theme="dark"]) .modal-field::placeholder {
  color: var(--modal-field-placeholder) !important;
}
html:not([data-theme="dark"]) .f-input option,
html:not([data-theme="dark"]) .modal-field option {
  background: #f5f3ef !important;
  color: #1a1806 !important;
}

/* ── Modal ───────────────────────────────────────────────────────────── */
html:not([data-theme="dark"]) .modal-box {
  background: var(--modal-bg) !important;
}
html:not([data-theme="dark"]) .modal-label { color: var(--text-secondary) !important; }

/* ── Index.html specific ─────────────────────────────────────────────── */
html:not([data-theme="dark"]) .stats-bar {
  background: #ffffff !important;
  border-color: rgba(212,175,55,0.2) !important;
}
html:not([data-theme="dark"]) .fleet-card {
  background: #ffffff !important;
  border-color: rgba(212,175,55,0.18) !important;
}
html:not([data-theme="dark"]) .fleet-card .font-playfair { color: #1a1806 !important; }
html:not([data-theme="dark"]) .section-label { color: #8a6a14 !important; }
html:not([data-theme="dark"]) .section-label .label-dot { background: #d4af37; }
html:not([data-theme="dark"]) .stat-card {
  background: rgba(255,253,248,0.75) !important;
  border-color: rgba(180,155,80,0.2) !important;
}

/* ── Form fields (index.html enquiry form) ───────────────────────────── */
html:not([data-theme="dark"]) #enquiry-form input,
html:not([data-theme="dark"]) #enquiry-form select,
html:not([data-theme="dark"]) #enquiry-form textarea {
  background: #ffffff !important;
  color: #1a1806 !important;
  border-color: rgba(180,140,40,0.4) !important;
}
html:not([data-theme="dark"]) #enquiry-form input::placeholder,
html:not([data-theme="dark"]) #enquiry-form textarea::placeholder {
  color: rgba(0,0,0,0.35) !important;
}
html:not([data-theme="dark"]) #enquiry-form label { color: #1a1806 !important; }

/* ── Scrollbar ───────────────────────────────────────────────────────── */
html:not([data-theme="dark"]) ::-webkit-scrollbar-track {
  background: var(--scrollbar-track) !important;
}

/* ── Footer always dark ──────────────────────────────────────────────── */
html:not([data-theme="dark"]) footer {
  background: #0a0a0a !important;
  color: #e8e0d0 !important;
}
html:not([data-theme="dark"]) footer h3,
html:not([data-theme="dark"]) footer h4 { color: #d4af37 !important; }
html:not([data-theme="dark"]) footer p,
html:not([data-theme="dark"]) footer li,
html:not([data-theme="dark"]) footer a { color: rgba(232,224,208,0.6) !important; }
html:not([data-theme="dark"]) footer a:hover { color: #d4af37 !important; }

/* ── Dark mode: restore original dark backgrounds ────────────────────── */
[data-theme="dark"] body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}
[data-theme="dark"] .glass {
  background: rgba(14,12,6,0.75) !important;
  border-color: rgba(212,175,55,0.14) !important;
}
[data-theme="dark"] .glass p,
[data-theme="dark"] .glass li,
[data-theme="dark"] .glass span { color: rgba(232,224,208,0.75) !important; }
[data-theme="dark"] .glass h3,
[data-theme="dark"] .glass .font-playfair { color: #e8e0d0 !important; }
[data-theme="dark"] .cta-border {
  background: rgba(14,12,6,0.60) !important;
  border-color: rgba(212,175,55,0.14) !important;
}
[data-theme="dark"] .pkg-card {
  background: linear-gradient(180deg, #141312 0%, #0d0d0c 100%) !important;
  border-color: rgba(212,175,55,0.18) !important;
}
[data-theme="dark"] .pkg-card.featured {
  background: linear-gradient(180deg, #1a1813 0%, #0e0c08 100%) !important;
  border-color: rgba(212,175,55,0.5) !important;
}
[data-theme="dark"] .pkg-title { color: #fff !important; }
[data-theme="dark"] .pkg-desc  { color: rgba(232,224,208,0.6) !important; }
[data-theme="dark"] .pkg-list li { color: rgba(232,224,208,0.78) !important; }
[data-theme="dark"] .why-card {
  background: rgba(20,20,20,0.6) !important;
  border-color: rgba(212,175,55,0.15) !important;
}
[data-theme="dark"] .test-card {
  background: rgba(20,20,20,0.55) !important;
  border-color: rgba(212,175,55,0.12) !important;
}
[data-theme="dark"] .exc-card { background: #111 !important; }
[data-theme="dark"] .svc-card { background: #111 !important; }
[data-theme="dark"] .day {
  background: rgba(20,20,20,0.55) !important;
  border-color: rgba(212,175,55,0.15) !important;
}
[data-theme="dark"] .inc {
  background: rgba(20,20,20,0.55) !important;
  border-color: rgba(212,175,55,0.12) !important;
}
[data-theme="dark"] .info-bar { background: #0d0d0c !important; }
[data-theme="dark"] .day-title { color: #fff !important; }
[data-theme="dark"] .day-list li { color: rgba(232,224,208,0.72) !important; }
[data-theme="dark"] .inc b { color: #fff !important; }
[data-theme="dark"] .inc p { color: rgba(232,224,208,0.6) !important; }
[data-theme="dark"] .mobile-nav { background: rgba(10,10,10,0.97) !important; }
[data-theme="dark"] #mobile-nav { background: rgba(10,10,10,0.98) !important; }
[data-theme="dark"] .mobile-link { color: #e8e0d0 !important; }
[data-theme="dark"] .f-input,
[data-theme="dark"] .modal-field {
  background: #000 !important;
  color: #e8e0d0 !important;
  border-color: rgba(212,175,55,0.2) !important;
}
[data-theme="dark"] .modal-box { background: #0a0a0a !important; }

/* ── Mobile: remove hero background images ──────────────────────────────── */
@media (max-width: 767px) {
  /* Package detail pages */
  .pkg-hero {
    background-image: none !important;
    background-color: #0a0a0a;
  }
  /* CarRental page */
  .car-hero-bg {
    display: none !important;
  }
}
