/*
 * MODERN RESTAURANT THEME for Pathiri Palace
 *
 * This new theme uses:
 * - A modern, elegant serif font ('Playfair Display') for headings.
 * - A clean, friendly sans-serif font ('Poppins') for body text.
 * - A color palette of deep green, warm gold, and clean cream/white.
 * - Softer, more subtle shadows for a premium feel.
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

/* --- Root Variables (The New Theme) --- */
:root {
  /* Colors */
  --color-primary: #2C5F2D; /* Deep, rich green */
  --color-primary-hover: #224723; /* Darker green */
  --color-primary-rgb: 44, 95, 45; /* RGB for opacity */

  --color-secondary: #E8C872; /* Warm, premium gold */
  --color-secondary-hover: #d4b561; /* Darker gold */

  --color-background: #FFFAF0; /* Light, warm cream */
  --color-surface: #FFFFFF; /* Pure white for cards */
  
  --color-text: #333333; /* Dark charcoal (not pure black) */
  --color-text-secondary: #666666; /* Medium gray */
  --color-text-on-primary: #FFFFFF;
  --color-text-on-secondary: #333333; /* Dark text on gold */
  --color-border: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-family-heading: 'Playfair Display', serif;
  --font-family-base: 'Poppins', sans-serif;
  
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 36px;
  --font-size-4xl: 52px;

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --letter-spacing-tight: -0.02em;

  /* Spacing */
  --space-0: 0;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows (Softer & more modern) */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-xl); }
p { margin-bottom: var(--space-16); }
a { text-decoration: none; color: var(--color-primary); }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-20);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  /* Modern glassy effect */
  background: rgba(255, 250, 240, 0.85); /* --color-background with alpha */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-standard);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-20);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo h2 {
  font-family: var(--font-family-heading);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-32);
}

.nav-link {
  font-family: var(--font-family-base);
  text-decoration: none;
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-md);
  position: relative;
  transition: color var(--duration-fast) var(--ease-standard);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--duration-normal) var(--ease-standard);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  margin: 3px 0;
  transition: var(--duration-normal);
  border-radius: 3px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-background);
  padding-top: var(--space-80);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-20);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-family: var(--font-family-base);
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-normal);
  margin-bottom: var(--space-24);
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--color-text);
  margin-bottom: var(--space-32);
  line-height: var(--line-height-normal);
}

.hero-buttons {
  display: flex;
  gap: var(--space-16);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-32);
  border-radius: var(--radius-md);
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-text-on-secondary);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-64);
}

.section-header h2 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-16);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- About Section --- */
.about {
  padding: var(--space-96) 0;
  background: var(--color-surface); /* White */
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-64);
  align-items: center;
}

.about-text p {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-24);
  color: var(--color-text);
}

.about-text .mission {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  font-style: italic;
  padding: var(--space-20);
  background: rgba(var(--color-primary-rgb), 0.05); /* Light green tint */
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.stat-item {
  text-align: center;
  padding: var(--space-24);
  background: var(--color-background); /* Cream */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-item h3 {
  font-family: var(--font-family-base); /* Use base font for numbers */
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-8);
}

.stat-item p {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  margin: 0;
}
/* --- Services Section (Clean & Professional Redesign) --- */
.services {
  padding: var(--space-96) 0;
  background: var(--color-surface); /* White background for clarity */
  position: relative;
}

.services .section-header h2 {
  color: var(--color-primary);
}

.services .section-header p {
  color: var(--color-text-secondary);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-32);
}

/* Service Card */
.service-card {
  background: var(--color-background); /* Light cream */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--color-primary-rgb), 0.2);
}

/* Service Icon */
.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto var(--space-20);
  background: rgba(var(--color-primary-rgb), 0.08);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-standard);
}

.service-icon i {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  transition: transform var(--duration-normal) var(--ease-standard);
}

.service-card:hover .service-icon {
  background: var(--color-primary);
}

.service-card:hover .service-icon i {
  color: var(--color-text-on-primary);
  transform: scale(1.1);
}

/* Service Text */
.service-card h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-12);
}

.service-card p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  margin: 0;
}

/* Accent line under heading */
.service-card h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-secondary);
  margin: var(--space-8) auto 0;
  border-radius: var(--radius-full);
  opacity: 0.7;
}

/* Subtle background pattern for visual depth */
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(44,95,45,0.05), transparent 70%);
  pointer-events: none;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .service-card {
    padding: var(--space-24);
  }

  .service-card h3 {
    font-size: var(--font-size-lg);
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-icon i {
    font-size: var(--font-size-xl);
  }
}


/* JS will change this to --color-secondary on hover */
.service-card:hover .service-icon {
  background: var(--color-secondary);
}

.service-card:hover .service-icon i {
  color: var(--color-text-on-secondary);
}

.service-card h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-12);
}

.service-card p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  margin: 0;
}
/* --- Products Section (Colorful Modern Style) --- */
.products {
  padding: var(--space-96) 0;
  background: linear-gradient(135deg, #2C5F2D 0%, #E8C872 100%);
  position: relative;
  overflow: hidden;
}

/* Add subtle decorative overlay (texture feel) */
.products::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 70%
  ),
  radial-gradient(
    circle at bottom right,
    rgba(0, 0, 0, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.products .section-header h2 {
  color: var(--color-surface);
}

.products .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-32);
  position: relative;
  z-index: 1;
}

.product-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-standard);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
}

/* Subtle floating hover effect */
.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: var(--color-secondary);
}

/* Product Image */
.product-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-standard);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

/* Product Info */
.product-info {
  padding: var(--space-24);
  text-align: center;
}

.product-info h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-surface);
  margin-bottom: var(--space-8);
}

.product-info p {
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--line-height-normal);
}

/* Add gradient accent line under title */
.product-info h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-secondary);
  margin: var(--space-8) auto 0;
  border-radius: var(--radius-full);
}

/* Glow effect on hover */
.product-card:hover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at center,
    rgba(232, 200, 114, 0.25) 0%,
    transparent 70%
  );
  z-index: 0;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .products {
    background: linear-gradient(160deg, #2C5F2D 0%, #E8C872 90%);
  }
  
  .product-info h3 {
    font-size: var(--font-size-lg);
  }
}

/* --- Contact Section --- */
.contact {
  padding: var(--space-96) 0;
  background: var(--color-background); /* Cream */
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
  margin-bottom: var(--space-48);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-16);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: var(--font-size-lg);
  color: var(--color-text-on-primary);
}

.contact-details h3 {
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.contact-details p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
  margin: 0;
}

.contact-map {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-48);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder {
  color: var(--color-text-secondary);
}

.map-placeholder i {
  font-size: var(--font-size-4xl);
  color: var(--color-primary);
  margin-bottom: var(--space-20);
}

.social-links {
  text-align: center;
}

.social-links h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-20);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-16);
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: var(--font-size-lg);
  transition: all var(--duration-normal) var(--ease-standard);
}

.social-link:hover {
  background: var(--color-primary-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* --- Footer --- */
.footer {
  background: var(--color-text); /* Dark charcoal footer */
  color: var(--color-background); /* Cream text */
  padding: var(--space-48) 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.footer-section h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-8);
  color: var(--color-surface);
}

.footer-section p {
  opacity: 0.8;
  margin: 0;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .hero-container {
      grid-template-columns: 1fr;
      text-align: center;
      gap: var(--space-32);
  }
  
  .hero-image {
      order: -1; /* Move image to top on mobile */
      max-width: 500px;
      margin: 0 auto;
  }
  
  .hero-buttons {
      justify-content: center;
  }
  
  .about-content {
      grid-template-columns: 1fr;
      gap: var(--space-48);
  }

  .contact-content {
      grid-template-columns: 1fr;
      gap: var(--space-48);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 65px; /* Adjust based on new navbar height */
    flex-direction: column;
    background-color: var(--color-surface);
    width: 100%;
    text-align: center;
    transition: all 0.5s ease;
    box-shadow: var(--shadow-lg);
    padding: var(--space-20) 0;
    gap: 0;
  }
  
  .nav-item {
      padding: var(--space-16) 0;
      border-bottom: 1px solid var(--color-border);
  }
  
  .nav-item:last-child {
      border-bottom: none;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .container {
    padding: 0 var(--space-16);
  }
  
  .about-stats {
      flex-direction: row;
      justify-content: space-around;
      flex-wrap: wrap;
  }
  
  .stat-item {
      flex-basis: 45%;
  }

  .services-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    text-align: center;
    flex-direction: column;
    gap: var(--space-24);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.5rem; } /* ~40px */
  h2 { font-size: 2rem; } /* ~32px */

  .hero-buttons {
    flex-direction: column;
    width: 80%;
    margin: 0 auto;
  }
  
  .about-stats {
      flex-direction: column;
  }
  
  .stat-item {
      flex-basis: 100%;
  }

  .btn {
    padding: var(--space-12) var(--space-24);
  }
}








/* --- Hero Image Slider --- */
.hero-image-slider {
  position: relative;
  width: 100%;
  height: 450px; /* You can adjust this height */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  background: #eee; /* Fallback color */
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: hero-fade-slide 20s infinite; /* 20s total duration (5s per image) */
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stagger the animations for each slide */
.hero-slide:nth-child(1) {
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  animation-delay: 5s; /* Starts when first slide fades out */
}
.hero-slide:nth-child(3) {
  animation-delay: 10s;
}
.hero-slide:nth-child(4) {
  animation-delay: 15s;
}

/* Keyframes for the fading slide animation */
@keyframes hero-fade-slide {
  0% { opacity: 0; transform: scale(1.05); }
  10% { opacity: 1; transform: scale(1); }  /* Fade in */
  25% { opacity: 1; transform: scale(1); }  /* Hold */
  35% { opacity: 0; transform: scale(1); }  /* Fade out */
  100% { opacity: 0; }
}

/* --- Attractive Load-in Animations --- */
.hero-content > * {
  /* Set initial state for animation */
  opacity: 0;
  transform: translateY(20px);
  /* Define the animation */
  animation: fadeInUp 0.7s ease-out forwards;
}

/* Stagger the text animation */
.hero-title {
  animation-delay: 0.3s;
}
.hero-subtitle {
  animation-delay: 0.5s;
}
.hero-description {
  animation-delay: 0.7s;
}
.hero-buttons {
  animation-delay: 0.9s;
}

/* Animate the slider itself */
.hero-image-slider {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleUp 0.8s ease-out 0.6s forwards;
}

/* Keyframes for the text animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Keyframes for the slider animation */
@keyframes scaleUp {
  to {
    opacity: 1;
    transform: scale(1);
  }
}