/* ============================================ */
/* LA DOLCE CASA — Custom Styles                */
/* ============================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Header states */
#header {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#header.scrolled .header-scrolled-text {
  color: #564c42;
}

#header.scrolled .header-scrolled-link {
  color: rgba(86, 76, 66, 0.7);
}

#header.scrolled .header-scrolled-link:hover {
  color: #564c42;
}

#header.scrolled #mobile-menu-btn {
  color: #564c42;
}

/* Hero background fallback gradient */
#hero > div:first-child {
  background: linear-gradient(135deg, #363b25 0%, #4d5530 30%, #6b381e 70%, #854321 100%);
}

/* Flatpickr customization */
.flatpickr-calendar {
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e0dbd3 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #d6832f !important;
  border-color: #d6832f !important;
}

.flatpickr-day.inRange {
  background: #f9edda !important;
  border-color: #f9edda !important;
  box-shadow: -5px 0 0 #f9edda, 5px 0 0 #f9edda !important;
}

.flatpickr-day.flatpickr-disabled {
  color: #ccc4b7 !important;
  text-decoration: line-through;
}

/* GLightbox customization */
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: rgba(214, 131, 47, 0.9) !important;
}

/* Booking form success state */
.booking-success {
  animation: fadeInUp 0.5s ease;
}

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

/* WhatsApp button pulse */
a[aria-label="Contattaci su WhatsApp"] {
  animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* Cookie banner show state */
#cookie-banner.show {
  transform: translateY(0);
}

/* Gallery hover effect */
.glightbox::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}

.glightbox:hover::after {
  opacity: 1;
}

.glightbox {
  position: relative;
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Price breakdown animation */
#price-breakdown {
  animation: fadeInUp 0.3s ease;
}

/* Review cards hover */
[data-aos="fade-up"] > div:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Responsive typography */
@media (max-width: 640px) {
  .font-serif.text-4xl {
    font-size: 1.875rem;
  }
}

/* Print styles */
@media print {
  #header,
  #cookie-banner,
  a[aria-label="Contattaci su WhatsApp"],
  #mobile-menu-btn {
    display: none !important;
  }
}
