/* ==========================================================================
   Visit Cox - Award-Winning Editorial Design System
   Principal UI/UX & Lead Frontend Architecture
   ========================================================================== */

:root {
  /* Editorial Palette: Muted Coastal, Warm Sand & Deep Charcoal */
  --bg-alabaster: #FAF9F6;
  --bg-surface: #FFFFFF;
  --bg-warm-sand: #F5F3EF;
  --bg-warm-muted: #EFECE6;
  
  --text-charcoal: #111827;
  --text-body: #374151;
  --text-muted: #4B5563; /* AA on sand surfaces */
  --text-subtle: #9CA3AF;
  
  --border-stone: #E7E5E0;
  --border-stone-light: #F0EEE9;
  --border-stone-dark: #D4D0C7;
  
  --accent-terracotta: #C86446;
  --accent-terracotta-soft: #F9EFEA;
  --accent-sage: #4A6B5D;
  --accent-sage-soft: #EEF3F0;
  --accent-navy: #0B2135;
  --accent-navy-soft: #E8F0F8;

  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hind Siliguri', sans-serif;
}

/* --------------------------------------------------------------------------
 * Base Typography & Smooth Scrolling
 * -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  overflow-x: hidden;
  background-color: var(--bg-alabaster);
  color: var(--text-charcoal);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-alabaster);
  color: var(--text-charcoal);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* High-end Editorial Headings */
.font-serif {
  font-family: var(--font-serif);
  font-feature-settings: "kern" 1, "liga" 1;
}

.font-sans {
  font-family: var(--font-sans);
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button, a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
 * Minimalist Custom Scrollbar
 * -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alabaster);
}

::-webkit-scrollbar-thumb {
  background: #D4D0C7;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A8A29E;
}

/* --------------------------------------------------------------------------
 * Editorial Navigation Glassmorphism
 * -------------------------------------------------------------------------- */
.navbar-editorial {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-stone);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
 * Asymmetrical Hero Collage & Floating Glassmorphism Search Pill
 * -------------------------------------------------------------------------- */
.floating-search-pill {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(231, 229, 224, 0.95);
  box-shadow: 0 12px 36px -4px rgba(17, 24, 39, 0.06), 0 4px 12px -2px rgba(17, 24, 39, 0.03);
  border-radius: 9999px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.floating-search-pill:focus-within {
  border-color: #111827;
  box-shadow: 0 16px 44px -4px rgba(17, 24, 39, 0.1);
}

/* --------------------------------------------------------------------------
 * Curated Destinations: Bento Grid Architecture
 * -------------------------------------------------------------------------- */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border-stone);
  background-color: #EFECE6;
  cursor: pointer;
  transition: border-color 0.4s ease;
}

.bento-card:hover {
  border-color: #A8A29E;
}

.bento-card .bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-img {
  transform: scale(1.05);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.05) 0%,
    rgba(17, 24, 39, 0.35) 45%,
    rgba(17, 24, 39, 0.92) 100%
  );
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.bento-card:hover .bento-overlay {
  opacity: 0.95;
}

.bento-card .bento-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-arrow {
  background: #FFFFFF;
  color: #111827;
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
 * Premium Stays: Draggable Horizontal Scroll Track
 * -------------------------------------------------------------------------- */
.stay-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 320px;
  background: #FFFFFF;
  border-radius: 1.25rem;
  border: 1px solid var(--border-stone);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .stay-card {
    width: 360px;
  }
}

.stay-card:hover {
  border-color: #111827;
  transform: translateY(-4px);
}

.stay-card .stay-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stay-card:hover .stay-img {
  transform: scale(1.04);
}

/* --------------------------------------------------------------------------
 * Practicalities & Transport: Brutalist Clean Editorial Table
 * -------------------------------------------------------------------------- */
.editorial-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.editorial-table th {
  padding: 1.125rem 1.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-stone);
}

.editorial-table td {
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-charcoal);
  border-bottom: 1px solid var(--border-stone-light);
  transition: background-color 0.2s ease;
}

.editorial-table tbody tr:hover td {
  background-color: rgba(245, 243, 239, 0.5);
}

/* --------------------------------------------------------------------------
 * FAQ Accordion (+ to × rotation)
 * -------------------------------------------------------------------------- */
.faq-row {
  border-bottom: 1px solid var(--border-stone);
  transition: border-color 0.2s ease;
}

.faq-row.active {
  border-color: var(--text-charcoal);
}

.faq-trigger {
  width: 100%;
  padding: 1.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.faq-plus-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--border-stone);
  color: var(--text-charcoal);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.faq-row.active .faq-plus-icon {
  transform: rotate(45deg);
  background-color: var(--text-charcoal);
  color: #FFFFFF;
  border-color: var(--text-charcoal);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.faq-row.active .faq-content {
  max-height: 400px;
  padding-bottom: 1.75rem;
}

/* --------------------------------------------------------------------------
 * Scroll Reveal Animations (Intersection Observer)
 * -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
 * Floating Concierge Pill & Chat Panel
 * -------------------------------------------------------------------------- */
.concierge-pill {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 45;
  background: #111827;
  color: #FAF9F6;
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.18);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.concierge-pill:hover {
  transform: translateY(-2px);
  background: #000000;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.25);
}

.chatbot-panel {
  transform-origin: bottom right;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s;
}

.chatbot-panel.hidden-chat {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(12px);
  pointer-events: none;
}

.chatbot-panel.visible-chat {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Hardware accelerated layer promotion */
.bento-card,
.stay-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* --------------------------------------------------------------------------
 * Accessibility: AA contrast, focus, tap targets, reduced motion
 * `html` prefix beats the Tailwind CDN styles, which are injected after this file.
 * -------------------------------------------------------------------------- */
/* Light surfaces only: the same utilities stay as they are inside dark sections. */
html :not(:is(.bg-charcoal, .bg-black, .bg-ocean-800, .bg-ocean-900, .bg-ocean-950, .bg-stone-700, .bg-stone-800, .bg-stone-900, .bg-slate-900, .bg-slate-950, .bg-teal-900, .bg-sky-700, .bg-\[\#111827\], [class*="from-"]) *):is(.text-stone-400, .text-stone-500) {
  color: #5A564F; /* stone-600: 6.6:1 on sand, was 2.6:1 and 4.2:1 */
}

html :not(:is(.bg-charcoal, .bg-black, .bg-ocean-800, .bg-ocean-900, .bg-ocean-950, .bg-stone-800, .bg-stone-900, .bg-slate-900, .bg-slate-950, [class*="from-"]) *).text-terracotta-600 {
  color: #A84C32; /* terracotta-700: 5.3:1, was 3.9:1 */
}

html :is(.bg-charcoal, .bg-black, .bg-ocean-900, .bg-ocean-950, .bg-stone-800, .bg-stone-900, .bg-slate-900, .bg-slate-950, .bg-\[\#111827\]) .text-stone-500 {
  color: #A39D92; /* stone-400 on dark: 6.9:1, was 3.9:1 */
}

html .bg-terracotta-600 { background-color: #A84C32; } /* white text 5.6:1 */
html .bg-sky-500.text-white { background-color: #0369A1; } /* 5.9:1 */
html .bg-teal-500.text-white { background-color: #0F766E; } /* 5.5:1 */

html :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-terracotta); /* >= 3:1 on both sand and charcoal */
  outline-offset: 2px;
}

.concierge-pill {
  min-height: 44px;
}

@media (pointer: coarse) {
  html :is(button, select, [role="button"], input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"])) {
    min-height: 44px;
  }
  html :is(input[type="checkbox"], input[type="radio"]) {
    width: 1.25rem; /* the wrapping <label> carries the rest of the tap area */
    height: 1.25rem;
  }
  html :is(nav, footer) a,
  html a[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  html :is(button, [role="button"], a[href^="tel:"]) {
    min-width: 44px;
  }
  html label:has(> input[type="checkbox"], > input[type="radio"]) {
    min-height: 44px;
  }
  /* The thumb is drawn centred; the transparent box is the tap area. */
  html input[type="range"] {
    height: 44px;
    background: transparent;
  }
  /* Standalone links (card links, photo credits, breadcrumbs). Links inside a sentence are exempt.
     :where() keeps specificity at 0 so a Tailwind display class (.block, .flex) still wins. */
  :where(a[href]:not(p a, li a, td a, :has(div, img, h2, h3, h4, p))) {
    display: inline-flex;
    align-items: center;
  }
  html a[href] { /* ignored by links that stay display: inline */
    min-height: 44px;
    min-width: 44px;
  }
  /* Short links widened by min-width ("Home", "999"): centre the text instead of leaving a gap. */
  html a[href]:not([class*="flex"], [class*="block"], [class*="grid"]) {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
 * Shared content helpers (used from js/ templates and pages)
 * -------------------------------------------------------------------------- */
/* "Approximate, as of <date>" note under any price, fare or phone number. */
.vc-approx {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.6; /* room for Bangla matras */
  font-style: italic;
  color: #5A564F;
}

/* Emergency contacts: <ul class="vc-emergency"><li><span>Label</span><a href="tel:999">999</a></li></ul> */
.vc-emergency {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-stone-dark);
  border-left: 4px solid #B91C1C;
  border-radius: 0.75rem;
  background: var(--bg-surface);
}

.vc-emergency li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-charcoal);
}

.vc-emergency li + li {
  border-top: 1px solid var(--border-stone-light);
}

.vc-emergency a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.125rem;
  color: #B91C1C; /* 6.5:1 on white */
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
 * Itinerary Print Optimization
 * -------------------------------------------------------------------------- */
@media print {
  header,
  footer,
  #hero,
  #destinations,
  #hotels,
  #transport,
  #faq,
  .concierge-pill,
  .chatbot-panel,
  [data-no-export="true"],
  #user-friendly-toast {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #111827 !important;
  }

  #itinerary-section {
    padding: 0 !important;
    border: none !important;
    background: #FFFFFF !important;
  }

  .itinerary-day-card {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    box-shadow: none !important;
    border: 1px solid #D6D3D1 !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Analytics consent banner (js/consent.js): bottom bar, does not block the page. */
.vc-consent {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 60;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.875rem 1rem;
  background: #111827;
  color: #FAF9F6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.25);
  font-size: 0.875rem;
  line-height: 1.45;
}
.vc-consent-text { margin: 0 0 0.75rem; }
.vc-consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.vc-consent-btn {
  flex: 1 1 9rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: #FAF9F6;
  color: #111827;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}
.vc-consent-btn:hover { background: #E7E5E0; }
.vc-consent-btn:focus-visible, .vc-consent-link:focus-visible, .footer-legal:focus-visible { outline: 2px solid #38BDF8; outline-offset: 2px; }
.vc-consent-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; color: #FAF9F6; text-decoration: underline; }

/* Footer "Privacy" and "Cookie settings" links */
.footer-legal-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1rem; padding-top: 1rem; font-size: 0.75rem; }
.footer-legal { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem; color: inherit; text-decoration: underline; background: none; border: 0; cursor: pointer; font: inherit; }
