/* ==========================================================================
   STUDIO ODONTOIATRICO — DENTISTA1_COMPONENTI.CSS
   Componenti Modulari: Hero Storyteller, Bento Grid, FAQ, Sezione Speciale
   Cache Busting: ?v=1.0.0
   ========================================================================== */

/* 1. HERO SECTION STORYTELLER */
.hero-section {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  color: var(--p-muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  max-width: 540px;
}

.hero-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--p-border);
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--p-ink-light);
}

.hero-trust-item svg {
  color: var(--p-accent);
  flex-shrink: 0;
}

/* Visual Hero con Cornice Sicura (No spill) */
.hero-visual-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--p-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.hero-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.6;
  overflow: hidden;
}

.hero-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-soft);
}

.hero-card-frame:hover img {
  transform: scale(1.02);
}

/* Badge All'Interno della Cornice per Evitare Spill */
.hero-floating-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--p-shadow-md);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
}

.hero-floating-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--p-accent-subtle);
  color: var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-floating-badge-text strong {
  display: block;
  font-size: 0.88rem;
  color: var(--p-ink);
}

.hero-floating-badge-text span {
  font-size: 0.78rem;
  color: var(--p-muted);
}

/* 2. BENTO GRID BILANCIATA (Nessuna card isolata) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background-color: var(--p-surface-card);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border: 1px solid var(--p-border);
  box-shadow: var(--p-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow-md);
  border-color: rgba(15, 108, 119, 0.25);
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--p-accent-subtle);
  color: var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.bento-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background-color: var(--p-surface);
  color: var(--p-accent);
  margin-bottom: 0.75rem;
}

/* 3. SEZIONE CHI SIAMO */
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.story-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--p-shadow-md);
  border: 1px solid var(--p-border);
}

.story-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 500ms var(--ease-soft);
}

.story-frame:hover img {
  transform: scale(1.02);
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--p-border);
}

.stat-item-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--p-accent);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-item-label {
  font-size: 0.85rem;
  color: var(--p-muted);
  line-height: 1.35;
}

/* 4. SEZIONE RECENSIONI CON VISUAL */
.reviews-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-card {
  background-color: var(--p-surface-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--p-border);
  box-shadow: var(--p-shadow-sm);
  transition: transform var(--trans-normal), box-shadow var(--trans-normal);
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow-md);
}

.review-stars {
  display: flex;
  gap: 0.2rem;
  color: #d97746;
  margin-bottom: 0.75rem;
}

.review-text {
  font-size: 0.92rem;
  color: var(--p-ink-light);
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 0.85rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--p-accent-subtle);
  color: var(--p-accent);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-author-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--p-ink);
}

.reviews-visual-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--p-shadow-md);
  border: 1px solid var(--p-border);
}

.reviews-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 5. SEZIONE FAQ ACCESSIBILE (Nessun overlap) */
.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--p-border);
  border-radius: var(--radius-md);
  background-color: var(--p-surface-card);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.faq-item.is-active {
  border-color: rgba(15, 108, 119, 0.35);
  box-shadow: var(--p-shadow-sm);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--p-ink);
  background: none;
  border: none;
  cursor: pointer;
  gap: 1rem;
}

.faq-trigger:hover {
  color: var(--p-accent);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--p-accent);
  transition: transform var(--trans-normal);
}

.faq-item.is-active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 1.5rem 1.25rem 1.5rem;
  border-top: 1px solid transparent;
}

.faq-item.is-active .faq-content {
  display: block;
}

/* 6. SEZIONE CONTATTI SPECIALE */
.contact-special-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

.contact-card-main {
  background-color: var(--p-surface-card);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--p-border);
  box-shadow: var(--p-shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-phone-box {
  background-color: var(--p-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
  border: 1px solid rgba(15, 108, 119, 0.15);
}

.contact-phone-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--p-accent);
  display: block;
  margin-bottom: 0.35rem;
}

.contact-phone-number {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--p-ink);
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  word-break: break-all;
  transition: color var(--trans-fast);
}

.contact-phone-number:hover {
  color: var(--p-accent);
}

.contact-hours-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--p-border);
}

.contact-hour-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--p-ink-light);
}

.contact-map-card {
  background-color: var(--p-surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--p-border);
  overflow: hidden;
  box-shadow: var(--p-shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.contact-map-frame {
  flex: 1;
  width: 100%;
  min-height: 280px;
  border: 0;
}

.contact-map-info {
  padding: 1.15rem 1.5rem;
  background-color: var(--p-surface-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--p-border);
}

/* 7. FOOTER */
.site-footer {
  background-color: var(--p-ink);
  color: #ffffff;
  padding-top: 3.5rem;
  padding-bottom: clamp(3.5rem, 5vw, 4.5rem);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.5rem;
  font-size: 0.84rem;
  color: var(--p-subtle);
}

/* 8. PULSANTE "CHIAMA ORA" STICKY */
.sticky-call-bar {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
}

.sticky-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-full);
  background-color: var(--p-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 22px rgba(15, 108, 119, 0.35);
  text-decoration: none;
  transition: transform var(--trans-fast), background-color var(--trans-fast);
}

.sticky-call-btn:hover {
  background-color: var(--p-accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .hero-grid,
  .story-grid,
  .reviews-layout,
  .contact-special-grid,
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual-wrapper {
    order: -1;
    max-width: 440px;
    margin: 0 auto;
  }

  .sticky-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: rgba(248, 250, 249, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--p-border);
    box-shadow: 0 -4px 14px rgba(11, 52, 59, 0.08);
  }

  .sticky-call-btn {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }

  body {
    padding-bottom: 70px;
  }
}
