/**
 * ITALTERMICA S.N.C. - Foglio di Stile Principale
 * Sito Web & Landing Pages Ads Ottimizzate SEO/CRO
 * Autore: Marco D'Elia
 * Versione: 1.0.0
 */

html {
  scroll-behavior: smooth;
  width: 100%;
}

body, #root {
  width: 100%;
  font-family: 'Inter', sans-serif;
}

.font-bricolage {
  font-family: 'Bricolage Grotesque', sans-serif !important;
}

[class*="rounded"] {
  border-radius: 8px !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.rounded-2xl {
  border-radius: 16px !important;
}

.rounded-3xl {
  border-radius: 24px !important;
}

#root {
  background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
}

#root section {
  position: relative;
  animation: hp-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#root section:nth-of-type(2) { animation-delay: 0.08s; }
#root section:nth-of-type(3) { animation-delay: 0.14s; }
#root section:nth-of-type(4) { animation-delay: 0.2s; }
#root section:nth-of-type(5) { animation-delay: 0.26s; }

#root h1, #root h2 {
  letter-spacing: -0.045em;
}

@keyframes hp-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.hp-float {
  animation: hp-float 5s ease-in-out infinite;
}

.whatsapp-pulse {
  animation: pulse-ring 2s infinite;
}

#root a, #root button {
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

#root a:hover, #root button:hover {
  transform: translateY(-1px);
}

/* Gallery & Before/After Cards */
.gallery-card:before {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}

.gallery-card img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
  opacity: 1;
}

.gallery-card:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 35, 71, 0.94), rgba(19, 35, 71, 0.22), transparent);
  opacity: 0.92;
  transition: opacity 0.35s ease;
}

.gallery-card:hover:after {
  opacity: 1;
}

.premium-glow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.premium-glow:before {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 25% 20%, rgba(245, 184, 46, 0.22), transparent 34%),
              radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 30%);
  z-index: -1;
}

#services .group, #reviews .bg-white, #find-us iframe {
  will-change: transform;
}

#services .group:hover {
  transform: translateY(-4px);
}

.section-radial-bg {
  background-color: #f8f9fc;
  background-image: radial-gradient(circle at 12% 8%, rgba(245, 184, 46, 0.08), transparent 32%),
                    radial-gradient(circle at 88% 12%, rgba(19, 35, 71, 0.05), transparent 30%);
}

footer {
  background-image: radial-gradient(circle at 20% 0%, rgba(245, 184, 46, 0.14), transparent 30%),
                    linear-gradient(180deg, #132347, #0d1832);
}

/* Before / After Interactive Comparison Card */
.ba-badge-before {
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  backdrop-filter: blur(4px);
}

.ba-badge-after {
  background: rgba(22, 163, 74, 0.92);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* FAQ Accordion */
.faq-item[open] summary ~ * {
  animation: hp-fade-up 0.3s ease-out;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Dimensionamento maggiorato per icone Telefono e WhatsApp nei bottoni CTA */
a[href^="tel:"] iconify-icon,
a[href*="wa.me"] iconify-icon {
  font-size: 1.45rem !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

/* Barra mobile sticky: icone ancora più grandi e leggibili */
.fixed.bottom-0 a[href^="tel:"] iconify-icon,
.fixed.bottom-0 a[href*="wa.me"] iconify-icon {
  font-size: 1.6rem !important;
}

/* Bottone flottante WhatsApp Desktop */
a.whatsapp-pulse iconify-icon {
  font-size: 2.15rem !important;
}

@media (prefers-reduced-motion: reduce) {
  #root section, .hp-float, .whatsapp-pulse {
    animation: none !important;
  }
  #root a:hover, #root button:hover {
    transform: none;
  }
}

