/* ============================================
   LEON — Componenti: Navbar, Footer, Card,
   Bottoni, Form
   ============================================ */

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 60px);
}

.navbar.scrolled {
  height: 60px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.navbar-logo img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease, height 0.4s ease;
}

.navbar-logo:hover img {
  transform: rotate(3deg);
}

.navbar.scrolled .navbar-logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

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

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

/* --- Hamburger mobile --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu mobile */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--gold);
}

/* --- Navbar CTA Prenota --- */
.btn-prenota-nav {
  padding: 10px 24px !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em;
  border-radius: 0 !important;
  margin-left: 8px;
}

.btn-prenota-nav:visited {
  color: var(--bg-primary) !important;
}

.btn-prenota-nav:hover {
  background: var(--gold-light) !important;
  color: var(--bg-primary) !important;
}

.btn-prenota-nav::after {
  display: none !important;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* --- Mobile Sticky Prenota Bar --- */
.mobile-prenota-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-prenota-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-gold);
  }

  .mobile-prenota-btn {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 16px 24px !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.15em;
    color: var(--bg-primary) !important;
  }

  .mobile-prenota-btn:visited {
    color: var(--bg-primary) !important;
  }

  /* Add bottom padding so content isn't hidden behind the bar */
  .footer {
    padding-bottom: 90px;
  }

  .prenota-section {
    padding-bottom: calc(var(--section-padding) + 70px);
  }
}

/* --- BOTTONI --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 14px 36px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.4s ease;
  font-weight: 500;
  border: none;
}

.btn-primary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  padding: 14px 20px;
}

.btn-secondary:hover {
  color: var(--gold);
}

.btn-gold {
  background: var(--gold);
  color: var(--bg-primary);
  font-weight: 600;
}

.btn-gold:visited {
  color: var(--bg-primary);
}

.btn-gold:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

/* --- CARD generica --- */
.card {
  background: var(--bg-warm);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-color: var(--gold);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.card-body {
  padding: clamp(16px, 3vw, 28px);
}

/* --- Badge --- */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 600;
}

.badge-raro {
  background: var(--fire-red);
  color: var(--text-primary);
}

.badge-premium {
  background: var(--gold);
  color: var(--bg-primary);
}

.badge-esotico {
  background: linear-gradient(135deg, #2d1b69, #6b3fa0);
  color: var(--text-primary);
}

.badge-classico {
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.badge-spettacolare {
  background: linear-gradient(135deg, var(--fire-red), #b22222);
  color: var(--text-primary);
}

.badge-iberico {
  background: linear-gradient(135deg, #8b4513, #d2691e);
  color: var(--text-primary);
}

/* --- FORM --- */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  min-width: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input[type="date"].form-control,
input[type="time"].form-control {
  min-height: 50px;
}

.form-control::placeholder {
  color: rgba(154, 138, 114, 0.5);
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-control.error {
  border-color: var(--fire-red);
}

.form-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.form-control.error + .form-error {
  display: block;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-warm);
  border: 1px solid var(--gold);
  color: var(--text-primary);
  padding: 18px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-secondary);
  padding: 60px 0 30px;
  position: relative;
  border-top: 1px solid var(--border-gold);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.footer-logo img {
  height: 60px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-logo:hover img {
  opacity: 1;
}

.footer-nav {
  display: flex;
  gap: 30px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .footer-nav {
    gap: 16px;
  }
}

/* ============================================
   POPUP — Prenotazione DISH
   ============================================ */
.dish-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.dish-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dish-popup {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #111;
  border-radius: 4px;
  overflow-y: auto;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.dish-popup-overlay.active .dish-popup {
  transform: scale(1) translateY(0);
}

.dish-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.dish-popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dish-popup-header {
  padding: 28px 28px 0;
  text-align: center;
}

.dish-popup-header h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dish-popup-header p {
  font-family: var(--font-sub);
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.dish-popup-widget {
  padding: 16px 20px 28px;
}

@media (max-width: 480px) {
  .dish-popup {
    max-width: 100%;
    max-height: 85vh;
    margin: 0 8px;
  }
  .dish-popup-header {
    padding: 20px 16px 0;
  }
  .dish-popup-widget {
    padding: 12px 12px 20px;
  }
}
