/**
 * Hero pagine con scrollspy.
 * Articoli (blog/ebook/eventi): padding-top/bottom e gap verticali dimezzati vs liste.
 * Clienti/demo: margini pieni (--st-scrollspy-page-hero-*).
 */
:root {
    --st-scrollspy-page-hero-margin-top: 80px;
    --st-scrollspy-page-hero-margin-bottom: 120px;
    --st-articolo-hero-margin-top: 20px;
    --st-articolo-hero-margin-bottom: 30px;
    --st-articolo-hero-padding-x: 50px;
    --st-articolo-hero-padding-y: 4px;
}

@media (max-width: 1280px) {
    :root {
        --st-scrollspy-page-hero-margin-top: 60px;
        --st-scrollspy-page-hero-margin-bottom: 80px;
        --st-articolo-hero-margin-top: 15px;
        --st-articolo-hero-margin-bottom: 20px;
    }
}

@media (max-width: 699px) {
    :root {
        --st-scrollspy-page-hero-margin-top: 30px;
        --st-scrollspy-page-hero-margin-bottom: 40px;
        --st-articolo-hero-margin-top: 8px;
        --st-articolo-hero-margin-bottom: 10px;
        --st-articolo-hero-padding-x: 20px;
    }
}

.st-bm-blog-article-offset-root .blog_hero-section,
html.st-has-header-offset .blog_hero-section,
html.st-has-header-offset .ebook_hero-section {
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin-top: var(--st-articolo-hero-margin-top) !important;
    margin-bottom: var(--st-articolo-hero-margin-bottom) !important;
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--st-articolo-hero-padding-y) !important;
    padding-bottom: var(--st-articolo-hero-padding-y) !important;
    padding-left: var(--st-articolo-hero-padding-x) !important;
    padding-right: var(--st-articolo-hero-padding-x) !important;
    box-sizing: border-box;
    display: grid;
    place-items: start center;
    background: #ffffff;
}

html.st-has-header-offset .evento-header-wrapper {
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin-top: var(--st-articolo-hero-margin-top) !important;
    margin-bottom: var(--st-articolo-hero-margin-bottom) !important;
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--st-articolo-hero-padding-y) !important;
    padding-bottom: var(--st-articolo-hero-padding-y) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    display: block;
    text-align: left;
    background: #ffffff;
}

html.st-has-header-offset .hero_condizionidivendita-section,
html.st-has-header-offset .sezione_superiore_demo-section {
    margin-top: var(--st-scrollspy-page-hero-margin-top) !important;
    margin-bottom: var(--st-scrollspy-page-hero-margin-bottom) !important;
    box-sizing: border-box;
}

.st-bm-blog-article-offset-root .blog_hero-content,
.ebook_hero-section .ebook_hero-content {
    width: 100%;
    max-width: 943px;
    height: auto;
    display: grid;
    gap: 10px;
    justify-items: center;
}

html.st-has-header-offset .evento-header-wrapper .evento-dettagli-wrapper,
.evento-header-wrapper .evento-dettagli-wrapper {
    display: grid !important;
    padding-top: 16px !important;
    padding-left: var(--st-articolo-hero-padding-x) !important;
    padding-right: var(--st-articolo-hero-padding-x) !important;
    padding-bottom: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
}

html.st-has-header-offset .evento-dettagli-wrapper > .evento-sidebar-hero,
.evento-dettagli-wrapper > .evento-sidebar-hero {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

html.st-has-header-offset .evento-titolo,
html.st-has-header-offset .evento-descrizione,
html.st-has-header-offset [name="event-hero-title"],
html.st-has-header-offset [name="event-hero-description"],
.evento-titolo,
.evento-descrizione,
[name="event-hero-title"],
[name="event-hero-description"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
}

html.st-has-header-offset .evento-sidebar-hero .evento-descrizione,
html.st-has-header-offset .evento-sidebar-hero [name="event-hero-description"],
.evento-sidebar-hero .evento-descrizione,
.evento-sidebar-hero [name="event-hero-description"] {
    max-width: 1000px !important;
}

html.st-has-header-offset .evento-sidebar-hero,
.evento-sidebar-hero {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

html.st-has-header-offset .evento-sidebar-img,
.evento-sidebar-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.st-bm-blog-article-offset-root .blog_hero-section + .blog_article-meta,
.st-bm-blog-article-offset-root .blog_hero-section + [class*="breadcrumb"] + .blog_article-meta,
.ebook_hero-section + .ebook_article-meta {
    padding-top: 0 !important;
}

@media (max-width: 409px) {
    .st-bm-blog-article-offset-root .blog_hero-section,
    html.st-has-header-offset .blog_hero-section,
    html.st-has-header-offset .ebook_hero-section {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }

    html.st-has-header-offset .evento-header-wrapper .evento-dettagli-wrapper,
    .evento-header-wrapper .evento-dettagli-wrapper {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

@media (min-width: 700px) and (max-width: 870px) {
    .st-bm-blog-article-offset-root .blog_hero-section,
    html.st-has-header-offset .blog_hero-section,
    html.st-has-header-offset .ebook_hero-section {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }

    html.st-has-header-offset .evento-header-wrapper .evento-dettagli-wrapper,
    .evento-header-wrapper .evento-dettagli-wrapper {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}
