/* ==========================================================================
   FAQ Accordion — shared component
   Used by: Home (desktop + mobile), Informazioni, Contattaci, Prenota (+ en/de).
   Mobile-first. Open/close is driven by CSS grid-template-rows (0fr -> 1fr),
   not JS-measured scrollHeight, so it stays smooth on resize/orientation
   change and never causes layout shift on page load (starts closed at 0fr).
   Toggle behaviour lives in /js/faq-accordion.js.

   Every rule below is scoped under .faq-list on purpose: some pages also
   have an older, unrelated FAQ block that happens to reuse the bare
   .faq-item/.faq-trigger/.faq-question-text/.faq-answer-text class names
   (e.g. informazioni.html's "Prima di Salpare" 5-question block). Scoping
   to .faq-list — a wrapper unique to this component's markup — keeps this
   stylesheet from bleeding into that older block.
   ========================================================================== */

.faq-section {
  scroll-margin-top: 5rem;
}

.faq-eyebrow {
  text-align: center;
  color: rgba(34, 211, 238, 0.7);
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .faq-eyebrow {
    font-size: 0.9375rem;
    margin-bottom: 4rem;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.faq-list .faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease;
}

.faq-list .faq-item:hover {
  border-color: rgba(6, 182, 212, 0.25);
}

.faq-list .faq-item-heading {
  margin: 0;
}

/* Real <button>: keyboard-focusable and screen-reader operable for free. */
.faq-list .faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.75rem 0.25rem;
  background: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.faq-list .faq-trigger:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 4px;
  border-radius: 4px;
}

.faq-list .faq-question-text {
  font-family: var(--font-serif, inherit);
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .faq-list .faq-question-text {
    font-size: 1.25rem;
  }
}

.faq-list .faq-trigger:hover .faq-question-text,
.faq-list .faq-trigger:focus-visible .faq-question-text {
  color: #22d3ee;
}

.faq-list .faq-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -0.625rem -0.5rem;
  color: rgba(34, 211, 238, 0.7);
}

.faq-list .faq-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-list .faq-item[data-open="true"] .faq-icon svg {
  transform: rotate(180deg);
}

.faq-list .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-list .faq-item[data-open="true"] .faq-answer {
  grid-template-rows: 1fr;
}

.faq-list .faq-answer-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-list .faq-answer-text {
  max-width: 68ch;
  padding: 0 0.25rem 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .faq-list .faq-answer-text {
    font-size: 1rem;
    padding-bottom: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-list .faq-item,
  .faq-list .faq-answer,
  .faq-list .faq-icon svg {
    transition: none;
  }
}
