/* ==========================================================================
   Boutique Hotel Stylesheet - Cas Ferrer Monjo (Ciutadella de Menorca)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Gotham Font Setup & Custom @font-face
   -------------------------------------------------------------------------- */

/* Gotham Extra Light (Weight: 200) */
@font-face {
  font-family: 'Gotham';
  src: url('/assets/fonts/Gotham-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Gotham Book (Weight: 400) */
@font-face {
  font-family: 'Gotham';
  src: url('/assets/fonts/Gotham-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design Tokens & Palette Variables
   -------------------------------------------------------------------------- */
:root {
  /* Font Family Stack */
  --font-gotham: 'Gotham', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  
  /* Custom Palette */
  --bg-color: #f2f2f2;         /* Off-White Page Background */
  --bg-card: #f0e6dc;          /* Warm Cream Cards & Containers */
  --primary-color: #383838;    /* Charcoal Dark Grey (Text & Footer) */
  --accent-color: #dbbfa9;     /* Warm Terracotta Accent */
  --accent-secondary: #ead4b8; /* Sandy Champagne Border & Highlights */
  
  --text-dark: #383838;
  --text-muted: #666666;
  --white: #FFFFFF;
  --border-light: #ead4b8;
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-gotham);
  font-weight: 200; /* Gotham Extra Light */
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Body Text Defaults -> Gotham Extra Light */
p, li, span, a, label, input, select, button, td, th {
  font-family: var(--font-gotham);
  font-weight: 200;
}

/* Headings & Titles -> Gotham Book */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-gotham);
  font-weight: 400; /* Gotham Book */
  color: var(--primary-color);
  margin-top: 0;
  letter-spacing: 0.04em;
}

a {
  color: inherit;
  transition: color 0.3s ease;
}

/* --------------------------------------------------------------------------
   3. Sticky Semi-Transparent Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  
  /* Glassmorphism Effect using Warm Cream Palette */
  background: rgba(240, 230, 220, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(56, 56, 56, 0.04);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.logo a {
  text-decoration: none;
  display: block;
}

/* Horizontal Navbar Logo Image */
.header-logo-img {
  height: 75px; 
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.header-logo-img:hover {
  opacity: 0.85;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400; /* Gotham Book */
}

.main-nav a:hover {
  color: var(--accent-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Combo Box Language Selector */
.lang-switcher-select select {
  font-family: var(--font-gotham);
  font-weight: 200;
  font-size: 0.8rem;
  color: var(--primary-color);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lang-switcher-select select:hover,
.lang-switcher-select select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(219, 191, 169, 0.3);
}

/* Hamburger Toggle Button (Hidden on Desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1010;
}

.hamburger {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background-color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--primary-color);
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger Open Animation ('X' shape) */
.nav-open .hamburger {
  background-color: transparent;
}

.nav-open .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-open .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   4. Hero Carousel (Home)
   -------------------------------------------------------------------------- */
.hero-carousel {
  position: relative;
  height: 65vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.carousel-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-overlay h1 {
  color: var(--white);
  font-size: 3.2rem;
  font-weight: 400; /* Gotham Book */
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-overlay p {
  font-size: 1.2rem;
  font-weight: 200; /* Gotham Extra Light */
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Carousel Indicators (Dots) */
.carousel-indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.8rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--white);
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.indicator.active,
.indicator:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   5. Page Layouts & Grids
   -------------------------------------------------------------------------- */
.page-content {
  min-height: 60vh;
}

.page-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 400; /* Gotham Book */
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 200; /* Gotham Extra Light */
}

/* Features Grid (Home) */
.features-grid {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(56, 56, 56, 0.03);
  text-align: center;
}

.feature-card h3 {
  font-size: 1.8rem;
  font-weight: 400; /* Gotham Book */
  margin-bottom: 1rem;
}

.feature-card p {
  font-weight: 200; /* Gotham Extra Light */
}

/* Photo Gallery Grid */
.gallery-grid {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(56, 56, 56, 0.08);
  background: var(--primary-color);
}

.gallery-item picture,
.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.gallery-item:hover picture img,
.gallery-item:hover img {
  transform: scale(1.06);
  opacity: 0.9;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(56, 56, 56, 0.92));
  color: var(--white);
  padding: 1.5rem 1rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 400; /* Gotham Book */
}

/* Narrative Section (About) */
.narrative-section {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.narrative-content p {
  font-size: 1.1rem;
  font-weight: 200; /* Gotham Extra Light */
  margin-bottom: 1.8rem;
  color: var(--text-dark);
}

.narrative-content h2 {
  font-size: 2.2rem;
  font-weight: 400; /* Gotham Book */
  margin-top: 3rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   6. Contact Page Layout & Form Styles
   -------------------------------------------------------------------------- */
.contact-page-wrapper {
  max-width: 1100px;
  margin: 1rem auto 4rem;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Top Section: Info on Left, Map on Right */
.contact-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.contact-info {
  background: var(--bg-card);
  padding: 2.5rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  height: 100%;
}

/* Centered Contact Card Logo */
.contact-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.hotel-logo-img {
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 400; /* Gotham Book */
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.contact-info p {
  font-weight: 200; /* Gotham Extra Light */
  margin-bottom: 0.6rem;
}

.contact-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(56, 56, 56, 0.08);
}

/* Bottom Section: Full Width Contact Form */
.contact-form-card {
  background: var(--bg-card);
  padding: 2.8rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  margin-top: 1.5rem; /* Added margin to guarantee space below the map */
}

.contact-form-card h2 {
  font-size: 2.2rem;
  font-weight: 400; /* Gotham Book */
  margin-bottom: 1.8rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 850px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 400; /* Gotham Book */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-color);
}

.form-field input, 
.form-field textarea {
  font-family: var(--font-gotham);
  font-weight: 200; /* Gotham Extra Light */
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field input:focus, 
.form-field textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(219, 191, 169, 0.25);
}

.btn-submit {
  font-family: var(--font-gotham);
  font-weight: 400; /* Gotham Book */
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.95rem 2.2rem;
  border-radius: 4px;
  cursor: pointer;
  align-self: center;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. Fullscreen Gallery Lightbox Modal (Expanded Canvas Theme)
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(242, 242, 242, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox-content {
  position: relative;
  z-index: 2010;
  width: 98vw;
  height: 96vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 94vw;
  height: 92vh;
}

#lightbox-img {
  width: 100%;
  height: 100%;
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 35px rgba(56, 56, 56, 0.12);
}

.lightbox-caption-text {
  color: var(--primary-color);
  font-family: var(--font-gotham);
  font-weight: 400;
  margin-top: 0.8rem;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  background: var(--bg-card);
  color: var(--primary-color);
  border: 1px solid var(--border-light);
  font-size: 1.5rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(56, 56, 56, 0.08);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--white);
  transform: scale(1.08);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
}

.lightbox-prev {
  margin-right: 1.2rem;
}

.lightbox-next {
  margin-left: 1.2rem;
}

/* --------------------------------------------------------------------------
   8. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 4rem 3rem 1.5rem;
  margin-top: 4rem;
  border-top: 3px solid var(--accent-color);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.footer-grid h3, 
.footer-grid h4 {
  color: var(--accent-secondary);
  font-weight: 400; /* Gotham Book */
  margin-bottom: 1rem;
}

.footer-grid p {
  color: var(--bg-card);
  font-size: 0.9rem;
  font-weight: 200; /* Gotham Extra Light */
  line-height: 1.8;
}

.footer-bottom {
  max-width: 1100px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #484848;
  text-align: center;
  font-size: 0.8rem;
  color: #A0A0A0;
  font-weight: 200; /* Gotham Extra Light */
}

/* --------------------------------------------------------------------------
   9. Mobile Responsiveness & Mobile Menu Drawer
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   9. Mobile Responsiveness & Mobile Menu Drawer
   -------------------------------------------------------------------------- */
   @media (max-width: 850px) {
    .site-header {
      padding: 1rem 1.25rem;
    }
  
    .header-logo-img {
      height: 42px;
    }
  
    /* Compact Select Box on Mobile */
    .lang-switcher-select select {
      padding: 0.35rem 0.6rem;
      font-size: 0.78rem;
      font-weight: 400;
    }
  
    /* Show Hamburger Button */
    .nav-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  
    /* Slide-Down Mobile Navigation Menu */
    .main-nav {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background: rgba(240, 230, 220, 0.98);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border-light);
      box-shadow: 0 10px 25px rgba(56, 56, 56, 0.08);
      
      flex-direction: column;
      align-items: center;
      padding: 2rem 1.5rem;
      gap: 1.5rem;
      
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }
  
    .nav-open .main-nav {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  
    .main-nav a {
      font-size: 1rem;
      letter-spacing: 0.12em;
    }
  
    .hero-overlay h1 {
      font-size: 2.2rem;
    }
  
    /* ----------------------------------------------------------------------
       Contact Page Mobile Optimization Fix
       ---------------------------------------------------------------------- */
    .contact-page-wrapper {
      padding: 0 1rem;
      gap: 1.5rem;
    }
  
    .contact-top-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
      margin-bottom: 1.5rem; /* Guarantees gap below map on mobile */
    }
  
    /* Compact padding for cards on mobile screens */
    .contact-info, 
    .contact-form-card {
      padding: 1.5rem 1.2rem;
      margin-top: 0.5rem;
    }
  
    /* Scale contact logo dynamically relative to screen width */
    .hotel-logo-img {
      max-width: 80%;
    }
  
    /* Set map height appropriately for mobile */
    .contact-map {
      height: 280px;
      min-height: 280px;
    }
  
    .contact-map iframe {
      height: 280px;
      min-height: 280px;
    }
  
    /* Text adjustments to prevent long address overflow */
    .contact-info h2,
    .contact-info h3 {
      font-size: 1.3rem;
    }
  
    .contact-info p {
      font-size: 0.92rem;
      word-break: break-word; /* Ensures long addresses wrap cleanly */
    }
  
    .form-row {
      grid-template-columns: 1fr;
    }
  
    .btn-submit {
      width: 100%;
    }
  
    /* Lightbox Mobile Adjustments */
    .lightbox-stage {
      width: 96vw;
    }
  
    #lightbox-img {
      max-width: 96vw;
      max-height: 78vh;
    }
  
    .lightbox-prev, .lightbox-next {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 42px;
      height: 42px;
      font-size: 1.2rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 15px; right: 15px; }
  }