/* =====================================================================
 * Best Sri Lankan Tour — Custom Stylesheet
 * File: assets/css/style.css
 *
 * This file sits ON TOP of Tailwind Play CDN. It defines design tokens,
 * component classes (.btn-primary, .nav-link, etc.), and global polish.
 * ===================================================================== */

:root {
  --c-forest:        #0B3D24;
  --c-forest-deep:   #072818;
  --c-forest-light:  #1A5A3A;
  --c-gold:          #D4A017;
  --c-gold-light:    #E8B947;
  --c-ocean:         #1E6FB8;
  --c-cream:         #FAF7F0;
  --c-cream-warm:    #F2EBDB;
  --c-ink:           #0F172A;
  --c-mute:          #64748B;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 4px 24px rgba(11, 61, 36, 0.08);
  --shadow-lift: 0 12px 40px rgba(11, 61, 36, 0.12);
  --shadow-gold: 0 8px 30px rgba(212, 160, 23, 0.25);
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Force display font on all heading-style elements */
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Selection color */
::selection {
  background-color: var(--c-gold);
  color: var(--c-forest);
}

/* Image defaults — never let images break layout */
img {
  max-width: 100%;
  height: auto;
}

/* Custom scrollbar (subtle, on-brand) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--c-cream-warm);
}
::-webkit-scrollbar-thumb {
  background: var(--c-forest);
  border-radius: 6px;
  border: 2px solid var(--c-cream-warm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-forest-light);
}

/* ===== Nav links ===== */
.nav-link {
  position: relative;
  padding: 0.55rem 0.95rem;
  color: var(--c-ink);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  transition: color 0.18s, background 0.18s;
}
.nav-link:hover {
  color: var(--c-forest);
  background: rgba(11, 61, 36, 0.04);
}
.nav-link.is-active {
  color: var(--c-forest);
}
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 18px;
  height: 2px;
  background: var(--c-gold);
  border-radius: 2px;
  transform: translateX(-50%);
}

/* Dropdown menu items */
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  color: var(--c-ink);
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover {
  background: var(--c-cream-warm);
  color: var(--c-forest);
}
.dropdown-item:last-child {
  border-bottom: none;
}

/* Mobile drawer items */
.mob-nav {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-ink);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.15s, color 0.15s;
}
.mob-nav:hover, .mob-nav.is-active {
  color: var(--c-forest);
  background: var(--c-cream-warm);
}
.mob-sub {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  color: var(--c-mute);
  border-radius: 0.4rem;
  transition: background 0.15s, color 0.15s;
}
.mob-sub:hover {
  background: var(--c-cream-warm);
  color: var(--c-forest);
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--c-forest);
  color: var(--c-cream);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.55rem;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--c-forest-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--c-gold);
  color: var(--c-forest);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.55rem;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn-gold:hover {
  background: var(--c-gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--c-forest);
  color: var(--c-forest);
  background: transparent;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.55rem;
  transition: background 0.18s, color 0.18s;
}
.btn-outline:hover {
  background: var(--c-forest);
  color: var(--c-cream);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #25D366;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.55rem;
  transition: transform 0.18s, background 0.18s;
}
.btn-whatsapp:hover {
  background: #1FB855;
  transform: translateY(-1px);
}

/* ===== Footer ===== */
.footer-link {
  color: rgba(250, 247, 240, 0.7);
  transition: color 0.15s, padding-left 0.18s;
}
.footer-link:hover {
  color: var(--c-gold);
  padding-left: 4px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(250, 247, 240, 0.06);
  color: rgba(250, 247, 240, 0.75);
  border: 1px solid rgba(250, 247, 240, 0.1);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.footer-social:hover {
  background: var(--c-gold);
  color: var(--c-forest);
  transform: translateY(-2px);
  border-color: var(--c-gold);
}

/* ===== Header scroll state ===== */
#site-header.is-scrolled {
  box-shadow: var(--shadow-soft);
  background: rgba(250, 247, 240, 0.98);
}

/* ===== Mobile drawer states ===== */
#mobile-drawer.is-open {
  transform: translateX(0);
}
#mobile-drawer-backdrop.is-open {
  display: block;
  opacity: 1;
}

/* ===== Flash toasts ===== */
.flash-toast {
  padding: 0.85rem 1.1rem;
  border-radius: 0.55rem;
  border-left: 4px solid;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  animation: flashIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes flashIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== Decorative section divider ===== */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 2rem;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-gold), transparent);
}
.section-divider span {
  color: var(--c-gold);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ===== Hero text outline (for over-image readability) ===== */
.hero-title {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ===== Card patterns ===== */
.tour-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--c-cream);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
}
.tour-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

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

/* ===== Print ===== */
@media print {
  #site-header, footer, #whatsapp-float, #mobile-drawer, #mobile-drawer-backdrop {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
