/* =========================================================
   FILE: /assets/css/theme.css
   TEMA: Gieffe Classic
   SCOPO: Stile frontend tema + sezioni Home Designer
   VERSIONE: 5.1
   ========================================================= */

:root {
    --gf-primary: #005fa3;
    --gf-primary-dark: #003f73;
    --gf-text: #1f2937;
    --gf-muted: #64748b;
    --gf-border: #dde3ea;
    --gf-bg-light: #f5f7fa;
    --gf-bg-blue: #eef7ff;
    --gf-dark: #111827;
    --gf-radius: 18px;
    --gf-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--gf-text);
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.65;
}

a {
    color: var(--gf-primary);
    text-decoration: none;
}

a:hover {
    color: var(--gf-primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--gf-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-bar .site-header {
    top: 32px;
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}


.site-branding {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    overflow: visible !important;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.custom-logo-link img,
.custom-logo,
.custom-logo--full {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center center;
}

.site-title {
    color: var(--gf-text);
    font-weight: 800;
    font-size: 1.25rem;
}

.site-description {
    margin: 0;
    color: var(--gf-muted);
    font-size: .86rem;
}

.site-menu-toggle {
    display: none;
}

.primary-menu,
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 18px;
}

.primary-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--gf-text);
    font-weight: 700;
    text-decoration: none;
}

.primary-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a,
.primary-menu .current-menu-ancestor > a,
.primary-menu .current_page_ancestor > a {
    text-decoration: none;
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after,
.primary-menu .current-menu-ancestor > a::after,
.primary-menu .current_page_ancestor > a::after {
    transform: scaleX(1);
}


.gf-section {
    box-sizing: border-box;
}

.gf-section--has-custom-side-padding > .gf-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.content-wrapper,
.gf-container {
    max-width: var(--gf-site-content-width, 1200px);
    margin: 0 auto;
    padding-left: var(--gf-site-content-padding, 24px);
    padding-right: var(--gf-site-content-padding, 24px);
    box-sizing: border-box;
}

.content-wrapper {
    padding-top: 56px;
    padding-bottom: 56px;
}

.content-wrapper--narrow,
.gf-container--narrow {
    max-width: 860px;
}

.gf-section .gf-container {
    max-width: var(--gf-section-content-width, var(--gf-site-content-width, 1200px));
    width: 100%;
    padding-left: var(--gf-section-content-padding-x, var(--gf-site-content-padding, 24px));
    padding-right: var(--gf-section-content-padding-x, var(--gf-site-content-padding, 24px));
}

.gf-container--full {
    max-width: none;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin: 0 0 28px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.post-list,
.gf-post-grid,
.gf-articles-grid {
    display: grid;
    grid-template-columns: repeat(var(--gf-post-columns, 3), minmax(0, 1fr));
    gap: 26px;
    align-items: stretch;
}

.post-list {
    --gf-post-columns: var(--gf-blog-columns, 3);
}

.post-card,
.gf-post-card,
.gf-article-card {
    background: #ffffff;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    overflow: hidden;
    box-shadow: var(--gf-shadow);
    min-width: 0;
    height: 100%;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-list--list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-list--list .post-card {
    display: grid;
    grid-template-columns: minmax(120px, var(--gf-blog-image-width, 390px)) minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    height: auto;
}

.post-card__image {
    display: block;
    background: #f1f5f9;
    overflow: hidden;
}

.post-list--list .post-card__image {
    width: 100%;
    height: var(--gf-blog-image-height, 250px);
    min-height: 0;
}

.post-card__image img,
.gf-post-card img,
.gf-article-card__image img,
.gf-article-card__placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.post-card__image img {
    height: var(--gf-blog-image-height, auto);
    object-fit: var(--gf-blog-image-fit, cover);
}

.post-list--list .post-card__image img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: var(--gf-blog-image-fit, cover);
}

.gf-article-card__placeholder {
    background: linear-gradient(135deg, #dbeafe, #f1f5f9);
}

.post-card__body {
    padding: var(--gf-blog-card-padding-top, 22px) var(--gf-blog-card-padding-right, 22px) var(--gf-blog-card-padding-bottom, 22px) var(--gf-blog-card-padding-left, 22px);
}

.gf-post-card {
    padding: 22px;
}

.gf-article-card__body {
    padding: 0 22px 22px;
}

.post-card__category {
    display: inline-block;
    margin: 0 0 8px;
    color: var(--gf-blog-category-color, var(--gf-muted));
    font-family: var(--gf-blog-category-font, inherit);
    font-size: var(--gf-blog-category-size, 12px);
    font-weight: var(--gf-blog-category-weight, 500);
    font-style: var(--gf-blog-category-style, normal);
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
}

.post-card__category:hover {
    color: var(--gf-primary);
    text-decoration: none;
}

.post-card__title,
.gf-post-card h3,
.gf-article-card__title {
    margin: 10px 0 10px;
    line-height: 1.25;
}

.post-card__title {
    color: var(--gf-blog-title-color, var(--gf-primary));
    font-family: var(--gf-blog-title-font, inherit);
    font-size: var(--gf-blog-title-size, 20px);
    font-weight: var(--gf-blog-title-weight, 700);
    font-style: var(--gf-blog-title-style, normal);
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--gf-primary-dark);
    text-decoration: none;
}

.post-card__date {
    display: block;
    margin: 0 0 10px;
    color: var(--gf-blog-date-color, var(--gf-muted));
    font-family: var(--gf-blog-date-font, inherit);
    font-size: var(--gf-blog-date-size, 13px);
    font-weight: var(--gf-blog-date-weight, 400);
    font-style: var(--gf-blog-date-style, normal);
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.post-card__excerpt {
    color: var(--gf-blog-excerpt-color, var(--gf-text));
    font-family: var(--gf-blog-excerpt-font, inherit);
    font-size: var(--gf-blog-excerpt-size, 16px);
    font-weight: var(--gf-blog-excerpt-weight, 400);
    font-style: var(--gf-blog-excerpt-style, normal);
    line-height: 1.65;
}

.post-card__excerpt p {
    margin: 0;
}

.gf-article-card__title a {
    color: inherit;
    text-decoration: none;
}

.gf-article-card__title a:hover {
    color: var(--gf-primary);
    text-decoration: none;
}

.gf-article-card__date {
    display: block;
    color: var(--gf-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.navigation.pagination {
    margin-top: 34px;
}

.navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.navigation.pagination .page-numbers {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--gf-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
    background: var(--gf-primary);
    border-color: var(--gf-primary);
    color: #ffffff;
    text-decoration: none;
}

.site-footer {
    background: var(--gf-footer-bg, var(--gf-dark));
    color: var(--gf-footer-text-color, #ffffff);
    padding: var(--gf-footer-padding-y, 56px) 24px;
    min-height: var(--gf-footer-min-height, auto);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-family: var(--gf-footer-font, inherit);
    font-size: var(--gf-footer-font-size, 16px);
    font-weight: var(--gf-footer-font-weight, 700);
    font-style: var(--gf-footer-font-style, normal);
}

.site-footer__inner {
    width: 100%;
    max-width: var(--gf-footer-inner-width, 1200px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(var(--gf-footer-columns, 4), minmax(0, 1fr));
    align-items: stretch;
}

.site-footer__column {
    min-width: 0;
    text-align: center;
    padding: 28px 28px;
    border-left: 1px solid var(--gf-footer-border-color, rgba(255, 255, 255, .12));
    display: grid;
    grid-template-rows: var(--gf-footer-icon-size, 36px) auto;
    align-content: center;
    justify-items: center;
    row-gap: 20px;
}

.site-footer__column:last-child {
    border-right: 1px solid var(--gf-footer-border-color, rgba(255, 255, 255, .12));
}

.site-footer__icon,
.site-footer__social-link {
    width: var(--gf-footer-icon-size, 36px);
    height: var(--gf-footer-icon-size, 36px);
    color: var(--gf-footer-link-color, #ffffff);
    fill: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.site-footer__icon svg,
.site-footer__social-link svg {
    width: 100%;
    height: 100%;
    display: block;
}

.site-footer__socials {
    min-height: var(--gf-footer-icon-size, 36px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.site-footer__social-link {
    text-decoration: none;
    transition: opacity .2s ease, transform .2s ease;
}

.site-footer__social-link:hover {
    opacity: .78;
    transform: translateY(-1px);
    text-decoration: none;
}

.site-footer__text {
    display: grid;
    grid-template-rows: repeat(3, minmax(1.45em, auto));
    gap: 2px;
    line-height: 1.45;
}

.site-footer__row {
    min-height: 1.45em;
    margin: 0;
}

.site-footer__row--empty {
    visibility: hidden;
}

.site-footer a {
    color: var(--gf-footer-link-color, #ffffff);
}

/* =========================================================
   HOME DESIGNER - SEZIONI CON MARKER GIEFFE
   ========================================================= */
/* Le regole delle sezioni Page Designer sono in /assets/css/sections/*.css */
@media (max-width: 900px) {
    .gf-hero,
    .gf-text-image,
    .gf-text-image--image-right,
    .post-list,
    .gf-post-grid,
    .gf-articles-grid,
    .gf-services-grid {
        grid-template-columns: 1fr;
    }

    .post-list--list .post-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .post-list--list .post-card__image img {
        height: var(--gf-blog-image-height, auto);
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .gf-text-image--image-right .gf-text-image__media,
    .gf-text-image--image-right .gf-text-image__content {
        order: initial;
    }

    .gf-section-header--row {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .site-footer__column,
    .site-footer__column:last-child {
        border-left: 0;
        border-right: 0;
        border-top: 1px solid var(--gf-footer-border-color, rgba(255, 255, 255, .12));
    }

    .site-footer__column:first-child {
        border-top: 0;
    }
}

@media (max-width: 720px) {
    .admin-bar .site-header { top: 0; }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-menu-toggle {
        display: inline-flex;
        border: 1px solid var(--gf-border);
        background: #ffffff;
        border-radius: 8px;
        padding: 7px 11px;
        cursor: pointer;
    }

    .site-navigation {
        display: none;
        width: 100%;
    }

    .site-navigation.is-open {
        display: block;
    }

    .primary-menu {
        flex-direction: column;
        gap: 8px;
    }

    .gf-section--padding-small,
    .gf-section--padding-medium,
    .gf-section--padding-large {
        padding: 44px 0;
    }

    .gf-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   BLOCCO: CUSTOMIZER - MODIFICA DIRETTA DA ANTEPRIMA
   ========================================================= */

body.gf-home-designer-preview-editing [data-gf-section="1"] {
    position: relative;
}

body.gf-home-designer-preview-editing [data-gf-preview-editable="1"] {
    cursor: text;
    outline: 1px dashed transparent;
    outline-offset: 4px;
    transition: outline-color 0.15s ease, background-color 0.15s ease;
}

body.gf-home-designer-preview-editing [data-gf-preview-editable="1"]:hover {
    outline-color: rgba(0, 95, 163, 0.55);
    background-color: rgba(0, 95, 163, 0.04);
}

body.gf-home-designer-preview-editing [data-gf-preview-editable="1"]:focus {
    outline-color: #005fa3;
    background-color: rgba(255, 255, 255, 0.75);
}

.gf-preview-section-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: #005fa3;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

body.gf-home-designer-preview-editing [data-gf-section="1"]:hover > .gf-preview-section-badge {
    display: inline-flex;
}

/* =========================================================
/* =========================================================
   HEADER DESIGNER - SUPPORTO PERSONALIZZAZIONE
   ========================================================= */

.site-header {
    transition: background-color .2s ease, box-shadow .2s ease;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.custom-logo-link img,
.custom-logo,
.custom-logo--full {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center center;
}

.primary-menu a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    transition: color .18s ease, background-color .18s ease;
}

.primary-menu a:hover {
    text-decoration: none;
}

.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a,
.primary-menu .current-menu-ancestor > a {
    text-decoration: none;
}

/* =========================================================
   Header con immagine di sfondo
   ========================================================= */

.site-header__background {
    width: 100%;
    background: transparent;
}

.site-header__visual {
    position: relative;
    width: var(--gf-header-bg-width, 100%);
    max-width: 100%;
    min-height: var(--gf-header-bg-height, 360px);
    margin-left: auto;
    margin-right: auto;
    background-repeat: no-repeat;
    background-size: var(--gf-header-bg-fit, cover);
    background-position: var(--gf-header-bg-position, center center);
    overflow: hidden;
}

.site-header__visual-overlay {
    position: absolute;
    inset: 0;
    background: #000000;
    opacity: var(--gf-header-bg-overlay-opacity, 0);
    pointer-events: none;
    z-index: 1;
}

.site-header__visual-inner {
    position: relative;
    z-index: 2;
    max-width: var(--gf-header-bg-content-width, 1200px);
    min-height: var(--gf-header-bg-height, 360px);
    margin-left: auto;
    margin-right: auto;
    padding: var(--gf-header-bg-content-padding-top, 48px) var(--gf-header-bg-content-padding-x, 24px) 32px;
    color: var(--gf-header-bg-text-color, #ffffff);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.site-header__visual-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.site-header__visual-logo {
    display: block;
    width: var(--gf-header-logo-width, 180px);
    max-width: 100%;
    max-height: var(--gf-header-logo-max-height, 80px);
    object-fit: contain;
}

.site-header__visual-title {
    display: inline-flex;
    align-items: center;
    color: var(--gf-header-bg-text-color, #ffffff);
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    font-weight: 800;
    line-height: 1.05;
    text-decoration: none;
}

.site-header__visual-title:hover {
    text-decoration: none;
}

.site-header__visual-motto,
.site-header__visual-tagline {
    display: inline-flex;
    align-items: center;
    color: var(--gf-header-bg-text-color, #ffffff);
    font-size: 1rem;
    line-height: 1.35;
    opacity: .88;
}

.site-header__visual-motto {
    font-style: italic;
}

.gf-header-background-enabled .site-header__inner {
    background: var(--gf-header-bg-color, #ffffff);
}

@media (max-width: 782px) {
    .site-header__visual,
    .site-header__visual-inner {
        min-height: min(var(--gf-header-bg-height, 360px), 420px);
    }

    .site-header__visual-inner {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    body.gf-header-overlap-enabled .site-main,
    body.gf-header-overlap-enabled .gf-page-layout,
    body.gf-header-overlap-enabled .content-wrapper,
    body.gf-header-overlap-enabled .site-main--front-page {
        margin-top: 0 !important;
    }
}

/* =========================================================
   Header immagine: sfondo sezione, menu posizionabile e testi allineati
   ========================================================= */

.site-header__background {
    background-color: var(--gf-header-bg-section-color, #ffffff);
}

.site-header__inner--menu {
    width: 100%;
}

.site-header__inner--align-left {
    justify-content: flex-start;
}

.site-header__inner--align-right {
    justify-content: flex-end;
}

.site-header__inner--menu .site-navigation {
    width: auto;
}

.site-header__menu-overlay {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 5;
    pointer-events: none;
}

.site-header__menu-overlay .site-header__inner--overlay {
    background: transparent;
    pointer-events: auto;
}

.site-header__menu-overlay--top-left,
.site-header__menu-overlay--top-right {
    top: 0;
}

.site-header__menu-overlay--bottom-left,
.site-header__menu-overlay--bottom-right {
    bottom: 0;
}

.site-header__visual-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.site-header__visual-title-row {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

.site-header__visual-title-row .site-header__visual-title,
.site-header__visual-title-row .site-header__visual-motto {
    margin: 0;
}

.site-header__visual-title-row .site-header__visual-motto {
    transform: translateY(-0.08em);
}

.site-header__visual-tagline {
    margin-top: 6px;
}

.gf-header-menu-overlay-top-left .site-header__visual-inner,
.gf-header-menu-overlay-top-right .site-header__visual-inner {
    padding-top: calc(var(--gf-header-bg-content-padding-top, 48px) + 58px);
}

.gf-header-menu-overlay-bottom-left .site-header__visual-inner,
.gf-header-menu-overlay-bottom-right .site-header__visual-inner {
    padding-bottom: 90px;
}

@media (max-width: 782px) {
    .site-header__menu-overlay {
        position: relative;
        inset: auto;
        background: var(--gf-header-bg-color, #ffffff);
    }

    .site-header__inner--menu,
    .site-header__inner--align-left,
    .site-header__inner--align-right {
        justify-content: space-between;
    }

    .site-header__visual-title-row {
        align-items: flex-start;
        gap: 6px;
        flex-direction: column;
    }

    .gf-header-menu-overlay-top-left .site-header__visual-inner,
    .gf-header-menu-overlay-top-right .site-header__visual-inner {
        padding-top: var(--gf-header-bg-content-padding-top, 48px);
    }

    .gf-header-menu-overlay-bottom-left .site-header__visual-inner,
    .gf-header-menu-overlay-bottom-right .site-header__visual-inner {
        padding-bottom: 32px;
    }
}

/* =========================================================
   Menu principale: sottomenu a tendina su hover
   ========================================================= */
.primary-menu li {
    position: relative;
}

.primary-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 9999;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 10px 12px;
    background: var(--gf-header-submenu-bg, #ffffff);
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.primary-menu .sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    display: block;
    margin: 0;
    padding: 0;
}

.primary-menu .sub-menu .sub-menu {
    top: 0;
    left: calc(100% + 8px);
}

.primary-menu .sub-menu .sub-menu::before {
    top: 0;
    left: -10px;
    right: auto;
    width: 10px;
    height: 100%;
}

.primary-menu .sub-menu a {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    justify-content: flex-start;
    white-space: nowrap;
    border-radius: 7px;
    pointer-events: auto;
    color: var(--gf-header-submenu-link-color, var(--gf-menu-color, #1f2937));
    padding: 7px 9px !important;
    line-height: 1.25;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu .current-menu-item > a,
.primary-menu .sub-menu .current_page_item > a {
    background: rgba(15, 23, 42, .06);
}

.primary-menu .sub-menu a::after {
    left: 9px;
    right: 9px;
    bottom: 3px;
}

.site-header__inner--align-right .primary-menu > li:last-child > .sub-menu,
.site-header__menu-overlay--top-right .primary-menu > li:last-child > .sub-menu,
.site-header__menu-overlay--bottom-right .primary-menu > li:last-child > .sub-menu {
    right: 0;
    left: auto;
}

/* =========================================================
   Categorie articolo multiple
   ========================================================= */
.gf-post-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.gf-post-categories__separator {
    display: inline-flex;
    align-items: center;
    opacity: .75;
    line-height: 1;
}

.gf-article-card__badges .gf-post-categories,
.gf-post-categories--badges {
    display: inline-flex;
}

.gf-post-categories .post-card__category,
.gf-post-categories .gf-articles-list-card__category,
.gf-post-categories .gf-featured-posts-split__category,
.gf-post-categories .gf-multi-category-posts__category,
.gf-post-categories .gf-post-hero-slide__category {
    margin-right: 0;
}

@media (max-width: 720px) {
    .primary-menu .sub-menu,
    .primary-menu .sub-menu .sub-menu {
        position: static;
        min-width: 0;
        padding: 6px 0 0 16px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .primary-menu .sub-menu a {
        white-space: normal;
    }
}

/* =========================================================
   Timbro articolo in evidenza
   ========================================================= */
.gf-featured-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px 12px;
    border: 2px solid currentColor;
    border-radius: 999px;
    color: var(--gf-primary, #0f172a);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .08em;
    text-transform: uppercase;
    transform: rotate(-2deg);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}

.gf-featured-stamp--small,
.gf-featured-stamp--archive,
.gf-featured-stamp--list,
.gf-featured-stamp--slider,
.gf-featured-stamp--split {
    margin: 0 0 8px;
}

.gf-featured-stamp--single {
    margin: 0 0 18px;
    font-size: .82rem;
}

.gf-article-card__badges .gf-featured-stamp {
    pointer-events: none;
    margin: 0;
    color: #ffffff;
    background: rgba(185, 28, 28, .90);
    border-color: rgba(255, 255, 255, .95);
}


/* =========================================================
   VERSIONE 2.3 - FIX RESPONSIVE MOBILE GENERALE
   ========================================================= */
@media (max-width: 782px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 16px;
        line-height: 1.6;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .site-header {
        position: relative;
        top: auto;
    }

    .site-header__inner,
    .content-wrapper,
    .gf-container,
    .gf-section .gf-container,
    .gf-page-layout,
    .site-main > .entry-content,
    .single-content,
    .page-content {
        width: 100%;
        max-width: 100%;
        padding-left: max(18px, env(safe-area-inset-left)) !important;
        padding-right: max(18px, env(safe-area-inset-right)) !important;
        box-sizing: border-box;
    }

    .gf-section--has-custom-side-padding > .gf-container,
    .gf-container--full,
    .content-wrapper {
        padding-left: max(18px, env(safe-area-inset-left)) !important;
        padding-right: max(18px, env(safe-area-inset-right)) !important;
    }

    .gf-page-layout {
        padding-top: 34px !important;
        padding-bottom: 34px !important;
    }

    .entry-content,
    .entry-content p,
    .entry-content li,
    .entry-content blockquote,
    .gf-text,
    .gf-text p,
    .post-card__excerpt,
    .gf-service-card p,
    .gf-icon-card p {
        max-width: 100%;
        font-size: clamp(1rem, 4vw, 1.08rem);
        line-height: 1.65;
        overflow-wrap: break-word;
    }

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .page-title,
    .post-card__title,
    .gf-section-header h2,
    .gf-service-card h3,
    .gf-icon-card h3 {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
    }

    .page-title,
    .entry-title,
    .gf-section-header h2 {
        font-size: clamp(1.9rem, 9vw, 2.7rem) !important;
        line-height: 1.12 !important;
    }

    .single-featured-image,
    .single-featured-image img,
    .entry-content img,
    .wp-block-image img {
        max-width: 100%;
        height: auto;
    }

    .single-featured-image {
        margin-left: 0;
        margin-right: 0;
    }

    .gf-section--padding-small,
    .gf-section--padding-medium,
    .gf-section--padding-large {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }

    .site-branding,
    .custom-logo-link,
    .custom-logo,
    .custom-logo--full {
        max-width: 100%;
    }

    .custom-logo,
    .custom-logo--full {
        max-width: min(100%, 280px) !important;
        height: auto !important;
    }

    .site-header__visual-logo {
        width: min(var(--gf-header-logo-width, 180px), 280px) !important;
        height: auto !important;
    }

    .site-navigation.is-open {
        display: block;
        max-width: 100%;
    }

    .primary-menu,
    .footer-menu {
        width: 100%;
        max-width: 100%;
    }

    .primary-menu a {
        white-space: normal;
    }

    .post-list,
    .gf-post-grid,
    .gf-articles-grid,
    .gf-services-grid,
    .gf-features-images__grid,
    .gf-icon-cards,
    .gf-plain-cards,
    .gf-overlay-cards,
    .gf-bullet-cards,
    .gf-portfolio-grid,
    .gf-multi-category-posts {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .post-list--list .post-card,
    .gf-articles-list-card,
    .gf-featured-posts-split,
    .gf-featured-posts-split--image-right,
    .gf-multi-category-posts__item,
    .gf-multi-category-posts__item--image-right {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .gf-multi-category-posts__item--image-right .gf-multi-category-posts__media,
    .gf-multi-category-posts__item--image-right .gf-multi-category-posts__body,
    .gf-featured-posts-split--image-right .gf-featured-posts-split__main,
    .gf-featured-posts-split--image-right .gf-featured-posts-split__side {
        order: initial !important;
    }

    .gf-service-card,
    .gf-feature-image-card,
    .gf-icon-card,
    .post-card,
    .gf-article-card,
    .gf-plain-card,
    .gf-overlay-card,
    .gf-bullet-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .gf-service-card,
    .gf-icon-card__inner,
    .post-card__body,
    .gf-article-card__body {
        padding: 20px !important;
    }

    .gf-service-card img,
    .gf-feature-image-card img,
    .post-card__image,
    .post-card__image img,
    .gf-articles-list-card__media,
    .gf-articles-list-card__media img,
    .gf-multi-category-posts__media,
    .gf-multi-category-posts__media img,
    .gf-featured-posts-split__main-media img,
    .gf-featured-posts-split__side-media img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .post-card__image,
    .gf-articles-list-card__media,
    .gf-multi-category-posts__media {
        height: auto !important;
    }

    .post-card__image img,
    .gf-articles-list-card__media img,
    .gf-multi-category-posts__media img {
        height: auto !important;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .gf-featured-posts-split__side-item {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    .gf-featured-posts-split__side-media,
    .gf-featured-posts-split__side-media img {
        width: 96px !important;
        height: 72px !important;
    }
}

@media (max-width: 480px) {
    .site-header__inner,
    .content-wrapper,
    .gf-container,
    .gf-section .gf-container,
    .gf-page-layout,
    .site-main > .entry-content,
    .single-content,
    .page-content {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }

    .page-title,
    .entry-title,
    .gf-section-header h2 {
        font-size: clamp(1.75rem, 9.5vw, 2.35rem) !important;
    }

    .gf-featured-posts-split__side-item {
        grid-template-columns: 88px minmax(0, 1fr) !important;
    }

    .gf-featured-posts-split__side-media,
    .gf-featured-posts-split__side-media img {
        width: 88px !important;
        height: 66px !important;
    }
}

/* =========================================================
   VERSIONE 2.3 - FIX HEADER RESPONSIVE PC/MOBILE
   ========================================================= */
.gf-header-background-enabled .site-header {
    overflow: visible;
}

.gf-header-background-enabled .site-header__background {
    width: 100%;
    overflow: hidden;
}

.gf-header-background-enabled .site-header__visual {
    display: block;
    max-width: 100%;
}

.gf-header-background-enabled .site-header__visual-inner {
    width: 100%;
    box-sizing: border-box;
}

.gf-header-background-enabled .site-header__visual-title-row {
    max-width: 100%;
}

.gf-header-background-enabled .site-header__visual-title,
.gf-header-background-enabled .site-header__visual-motto,
.gf-header-background-enabled .site-header__visual-tagline {
    text-shadow: 0 2px 12px rgba(0, 0, 0, .20);
}

@media (min-width: 783px) {
    .gf-header-background-enabled .site-header__visual-inner {
        align-content: flex-start;
    }

    .gf-header-background-enabled .site-header__inner--overlay {
        max-width: var(--gf-header-bg-content-width, 1200px) !important;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 782px) {
    body.gf-header-background-enabled .site-header {
        border-bottom: 1px solid var(--gf-border);
    }

    body.gf-header-background-enabled .site-header__background {
        background: var(--gf-header-bg-section-color, #ffffff) !important;
    }

    body.gf-header-background-enabled .site-header__visual {
        width: 100% !important;
        min-height: var(--gf-header-bg-mobile-height, 280px) !important;
        height: var(--gf-header-bg-mobile-height, 280px) !important;
        background-size: var(--gf-header-bg-fit, contain) !important;
        background-position: var(--gf-header-bg-position, center center) !important;
    }

    body.gf-header-background-enabled .site-header__visual-inner {
        min-height: var(--gf-header-bg-mobile-height, 280px) !important;
        height: var(--gf-header-bg-mobile-height, 280px) !important;
        padding: 24px max(20px, env(safe-area-inset-left)) 24px max(20px, env(safe-area-inset-right)) !important;
        gap: 8px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    body.gf-header-background-enabled .site-header__visual-inner[style] {
        min-height: var(--gf-header-bg-mobile-height, 280px) !important;
    }

    body.gf-header-background-enabled .site-header__visual-title-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        width: 100%;
    }

    body.gf-header-background-enabled .site-header__visual-title {
        font-size: clamp(1.75rem, 7.6vw, 2.65rem) !important;
        line-height: 1.05 !important;
        max-width: 100%;
    }

    body.gf-header-background-enabled .site-header__visual-motto,
    body.gf-header-background-enabled .site-header__visual-tagline {
        font-size: clamp(.95rem, 4vw, 1.25rem) !important;
        line-height: 1.25 !important;
        max-width: 100%;
        margin-top: 0 !important;
    }

    body.gf-header-background-enabled .site-header__visual-logo {
        width: min(var(--gf-header-logo-width, 180px), 220px) !important;
        max-height: min(var(--gf-header-logo-max-height, 80px), 78px) !important;
    }

    body.gf-header-background-enabled .site-header__menu-overlay {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: auto !important;
        z-index: 10 !important;
        background: transparent !important;
        pointer-events: none;
    }

    body.gf-header-background-enabled .site-header__menu-overlay .site-header__inner--overlay {
        pointer-events: auto;
        padding: 12px max(18px, env(safe-area-inset-left)) !important;
        background: transparent !important;
        min-height: 0 !important;
        justify-content: flex-start !important;
    }

    body.gf-header-background-enabled.gf-header-menu-overlay-top-right .site-header__menu-overlay .site-header__inner--overlay,
    body.gf-header-background-enabled.gf-header-menu-overlay-bottom-right .site-header__menu-overlay .site-header__inner--overlay {
        justify-content: flex-end !important;
    }

    body.gf-header-background-enabled .site-menu-toggle {
        color: #111827 !important;
        background: rgba(255, 255, 255, .90) !important;
        border: 1px solid rgba(15, 23, 42, .15) !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
    }

    body.gf-header-background-enabled .site-menu-toggle span {
        color: inherit !important;
    }

    body.gf-header-background-enabled .site-navigation.is-open {
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(15, 23, 42, .10);
        border-radius: 14px;
        margin-top: 10px;
        padding: 12px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    }

    body.gf-header-background-enabled .site-header__inner--before,
    body.gf-header-background-enabled .site-header__inner--after {
        min-height: 0 !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    body.gf-header-background-enabled.gf-header-mobile-text-top .site-header__visual-inner {
        justify-content: flex-start !important;
        padding-top: 64px !important;
    }

    body.gf-header-background-enabled.gf-header-mobile-text-center .site-header__visual-inner {
        justify-content: center !important;
    }

    body.gf-header-background-enabled.gf-header-mobile-text-bottom .site-header__visual-inner {
        justify-content: flex-end !important;
        padding-bottom: 34px !important;
    }
}

@media (max-width: 480px) {
    body.gf-header-background-enabled .site-header__visual-title {
        font-size: clamp(1.65rem, 7.2vw, 2.25rem) !important;
    }

    body.gf-header-background-enabled .site-header__visual-motto,
    body.gf-header-background-enabled .site-header__visual-tagline {
        font-size: clamp(.9rem, 3.8vw, 1.08rem) !important;
    }
}
