/* ==========================================================================
   RISTORANTE PIZZERIA ARCO - LUXURY MODERN RESTAURANT STYLE
   100% Locale - Zero CDN - Zero Dipendenze Esterne
   Supporto Temi: Chiaro (Predefinito), Scuro, Alto Contrasto
   ========================================================================== */

/* --------------------------------------------------------------------------
   Caratteri Tipografici Outfit (100% Locali WOFF2)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   DESIGN TOKENS - TEMA CHIARO (PREDEFINITO & MODERNO)
   ========================================================================== */
:root, [data-theme="light"] {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Brand Accents */
  --color-primary: #14693c;
  --color-primary-light: #1ea862;
  --color-primary-glow: rgba(20, 105, 60, 0.22);
  
  --color-accent: #c82a35;
  --color-accent-light: #e0323e;
  
  --color-gold: #b58d1d;
  --color-gold-light: #d4af37;
  --color-gold-glow: rgba(181, 141, 29, 0.2);

  /* Backgrounds */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-topbar: #f8fafc;
  --bg-navbar: rgba(255, 255, 255, 0.94);
  --bg-navbar-scrolled: rgba(255, 255, 255, 0.98);
  --bg-footer: #f1f5f9;
  --bg-modal: #ffffff;
  --bg-switcher: rgba(0, 0, 0, 0.05);

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(20, 105, 60, 0.35);
  --border-gold: rgba(181, 141, 29, 0.4);

  /* Typography */
  --text-main: #1e293b;        /* Slate 800 */
  --text-heading: #0f172a;     /* Slate 900 */
  --text-muted: #475569;       /* Slate 600 - WCAG AA elevato */
  --text-dim: #64748b;         /* Slate 500 */
  
  /* Footer Specifics */
  --text-footer: #1e293b;
  --text-footer-heading: #0f172a;
  --text-footer-muted: #475569;
  --text-footer-link: #1e293b;

  /* Credits Badge */
  --credits-bg: #ffffff;
  --credits-border: rgba(0, 0, 0, 0.12);
  --credits-text: #1e293b;
  --credits-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 6px 22px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 14px 34px rgba(20, 105, 60, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-gold: 0 8px 25px rgba(181, 141, 29, 0.2);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Dynamic Pattern */
  --bg-pattern: 
    radial-gradient(circle at 12% 18%, rgba(20, 105, 60, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 88% 72%, rgba(212, 175, 55, 0.05) 0%, transparent 40%);
}

/* ==========================================================================
   DESIGN TOKENS - TEMA SCURO (SFONDO SCURO ELEGANTE)
   ========================================================================== */
[data-theme="dark"] {
  --color-primary: #1ea862;
  --color-primary-light: #2fd17e;
  --color-primary-glow: rgba(30, 168, 98, 0.35);
  
  --color-accent: #e0323e;
  --color-accent-light: #ff4755;
  
  --color-gold: #d4af37;
  --color-gold-light: #ebd07a;
  --color-gold-glow: rgba(212, 175, 55, 0.3);

  /* Backgrounds */
  --bg-body: #080a0d;
  --bg-surface: #0e1218;
  --bg-surface-alt: #131822;
  --bg-card: rgba(18, 22, 30, 0.85);
  --bg-card-hover: rgba(24, 30, 42, 0.95);
  --bg-topbar: rgba(8, 10, 13, 0.96);
  --bg-navbar: rgba(11, 14, 19, 0.9);
  --bg-navbar-scrolled: rgba(8, 10, 13, 0.98);
  --bg-footer: #050608;
  --bg-modal: #11151d;
  --bg-switcher: rgba(255, 255, 255, 0.08);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.25);
  --border-gold: rgba(212, 175, 55, 0.35);

  /* Typography */
  --text-main: #f3f4f6;
  --text-heading: #ffffff;
  --text-muted: #cbd5e1;       /* Contrasto elevato, mai nero */
  --text-dim: #94a3b8;
  
  /* Footer Specifics */
  --text-footer: #f8fafc;
  --text-footer-heading: #ffffff;
  --text-footer-muted: #cbd5e1;
  --text-footer-link: #e2e8f0;

  /* Credits Badge */
  --credits-bg: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 100%);
  --credits-border: rgba(255, 255, 255, 0.16);
  --credits-text: #f3f4f6;
  --credits-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);

  /* Shadows */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 20px rgba(30, 168, 98, 0.2);
  --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.25);

  --bg-pattern: 
    radial-gradient(circle at 10% 15%, rgba(20, 105, 60, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(212, 175, 55, 0.07) 0%, transparent 45%);
}

/* ==========================================================================
   DESIGN TOKENS - TEMA ALTO CONTRASTO (WCAG AAA MASSIMA ACCESSIBILITÀ)
   ========================================================================== */
[data-theme="contrast"] {
  --color-primary: #00ff66;
  --color-primary-light: #55ff99;
  --color-primary-glow: none;
  
  --color-accent: #ff3333;
  --color-accent-light: #ff6666;
  
  --color-gold: #ffff00;
  --color-gold-light: #ffff66;
  --color-gold-glow: none;

  /* Backgrounds */
  --bg-body: #000000;
  --bg-surface: #000000;
  --bg-surface-alt: #0a0a0a;
  --bg-card: #000000;
  --bg-card-hover: #121212;
  --bg-topbar: #000000;
  --bg-navbar: #000000;
  --bg-navbar-scrolled: #000000;
  --bg-footer: #000000;
  --bg-modal: #000000;
  --bg-switcher: #1a1a1a;

  /* High Contrast Borders */
  --border-subtle: 2px solid #ffffff;
  --border-hover: 2px solid #ffff00;
  --border-gold: 2px solid #ffff00;

  /* Typography */
  --text-main: #ffffff;
  --text-heading: #ffff00;
  --text-muted: #ffffff;
  --text-dim: #ffffff;
  
  /* Footer Specifics */
  --text-footer: #ffffff;
  --text-footer-heading: #ffff00;
  --text-footer-muted: #ffffff;
  --text-footer-link: #ffff00;

  /* Credits Badge */
  --credits-bg: #000000;
  --credits-border: 2px solid #ffff00;
  --credits-text: #ffffff;
  --credits-shadow: none;

  /* Shadows (Disattivate per purezza grafica) */
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-gold: none;

  --bg-pattern: none;
}

/* ==========================================================================
   RESET & REGOLE BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.65;
  background-color: var(--bg-body);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  color: var(--text-main);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Normalizzazione Utilities Bootstrap per rispetto del tema attivo */
.text-muted {
  color: var(--text-muted) !important;
}

.text-dim {
  color: var(--text-dim) !important;
}

.theme-heading, .text-heading {
  color: var(--text-heading) !important;
}

/* ==========================================================================
   TOPBAR INFORMATIVA
   ========================================================================== */
.topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.topbar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.topbar a:hover {
  color: var(--color-primary);
}

[data-theme="contrast"] .topbar a:hover {
  color: #ffff00;
  text-decoration: underline;
}

/* ==========================================================================
   THEME SWITCHER (Pulsanti Chiaro | Scuro | Alto Contrasto)
   ========================================================================== */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-switcher);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  line-height: 1;
}

.theme-btn:hover {
  color: var(--text-heading);
}

.theme-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

[data-theme="contrast"] .theme-btn.active {
  background: #ffff00;
  color: #000000;
  font-weight: 700;
  border: 1px solid #ffffff;
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switcher {
  display: inline-flex;
  gap: 3px;
  background: var(--bg-switcher);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active, .lang-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
}

[data-theme="contrast"] .lang-btn.active {
  background: #ffff00;
  color: #000000;
}

/* ==========================================================================
   NAVBAR (Glassmorphism Reattivo)
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-navbar);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
  padding: 13px 0;
}

.site-nav.scrolled {
  background: var(--bg-navbar-scrolled);
  padding: 9px 0;
  box-shadow: var(--shadow-card);
}

.navbar-brand img {
  height: 48px;
  width: auto;
  transition: transform var(--transition-fast);
}

.navbar-brand:hover img {
  transform: scale(1.02);
}

.navbar-toggler {
  color: var(--text-heading) !important;
  padding: 6px;
}

.nav-link {
  color: var(--text-heading) !important;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 8px 15px !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary) !important;
  background: rgba(20, 105, 60, 0.08);
}

[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="contrast"] .nav-link:hover, [data-theme="contrast"] .nav-link.active {
  color: #ffff00 !important;
  background: #000000;
  text-decoration: underline;
}

/* ==========================================================================
   HERO SECTION CINEMATIC
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 80px 20px;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.55) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(8, 10, 13, 0.3) 0%, rgba(8, 10, 13, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 920px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  background: rgba(20, 105, 60, 0.28);
  border: 1px solid rgba(20, 105, 60, 0.55);
  color: #6ee7b7;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
}

.hero-title span {
  background: linear-gradient(125deg, #ffffff 40%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="contrast"] .hero-title span {
  background: none;
  -webkit-text-fill-color: #ffff00;
  color: #ffff00;
}

.hero-subtitle {
  font-size: 1.22rem;
  color: #f3f4f6;
  max-width: 740px;
  margin: 0 auto 34px auto;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  line-height: 1.6;
}

/* ==========================================================================
   PULSANTI LUXURY
   ========================================================================== */
.btn-luxury-menu {
  background: linear-gradient(135deg, var(--color-gold) 0%, #947113 100%);
  color: #0c0e12 !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: var(--shadow-gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-luxury-menu:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  color: #000000 !important;
}

[data-theme="contrast"] .btn-luxury-menu {
  background: #ffff00;
  color: #000000 !important;
  border: 2px solid #ffffff;
}

.btn-luxury-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-luxury-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
  transform: translateY(-2px);
}

[data-theme="contrast"] .btn-luxury-secondary {
  background: #000000;
  color: #00ff66 !important;
  border: 2px solid #00ff66;
}

/* ==========================================================================
   SEZIONI EDITORIALI E CARDS
   ========================================================================== */
.section-editorial {
  padding: 85px 0;
  background: var(--bg-body);
  transition: background-color var(--transition-smooth);
}

.section-editorial.alt-bg {
  background: var(--bg-surface);
}

.editorial-header {
  text-align: center;
  margin-bottom: 50px;
}

.editorial-tag {
  color: var(--color-gold);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

[data-theme="contrast"] .editorial-tag {
  color: #ffff00;
}

.editorial-title {
  font-size: clamp(2.1rem, 4.5vw, 2.9rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.editorial-desc {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Card Valori / Servizi */
.luxury-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.luxury-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.luxury-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.luxury-card-icon.gold {
  background: rgba(181, 141, 29, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--color-gold);
}

.luxury-card-icon.green {
  background: rgba(20, 105, 60, 0.12);
  border: 1px solid rgba(20, 105, 60, 0.3);
  color: var(--color-primary);
}

[data-theme="contrast"] .luxury-card-icon {
  background: #000000;
  border: 2px solid #ffff00;
  color: #ffff00;
}

.luxury-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.luxury-card-text {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

/* ==========================================================================
   GALLERIE FOTOGRAFICHE PURE (ZERO TESTI SULLE FOTO)
   ========================================================================== */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-card-hover);
}

.photo-card:hover img {
  transform: scale(1.06);
}

/* ==========================================================================
   BANNER INVITO AL MENU POPUP
   ========================================================================== */
.menu-cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 48px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.menu-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ==========================================================================
   FINESTRA POPUP MODALE MENU (27 PAGINE)
   ========================================================================== */
.menu-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.menu-modal-overlay.active {
  display: flex;
}

.menu-modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.menu-modal-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.menu-modal-header .theme-heading {
  color: var(--text-heading) !important;
}

.menu-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: var(--bg-body);
}

.menu-page-img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  background: #ffffff;
}

.menu-modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   MAPPA OPENSTREETMAP & CONTATTI
   ========================================================================== */
#map {
  width: 100%;
  height: 440px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  z-index: 1;
}

.contact-info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   FOOTER & CREDITS (NESSUN TESTO NERO SU SFONDO NERO)
   ========================================================================== */
.site-footer {
  background: var(--bg-footer);
  color: var(--text-footer);
  border-top: 1px solid var(--border-subtle);
  padding: 65px 0 35px 0;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.site-footer h4,
.site-footer .footer-heading {
  color: var(--text-footer-heading) !important;
}

.site-footer p,
.site-footer .text-muted,
.site-footer .footer-text {
  color: var(--text-footer-muted) !important;
}

.site-footer a.text-muted,
.site-footer a.footer-link {
  color: var(--text-footer-link) !important;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.site-footer a.text-muted:hover,
.site-footer a.footer-link:hover {
  color: var(--color-primary-light) !important;
  transform: translateX(2px);
}

[data-theme="contrast"] .site-footer a.text-muted:hover {
  color: #ffff00 !important;
  text-decoration: underline;
}

.site-footer code {
  color: var(--color-gold);
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="dark"] .site-footer code {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="contrast"] .site-footer code {
  background: #000000;
  color: #ffff00;
  border: 1px solid #ffff00;
}

/* Credits Badge */
.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  border-radius: var(--radius-full);
  background: var(--credits-bg);
  border: 1px solid var(--credits-border);
  color: var(--credits-text) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  box-shadow: var(--credits-shadow);
  transition: all var(--transition-smooth);
}

.credits-badge:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold);
  color: var(--text-heading) !important;
}

.credits-badge .brand-glow {
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, #e11d48, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="contrast"] .credits-badge .brand-glow {
  background: none;
  -webkit-text-fill-color: #ffff00;
  color: #ffff00;
}

/* ==========================================================================
   COOKIE BANNER, FLOATING BUTTON & LIGHTBOX
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 620px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  z-index: 9999;
  display: none;
}

[data-theme="dark"] .cookie-banner {
  background: rgba(14, 18, 24, 0.96);
}

.cookie-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 900;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all var(--transition-fast);
}

.cookie-toggle-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 50px rgba(0,0,0,0.9);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   PULSANTE CHIUSURA MODALI BEN VISIBILE & ELEGANTE
   ========================================================================== */
.btn-modal-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-alt);
  color: var(--text-heading);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all var(--transition-fast);
}

.btn-modal-close:hover {
  background: var(--color-primary);
  color: #ffffff !important;
  border-color: var(--color-primary);
  transform: scale(1.03);
}

[data-theme="contrast"] .btn-modal-close {
  background: #000000;
  color: #ffff00 !important;
  border: 2px solid #ffff00;
}

/* ==========================================================================
   FINESTRE MODALI POPUP PER LE POLICY (PRIVACY, COOKIE, ACCESSIBILITÀ)
   ========================================================================== */
.policy-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.policy-modal-overlay.active {
  display: flex;
}

.policy-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  animation: modalFadeIn 0.25s ease;
}

.policy-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-alt);
}

.policy-modal-body {
  padding: 28px 26px;
  overflow-y: auto;
  color: var(--text-main);
  line-height: 1.7;
}

.policy-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   GALLERY SLIDESHOW SU MOBILE CON SCROLL & EFFETTO MOVIMENTO
   ========================================================================== */
@media (max-width: 768px) {
  .photo-gallery-grid,
  .photo-gallery-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 10px 4px 16px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .photo-gallery-grid::-webkit-scrollbar,
  .photo-gallery-slider::-webkit-scrollbar {
    display: none;
  }

  .photo-gallery-grid .photo-card,
  .photo-gallery-slider .photo-card {
    flex: 0 0 78vw !important;
    max-width: 320px !important;
    scroll-snap-align: center;
    aspect-ratio: 4/3;
  }

  .gallery-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-weight: 600;
  }

  .gallery-swipe-hint svg {
    animation: swipeHand 1.8s infinite ease-in-out;
  }

  @keyframes swipeHand {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
  }
}

/* ==========================================================================
   LANDING PAGE 404 & INTERCETTAZIONE LINK ERRATI
   ========================================================================== */
.hero-404 {
  padding: 85px 0 55px 0;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-404-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.14);
  color: var(--color-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

[data-theme="contrast"] .hero-404-badge {
  background: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

.hero-404-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-404-title span {
  background: linear-gradient(125deg, var(--color-primary) 30%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-404-title span {
  background: linear-gradient(125deg, #ffffff 30%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="contrast"] .hero-404-title span {
  background: none;
  -webkit-text-fill-color: #ffff00;
  color: #ffff00;
}

.hero-404-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.smart-intercept-box {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin: 0 auto 34px auto;
  max-width: 760px;
  text-align: left;
  box-shadow: var(--shadow-gold);
  animation: modalFadeIn 0.35s ease;
}

.smart-intercept-box.active {
  display: block;
}

.hub-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  text-decoration: none !important;
}

.hub-action-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-gold);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

[data-theme="contrast"] .hub-action-card {
  background: #000000;
  border: 2px solid #ffffff;
}

[data-theme="contrast"] .hub-action-card:hover {
  border-color: #ffff00;
}

.hub-action-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
}

.hub-action-card-icon.gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold);
}

.hub-action-card-icon.green {
  background: rgba(20, 105, 60, 0.15);
  color: var(--color-primary);
}

.hub-action-card-icon.red {
  background: rgba(200, 42, 53, 0.15);
  color: var(--color-accent);
}

.hub-action-card-icon.blue {
  background: rgba(14, 116, 144, 0.15);
  color: #0284c7;
}

.hub-action-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.hub-action-card-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.hub-action-card-cta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.hub-action-card:hover .hub-action-card-cta {
  gap: 10px;
  color: var(--color-gold);
}

[data-theme="contrast"] .hub-action-card-cta {
  color: #ffff00 !important;
}

.search-filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.search-pill-btn {
  background: var(--bg-surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.search-pill-btn:hover {
  background: var(--color-gold);
  color: #000000 !important;
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

[data-theme="contrast"] .search-pill-btn {
  background: #000000;
  color: #ffff00;
  border: 1px solid #ffff00;
}

