:root {

    /* =====================
       TYPOGRAPHY
    ===================== */
    --font-family-primary:   var(--e-a-font-family, 'Inter', sans-serif);
    --font-family-secondary: var(--e-global-typography-secondary-font-family, 'EB Garamond', serif);

    --font-size-xs:          0.75rem;
    --font-size-sm:          0.875rem;
    --font-size-base:        1rem;
    --font-size-md:          1.125rem;
    --font-size-lg:          1.25rem;
    --font-size-xl:          1.5rem;
    --font-size-2xl:         2rem;
    --font-size-3xl:         2.5rem;
    --font-size-4xl:         3rem;
    --font-size-5xl:         4rem;

    --line-height-tight:     1.1;
    --line-height-snug:      1.3;
    --line-height-normal:    1.5;
    --line-height-relaxed:   1.7;

    --letter-spacing-tight:  -0.02em;
    --letter-spacing-normal:  0em;
    --letter-spacing-wide:    0.05em;
    --letter-spacing-wider:   0.1em;

    --font-weight-light:     300;
    --font-weight-regular:   400;
    --font-weight-medium:    500;
    --font-weight-semibold:  600;
    --font-weight-bold:      700;

    /* =====================
       SPACING
    ===================== */
    --space-1:               0.25rem;
    --space-2:               0.5rem;
    --space-3:               0.75rem;
    --space-4:               1rem;
    --space-5:               1.25rem;
    --space-6:               1.5rem;
    --space-8:               2rem;
    --space-10:              2.5rem;
    --space-12:              3rem;
    --space-16:              4rem;
    --space-20:              5rem;
    --space-24:              6rem;
    --space-32:              8rem;

    --section-padding-y:     var(--space-20);
    --section-padding-x:     var(--space-6);
    --container-max-width:   1440px;
    --container-padding:     var(--space-6);

    /* =====================
       BORDER RADIUS
    ===================== */
    --radius-sm:             var(--e-a-border-radius, 4px);
    --radius-md:             8px;
    --radius-lg:             16px;
    --radius-xl:             24px;
    --radius-2xl:            32px;
    --radius-full:           9999px;

    /* =====================
       TRANSITIONS
    ===================== */
    --transition-fast:       150ms ease;
    --transition-base:       300ms ease;
    --transition-slow:       600ms ease;
    --transition-slower:     1000ms ease;

    /* =====================
       Z-INDEX
    ===================== */
    --z-below:               -1;
    --z-base:                0;
    --z-above:               1;
    --z-dropdown:            100;
    --z-sticky:              200;
    --z-overlay:             300;
    --z-modal:               400;
    --z-toast:               500;

}

#content{
    overflow-x: clip;
}

html.lenis{
    overflow: inherit!important;
}

button{
    border: none!important;
}

.elementor-button{
    fill: inherit!important;

}

.elementor-button:hover .elementor-button-icon{
    transform: translateX(2px);
    transition: all 0.3s ease-in-out;
}

.elementor-section-wrap > .elementor-section > .elementor-container,
.e-con-inner {
    width: calc(100% - 5rem);
    max-width: 1440px;
    margin-inline: auto;
}

.elementor-widget-image.parallax-img {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.elementor-widget-image.parallax-img img {
    will-change: transform;
    display: block;
    width: 100%;
    height: 115%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elementor-widget-image.parallax-img img.parallax-ready {
    opacity: 1;
}

.e-con.fade-up > * {
    opacity: 0;
}

#atf-container{
    max-height: 90vh;
}

.elementor-widget-image.parallax-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            transparent 40%,
            rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elementor-widget-image.parallax-img.parallax-ready::after {
    opacity: 1;
}
/* =========================
   EDIT START HERE
========================= */

.icon-left .elementor-icon svg {
    height: 45px;
    background-color: var(--e-global-color-secondary);
    width: 45px;
    border-radius: 100px;
}

.icon-left .elementor-icon svg {
    height: 45px;
    background-color: var(--e-global-color-secondary);
    width: 45px;
    border-radius: 100px;
}

.contatti.e-con {
    height: 45px;
    background-color: var(--e-global-color-secondary);
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    color: white;
    font-size: 16px;
    font-family: 'barlow_medium', sans-serif;
    overflow: hidden;
    max-width: 45px;
    transition: all 0.3s ease-in;
    text-decoration: none;
    padding: 0;
}

.contatti.e-con:hover {
    max-width: 220px;
    background-color: var(--e-global-color-secondary);
    color: white;
    cursor: pointer;
}

.contatti .elementor-icon-wrapper,
.contatti.icon-left {
    height: 45px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contatti .elementor-widget-text-editor p {
    padding-right: 20px;
    white-space: nowrap;
    margin: 0;
}

.contatti .icon-left {
    width: 45px !important;
    min-width: 45px !important;
    flex-shrink: 0 !important;
}

/*BURGE MENU*/

.burger.header_item {
    height: 45px;
    background-color: var(--e-global-color-secondary);
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 16px 0 0;
    gap: 0;
    overflow: hidden;
    user-select: none;
    font-family: nexa, sans-serif;
}

/* Testo Menu/Chiudi */
.burger__text {
    display: flex;
    flex-direction: column;
    height: 45px;
    overflow: hidden;
    padding-left: 16px;
}

.burger__text span {
    height: 45px;
    line-height: 45px;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

/* Icona burger */
.burger__ico__wrapper {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.burger__ico {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger__ico__line {
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Stato aperto */
.burger.is-open .burger__text span {
    transform: translateY(-100%);
}

.burger.is-open .burger__ico__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger.is-open .burger__ico__line:nth-child(2) {
    transform: translateY(-6px) rotate(-45deg);
}

.dialog-type-lightbox{
    z-index: 5!important;
}

#header-polygon {
    fill: var(--e-global-color-primary);
}

.polygon-footer{
    fill: var(--e-global-color-secondary);
}



.carosello-loghi .swiper-wrapper {
    transition-timing-function: linear !important;
    position: relative;
}

.carosello-loghi .swiper::after{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 150px;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%);
}

.carosello-loghi .swiper::before{
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 150px;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to left, #fff 0%, rgba(255,255,255,0) 100%);
}


.accent{
    color:var(--e-global-color-primary)!important;
}

.site-logo img {
    transition: filter 0.5s ease-in-out;
}

.site-logo.menu-open img {
    filter: invert(1);
}


/*TOPSCROLL*/

#topScroll {
    opacity: 0;
    pointer-events: none;
    transform: translatey(10px);
    transition: all 0.3s ease;
}

#topScroll:hover{
    cursor: pointer;
}

#topScroll.visible {
    opacity: 1;
    transform: translatey(0px);
    pointer-events: auto;
}

/* =========================
   BREADCRUMB RANK MATH (hero pagine interne)
========================= */

.hcs-breadcrumb .rank-math-breadcrumb {
    display: inline-block;
    padding: 10px 14px;
    background-color: var(--e-global-color-primary);
    color: #fff;
    font-family: var(--e-global-typography-text-font-family, 'Nexa'), sans-serif;
    font-size: 18px;
    line-height: 1.3;
}

.hcs-breadcrumb .rank-math-breadcrumb p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.hcs-breadcrumb .rank-math-breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.hcs-breadcrumb .rank-math-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.hcs-breadcrumb .rank-math-breadcrumb .separator {
    opacity: 0.6;
}

.hcs-breadcrumb .rank-math-breadcrumb .last {
    font-weight: 700;
}

@media (max-width: 1024px) {
    .hcs-breadcrumb .rank-math-breadcrumb { font-size: 15px; padding: 8px 12px; }
}

/* =========================
   GALLERY (Elementor Pro) – lazy load senza riquadro grigio
   Prima del caricamento: fondo beige tenue (niente overlay scuro),
   poi la foto entra con una semplice dissolvenza, senza effetto scala.
========================= */

.elementor-widget-gallery .e-gallery-item {
    background-color: var(--e-global-color-accent);
    border-radius: 15px;
    overflow: hidden;
}

.elementor-widget-gallery .e-gallery--lazyload .e-gallery-image:not(.e-gallery-image-loaded) {
    transform: none;
}

/* filtri come pill */
.elementor-widget-gallery .elementor-gallery__titles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.elementor-widget-gallery .elementor-gallery-title {
    margin: 0;
    padding: 10px 20px;
    border-radius: 999px;
    background-color: var(--e-global-color-accent);
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-text-font-family, 'Nexa'), sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.elementor-widget-gallery .elementor-gallery-title:hover {
    background-color: var(--e-global-color-secondary);
    color: var(--e-global-color-text);
}

.elementor-widget-gallery .elementor-gallery-title.elementor-gallery-title--active {
    background-color: var(--e-global-color-primary);
    color: #fff;
}

/* =========================
   CARD CLICCABILI (container con link) – Home punti di forza
========================= */

a.e-con.card-link {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.e-con.card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* =========================
   MENU POPUP – voci su due colonne
========================= */

.menu-popup-nav .elementor-nav-menu--main .elementor-nav-menu {
    display: block;
    columns: 2;
    column-gap: 40px;
}

.menu-popup-nav .elementor-nav-menu--main .elementor-nav-menu > li {
    display: block;
    width: 100%;
    break-inside: avoid;
}

@media (max-width: 767px) {
    .menu-popup-nav .elementor-nav-menu--main .elementor-nav-menu {
        columns: 1;
    }
}

/* =========================
   LANGUAGE SWITCHER (Polylang) – [lang_switcher]
========================= */

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang-switch--pill .lang-switch__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 12px;
    border-radius: 100px;
    background-color: var(--e-global-color-secondary);
    color: #fff;
    font-family: nexa, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-switch--pill .lang-switch__item:hover {
    background-color: var(--e-global-color-primary);
    color: #fff;
}

.lang-switch--pill .lang-switch__item.is-current {
    background-color: var(--e-global-color-primary);
}

/* variante testuale (popup menu mobile) */
.lang-switch--text .lang-switch__item {
    font-family: nexa, sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--e-global-color-primary);
    text-decoration: none;
    padding: 6px 0;
}

.lang-switch--text .lang-switch__item::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--e-global-color-secondary);
}

/* =========================
   MENU POPUP – contenuto scrollabile (mobile/tablet)
========================= */

.elementor-popup-modal .dialog-message {
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
