/* Nepal Heritage Travel and Tours - Production Stylesheet with FOUC Fallbacks */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-crimson: #8B0000;
  --color-crimson-dark: #660000;
  --color-crimson-light: #9E1B32;
  --color-navy: #0B2545;
  --color-navy-dark: #051326;
  --color-navy-light: #103763;
  --color-gold: #D4AF37;
  --color-gold-light: #F3E5AB;
  --color-cream: #FAF9F6;
  --color-surface: #F8F9FA;
}

/* Core Document Styles */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1E293B;
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* FOUC Protection & Essential Layout Fallbacks */
.bg-navy-950 { background-color: #051326 !important; }
.bg-navy-900 { background-color: #0b2545 !important; }
.bg-crimson-700 { background-color: #8b0000 !important; }
.bg-crimson-800 { background-color: #700000 !important; }
.bg-amber-500 { background-color: #d4af37 !important; }
.text-amber-400 { color: #e5c053 !important; }
.text-amber-300 { color: #f3d97f !important; }
.text-white { color: #ffffff !important; }

.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }

/* Pre-compiled Layout Containers */
.container-box {
  width: 100%;
  box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0B2545;
}
::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8B0000;
}

/* Hero Background and Gradient Masks */
.hero-gradient-overlay {
  background: linear-gradient(180deg, rgba(11, 37, 69, 0.75) 0%, rgba(5, 19, 38, 0.88) 60%, rgba(5, 19, 38, 0.98) 100%);
}

.pattern-nepal-mandala {
  background-image: radial-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Animations */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 16px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.whatsapp-pulse {
  animation: pulse-ring 2.5s infinite;
}

@keyframes float-subtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float {
  animation: float-subtle 4s ease-in-out infinite;
}

/* Mobile Touch Targets */
button, a, input, select, textarea {
  touch-action: manipulation;
}

/* Focus States for Accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
}

/* Image Fallback Aspect & Brand Badges */
.brand-logo-img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #ffffff;
}

/* Modal Fallback Display Rules */
#tour-detail-modal:not(.hidden) {
  display: flex !important;
}

/* Truncate Multi-Line Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Print Cleanliness */
@media print {
  #main-navbar, #floating-whatsapp, aside {
    display: none !important;
  }
}
