/* ==========================================================================
   YatriNivas.com Design System
   Modern Mobile-First Adaptive Stylesheet
   ========================================================================== */

/* 1. Global CSS Variables & Theme Engine */
:root {
  /* Color Palette */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-header: #0f172a;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-accent: #059669;
  --brand-accent-hover: #047857;
  --rating-color: #d97706;
  
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Radii & Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Fluid Typography */
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem);
  --step-2: clamp(1.56rem, 1.38rem + 0.9vw, 2.1rem);
  --step-3: clamp(1.95rem, 1.66rem + 1.4vw, 2.8rem);
  
  --max-width: 1240px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Automatic Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #090d16;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #334155;
    --bg-header: #030712;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --border-light: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  }
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* 2. Header & Navigation */
header {
  background-color: var(--bg-header);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--text-inverse);
  text-decoration: none;
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--brand-primary);
}

/* 3. Hero Header Component */
.hero {
  background: linear-gradient(135deg, rgba(15,23,42,0.85), rgba(30,41,59,0.75)), 
              url('https://images.unsplash.com/photo-1566073771259-6a8506099945?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  text-align: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: var(--step-3);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero p {
  font-size: var(--step-1);
  max-width: 650px;
  margin: 0 auto;
  color: #cbd5e1;
}

/* 4. Adaptive Grid & Layout Engine */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
}

.breadcrumb {
  margin: 1.5rem 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Fluid Auto-Fitting Card Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Card Components */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
}

.card-img-wrapper {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background-color: var(--border-light);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: var(--step-0);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-meta {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-stars {
  color: var(--rating-color);
  font-size: 0.9rem;
}

/* 5. Rich AI Travel Guide & Detail Sections */
.travel-guide-box {
  background-color: var(--bg-surface);
  border-left: 5px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.travel-guide-box h3 {
  font-size: var(--step-1);
  margin-bottom: 0.75rem;
  color: var(--brand-primary);
}

.hotel-detail {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.badge {
  display: inline-block;
  background-color: var(--brand-primary);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Flexible Adaptive Image Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.gallery-grid img:hover {
  opacity: 0.9;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-accent);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  margin-top: 1.5rem;
  min-height: 48px; /* Mobile touch accessibility requirement */
}

.btn:hover {
  background-color: var(--brand-accent-hover);
  transform: translateY(-2px);
}

/* 6. Mobile & Desktop Responsive Tweaks */
@media (max-width: 640px) {
  .hero {
    text-align: left;
    padding: 2.5rem 1rem;
  }
  
  .container {
    padding: 0 1rem 2rem 1rem;
  }
  
  .hotel-detail {
    padding: 1.25rem;
  }
  
  .btn {
    width: 100%; /* Full width conversion buttons on mobile */
  }
}