/* css/layout.css — nav, section base, responsive. */

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  transition: all 0.3s ease;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--logo-fg);
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
}

.logo span {
  font-style: italic;
  color: var(--logo-fg-italic);
}

nav ul {
  display: flex;
  gap: 0;
  list-style: none;
}

nav ul li a {
  display: block;
  padding: 0 1.2rem;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
  line-height: 70px;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--gold);
}

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

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  transition: all 0.3s;
}

/* Hero, footer, section backgrounds nos parciais: hero.css, footer.css, section-bgs.css */

/* ===== SECTION BASE ===== */
section {
  display: none;
  min-height: auto;
  padding: 120px 0 80px;
  animation: sectionIn 0.5s ease both;
}

section.active {
  display: block;
}

#hero.active {
  display: flex;
  margin-bottom: 0;
  padding-bottom: 0;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 500px) {
  .container {
    padding: 0 1rem;
  }

  .dp-flex-center.dp-flex-center {
    gap: 0.4rem;
  }

  .dp-theme-btn.dp-theme-btn {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.75rem;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
}

.section-title em {
  color: var(--accent-gold);
  font-style: italic;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto 0;
  opacity: 0.5;
}

/* Footer em css/footer.css */

/* ===== RESPONSIVE ===== */
/* Entre 901 e 1280px os 8 itens do menu não cabem com o espaçamento largo:
   aperta o espaçamento antes de o menu passar ao botão de 3 riscas. */
@media (min-width: 901px) and (max-width: 1280px) {
  nav {
    padding: 0 1.5rem;
  }
  .logo {
    font-size: 1.35rem;
    letter-spacing: 2px;
    white-space: nowrap;
  }
  nav ul li a {
    padding: 0 0.6rem;
    font-size: 0.62rem;
    letter-spacing: 1.2px;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 0 clamp(1rem, 3vw, 2rem);
    height: 60px;
  }

  .logo {
    font-size: 1.3rem;
    letter-spacing: 1.5px;
  }

  nav ul {
    display: none;
  }

  nav ul li a {
    line-height: 60px;
  }

  .hamburger {
    display: flex;
  }

  section {
    padding: 100px 0 60px;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 env(safe-area-inset-bottom, 0.5rem);
    z-index: 999;
    background: var(--mobile-nav-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  }

  .mobile-nav.open {
    display: block;
  }

  .mobile-nav.open a {
    animation: navItemFadeIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
  }
  .mobile-nav.open a:nth-child(1) { animation-delay: 0.05s; }
  .mobile-nav.open a:nth-child(2) { animation-delay: 0.10s; }
  .mobile-nav.open a:nth-child(3) { animation-delay: 0.15s; }
  .mobile-nav.open a:nth-child(4) { animation-delay: 0.20s; }
  .mobile-nav.open a:nth-child(5) { animation-delay: 0.25s; }
  .mobile-nav.open a:nth-child(6) { animation-delay: 0.30s; }
  .mobile-nav.open a:nth-child(7) { animation-delay: 0.35s; }

  @keyframes navItemFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-nav a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 2rem;
    color: var(--muted);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav a:last-child {
    border-bottom: none;
  }

  .mobile-nav a:hover,
  .mobile-nav a:active {
    color: var(--gold);
    background: rgba(212, 160, 23, 0.1);
  }

  .reservation-layout,
  .reviews-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }

  .hero-cta .btn {
    width: 100%;
    padding: 1rem;
  }

  .spirits-grid {
    grid-template-columns: 1fr;
  }

  /* Ajustes específicos para a secção de Reservas no telemóvel */
  .form-card {
    padding: 1.5rem 1rem;
  }

  .step {
    font-size: 0.45rem;
    padding: 0.5rem 0.2rem;
    letter-spacing: 0px;
  }

  .reservation-info h3 {
    font-size: 1.4rem;
  }
}

/* Section backgrounds em css/section-bgs.css; light-mode images em
   css/light-mode.css; eventos nav em css/section-bgs.css */

/* Mobile image optimization em css/mobile-sections.css */

/* Refinamentos para ecrãs muito pequenos — após 900px/600px para vencer na cascata */
@media (max-width: 500px) {
  .logo {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }

  section {
    padding: 90px 0 50px;
  }

  .section-header {
    margin-bottom: 2rem;
  }
}
