/**
 * Componenti SEO editoriali Preventivo.it
 * TOC automatico + FAQ guide
 */

/* TOC Bootstrap accordion */



.hb-guide-toc__accordion {
  border-radius: 16px;
}

.hb-guide-toc__item-wrap {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.hb-guide-toc__button {
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  font-weight: 800;
  color: #172033;
  background:
    radial-gradient(circle at top left, #0058a240, transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: none;
}

.hb-guide-toc__button::before {
  content: "";
  width: 0.68rem;
  height: 0.68rem;
  flex: 0 0 0.68rem;
  border-radius: 999px;
  background: #2563eb61;
  box-shadow: 0 0 0 5px rgba(236, 196, 144, 0.2);
}

.hb-guide-toc__button:not(.collapsed) {
  color: #172033;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
}

.hb-guide-toc__button:focus {
  border-color: rgba(236, 196, 144, 0.8);
  box-shadow: 0 0 0 0.2rem rgba(236, 196, 144, 0.22);
}

.hb-guide-toc__button-label {
  line-height: 1.2;
  color: #054db5;
}

.hb-guide-toc__body {
  padding: 0.95rem;
  background: #fff;
}

.hb-guide-toc__list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hb-guide-toc__item {
  margin: 0;
  padding: 0;
}

.hb-guide-toc__item--h3 {
  padding-left: 0.9rem;
}

.hb-guide-toc__item--h4 {
  padding-left: 1.8rem;
}

.hb-guide-toc__link {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.62rem 0.7rem;
  border-radius: 12px;
  color: #263247;
  text-decoration: none;
  line-height: 1.35;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.hb-guide-toc__link:hover,
.hb-guide-toc__link:focus {
  color: #111827;
  text-decoration: none;
  background: #fff;
  border-color: rgba(236, 196, 144, 0.62);
  transform: translateX(2px);
}

.hb-guide-toc__dot {
width: 0.45rem;
    height: 0.45rem;
    margin-top: 0.42rem;
    flex: 0 0 0.45rem;
    border-radius: 999px;
    background: #4578c3;
}

.hb-guide-toc__item--h3 .hb-guide-toc__dot {
  background: #4578c3d6
}

.hb-guide-toc__item--h4 .hb-guide-toc__dot {
  background: rgba(15, 23, 42, 0.28);
}

.hb-guide-content h2[id],
.hb-guide-content h3[id],
.hb-guide-content h4[id] {
  scroll-margin-top: 110px;
}

/* FAQ - base provvisoria, la rifiniamo dopo */

.hb-guide-faq {
  margin: 3rem 0 0;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.hb-guide-faq__title {
  margin: 0 0 1rem;
  color: #172033;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.hb-guide-faq__items {
  display: grid;
  gap: 0.75rem;
}

.hb-guide-faq__item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.hb-guide-faq__question {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 800;
  color: #172033;
}

.hb-guide-faq__answer {
  padding: 0 1.1rem 1rem;
  color: #334155;
  line-height: 1.7;
}

.hb-guide-faq__answer > :last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .hb-guide-toc__item--h3,
  .hb-guide-toc__item--h4 {
    padding-left: 0;
  }
}

/* TOC guide - stile gerarchico tipo Hardgroup */
.hb-guide-toc__body,
.hb-seo-toc__details {
  font-size: 1rem;
}

.hb-guide-toc__list,
.hb-seo-toc__list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* reset item */
.hb-guide-toc__item,
.hb-seo-toc__item {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* link base */
.hb-guide-toc__link,
.hb-seo-toc__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 100%;
  color: #07539f;
  line-height: 1.35;
  text-underline-offset: 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.12rem 0;
  transform: none;
  box-shadow: none;
}

.hb-guide-toc__link:hover,
.hb-guide-toc__link:focus,
.hb-seo-toc__link:hover,
.hb-seo-toc__link:focus {
  color: #003f7f;
  background: transparent;
  transform: none;
}

/* H2: riga evidenziata */
.hb-guide-toc__item--h2 .hb-guide-toc__link,
.hb-seo-toc__item--h2 .hb-seo-toc__link {
  display: inline;
  width: fit-content;
  padding: 0.08rem 0.18rem;
  color: #07539f;
  font-weight: 700;
  background: rgba(7, 83, 159, 0.08);
  border-radius: 4px;
}

/* H2 senza pallino */
.hb-guide-toc__item--h2 .hb-guide-toc__dot,
.hb-seo-toc__item--h2 .hb-seo-toc__bullet {
  display: none;
}

/* H3: dot pieno */
.hb-guide-toc__item--h3,
.hb-seo-toc__item--h3 {
  padding-left: 1rem;
}

.hb-guide-toc__item--h3 .hb-guide-toc__dot,
.hb-seo-toc__item--h3 .hb-seo-toc__bullet {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: 0.48rem;
  border-radius: 999px;
  background: #07539f;
  border: 1px solid #07539f;
}

/* H4: dot vuoto */
.hb-guide-toc__item--h4,
.hb-seo-toc__item--h4 {
  padding-left: 2rem;
}

.hb-guide-toc__item--h4 .hb-guide-toc__dot,
.hb-seo-toc__item--h4 .hb-seo-toc__bullet {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  margin-top: 0.48rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #07539f;
}

/* Testo link */
.hb-guide-toc__text,
.hb-seo-toc__link-text {
  min-width: 0;
}

/* Mobile: riduce indentazione */
@media (max-width: 575.98px) {
  .hb-guide-toc__item--h3,
  .hb-seo-toc__item--h3 {
    padding-left: 0.75rem;
  }

  .hb-guide-toc__item--h4,
  .hb-seo-toc__item--h4 {
    padding-left: 1.35rem;
  }
}

.hb-guide-content h2 {
    color: #016393;
    font-weight: bold;
    font-size: 1.5rem;
}
.hb-guide-content h3,.hb-guide-content h4 {
    color: #007bb8;
    font-size: 1.2rem;
    font-weight: bold;
}


/* Guide - box "In breve" */
.hb-guide-quick-summary {
  margin: 0 0 2rem;
  padding: 1.35rem 1.35rem 1.25rem;
  border: 1px solid rgba(0, 46, 74, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 196, 144, 0.20), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 34px rgba(0, 46, 74, 0.08);
}

.hb-guide-quick-summary__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a4b19;
}

.hb-guide-quick-summary__title {
  margin: 0 0 .85rem;
  color: #002e4a;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.hb-guide-quick-summary__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hb-guide-quick-summary__item {
  position: relative;
  margin: 0 0 .7rem;
  padding-left: 1.55rem;
  color: #244253;
  line-height: 1.55;
}

.hb-guide-quick-summary__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: .58rem;
  height: .58rem;
  border-radius: 999px;
  background: #ecc490;
  box-shadow: 0 0 0 4px rgba(236, 196, 144, .22);
}

.hb-guide-quick-summary__item:last-child {
  margin-bottom: 0;
}

.hb-guide-quick-summary__note {
  margin: 1rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid rgba(0, 46, 74, .10);
  color: #4c6572;
  font-size: .96rem;
}

@media (max-width: 575.98px) {
  .hb-guide-quick-summary {
    padding: 1.1rem;
    border-radius: 16px;
  }
}


/* Guide - CTA single */
.hb-guide-single-cta {
  margin: 2.5rem 0 0;
  padding: 1.7rem;
  border-radius: 22px;
  background: linear-gradient(135deg, #002e4a 0%, #0b4f76 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 46, 74, .18);
}

.hb-guide-single-cta__eyebrow {
  margin: 0 0 .45rem;
  color: #ecc490;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hb-guide-single-cta__title {
  margin: 0 0 .7rem;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.hb-guide-single-cta__text {
  max-width: 680px;
  margin: 0 0 1.15rem;
  color: rgba(255, 255, 255, .88);
  line-height: 1.6;
}

.hb-guide-single-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .78rem 1.2rem;
  border-radius: 999px;
  background: #ecc490;
  color: #002e4a;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.hb-guide-single-cta__button:hover,
.hb-guide-single-cta__button:focus {
  background: #f2d3aa;
  color: #002e4a;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .20);
}

@media (max-width: 575.98px) {
  .hb-guide-single-cta {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .hb-guide-single-cta__button {
    width: 100%;
  }
}
