/**
 * FAQ My Pet Hotel — Stili
 * 
 * Scope: .faq-mypethotel
 * Features: <details>/<summary> nativo, ToC multi-colonna, chevron CSS, 
 * scroll-margin-top 100px (header sticky), prefers-reduced-motion, responsive
 */

.faq-mypethotel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.faq-mypethotel > section {
  display: block;
}

/* ===== BLOCCHI (Principali / Secondarie) ===== */

.faq-mypethotel .faq-blocco {
  margin-bottom: 3rem;
}

.faq-mypethotel .faq-blocco > h2 {
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #f61d25;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== INDICE (ToC) ===== */

.faq-mypethotel .faq-toc {
  background: #f8f8f8;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 4px;
}

.faq-mypethotel .faq-toc ol {
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.faq-mypethotel .faq-toc > ol > li {
  margin-bottom: 1rem;
}

.faq-mypethotel .faq-toc > ol > li > a {
  color: #f61d25;
  font-weight: 600;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.faq-mypethotel .faq-toc > ol > li > a:hover,
.faq-mypethotel .faq-toc > ol > li > a:focus {
  text-decoration: underline;
  outline: 2px solid #f61d25;
  outline-offset: 2px;
}

.faq-mypethotel .faq-toc ol ol {
  margin-top: 0.5rem;
  margin-left: 0;
  list-style-type: lower-alpha;
}

.faq-mypethotel .faq-toc ol ol li {
  margin-bottom: 0.25rem;
}

.faq-mypethotel .faq-toc ol ol li a {
  color: #666;
  font-weight: 400;

  text-decoration: none;
  display: inline-block;
}

.faq-mypethotel .faq-toc ol ol li a:hover,
.faq-mypethotel .faq-toc ol ol li a:focus {
  color: #f61d25;
  text-decoration: underline;
}

/* ===== GRUPPI ===== */

.faq-mypethotel .faq-gruppo {
  margin-bottom: 2.5rem;
  scroll-margin-top: 100px;
  /* Per fixed/sticky header nel tema */
}

.faq-mypethotel .faq-gruppo > h3 {
  font-weight: 700;
  color: #333;
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== DETAILS / SUMMARY ===== */

.faq-mypethotel details {
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  scroll-margin-top: 100px;
  /* Applica scroll margin anche ai details */
}

.faq-mypethotel details[open] {
  border-color: #f61d25;
  box-shadow: 0 2px 8px rgba(246, 29, 37, 0.1);
}

.faq-mypethotel summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
  user-select: none;
  transition: background-color 0.2s ease;
}

.faq-mypethotel summary:hover {
  background: #f0f0f0;
}

.faq-mypethotel summary:focus {
  outline: 2px solid #f61d25;
  outline-offset: -2px;
}

.faq-mypethotel summary h4 {
  margin: 0;
  padding: 0;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: left;
  line-height: 1.4;
}

/* ===== CHEVRON / ICONA APERTURA ===== */

.faq-mypethotel summary::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  margin-left: -0.5rem;
  background: linear-gradient(135deg, transparent 0%, transparent 40%, #f61d25 40%, #f61d25 60%, transparent 60%), linear-gradient(45deg, transparent 0%, transparent 40%, #f61d25 40%, #f61d25 60%, transparent 60%);
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-mypethotel details[open] summary::before {
  transform: rotate(180deg);
}

/* ===== RISPOSTA ===== */

.faq-mypethotel .faq-a {
  padding: 1.25rem;
  border-top: 1px solid #e0e0e0;
  background: #fefefe;
  line-height: 1.7;
  color: #555;
  animation: slideDown 0.3s ease;
}

.faq-mypethotel .faq-a p {
  margin: 0 0 1rem 0;
}

.faq-mypethotel .faq-a p:last-child {
  margin-bottom: 0;
}

.faq-mypethotel .faq-a ul {
  margin: 2rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.faq-mypethotel .faq-a ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.faq-mypethotel .faq-a a {
  color: #f61d25;
  text-decoration: underline;
  font-weight: 500;
}

.faq-mypethotel .faq-a a:hover {
  color: #d81a1f;
  text-decoration: none;
}

.faq-mypethotel .faq-a a:focus {
  outline: 2px solid #f61d25;
  outline-offset: 2px;
}

/* ===== ANIMAZIONI ===== */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RIDUZIONE MOVIMENTO (Accessibility) ===== */

@media (prefers-reduced-motion: reduce) {
  .faq-mypethotel summary::before {
    transition: none;
  }
  .faq-mypethotel details[open] summary::before {
    transform: none;
  }
  .faq-mypethotel .faq-a {
    animation: none;
  }
  .faq-mypethotel summary,
  .faq-mypethotel details {
    transition: none;
  }
}

/* ===== RESPONSIVE: TABLET (768px) ===== */

@media (max-width: 767px) {
  .faq-mypethotel {
    padding: 1.5rem 1rem;
  }

  .faq-mypethotel .faq-blocco > h2 {
    margin-bottom: 1rem;
  }

  .faq-mypethotel .faq-gruppo > h3 {
    margin-bottom: 1rem;
  }

  .faq-mypethotel summary h4 {
  }

  .faq-mypethotel summary {
    padding: 0.9rem 1rem;
  }

  .faq-mypethotel .faq-a {
    padding: 1rem;
  }

  .faq-mypethotel .faq-toc {
    padding: 1rem;
  }

  .faq-mypethotel .faq-toc ol ol li a {
  }
}

/* ===== RESPONSIVE: MOBILE (360px) ===== */

@media (max-width: 480px) {
  .faq-mypethotel {
    padding: 1rem;
  }

  .faq-mypethotel .faq-blocco > h2 {
    margin-bottom: 0.75rem;
  }

  .faq-mypethotel .faq-gruppo > h3 {
    margin-bottom: 0.75rem;
  }

  .faq-mypethotel summary {
    padding: 0.75rem 0.9rem;
  }

  .faq-mypethotel summary h4 {
  }

  .faq-mypethotel summary::before {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
  }

  .faq-mypethotel .faq-a {
    padding: 0.9rem;
  }

  .faq-mypethotel .faq-toc {
    padding: 0.75rem;
  }

  .faq-mypethotel .faq-toc ol {
    padding-left: 2rem;
  }

  .faq-mypethotel .faq-toc ol ol {
    padding-left: 1.25rem;
  }
}

/* ===== CONTRASTO E ACCESSIBILITÀ ===== */

@media (prefers-contrast: more) {
  .faq-mypethotel summary {
    border: 2px solid #333;
  }

  .faq-mypethotel details[open] {
    border-width: 2px;
  }

  .faq-mypethotel summary::before {
    background-image: linear-gradient(135deg, transparent 0%, transparent 35%, #000 35%, #000 65%, transparent 65%), linear-gradient(45deg, transparent 0%, transparent 35%, #000 35%, #000 65%, transparent 65%);
  }
}

/* ===== STAMPA (Print-friendly) ===== */

@media print {
  .faq-mypethotel details {
    border: 1px solid #999;
  }

  .faq-mypethotel details[open],
  .faq-mypethotel details {
    page-break-inside: avoid;
  }

  .faq-mypethotel summary::before {
    display: none;
  }

  .faq-mypethotel .faq-toc {
    background: #eee;
    border: 1px solid #999;
  }
}
