/**
 * Widget: hero-content|tab
 */

.hero-content-tab {
    padding: var(--website-padding-top-bottom-header) 0;
    /* Smooth scroll per gli anchor dell'indice */
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    .hero-content-tab {
        scroll-behavior: auto;
    }
}

.hero-content-tab > .container {
    max-width: var(--website-container-max-width);
}

/* -----------------------------------------------------------------------
   Layout: TOC sinistra, contenuto destra
----------------------------------------------------------------------- */
.hero-content-tab .hctab-row {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 4rem;
    align-items: flex-start;
}

/* -----------------------------------------------------------------------
   TOC (sticky)
----------------------------------------------------------------------- */
.hero-content-tab .hctab-toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.hero-content-tab .hctab-toc-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3D3D3D;
    margin: 0 0 1rem;
}

.hero-content-tab .hctab-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 2px solid rgba(24, 19, 16, 0.10);
}

.hero-content-tab .hctab-toc-link {
    display: block;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: rgba(24, 19, 16, 0.70);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.hero-content-tab .hctab-toc-link:hover {
    color: var(--website-accent);
}

.hero-content-tab .hctab-toc-link.is-active {
    color: var(--website-accent);
    border-left-color: var(--website-accent);
    font-weight: 600;
}

.hero-content-tab .hctab-toc-link:focus-visible {
    outline: 3px solid var(--website-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* -----------------------------------------------------------------------
   Contenuto pagina
----------------------------------------------------------------------- */
.hero-content-tab .hctab-page-title {
    font-size: 2.625rem;
    font-weight: 500;
    line-height: 1.1;
    color: #181310;
    margin: 0 0 2rem;
}

.hero-content-tab .title-emphasis{
    font-style: italic;
}

.hero-content-tab .hctab-content-body {
    color: rgba(24, 19, 16, 0.80);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.36px;
}

.hero-content-tab .hctab-content-body h2 {
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1.2;
    color: #181310;
    margin: 2.5rem 0 1.5rem;
    /* Offset per anchor scroll: il titolo non finisce sotto all'header sticky */
    scroll-margin-top: 100px;
}

.hero-content-tab .hctab-content-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #181310;
    margin: 1.75rem 0 1rem;
    scroll-margin-top: 100px;
}

.hero-content-tab .hctab-content-body p {
    margin: 0 0 1.25rem;
}

.hero-content-tab .hctab-content-body p:last-child {
    margin-bottom: 0;
}

.hero-content-tab .hctab-content-body strong {
    font-weight: 600;
    color: #181310;
}

.hero-content-tab .hctab-content-body a {
    color: var(--website-accent);
    text-decoration: underline;
}

.hero-content-tab .hctab-content-body a:focus-visible {
    outline: 2px solid var(--website-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.hero-content-tab .hctab-content-body ul,
.hero-content-tab .hctab-content-body ol {
    margin: 0 0 1.25rem 1.5rem;
    padding: 0;
}

.hero-content-tab .hctab-content-body li {
    margin: 0 0 0.5rem;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-content-tab .hctab-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content-tab .hctab-toc {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .hero-content-tab {
        padding: var(--website-padding-top-bottom-mobile) 0;
    }

    .hero-content-tab .hctab-page-title {
        font-size: 2rem;
    }

    .hero-content-tab .hctab-content-body h2 {
        font-size: 1.75rem;
    }
}
