/* ============================================================
   Regina Chocolate - Stili Personalizzati e Tema Cioccolato
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --color-cocoa-dark: #140905;
  --color-cocoa-card: #1e0e08;
  --color-cocoa-border: rgba(212, 175, 55, 0.22);
  --color-gold: #d4af37;
  --color-gold-light: #f5d77f;
  --color-caramel: #e5a93b;
  --color-cream: #fbf8f2;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-cocoa-dark);
  color: var(--color-cream);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

.font-serif {
  font-family: var(--font-serif);
}

/* Sfumatura oro lussuosa per titoli */
.text-gold-gradient {
  background: linear-gradient(135deg, #fef0c7 0%, #d4af37 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gold-gradient {
  background: linear-gradient(135deg, #d4af37 0%, #e5a93b 50%, #9e6f15 100%);
}

.bg-gold-gradient:hover {
  background: linear-gradient(135deg, #e5be49 0%, #f3be4d 50%, #b8860b 100%);
}

/* Texture di fondo con pattern cacao */
.bg-chocolate-pattern {
  background-color: #140905;
  background-image: radial-gradient(rgba(212, 175, 55, 0.06) 1px, transparent 1px), radial-gradient(rgba(212, 175, 55, 0.04) 1px, #140905 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

/* Glow d'accento */
.glow-gold {
  box-shadow: 0 0 35px -5px rgba(212, 175, 55, 0.35);
}

.glow-gold-pulse {
  animation: pulseGold 2.5s infinite;
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

/* Puntatore della ruota della fortuna */
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 36px solid #d4af37;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  z-index: 20;
}

.wheel-pointer::after {
  content: '';
  position: absolute;
  top: -36px;
  left: -8px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #d4af37;
}

/* Scrollbar personalizzata color cioccolato */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #140905;
}
::-webkit-scrollbar-thumb {
  background: #3d1c10;
  border-radius: 5px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}

/* Effetto card glass luxury */
.card-glass {
  background: rgba(30, 14, 8, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-glass:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

/* Animazione galleggiamento dolce */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
}


/* ============================================================
   Mappa Interattiva Cioccolato & Caramello (Tema Leaflet Personalizzato)
   ============================================================ */

/* Filtro speciale per dare alle mappe toni caldi artigianali: cacao, caramello e oro */
.chocolate-map-container .leaflet-tile-pane,
.chocolate-map-tiles {
  filter: contrast(108%) saturate(145%) sepia(22%) hue-rotate(-12deg) brightness(97%) !important;
}

/* Sfondo contenitore scuro per contrasto cioccolato */
.chocolate-map-container {
  background-color: #1e0e08 !important;
}

/* Marker artigianale cioccolato con pin 3D e alone dorato pulsante */
.chocolate-custom-marker {
  background: transparent !important;
  border: none !important;
}

.chocolate-pin-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
  cursor: pointer;
  user-select: none;
}

.chocolate-pin-badge {
  position: relative;
  z-index: 3;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #26140b 0%, #140905 100%);
  color: #f5d77f;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 4px 12px rgba(0,0,0,0.7);
  white-space: nowrap;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.chocolate-custom-marker:hover .chocolate-pin-badge {
  transform: scale(1.05);
  border-color: #d4af37;
  color: #ffffff;
}

/* Quando il popup delle info è aperto, nascondi la targhetta del nome:
   il riquadro della scritta si trasforma così nel riquadro delle info senza lasciare testo sotto! */
.chocolate-custom-marker.popup-active .chocolate-pin-badge {
  display: none !important;
}

.chocolate-pin-body {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #d4af37 0%, #7c4722 45%, #26140b 100%);
  border: 2px solid #fef0c7;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chocolate-custom-marker:hover .chocolate-pin-body {
  transform: rotate(-45deg) scale(1.08);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6);
}

.chocolate-pin-icon {
  transform: rotate(45deg);
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.chocolate-pin-pulse {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.7) 0%, rgba(212, 175, 55, 0) 70%);
  animation: chocolatePulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes chocolatePulse {
  0% {
    transform: translateX(-50%) scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-50%) scale(1.6);
    opacity: 0;
  }
}

/* Custom Popup Leaflet Tema Cioccolato Fondente & Oro (Compatto e Ottimizzato Mobile) */
.chocolate-leaflet-popup .leaflet-popup-content-wrapper {
  background: #1c0c07 !important;
  color: #fbf8f2 !important;
  border: 1.5px solid #d4af37 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.85) !important;
  padding: 2px !important;
}

.chocolate-leaflet-popup .leaflet-popup-tip {
  background: #1c0c07 !important;
  border-left: 1.5px solid #d4af37 !important;
  border-bottom: 1.5px solid #d4af37 !important;
}

.chocolate-leaflet-popup .leaflet-popup-content {
  margin: 6px 8px !important;
  line-height: 1.25 !important;
}

.chocolate-popup-inner {
  font-family: var(--font-sans);
  text-align: center;
  max-width: 190px;
}

.chocolate-popup-inner .popup-badge {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 9999px;
  padding: 1px 6px;
  margin-bottom: 2px;
}

.chocolate-popup-inner .popup-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
  color: #fef0c7;
  margin-bottom: 2px;
}

.chocolate-popup-inner .popup-desc {
  font-size: 10px;
  color: #f5d77f;
  line-height: 1.3;
  margin-bottom: 5px;
}

.chocolate-popup-inner .popup-btn {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, #d4af37 0%, #e5a93b 50%, #9e6f15 100%);
  color: #140905;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.chocolate-popup-inner .popup-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.leaflet-container a.leaflet-popup-close-button {
  color: #f5d77f !important;
  padding: 3px 5px !important;
  font-size: 14px !important;
  top: 2px !important;
  right: 2px !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #ffffff !important;
}

/* Controlli zoom in stile cioccolato */
.leaflet-control-zoom {
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6) !important;
}

.leaflet-control-zoom a {
  background-color: #26140b !important;
  color: #f5d77f !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
  transition: all 0.2s ease;
}

.leaflet-control-zoom a:hover {
  background-color: #d4af37 !important;
  color: #140905 !important;
}

/* Attribution Leaflet color cacao */
.leaflet-container .leaflet-control-attribution {
  background: rgba(20, 9, 5, 0.85) !important;
  color: rgba(245, 215, 127, 0.7) !important;
  font-size: 9px !important;
  border-radius: 6px;
  padding: 2px 6px;
}

.leaflet-container .leaflet-control-attribution a {
  color: #d4af37 !important;
}
