:root {
  --wine: #7A1E2B;
  --pine: #0F3D2E;
  --gold: #C6A15B;
  --ivory: #F7F1E6;
  --charcoal: #1F2937;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Playfair Display', sans-serif;
  background-color: var(--ivory);
  color: var(--charcoal);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.02em;
}

.font-display {
  font-family: 'Dancing Script', cursive;
}

.font-elegant {
  font-family: 'Dancing Script', cursive;
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
  font-family: 'Playfair Display', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

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

.nav-link:hover::after {
  width: 100%;
}

.btn-primary {
  background-color: var(--wine);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: white;
  color: var(--wine);
  border-color: var(--wine);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(122, 30, 43, 0.2);
}

.btn-secondary {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background-color: var(--gold);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(198, 161, 91, 0.2);
}

/* Snow effect */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   AVENTURA MAPA / PINS
   ========================= */

/* Wrapper: centra el pin exactamente en la coordenada x/y */
.map-pin-wrap {
  transform: translate(-50%, -50%);
}

/* Pin base (solo ajustes finos, Tailwind hace el resto) */
.map-pin {
  position: relative;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

/* Estado activo del pin */
.map-pin.is-active {
  box-shadow:
    0 0 0 4px rgba(198, 161, 91, 0.28),
    0 10px 25px rgba(122, 30, 43, 0.25);
  transform: scale(1.08);
}

/* Halo / pulso suave */
.pin-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: rgba(122, 30, 43, 0.18);
  z-index: 0;
  animation: pinPulse 2.2s ease-out infinite;
}

/* Pausa el pulso al hacer hover/focus para que se vea más limpio */
.map-pin:hover .pin-pulse,
.map-pin:focus-visible .pin-pulse,
.map-pin.is-active .pin-pulse {
  animation-play-state: paused;
  opacity: 0.6;
}

/* Tooltip */
.pin-tooltip {
  background-color: rgba(31, 41, 55, 0.92);
  color: white;
  padding: 6px 10px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 40;
}

/* Triangulito del tooltip */
.pin-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: rgba(31, 41, 55, 0.92);
  rotate: 45deg;
  border-radius: 2px;
}

/* En móvil no hay hover real -> ocultamos tooltips visuales para limpiar UX */
@media (hover: none) and (pointer: coarse) {
  .pin-tooltip {
    display: none;
  }
}

/* Motion reduced */
@media (prefers-reduced-motion: reduce) {
  .map-pin,
  .pin-pulse,
  .fade-in,
  .nav-link,
  .btn-primary,
  .btn-secondary {
    animation: none !important;
    transition: none !important;
  }
}

/* Animación halo */
@keyframes pinPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.65;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Slider Bar Styling */
.slider-track {
  cursor: pointer;
  height: 6px;
  background-color: rgba(198, 161, 91, 0.2);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  transition: height 0.3s ease;
}

.slider-track:hover, .slider-track:active {
  height: 8px;
}

.slider-thumb {
  height: 100%;
  background-color: var(--gold);
  width: 0;
  transition: width 0.15s ease;
}

/* Scrollbar Hide Utility */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Status Badges */
.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.status-available {
  background-color: #f1f5f9;
  color: #475569;
}

.status-almost {
  background-color: #fffbeb;
  color: #b45309;
}

.status-completed {
  background-color: #ecfdf5;
  color: #059669;
}

/* Progress Bar */
.progress-container {
  height: 6px;
  background-color: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contributor List */
.contributor-tag {
  font-size: 0.75rem;
  background-color: white;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.contributor-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  top: 50%;
  left: 50%;
  margin-top: -0.6rem;
  margin-left: -0.6rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal Animations */
.modal-backdrop {
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.modal-content-anim {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scrollbar suave para zonas con overflow (opcional, bonito en modal) */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(198, 161, 91, 0.2);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(198, 161, 91, 0.4);
}

#comments-list::-webkit-scrollbar {
  width: 8px;
}
#comments-list::-webkit-scrollbar-track {
  background: transparent;
}
#comments-list::-webkit-scrollbar-thumb {
  background: rgba(198, 161, 91, 0.35);
  border-radius: 9999px;
}
#comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(198, 161, 91, 0.55);
}
.hero-section {
  min-height: 100svh;
}

.hero-bg {
  background-image: url('../assets/photos/hero.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: scroll;
}

/* Desktop */
@media (min-width: 768px) {
  .hero-section {
    min-height: 100vh;
  }

  .hero-bg {
    background-image: url('../assets/photos/hero.jpg');
    background-position: center center;
    background-attachment: fixed;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .hero-bg {
    background-image: url('../assets/photos/hero-mobile.jpeg');
    background-position: center center;
    background-attachment: scroll;
  }
}