@import url("tokens.css");
@import url("loader.css?v=2");

/* ── Reset & Base ── */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body, 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ── Global Utility / Layout ── */
#global-navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}

#global-navbar > * {
  pointer-events: auto !important;
}

.app-wrapper {
  min-height: 100vh;
  width: 100%;
  position: relative;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* Guarantee clean top spacing for floating glass navbar across ALL pages (excl. Hero) */
.app-wrapper > main,
.app-wrapper > section:not(.hero-wrapper),
.app-wrapper > div:not(.hero-wrapper):not(#global-navbar):not(.app-nav-header):first-of-type,
.page-content-wrapper,
.app__main,
.planner-container,
.chat-container,
.dashboard-shell,
#favourites-page,
#trips-page,
#reviews-page,
#notifications-page,
#payments-page-root,
main {
  padding-top: 6rem !important;
}

/* Exclude full-bleed hero wrapper from forced main padding */
.hero-wrapper main,
.hero-wrapper .content-layer {
  padding-top: 7rem !important;
}

/* ── Hero wrapper ── */
.hero-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 1.5rem 1rem;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  transition: background-image 0.8s ease;
  overflow: hidden;
  overflow-x: clip;
}

.hero-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 7, 0.50) 0%, rgba(5, 5, 7, 0.20) 45%, rgba(5, 5, 7, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-wrapper > * {
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .hero-wrapper {
    padding: 1rem 1.2rem;
    height: auto;
    min-height: 100vh;
  }
}

/* ── Giant Text Overlay ── */
.giant-text {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding-bottom: 6rem;
  overflow: hidden;
  white-space: nowrap;
}

.giant-text h1 {
  font-size: 26vw;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.10);
  user-select: none;
  mix-blend-mode: overlay;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  line-height: 1;
  transition: opacity 0.6s ease;
  opacity: 0.12;
  margin: 0;
}

@media (max-width: 640px) {
  .giant-text h1 {
    font-size: 30vw;
  }
}

/* ── Content Layer ── */
.content-layer {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* =====================================================================
   UNIFIED GLASSMORPHISM NAVBAR (Public, Customer & Auth Pages)
   ===================================================================== */
.app-nav-header,
.auth-nav-header {
  width: 100%;
  padding: 1.25rem 2rem 0.6rem;
  display: flex;
  justify-content: center;
  z-index: 100;
  position: sticky;
  top: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
}

.app-nav-container,
.auth-nav-container {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 248, 246, 0.82) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 0.45rem 1rem 0.45rem 1.2rem;
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 1),
    0 10px 30px -5px rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

html.dark .app-nav-container,
html.dark .auth-nav-container,
:root[data-theme="dark"] .app-nav-container,
:root[data-theme="dark"] .auth-nav-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(18, 18, 20, 0.92) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5),
    0 16px 40px -8px rgba(0, 0, 0, 0.65),
    0 4px 16px rgba(0, 0, 0, 0.35);
}

.app-brand,
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  flex-shrink: 0;
}

.app-brand:hover,
.auth-brand:hover {
  transform: translateY(-1px) scale(1.02);
}

.app-brand .brand-mark,
.auth-brand .brand-mark,
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #000000;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

html.dark .app-brand .brand-mark,
html.dark .auth-brand .brand-mark {
  background: #ffffff;
  color: #000000;
}

.app-brand .brand-name,
.auth-brand .brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

html.dark .app-brand .brand-name,
html.dark .auth-brand .brand-name {
  color: #ffffff;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.2s ease;
}

html.dark .app-nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.app-nav-link:hover,
.app-nav-link.active {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

html.dark .app-nav-link:hover,
html.dark .app-nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Nav Pill (Glassmorphism) ── */
.nav-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(245, 245, 244, 0.58) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) contrast(95%);
  backdrop-filter: blur(24px) saturate(190%) contrast(95%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 9999px;
  padding: 0.35rem 0.6rem;
  box-shadow: 
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.95),
    0 10px 30px -5px rgba(0, 0, 0, 0.06);
}

html.dark .nav-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(12, 12, 15, 0.68);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 
    inset 0 1px 1.2px 0 rgba(255, 255, 255, 0.22),
    0 16px 40px -8px rgba(0, 0, 0, 0.65);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

html.dark .nav-link {
  color: rgba(255, 255, 255, 0.65);
}

.nav-link i {
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-link .nav-text {
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  display: inline-block;
  transition: max-width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.2s ease 0.05s, margin 0.2s ease;
  margin-left: 0;
  vertical-align: middle;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 0.35rem 0.85rem;
  gap: 0.5rem;
  color: #1c1917;
}

html.dark .nav-link:hover,
html.dark .nav-link:focus-visible,
html.dark .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.nav-link:hover .nav-text,
.nav-link:focus-visible .nav-text,
.nav-link.active .nav-text {
  max-width: 120px;
  opacity: 1;
  margin-left: 0.15rem;
}

/* ── Guest / Auth Actions ── */
.guest-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.guest-actions:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

html.dark .guest-actions {
  background: #ffffff;
  color: #0a0a0a;
}

html.dark .guest-actions:hover {
  background: rgba(255, 255, 255, 0.9);
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.user-profile-chip:hover {
  background: hsl(var(--muted));
}

html.dark .user-profile-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html.dark .user-profile-chip:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ── Glass Cards & Tiles ── */
.glass-card {
  background: hsl(var(--card));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border));
  border-radius: 1.25rem;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.08);
  border-color: hsl(var(--accent) / 0.4);
}

html.dark .glass-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html.dark .glass-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: hsl(var(--foreground));
}

@media (max-width: 640px) {
  .stat-number {
    font-size: 2.4rem;
  }
}

/* ── Carousel Card ── */
.carousel-card {
  background: hsl(var(--card));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 0.6rem 0.6rem 0.8rem;
  width: 100%;
  max-width: 380px;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.carousel-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

html.dark .carousel-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

html.dark .carousel-card:hover {
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 768px) {
  .carousel-card {
    max-width: 100%;
    margin-top: 1rem;
  }
}

/* ── Sections Wrapper ── */
.sections-wrapper {
  position: relative;
  z-index: 10;
  padding: 3rem 2.5rem 6rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 640px) {
  .sections-wrapper {
    padding: 1.5rem 1.2rem 4rem;
  }
}

/* ── Sleek Ticker Section (Wired to CSS Color Variables) ── */
.ticker-section {
  width: 100%;
  height: fit-content;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  display: flex;
  align-items: center;
  background-color: var(--ticker-bg);
  border-top: 1px solid var(--ticker-border);
  border-bottom: 1px solid var(--ticker-border);
  backdrop-filter: blur(16px);
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease;
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: transparent;
  padding: 0 !important;
  height: fit-content !important;
  min-height: 0 !important;
  max-height: fit-content !important;
  display: flex !important;
  align-items: center !important;
  user-select: none;
}

.ticker__track {
  display: inline-flex !important;
  align-items: center !important;
  height: fit-content !important;
  animation: marquee 35s linear infinite;
}

.ticker__content {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--ticker-text) !important;
}

.ticker__word {
  font-size: 0.7rem !important;
  line-height: 1 !important;
}

.ticker__star {
  margin: 0 0.4rem;
  opacity: 0.6;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Destination Cards ── */
.dest-card {
  background: hsl(var(--card));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 0.75rem;
  transition: all 0.3s;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dest-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--accent) / 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

html.dark .dest-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

html.dark .dest-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.dest-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
}

.dest-card .dest-name {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: hsl(var(--foreground));
}

.dest-card .dest-location {
  font-size: 0.78rem;
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

html.dark .dest-card .dest-location {
  color: rgba(255, 255, 255, 0.5);
}

.dest-card .dest-desc {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .dest-card .dest-desc {
  color: rgba(255, 255, 255, 0.45);
}

.dest-card .dest-badges {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dest-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

html.dark .dest-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Buttons ── */
.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.75rem 1.8rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

html.dark .btn-primary {
  background: #ffffff;
  color: #0a0a0a;
}

html.dark .btn-primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0.75rem 1.8rem;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground));
}

html.dark .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

html.dark .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Section Titles ── */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: hsl(var(--foreground));
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.8rem;
  }
}

.section-sub {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  margin-top: 0.5rem;
  max-width: 38rem;
}

html.dark .section-sub {
  color: rgba(255, 255, 255, 0.5);
}

/* ── Chips / Pills ── */
.chip {
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  user-select: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chip:hover {
  border-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.chip.on {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
}

html.dark .chip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
}

html.dark .chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

html.dark .chip.on {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
}

/* ── Wizard Steps ── */
.step-dot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  cursor: pointer;
}

.step-dot .dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1.5px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  transition: all 0.3s;
}

.step-dot.on {
  color: hsl(var(--foreground));
}

.step-dot.on .dot {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

html.dark .step-dot {
  color: rgba(255, 255, 255, 0.35);
}

html.dark .step-dot .dot {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
}

html.dark .step-dot.on {
  color: #ffffff;
}

html.dark .step-dot.on .dot {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
}

.step-line {
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
  margin: 0 0.5rem;
  position: relative;
  overflow: hidden;
}

.step-line .fill {
  position: absolute;
  inset: 0;
  background: hsl(var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.step-line.done .fill {
  transform: scaleX(1);
}

html.dark .step-line {
  background: rgba(255, 255, 255, 0.15);
}

html.dark .step-line .fill {
  background: #ffffff;
}

/* ── Modals & Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

html.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

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

.modal-box {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1.5rem;
  width: 100%;
  max-width: 440px;
  padding: 2.2rem;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.15);
  color: hsl(var(--foreground));
}

html.dark .modal-box {
  background: rgba(20, 20, 20, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

.auth-tabs {
  display: flex;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

html.dark .auth-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
}

.auth-tabs button {
  flex: 1;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: none;
  padding: 0.6rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-radius: 9999px;
}

.auth-tabs button.on {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

html.dark .auth-tabs button {
  color: rgba(255, 255, 255, 0.6);
}

html.dark .auth-tabs button.on {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: none;
}

.modal-box form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

html.dark .modal-box form label {
  color: rgba(255, 255, 255, 0.55);
}

.modal-box form input {
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.modal-box form input:focus {
  border-color: hsl(var(--accent));
}

html.dark .modal-box form input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html.dark .modal-box form input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  padding: 0.8rem 1.6rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 400;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

html.dark .toast {
  background: rgba(20, 20, 20, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.err {
  border-color: hsl(var(--destructive));
}

/* ── Footer ── */
.app-footer {
  background: hsl(var(--secondary));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid hsl(var(--border));
  padding: 3rem 2.5rem 2rem;
  color: hsl(var(--muted-foreground));
}

.app-footer a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: hsl(var(--foreground));
}

html.dark .app-footer {
  background: rgba(10, 10, 10, 0.6);
  border-color: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
}

html.dark .app-footer a {
  color: rgba(255, 255, 255, 0.55);
}

html.dark .app-footer a:hover {
  color: #ffffff;
}

/* ── Ambient Sculptural Bas-Relief & Architectural Backgrounds ("منحوتات") ── */
.bg-sculpture-relief {
  background-image: radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.02) 0%, transparent 60%), url('../img/sculptures/sculpture-relief-classical.svg');
  background-repeat: no-repeat;
  background-position: top 8% right 4%;
  background-size: auto, 480px;
}

html.dark .bg-sculpture-relief {
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 60%), url('../img/sculptures/sculpture-relief-classical.svg');
}

.bg-architectural-fluting {
  background-image: url('../img/sculptures/sculpture-architectural-fluting.svg');
  background-repeat: repeat-y;
  background-position: top left;
  background-size: 220px;
}

.bg-cartography-contour {
  background-image: url('../img/sculptures/sculpture-cartography-contour.svg');
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 640px;
}

/* =====================================================================
   LIGHT MODE ADAPTATION LAYER FOR TAILWIND PUBLIC UTILITY CLASSES
   Applied automatically whenever html is NOT .dark
   ===================================================================== */
html:not(.dark) body.bg-\[\#0a0a0a\],
html:not(.dark) body.bg-\[\#0d0d0c\],
html:not(.dark) body.text-white {
  background-color: hsl(var(--background)) !important;
  color: hsl(var(--foreground)) !important;
}

/* Text adaptations in light mode (Preserve white text & gold labels inside photo hero sections) */
.hero-wrapper .hero-headline,
.hero-wrapper .content-layer,
.hero-wrapper .content-layer p,
.hero-wrapper .content-layer span:not([class*="text-amber"]):not([class*="text-emerald"]):not([class*="text-blue"]) {
  color: #ffffff !important;
}

.hero-wrapper .text-amber-300,
.hero-wrapper .text-amber-400 {
  color: #fcd34d !important;
}

.hero-wrapper .hero-headline {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.85);
}

html:not(.dark) .giant-text h1 {
  color: rgba(0, 0, 0, 0.04) !important;
  text-shadow: none !important;
}

/* Text adaptations in light mode (Exempt photo hero wrappers and dark glass containers) */
html:not(.dark) .hero-wrapper * {
  /* Preserve white typography over photo background */
}


/* Keep hero stat numbers white (dark glass strip stays dark in light mode too) */
html:not(.dark) .hero-wrapper .text-white.text-white { color: #ffffff !important; }
html:not(.dark) .hero-wrapper .bg-white\/20 { background-color: rgba(255, 255, 255, 0.2) !important; }

html:not(.dark) .text-white\/60,
html:not(.dark) .text-white\/50,
html:not(.dark) .text-white\/40 {
  color: hsl(var(--muted-foreground)) !important;
}

html:not(.dark) .text-white\/30,
html:not(.dark) .text-white\/20,
html:not(.dark) .text-white\/10 {
  color: hsl(var(--muted-foreground) / 0.6) !important;
}

/* Background adaptations in light mode */
html:not(.dark) .bg-white\/5,
html:not(.dark) .bg-white\/10,
html:not(.dark) .bg-white\/20,
html:not(.dark) .bg-white\/\[0\.03\],
html:not(.dark) .bg-white\/\[0\.04\] {
  background-color: hsl(var(--secondary)) !important;
}

html:not(.dark) .bg-\[\#0a0a0a\],
html:not(.dark) .bg-\[\#0a0a0c\],
html:not(.dark) .bg-\[\#0d0d0c\],
html:not(.dark) .bg-\[\#121212\],
html:not(.dark) .bg-\[\#141414\],
html:not(.dark) .bg-zinc-900,
html:not(.dark) .bg-zinc-950 {
  background-color: hsl(var(--card)) !important;
}

html:not(.dark) .bg-black\/40,
html:not(.dark) .bg-black\/50,
html:not(.dark) .bg-black\/60,
html:not(.dark) .bg-black\/70,
html:not(.dark) .bg-black\/80 {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

/* LM-01 Phase 2: hero photo overlays keep DARK glass in light mode
   (exemption policy — text stays white over photo; re-darken after
   the generic bg-black/40-80 → white/85 conversion above) */
html:not(.dark) .hero-wrapper .bg-black\/40,
html:not(.dark) .hero-wrapper .bg-black\/50,
html:not(.dark) .hero-wrapper .bg-black\/55,
html:not(.dark) .hero-wrapper .bg-black\/60,
html:not(.dark) .hero-wrapper .bg-black\/70,
html:not(.dark) .hero-wrapper .bg-black\/80 {
  background-color: rgba(0, 0, 0, 0.6) !important;
}
html:not(.dark) .hero-wrapper .border-white\/20,
html:not(.dark) .hero-wrapper .border-white\/40,
html:not(.dark) .hero-wrapper .border-white\/50 {
  border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Border adaptations in light mode */
html:not(.dark) .border-white\/5,
html:not(.dark) .border-white\/10,
html:not(.dark) .border-white\/15,
html:not(.dark) .border-white\/20,
html:not(.dark) .border-white\/30,
html:not(.dark) .border-white\/40 {
  border-color: hsl(var(--border)) !important;
}

html:not(.dark) .divide-white\/10,
html:not(.dark) .divide-white\/20 {
  border-color: hsl(var(--border)) !important;
}

/* Form controls & inputs in light mode */
html:not(.dark) input:not([type="checkbox"]):not([type="radio"]),
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: hsl(var(--card)) !important;
  border-color: hsl(var(--border)) !important;
  color: hsl(var(--foreground)) !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: hsl(var(--muted-foreground)) !important;
}

html:not(.dark) label {
  color: hsl(var(--muted-foreground)) !important;
}

/* When hero section is purely text/no-photo background (like explore, about, etc.) */
html:not(.dark) .hero-wrapper:not([style*="url"]) {
  background: hsl(var(--background)) !important;
}

html:not(.dark) .hero-wrapper:not([style*="url"])::before {
  display: none !important;
}
