/* ==================================================
   style.css for Maison Locale
   ————————————————————————————————————————————————
   1) Desktop (base) styles
   2) Mobile overrides at the bottom (≤ 768px)
   ================================================== */

/* ————————————————————————————
   1) BASE (DESKTOP) & NAV
   ———————————————————————————— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Libre Baskerville', serif; /* warmer, more readable body text */
  background: #fff;
  color: #333;                             /* switch to dark grey for better contrast */
  padding: 0;
}

/* Hide any unintended duplicate parallax-hero on desktop/mobile */
.parallax-hero + .parallax-hero {
  display: none;
}

.main-nav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem 2rem;
  border-bottom: 2px solid #000;
  z-index: 2000; /* ensures the header (and its dropdown) floats above the hero */
}

/* Nav links & Section headings share the same “fancy” font */
.main-nav .menu a,
.section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #d4af37;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.menu a {
  position: relative;
  text-decoration: none;
  font-size: 1.125rem;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.menu a:hover::after {
  transform: scaleX(1);
}

/* Desktop dropdown (hover to open) */
.main-nav .dropdown {
  position: relative; /* anchor point */
}

.main-nav .dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 4px);    /* just below header border */
  left: 50%;                /* center under the “Menu” link */
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-width: 200px;         /* adjust to taste */
  padding: 0.25rem 0;
  z-index: 100;
}
.main-nav .dropdown:hover .dropdown-content {
  display: block;
}
.main-nav .dropdown-content li {
  list-style: none;
}
.main-nav .dropdown-content li a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #333;             /* darker text for readability */
  font-size: 1rem;
  text-align: center;      /* center the text */
  transition: background 0.2s ease;
}
.main-nav .dropdown-content li a:hover {
  background: #f5f5f5;
}

/* Global wrapper for consistent margins */
.content-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 6rem auto;      /* ↑ more separation top & bottom */
  padding: 0 1.5rem;
  scroll-margin-top: 120px;
}
.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.section p,
.section li {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
/* Section header flourish */
.section h2 {
  position: relative;
  padding-bottom: 0.5rem;
}
.section h2::after {
  content: '';
  display: block;
  width: 60px;              /* length of flourish */
  height: 4px;              /* thickness */
  background-color: #d4af37;/* gold color */
  margin: 0.5rem auto 0;    /* center under the text */
  border-radius: 2px;       /* soft edges */
}

/* HERO & LOGO OVERLAY */
.parallax-hero {
  position: relative;
  height: 90vh;
  background: url('interior.jpg') center calc(40% + 20px)/cover no-repeat;
  background-attachment: fixed;
  border-bottom: 2px solid #000;
  transition: height 1s ease-out;
}
body.loaded .parallax-hero {
  height: 80vh;
}

/* 1. Starting state: centered big in hero */
/* initial logo-overlay: centered & full size */
.logo-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  transition: transform 0.6s ease-out;
}
/* Keep only the drop-shadow on the centered SVG */
.logo-overlay svg {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
/* shrink+move into nav logo spot */
.logo-overlay.fly-home {
  /* adjust these translate() values until it lines up exactly: */
  transform: translate(1rem, 1rem) scale(0.25);
}

/* HIDE/SHOW SITE CONTENT */
.site-content {
  opacity: 0;
  transition: opacity 0.5s ease 1.5s;
}
.site-content.loaded {
  opacity: 1;
}

/* SMOOTH OUT THE STROKE ANIMATION */
#logo-path {
  stroke-linecap: round;
  stroke-linejoin: round;
  /* fillOpacity is driven by JS */
}

/* About */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.about-text { flex: 1 1 300px; }
.about-img { flex: 1 1 300px; text-align: center; }
.about-img img {
  width: 66%;
  max-width: 250px;
  border-radius: 8px;
  border: 2px solid #000; /* black border */
}
.caption { font-style: italic; margin-top: .5rem; }

/* Carousel container */
.special-carousel {
  display: flex;
  white-space: nowrap;
  gap: 1rem;
  overflow-x: scroll;
  overflow-y: hidden;
  touch-action: pan-x;
  will-change: transform;
  cursor: grab;
  padding: 0.5rem 0;
}
.special-carousel.dragging { cursor: grabbing; }
.special-carousel::-webkit-scrollbar { display: none; }

.special-carousel.dragging {
  cursor: grabbing;
  user-select: none;
}

/* Slides */
.slide {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  overflow: hidden;
  scroll-snap-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.slide-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom: 2px solid #000;
}
.slide-info {
  padding: .75rem 1rem;
  background: #fff;
  flex: 1;
}
.slide-info h3 { margin: 0 0 .3rem; font-size: 1.1rem; color: #000; }
.slide-info p  { margin: 0; color: #555; }

/* Modal overlay & content */
.slide-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: auto;
}
.slide-modal.open {
  display: flex !important;  /* force-show when JS adds .open */
  pointer-events: auto;
}
.modal-content {
  position: relative;
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: visible;
  max-width: 90vw;
  max-height: 90vh;
  animation: pop-in .3s ease-out forwards;
}
@keyframes pop-in {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.slide:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}
.specials {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* Prev/Next */
.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  z-index: 300;                /* ↑ ensure they float above everything */
  transition: transform 0.2s ease, background 0.2s ease;
}
#modal-prev { left: 0.5rem; }  /* very close to left edge */
#modal-next { right: 0.5rem; } /* very close to right edge */
.modal-nav:hover {
  transform: translateY(-50%) scale(1.2);
  background: rgba(0,0,0,0.6);
}
.modal-content {
  position: relative;
  z-index: 150;   /* ensure the modal box sits below the arrows */
}
.modal-nav {
  z-index: 200;   /* arrows float above everything */
}
/* Ensure arrows remain above overlay */
.slide-modal.open .modal-nav {
  display: block;
}

/* Image & text */
#modal-image {
  width: 450px;
  object-fit: cover;
}
.modal-text {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}
.modal-text h3 { margin: 0 0 1rem; font-size: 2rem; }
.modal-text p  { margin: 0 0 1.5rem; line-height: 1.4; color: #333; }

/* Close */
#close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Reservations (Airtable embed) */
.reserve iframe {
  width: 100%;
  height: 533px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* Footer */
.footer {
  width: 100%;                /* full-width container */
  background: #fff;
  color: #333;
  padding: 2rem 1rem;
  border-top: 2px solid #000; /* full-width divider */
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;             /* center inner content */
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-column {
  flex: 1 1 300px;
}
.footer-column h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #d4af37;
}
.footer-column p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.footer-column form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-column input[type="email"] {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}
.footer-column button {
  padding: 0.5rem;
  border: none;
  background: #d4af37;
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.footer-column button:hover {
  background: #b5942f;
}
.socials {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}
.socials a {
  display: inline-block;
}
.socials svg {
  width: 24px;
  height: 24px;
  fill: #d4af37;
}

/* ─────────────────────────────────────────────────────
   MOBILE OVERRIDES (≤ 768px)
   Paste this block at the end of style.css (after all other mobile rules)
   ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* 2) MOBILE DROPDOWN (.simple-dropdown.open) */
  .main-nav .simple-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .main-nav .simple-dropdown.open {
    display: block;
  }

  /* 1) Hide just the About & Reservations links (not the whole <li>) */
  .main-nav .menu a[href="#about"],
  .main-nav .menu a[href="#reserve"] {
    display: none !important;
  }

  /* 2) Enlarge the centered SVG back to 3× on mobile */
  .logo-overlay {
    transform: translate(-50%, -50%) scale(3) !important;
  }
  .logo-overlay svg {
    width: 100px !important;
    height: auto !important;
  }

  /* 3) Modal should show image + title/desc without horizontal scrolling */
  .slide-modal.open {
    display: flex !important;
    z-index: 3000 !important;
  }
  .slide-modal .modal-content {
    display: flex;
    flex-direction: column;
    width: 90vw !important;
    max-height: 80vh !important;
    overflow: hidden;
  }
  .slide-modal img {
    flex-shrink: 0;
    max-height: 40vh !important;
    width: auto !important;
    margin: 0 auto;
  }
  .modal-text {
    flex: 1;
    max-height: calc(80vh - 40vh - 3rem) !important;
    overflow-y: auto !important;
    padding: 1rem !important;
  }

  /* 4) Footer: revert to your base footer style—no mobile shrink here */
  /* (simply don’t include any footer‐specific overrides) */

  /* 5) Parallax hero still shrinks just like desktop */
  .parallax-hero {
    height: 90vh;
    background-attachment: scroll;
    z-index: 0;
  }
  body.loaded .parallax-hero {
    height: 80vh;
  }
}
