/* --- Custom Local Fonts --- */
@font-face {
  font-family: "CustomHeaderFont";
  src: url("../assets/fonts/SAFFIERA.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Luxio Events Color Palette & Typography --- */
:root {
  --light-beige: #e6dcc8;
  --warm-tan: #c2a88d;
  --medium-brown: #b06a3d;
  --dark-brown: #5c2206;
  --light-gray: #d9d9d9;
  --black: #000000;
  --bright-orange: #f04a00;
  --deep-red-brown: #8c1f05;

  /* Fonts */
  --font-heading: "CustomHeaderFont", serif;
  --font-subheading: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Accounts for sticky navbar */
}

body {
  font-family: var(--font-body);
  background-color: var(--light-beige);
  color: var(--dark-brown);
  line-height: 1.6;
  font-size: 16px;
  /* (Removed the overflow rules from here) */
}

/* CRITICAL FIX: Contains AOS animations so they never stretch the mobile screen! */
header,
section,
footer {
  overflow-x: hidden;
  width: 100%;
}

/* Main Headers */
h1,
h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--dark-brown);
}

/* Subheaders */
h3,
h4 {
  font-family: var(--font-subheading);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--dark-brown);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

.subtitle {
  font-family: var(--font-subheading);
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--medium-brown);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.intro-p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

/* --- Navigation --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  background-color: var(--light-beige);
  position: sticky;
  top: 0;
  z-index: 9999; /* Boosted */

  /* CRITICAL SAFARI FIX: Forces the navbar to stay above animations */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);

  transition: all 0.3s ease;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--dark-brown);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--bright-orange); /* Subtle pop of color on hover */
}

.btn-nav {
  background-color: transparent;
  border: 1px solid var(--dark-brown);
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background-color: var(--dark-brown);
  color: var(--light-beige) !important;
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.hamburger .bar {
  width: 25px;
  height: 2px;
  background-color: var(--dark-brown);
  transition: 0.3s ease;
}

/* --- Circular Logo Styling --- */
.circular-logo {
  width: 55px; /* Adjust this to make the logo larger or smaller */
  height: 55px; /* Keep this exactly the same as the width */
  border-radius: 50%; /* This turns the 1x1 square into a perfect circle */
  object-fit: cover; /* Ensures the image fits perfectly without squishing */

  /* Optional Luxury Touches */
  border: 2px solid var(--warm-tan); /* Adds a subtle, elegant ring around the logo */
  box-shadow: 0 4px 10px rgba(92, 34, 6, 0.1); /* Soft shadow to separate it from the background */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Make it interactive when hovered */
.logo-link {
  display: flex;
  align-items: center;
}

.logo-link:hover .circular-logo {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(92, 34, 6, 0.2);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  background-color: var(--deep-red-brown); /* More grounded, luxury feel */
  color: #fff;
  padding: 1rem 2rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--dark-brown);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--dark-brown);
  border: 1px solid var(--dark-brown);
  padding: 1rem 2rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--medium-brown);
  border-color: var(--medium-brown);
  color: var(--light-beige);
}

/* --- Hero Section --- */
.hero {
  position: relative; /* CRITICAL: Anchors the absolute slideshow */
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  text-align: center;
  border-bottom: none;

  /* Hides the edges of the images as they slowly zoom in */
  overflow: hidden;
  background-color: var(--dark-brown);
}

/* Elevates the text above the sliding images */
.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* =========================================
   --- NEW: INFINITE HERO SLIDESHOW ---
   ========================================= */
.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Stays behind the text */
}

/* The Deep Brown Overlay */
.hero-slideshow::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* Uses your brand colors for a rich, luxurious tint */
  background: linear-gradient(rgba(92, 34, 6, 0.4), rgba(92, 34, 6, 0.8));
  z-index: 5; /* Sits above the images, but below the text */
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0; /* Hidden by default */

  /* 12s total loop (4 seconds per image). Adjust 12s if you want it faster/slower! */
  animation: heroFade 16s infinite ease-in-out;
}

/* IMPORTANT: Put your actual image file names here! */
.slide-1 {
  background-image: url("../assets/img/gallery/1st.jpeg");
  animation-delay: 0s; /* Starts immediately */
}
.slide-2 {
  background-image: url("../assets/img/gallery/5th.jpg");
  animation-delay: 4s; /* Waits 4 seconds, then starts */
}
.slide-3 {
  background-image: url("../assets/img/gallery/4th.jpg");
  animation-delay: 8s; /* Waits 8 seconds, then starts */
}
.slide-4 {
  background-image: url("../assets/img/gallery/3rd.jpg");
  animation-delay: 12s; /* Waits 8 seconds, then starts */
}

/* The Cross-Fade & Zoom Animation */
@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  10% {
    opacity: 1; /* Fades in smoothly */
  }
  33% {
    opacity: 1; /* Stays visible */
  }
  43% {
    opacity: 0; /* Cross-fades into the next image */
    transform: scale(1.08); /* Slow luxury zoom effect */
  }
  100% {
    opacity: 0;
    transform: scale(1); /* Resets silently in the background */
  }
}
/* 3. Make the text light so it pops against the photo */
.hero h1 {
  font-size: 4rem; /* Made slightly larger for impact */
  margin-bottom: 1.5rem;
  color: var(--light-beige); /* Changed from dark-brown to light */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Adds depth to the text */
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: var(--light-gray); /* Changed to light */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* 4. Update the secondary button to work on a dark background */
.hero .btn-secondary {
  color: var(--light-beige);
  border-color: var(--light-beige);
}

.hero .btn-secondary:hover {
  background-color: var(--light-beige);
  color: var(--dark-brown);
}

/* 5. The Centered Hero Logo */
.hero-logo {
  width: 150px; /* Slightly larger than the navbar logo for impact */
  height: 150px;
  border-radius: 50%; /* Keeps that perfect circular badge look */
  object-fit: cover;

  /* This centers the image and adds space below it */
  display: block;
  margin: 0 auto 1.5rem auto;

  /* Elegant border and shadow to make it pop off the background image */
  /* border: 2px solid var(--warm-tan); */
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); */
}

/* --- Sections General --- */
section {
  padding: 6rem 0;
}

/* --- Positioning --- */
.positioning {
  background-color: var(--warm-tan);
  text-align: center;
}

.positioning h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.positioning p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1rem auto;
}

/* --- Services --- */
.services {
  background-color: var(--light-beige);
}

.double-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.check-list {
  list-style: none;
  margin: 2rem 0;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
}

.check-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--medium-brown);
}

.highlight-text {
  font-size: 1rem;
  color: var(--deep-red-brown);
  padding-left: 1rem;
  margin-top: 2rem;
}

/* --- New Event Types Image Cards --- */
.event-types-section {
  background-color: var(--warm-tan); /* Replaced muddy gray with warm tan */
  padding: 6rem 0;
}

.event-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.event-image-card {
  background-color: var(--light-beige); /* Pops nicely off the warm tan */
  border: none; /* Let the shadow define the edges for a cleaner blend */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(92, 34, 6, 0.05); /* Very subtle base shadow */
}

.event-image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(92, 34, 6, 0.12); /* Slightly stronger shadow on hover */
}

.event-img {
  height: 220px;
  width: 100%;
  background-color: var(--medium-brown); /* Better fallback color */
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--warm-tan);
}

.img-corporate {
  background-image: url("../assets/img/corporate.png");
}
.img-private {
  background-image: url("../assets/img/private.png");
}
.img-destination {
  background-image: url("../assets/img/destination.png");
}
.img-luxury {
  background-image: url("../assets/img/concept.png");
}

.event-card-content {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
}

.event-card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--dark-brown);
}

.event-card-content p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Expertise --- */
.expertise {
  background-color: var(--dark-brown);
  color: var(--light-beige);
}

.expertise h2,
.expertise .subtitle,
.expertise p {
  color: var(--light-beige);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.grid-item {
  border-top: 1px solid var(--medium-brown); /* Blends beautifully with dark brown */
  padding-top: 1.5rem;
  text-align: left;
}

.grid-item h3 {
  color: var(--warm-tan);
  font-size: 1.2rem;
}

/* --- Process Timeline --- */
.process {
  background-color: var(--light-beige);
}

.timeline {
  max-width: 800px;
  margin: 3rem auto 0;
}

.step {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

.step-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--bright-orange); /* Excellent spot for an elegant pop of color */
  font-weight: 600;
  line-height: 1;
}

.step-content h3 {
  margin-bottom: 0.5rem;
}

/* --- Gallery Scroll (Updated for Dragging) --- */
.gallery {
  background-color: var(--warm-tan);
  overflow: hidden;
}

.horizontal-scroll {
  width: 100%;
  overflow-x: hidden; /* Changed from auto to hidden so the user can't manually scroll the bar */
  padding: 2rem 0;

  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );

  cursor: grab; /* Changes cursor to a left-right arrow to indicate hover movement */
  scrollbar-width: none;
}

/* Hide scrollbar for Chrome/Safari */
.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.scroll-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  /* Notice we removed the animation property here! */
}

.scroll-item {
  height: 420px; /* The height stays perfectly consistent! */
  background-color: var(--medium-brown);
  border: none;
  box-shadow: 0 4px 15px rgba(92, 34, 6, 0.1);
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
  pointer-events: none;
}

/* Dynamic Widths based on Orientation */
.item-portrait {
  width: 320px; /* Classic vertical crop */
}

.item-landscape {
  width: 600px; /* Wide cinematic crop */
}

.scroll-item:hover {
  transform: scale(1.02);
}

/* --- Trust & Location --- */
.trust-location {
  background-color: var(--light-beige);
}

.location-box {
  background-color: var(--dark-brown);
  color: var(--light-beige);
  padding: 3rem;
}

.location-box h2 {
  color: var(--warm-tan);
}

.location-box p {
  margin-bottom: 1rem;
}

/* --- Team --- */
.team {
  background-color: var(--warm-tan); /* Replaced muddy gray with warm tan */
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.team-member h3 {
  margin-bottom: 0.2rem;
}

.role {
  font-family: var(--font-subheading);
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--deep-red-brown); /* Grounded accent color */
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.team-member p,
.network-box p {
  font-size: 0.95rem;
}

.network-box {
  background: var(--light-beige); /* Pops off the warm tan background */
  padding: 3rem;
  border: none;
  box-shadow: 0 4px 15px rgba(92, 34, 6, 0.05); /* Soft, blended shadow */
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Team Member Images & Buttons --- */
.team-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--warm-tan);
  background-color: var(
    --medium-brown
  ); /* SMART FALLBACK: Adds the brown block color if image is missing */
}

#modal-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--warm-tan);
  background-color: var(
    --medium-brown
  ); /* SMART FALLBACK: Adds the brown block color if image is missing */
}

/* .team-img-block {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--medium-brown);
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

#modal-img-block {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--medium-brown);
  border-radius: 4px;
} */

.preview-text {
  margin-bottom: 1rem;
}

.btn-read-more {
  background: transparent;
  border: none;
  color: var(--deep-red-brown);
  font-family: var(--font-subheading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
}

.btn-read-more:hover {
  color: var(--medium-brown);
}

/* --- Team Modal Styling --- */
.modal {
  /* Replaced 'display: none' with opacity/visibility for smooth fading */
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex; /* Always flex, just invisible when not active */

  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background-color: var(--light-beige);
  padding: 3rem;
  max-width: 800px;
  width: 90%;
  position: relative;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  max-height: 90vh;
  overflow-y: auto;

  /* NEW DESKTOP ANIMATION: Starts slightly small and pushed down */
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  /* Uses a custom cubic-bezier for a smooth, premium "snap" into place */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* When the modal is active, the content scales to normal size */
.modal.active .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  font-family: sans-serif;
  color: var(--dark-brown);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--deep-red-brown);
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem;
  align-items: center;
}

#modal-text {
  line-height: 1.8;
}

/* --- Final CTA --- */
.final-cta {
  background-color: var(--dark-brown);
  color: var(--light-beige);
}

.final-cta h2 {
  color: var(--light-beige);
  font-size: 2.5rem;
}

.final-cta p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

.micro-copy {
  font-size: 0.85rem !important;
  margin-top: 1.5rem;
  opacity: 0.7;
  color: var(--warm-tan);
}

/* --- Footer --- */
/* Custom Footer Badges */
.footer-badges {
  display: flex;
  flex-direction: column;
}

.badge-icons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap; /* Allows wrapping on mid-sized screen widths */
  margin-top: 0.5rem;
}

.badge-item {
  display: inline-flex;
  align-items: center;
}

.badge-item img {
  height: 45px; /* Forces every badge image to have the exact same height */
  width: auto; /* Dynamically maintains proper aspect ratio proportions */
  object-fit: contain; /* Insures images scale perfectly within their dimensions */
  transition: transform 0.3s ease;
}

/* Elegant lift hover effect to match your social icons layout styling */
.badge-item:hover img {
  transform: translateY(-3px);
}

footer {
  background-color: var(--black);
  color: var(--warm-tan);
  padding: 4rem 0 2rem 0;
}

/* Sleek 2-Column Layout */
.footer-grid {
  display: flex;
  justify-content: space-between; /* Pushes the left and right sides apart */
  align-items: flex-start;
  flex-wrap: wrap; /* Allows it to stack nicely on phones */
  gap: 3rem;
  text-align: left;
  border-bottom: 1px solid rgba(194, 168, 141, 0.2);
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

/* Footer Brand & Logo Alignment */
.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem; /* Space between the logo and the text */
  margin-bottom: 1.5rem;
}

.footer-circular-logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--warm-tan); /* Subtle matching border */
}

/* Specific styling for the Saffiera brand name */
.footer-grid .footer-brand-name {
  font-family: var(--font-heading); /* Forces the custom Saffiera font */
  color: var(--light-beige);
  margin-bottom: 0; /* Removed because the wrapper handles the spacing now */
  letter-spacing: 2px;
  font-size: 1.4rem; /* Slightly larger to match the logo size */
  font-weight: 600;
}

.footer-brand p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-loc {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--medium-brown);
  margin-top: 1rem;
}

/* Social & Email Icons */
.footer-connect {
  color: var(--light-beige) !important;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--warm-tan);
  color: var(--warm-tan);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--warm-tan);
  color: var(--black);
  transform: translateY(-3px);
}

.social-icons svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Bottom Copyright */
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--medium-brown);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
  .double-col {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* --- Booking Modal Overlay --- */
.booking-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;

  opacity: 0;
  visibility: hidden;

  /* THE ULTIMATE KILL-SWITCH: Completely disables clicks when modal is closed */
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.booking-modal-overlay.active {
  opacity: 1;
  visibility: visible;

  /* Turns clicks back on only when the modal is actually open */
  pointer-events: auto;
}
.booking-container {
  background: var(--card-bg);
  width: 100%;
  max-width: 900px; /* Slightly narrower for a tighter modal feel */
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative; /* Crucial for the absolute close button */

  /* Start slightly scaled down for a "pop" animation */
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.booking-modal-overlay.active .booking-container {
  transform: scale(1);
}

/* The Close X Button */
.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-light);
  cursor: pointer;
  z-index: 50;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal-btn:hover {
  color: var(--text-main);
}

.calendar-section {
  padding: 3rem;
  border-right: 1px solid var(--warm-tan);
  background-color: var(--light-beige);
}

.calendar-section h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--dark-brown);
}

.form-section {
  padding: 3rem;
  background-color: var(--light-beige);
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--dark-brown);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#selected-date-text {
  font-family: var(--font-subheading);
  font-size: 0.9rem !important;
  color: var(--deep-red-brown) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Time Slots Styling */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 2rem;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 5px;
}

.time-slots.active {
  opacity: 1;
  pointer-events: all;
}

.time-slot {
  padding: 10px;
  border: 1px solid var(--medium-brown);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-subheading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-brown);
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--deep-red-brown);
  color: var(--light-beige);
  background: var(--medium-brown);
}

.time-slot.selected {
  background: var(--deep-red-brown);
  color: var(--light-beige);
  border-color: var(--deep-red-brown);
}

/* Form Inputs Styling */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-subheading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dark-brown);
}

/* --- ENHANCED INPUT STYLING --- */
.form-group input {
  width: 100%;
  padding: 14px 16px; /* Slightly larger padding for a premium, spacious feel */
  border: 1.5px solid var(--warm-tan); /* Deliberate, elegant border */
  border-radius: 8px; /* Slightly rounded edges */
  font-family: var(--font-body);
  font-size: 1rem;

  /* Adds a subtle white tint so the box pops off the beige background */
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--dark-brown);
  outline: none;
  transition: all 0.3s ease;

  /* CRITICAL: This completely removes default Apple/Chrome browser styling */
  -webkit-appearance: none;
  appearance: none;
}

/* Custom styling for the placeholder text */
.form-group input::placeholder {
  color: var(--medium-brown);
  opacity: 0.7;
}

/* When the user clicks into the box to type */
.form-group input:focus {
  border-color: var(--deep-red-brown);
  background-color: #fff; /* Turns solid white for better readability */
  box-shadow: 0 4px 15px rgba(140, 31, 5, 0.08); /* Elegant, soft shadow */
}

/* Submit Button */
.submit-btn {
  background: var(--deep-red-brown);
  color: #fff;
  padding: 1rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-subheading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 1rem;
  width: 100%;
}

.submit-btn:hover {
  background: var(--dark-brown);
}

/* Hides backend form inputs from the user */
.hidden {
  display: none !important;
}

/* Success Message */
.success-message {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  animation: fadeIn 0.5s;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--medium-brown);
  color: var(--light-beige);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Customizing the Flatpickr Calendar to Match the Brand */
.flatpickr-calendar {
  font-family: var(--font-body) !important;
  background: var(--light-beige) !important;
  border: 1px solid var(--warm-tan) !important;
  box-shadow: 0 10px 30px rgba(92, 34, 6, 0.15) !important;
  border-radius: 12px !important;
  padding: 10px 0;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--deep-red-brown) !important;
  border-color: var(--deep-red-brown) !important;
}

.flatpickr-months .flatpickr-month {
  color: var(--dark-brown) !important;
  fill: var(--dark-brown) !important;
  height: 40px !important;
}

.flatpickr-current-month {
  font-family: var(--font-subheading) !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--dark-brown) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 600 !important;
  background: var(--light-beige) !important; /* Fixes dropdown background */
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--dark-brown) !important;
  fill: var(--dark-brown) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--deep-red-brown) !important;
  fill: var(--deep-red-brown) !important;
}

span.flatpickr-weekday {
  font-family: var(--font-subheading) !important;
  color: var(--medium-brown) !important;
  font-weight: 600 !important;
  letter-spacing: 1px;
}

.flatpickr-day {
  color: var(--dark-brown) !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  border-radius: 50% !important; /* Perfect circles */
  transition: all 0.2s ease !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: var(--deep-red-brown) !important;
  border-color: var(--deep-red-brown) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(140, 31, 5, 0.3) !important;
  transform: scale(1.05); /* Slight pop effect when selected */
}

.flatpickr-day.flatpickr-disabled {
  color: var(--warm-tan) !important;
  opacity: 0.5 !important;
}

.flatpickr-calendar.hasTime.noCalendar {
  width: auto !important;
  max-width: 300px !important;
  background: var(--light-beige) !important;
  border: 1px solid var(--warm-tan) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
  z-index: 99999 !important;
  margin-top: 8px;
  border-radius: 12px !important;
  padding: 10px;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm {
  color: var(--dark-brown) !important;
  font-family: var(--font-subheading) !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
}

.booking-modal-overlay {
  pointer-events: none !important;
}

.booking-modal-overlay.active {
  pointer-events: auto !important;
}

.booking-modal-overlay:not(.active) .flatpickr-calendar.inline {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Optional: Make the time hover states match your deep-red branding */
.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
  background: rgba(140, 31, 5, 0.1) !important;
}

@media (max-width: 768px) {
  /* Center badges on mobile screens */
  .badge-icons {
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem; /* Balanced spacing before the social container */
  }

  /* Elegantly downscale badge sizing on smaller screen viewports */
  .badge-item img {
    height: 38px;
  }
  .navbar {
    padding: 0.5rem 5%;
  }

  .circular-logo {
    width: 45px;
    height: 45px;
  }

  .hamburger {
    display: flex;
  }

  /* --- Mobile Drop-Down Menu --- */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--light-beige);
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);

    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;

    /* CRITICAL FIX: Forces clickability */
    z-index: 9999;
    pointer-events: auto;

    transition:
      transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .process .step {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* --- Premium Mobile Modal (Bottom Sheet Style) --- */
  .modal {
    align-items: flex-end; /* Pushes the modal to the very bottom of the screen */
  }

  .modal-content {
    width: 100%;
    max-height: 75vh;
    padding: 2.5rem 1.5rem 1.5rem;
    border-radius: 24px 24px 0 0;
    margin: 0;
    overflow-y: auto;

    /* NEW MOBILE ANIMATION: Pushes the modal 100% off the bottom of the screen */
    transform: translateY(100%);
  }

  /* When active, it gracefully slides up to its normal position (0) */
  .modal.active .modal-content {
    transform: translateY(0);
  }

  .close-modal {
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
  }

  .modal-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center; /* Centers the image and name */
  }

  /* Shrink the massive rectangle into a sleek circular profile picture */
  #modal-img {
    width: 100px;
    height: 100px;
    aspect-ratio: auto;
    border-radius: 50%; /* Makes it a perfect circle */
    margin: 0 auto; /* Centers it */
    border: 2px solid var(--warm-tan);
    background-color: var(
      --medium-brown
    ); /* SMART FALLBACK: Brown circle if image is missing */
  }

  #modal-text {
    text-align: left; /* Keeps the actual paragraph easy to read */
    font-size: 0.95rem;
    margin-top: 1rem;
  }
  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  /* --- Mobile Gallery Fix --- */
  .scroll-item {
    height: 320px; /* Scaled down height for mobile */
  }

  .item-portrait {
    width: 240px; /* Scaled down portrait width */
  }

  .item-landscape {
    width: 450px; /* Scaled down landscape width */
    max-width: 85vw; /* Failsafe: Ensures it never gets wider than the phone screen! */
  }

  .scroll-track {
    gap: 1rem;
  }

  /* 1. Reduce massive vertical spacing between sections */
  section {
    padding: 3.5rem 0;
  }

  /* 2. Scale down Typography */
  h2,
  .positioning h2,
  .final-cta h2,
  .location-box h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .intro-p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero {
    /* Brings back the original static image and gradient just for mobile */
    background-image:
      linear-gradient(rgba(92, 34, 6, 0.4), rgba(92, 34, 6, 0.8)),
      url("../assets/img/hero-bg.png");
    background-size: cover;
    background-position: center;
  }

  .hero-slideshow {
    display: none !important; /* Completely hides and disables the animation on phones */
  }

  /* 3. Scale down the Hero Logo so it doesn't push the text too far down */
  .hero-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
  }

  /* 4. Fix giant Team Cards & Grid gaps */
  .grid-3,
  .grid-4,
  .double-col {
    gap: 2rem; /* Reduces the huge gaps between stacked items */
  }

  .team-member {
    max-width: 320px; /* Prevents the 3/4 aspect ratio from making the image 500px tall */
    margin: 0 auto; /* Perfectly centers the cards on the screen */
  }

  /* 5. Mobile-friendly Buttons */
  .btn-primary,
  .btn-secondary {
    padding: 0.8rem 1.5rem;
    width: 100%; /* Makes buttons span the width of the screen for easy thumb-tapping */
    text-align: center;
    font-size: 0.95rem;
  }

  /* 6. Tighten up the Footer */
  footer {
    padding: 3rem 0 1.5rem 0;
  }

  .footer-grid {
    gap: 1.5rem;
    padding-bottom: 2rem;
  }

  .footer-grid .footer-brand-name {
    font-size: 1.2rem; /* Scaled down slightly */
  }

  /* --- Mobile Booking Modal Redesign (Bottom Sheet) --- */
  .booking-modal-overlay {
    padding: 0;
    align-items: flex-end; /* Docks the modal strictly to the bottom of the screen */
  }

  .booking-container {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0;

    /* Locks the height to 90% of the screen so it is always scrollable */
    height: 90vh;
    height: 90dvh;
    max-height: 90dvh;
    overflow-y: auto;

    border-radius: 24px 24px 0 0; /* Premium rounded top corners */

    /* Native app slide-up animation */
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .booking-modal-overlay.active .booking-container {
    transform: translateY(0); /* Slides up seamlessly when opened */
  }

  /* Shrink paddings so the calendar physically fits on narrow phones */
  .calendar-section {
    padding: 2rem 1rem 1rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--warm-tan);
  }

  .form-section {
    padding: 1.5rem 1rem 4rem 1rem; /* Extra space at the bottom for easy thumb scrolling */
  }

  /* CRITICAL FIX: Force Flatpickr to scale down to fit tiny screens */
  .flatpickr-calendar.inline {
    transform: scale(0.92);
    transform-origin: center top;
    margin-bottom: -15px; /* Recalibrates the gap after scaling */
  }

  .calendar-section h2 {
    font-size: 1.8rem;
    text-align: center; /* Centers the header for mobile */
  }

  .step-title {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Adjusted the close button to fit the new curved top-right corner */
  .close-modal-btn {
    top: 1rem;
    right: 1.2rem;
    font-size: 2.5rem;
    color: var(--dark-brown);
    background: var(--light-beige);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  /* Make time slots bigger and 2-columns for easier thumb tapping */
  .time-slots {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .time-slot {
    padding: 12px;
    font-size: 0.95rem;
  }
}
