/* =========================================
   bnb.css - STILE SPECIFICO B&B (Namespaced)
   ========================================= */

/* Importiamo i font necessari se non sono già nel main css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Queste regole si attivano SOLO se il body ha la classe .bnb-mode.
   Isolamento totale dallo stile del ristorante.
*/

/* 1. VARIABILI & PALETTE (Scoped) */
body.bnb-mode {
  /* Nuova Palette "Warm Luxury" */
  --brand: #8B5E3C;       /* Marrone terra elegante (invece del vecchio ruggine) */
  --brand-dark: #5D3A24;  /* Marrone scuro per hover/testi forti */
  --secondary: #C5A065;   /* Oro satinato per dettagli */
  --accent: #F9F5F0;      /* Crema chiarissimo (Sfondo pagina) */
  --surface: #FFFFFF;     /* Bianco puro per le card */
  --text: #4A4A4A;        /* Grigio antracite morbido per leggibilità */
  --muted: #888888;       /* Grigio neutro */
  
  /* Override Font e Dimensioni */
  font-family: 'Inter', system-ui, sans-serif; /* Corpo del testo pulito */
  background: var(--accent);
  color: var(--text);
  line-height: 1.7;
}

/* 2. OVERRIDE TIPOGRAFIA */
body.bnb-mode h1, 
body.bnb-mode h2, 
body.bnb-mode h3, 
body.bnb-mode h4,
body.bnb-mode .logo-text .name {
  font-family: 'Playfair Display', serif; /* Titoli eleganti */
  font-weight: 700;
  color: var(--brand-dark);
}

body.bnb-mode .logo-text .tag {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  color: var(--secondary);
}

/* 3. HEADER SPECIFICO B&B */
body.bnb-mode .site-header {
  background: rgba(255, 255, 255, 0.95); /* Effetto semitrasparente */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 160, 101, 0.2); /* Bordo oro sottile */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Navigazione */
body.bnb-mode .primary-nav a {
  color: var(--brand-dark);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: color 0.3s ease;
}

body.bnb-mode .primary-nav a:hover {
  color: var(--brand);
  background: rgba(197, 160, 101, 0.1);
}

/* Pulsante CTA nell'header (Ristorante/Prenota) */
body.bnb-mode .cta {
  background: var(--brand);
  color: white !important;
  border-radius: 50px; /* Pill shape moderna */
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(139, 94, 60, 0.2);
  border: none;
}

body.bnb-mode .cta:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(139, 94, 60, 0.3);
}

/* 4. HERO SECTION SPECIFICA */
body.bnb-mode .bnb-hero {
  /* Gradiente al posto di una foto: stessa nota di style.css, hero.jpg
     non esisteva nel progetto originale. Toni caldi coerenti col resto
     del B&B invece del blu del ristorante. */
  background: linear-gradient(160deg, #4a3728 0%, #6d4e2f 55%, #8B5E3C 100%);
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 140px 20px 100px; /* Più spazio sopra per l'header fixed */
  margin-bottom: 80px;
  border-radius: 0 0 40px 40px; /* Curva moderna in basso */
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

body.bnb-mode .bnb-hero h1 {
  color: white;
  font-size: clamp(40px, 6vw, 64px);
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.bnb-mode .bnb-hero p {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 300;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
}

/* 5. TITOLI DI SEZIONE */
body.bnb-mode .rooms-section h2, 
body.bnb-mode .services-section h2, 
body.bnb-mode .contact-info h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Elemento decorativo sotto i titoli */
body.bnb-mode .rooms-section h2::after,
body.bnb-mode .services-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* 6. CARD CAMERE (ROOMS) */
body.bnb-mode .rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
}

body.bnb-mode .room-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  border: none; /* Rimosso bordo spesso vecchio */
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Ombra diffusa */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

body.bnb-mode .room-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(139, 94, 60, 0.15);
}

body.bnb-mode .room-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

body.bnb-mode .room-card:hover img {
  transform: scale(1.05); /* Zoom leggero immagine */
}

/* Placeholder foto camere: progetto di portfolio, nessuna foto reale. */
body.bnb-mode .room-card .ph {
  width: 100%; height: 260px;
  color: rgba(255,255,255,.92); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
}
body.bnb-mode .ph-room1 { background: linear-gradient(160deg, #8B5E3C, #5c3d24); }
body.bnb-mode .ph-room2 { background: linear-gradient(160deg, #a1745a, #6d4e2f); }
body.bnb-mode .ph-room3 { background: linear-gradient(160deg, #6d4e2f, #4a3728); }

body.bnb-mode .room-info {
  padding: 30px;
}

body.bnb-mode .room-info h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--brand-dark);
}

body.bnb-mode .room-info p {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

body.bnb-mode .room-price {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

/* Pulsante Prenota/Whatsapp nella card */
body.bnb-mode .whatsapp-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
}

body.bnb-mode .whatsapp-btn:hover {
  background: var(--brand);
  color: white;
  box-shadow: 0 5px 15px rgba(139, 94, 60, 0.3);
}

/* 7. SERVIZI */
body.bnb-mode .services-section {
  padding: 60px 0;
  background: white; /* Stacco visivo */
  border-radius: 20px;
  margin-bottom: 80px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

body.bnb-mode .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

body.bnb-mode .service-item {
  background: var(--accent);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
  color: var(--brand-dark);
  border: 1px solid rgba(197, 160, 101, 0.1);
  transition: transform 0.2s;
}

body.bnb-mode .service-item:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
}

/* 8. SEZIONE CONTATTI */
body.bnb-mode .contact-info {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  text-align: center;
  border-radius: 24px;
  padding: 60px 40px;
  box-shadow: 0 20px 50px rgba(93, 58, 36, 0.25);
  margin-bottom: 80px;
}

body.bnb-mode .contact-info h2 {
  color: white;
  margin-bottom: 20px;
}
body.bnb-mode .contact-info h2::after { background: rgba(255,255,255,0.3); }

body.bnb-mode .contact-info a {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.2em;
  text-decoration: none;
  transition: color 0.2s;
}

body.bnb-mode .contact-info a:hover {
  color: white;
}

/* 9. MODALE BOOKING (Whatsapp) */
body.bnb-mode .whatsapp-booking {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.bnb-mode .booking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.6); /* Backdrop scuro */
  backdrop-filter: blur(5px);
}

body.bnb-mode .booking-modal {
  position: relative;
  background: white;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 40px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.bnb-mode .close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f0f0f0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

body.bnb-mode .close-modal:hover {
  background: var(--brand);
  color: white;
}

/* Stile Form Modale */
body.bnb-mode .form-group {
  margin-bottom: 20px;
}

body.bnb-mode .form-group label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

body.bnb-mode .form-group input,
body.bnb-mode .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
  background: #FAFAFA;
}

body.bnb-mode .form-group input:focus,
body.bnb-mode .form-group select:focus {
  outline: none;
  border-color: var(--brand);
  background: white;
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.1);
}

body.bnb-mode .whatsapp-submit-btn {
  background: #25D366; /* Verde Whatsapp ufficiale */
  color: white;
  border: none;
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s;
}

body.bnb-mode .whatsapp-submit-btn:hover {
  transform: translateY(-2px);
  background: #1faf53;
}

/* 10. FOOTER SPECIFICO B&B */
body.bnb-mode .site-footer {
  background: #2C1810; /* Marrone scurissimo, quasi nero */
  color: #E0E0E0;
  border-top: 4px solid var(--secondary);
  padding-top: 60px;
}

body.bnb-mode .footer-logo {
  filter: brightness(100); /* Rende il logo bianco se è un'immagine scura */
  opacity: 0.9;
}

body.bnb-mode .site-footer h4 {
  color: var(--secondary);
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
}

body.bnb-mode .contact-item a {
  color: #E0E0E0;
}
body.bnb-mode .contact-item a:hover {
  color: var(--secondary);
}

body.bnb-mode .social a {
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  padding: 10px;
  transition: background 0.3s;
}
body.bnb-mode .social a:hover {
  background: var(--brand);
}

/* 11. RESPONSIVE UTILS */
@media (max-width: 768px) {
  body.bnb-mode .bnb-hero {
    padding: 120px 20px 60px;
    border-radius: 0 0 30px 30px;
  }
  
  body.bnb-mode .rooms-grid {
    grid-template-columns: 1fr;
  }
  
  body.bnb-mode .contact-info {
    padding: 40px 20px;
  }

  body.bnb-mode .booking-modal {
    padding: 30px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
}