/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://altea-service.com
 Description:  Child theme di Hello Elementor per Altea Service
 Author:       Altea Service
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* =============================================================================
   FONT LOCALI
   Roboto        – variabile, pesi 100-900 (normal + italic)
   ============================================================================= */

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/roboto.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/roboto-italic.woff2') format('woff2');
}

/* =============================================================================
   TIPOGRAFIA GLOBALE
   Titoli  → Roboto
   Testi   → Roboto
   Valori estratti da aetmedia.it (tema Wanium)
   ============================================================================= */

body,
p,
li,
td,
th,
label,
input,
textarea,
select,
button,
.elementor-widget-text-editor,
.elementor-widget-icon-box .elementor-icon-box-description {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #262626;
}

p {
    margin-bottom: 35px;
}
ul {
/*    margin-bottom:30px !important;*/
}
h1, h2, h3, h4, h5, h6,
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-image-box .elementor-image-box-title,
.elementor-widget-button .elementor-button {
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Scala tipografica – allineata a Wanium (base 16px) */
h1, .elementor-heading-title.elementor-size-xxl { font-size: 3.58em; }
h2, .elementor-heading-title.elementor-size-xl  { font-size: 2.49em; }
h3, .elementor-heading-title.elementor-size-large { font-size: 1.73em; }
h4, .elementor-heading-title.elementor-size-medium { font-size: 1.2em; }
h5, .elementor-heading-title.elementor-size-small  { font-size: 1em; }
h6  { font-size: 0.83em; }

@media (max-width: 1024px) {
    h1 { font-size: 2.49em; }
    h2 { font-size: 2.07em; }
    h3 { font-size: 1.73em; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.07em; }
    h2 { font-size: 1.73em; }
    h3 { font-size: 1.44em; }
    body, p { font-size: 15px; }
}

/* =============================================================================
   HEADER – Hello Elementor dynamic-header
   Desktop: selettori #site-header (Hello Elementor default)
   Mobile:  selettori #aet-header (template custom child theme)
   ============================================================================= */

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%) !important;
    box-shadow: none !important;
    border: none !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#site-header.is-scrolled {
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Testo menu diventa scuro sullo sfondo bianco */
#site-header.is-scrolled .site-navigation .menu > li > a,
#site-header.is-scrolled .site-navigation .menu > li > a:visited {
    color: var(--aet-dark, #262626) !important;
}

#site-header.is-scrolled .site-navigation .menu > li > a:hover,
#site-header.is-scrolled .site-navigation .menu > li.current-menu-item > a,
#site-header.is-scrolled .site-navigation .menu > li.current-menu-ancestor > a {
    color: var(--aet-orange, #faa51e) !important;
}

/* Freccia submenu diventa scura */
#site-header.is-scrolled .site-navigation ul.menu li.menu-item-has-children > a::after {
    border-right-color: var(--aet-dark, #262626) !important;
    border-bottom-color: var(--aet-dark, #262626) !important;
}

/* Hamburger scrolled: gestito nella sezione hamburger sotto */

#site-header .header-inner {
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 30px;
    min-height: 80px;
    transition: min-height 0.3s ease;
}

#site-header.is-scrolled .header-inner {
    min-height: 44px;
}

/* ── Logo ── */
#site-header .custom-logo {
    max-height: 54px !important;
    width: auto;
    transition: max-height 0.3s ease;
}

#site-header.is-scrolled .custom-logo {
    max-height: 38px !important;
}

/* ── Voci menu desktop ── */
#site-header .site-navigation .menu > li > a,
#site-header .site-navigation .menu > li > a:visited {
    font-family: 'Roboto', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

#site-header .site-navigation .menu > li > a:hover,
#site-header .site-navigation .menu > li.current-menu-item > a,
#site-header .site-navigation .menu > li.current-menu-ancestor > a {
    color: #faa51e !important;
}

/* ── Freccia moderna sulle voci con submenu ── */

/* Nasconde la freccia nativa di Hello Elementor */
#site-header .site-navigation ul.menu li.menu-item-has-children::after {
    display: none !important;
    content: none !important;
}

#site-header .site-navigation ul.menu li.menu-item-has-children > a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding-right: 6px !important;
}

#site-header .site-navigation ul.menu li.menu-item-has-children > a::after {
    content: '' !important;
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    border-right: 1.5px solid #ffffff !important;
    border-bottom: 1.5px solid #ffffff !important;
    border-left: none !important;
    border-top: none !important;
    transform: rotate(45deg) translateY(-1px) !important;
    flex-shrink: 0 !important;
    transition: transform 0.25s ease !important;
    background: none !important;
    font-size: 0 !important;
}

#site-header .site-navigation ul.menu li.menu-item-has-children:hover > a::after {
    transform: rotate(-135deg) translateY(1px) !important;
}

/* ── Dropdown ── */
#site-header .site-navigation .sub-menu {
    background: #2d2d2d;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border: none !important;
    padding: 6px 0;
    min-width: 240px;
}

#site-header .site-navigation .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#site-header .site-navigation .sub-menu li:last-child {
    border-bottom: none;
}

#site-header .site-navigation .sub-menu li a,
#site-header .site-navigation .sub-menu li a:visited {
    display: block !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    text-decoration: none !important;
    padding: 10px 24px !important;
}

#site-header .site-navigation .sub-menu li a:hover {
    color: var(--aet-orange, #faa51e) !important;
   /* background: rgba(255, 255, 255, 0.08) !important;*/
}

/* ── Hamburger Hello Elementor (mobile toggle) ── */
#site-header .site-navigation-toggle {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* Nascondi qualsiasi contenuto interno del tema (icone SVG, i, span, ecc.) */
#site-header .site-navigation-toggle > * {
    display: none !important;
}

/* Icona hamburger via SVG inline */
#site-header .site-navigation-toggle::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: background-image 0.2s ease !important;
}

/* ── Hamburger → X quando menu aperto ── */
#site-header .site-navigation-toggle.toggled::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E") !important;
}

/* Scrolled: icone scure */
#site-header.is-scrolled .site-navigation-toggle::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E") !important;
}

#site-header.is-scrolled .site-navigation-toggle.toggled::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E") !important;
}

/* ── Mobile dropdown nav (Hello Elementor default) ── */
#site-header .site-navigation-dropdown {
    background: #ffffff;
    border-top: 2px solid #faa51e;
}

#site-header .site-navigation-dropdown .menu > li > a,
#site-header .site-navigation-dropdown .menu > li > a:visited {
    font-family: 'Roboto', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #262626 !important;
    text-decoration: none !important;
    letter-spacing: 0.04em !important;
}

#site-header .site-navigation-dropdown .menu > li > a:hover,
#site-header .site-navigation-dropdown .menu > li.current-menu-item > a {
    color: #faa51e !important;
}

/* Freccetta ▸ per voci con sotto-menu (mobile dropdown) */
#site-header .site-navigation-dropdown .menu > li.menu-item-has-children > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

#site-header .site-navigation-dropdown .menu > li.menu-item-has-children > a::after {
    content: '' !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg) !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
    margin-left: 8px !important;
    position: relative !important;
    top: -2px !important;
}

/* Freccetta verso l'alto quando sotto-menu aperto */
#site-header .site-navigation-dropdown .menu > li.menu-item-has-children.toggled > a::after {
    transform: rotate(-135deg) !important;
    top: 2px !important;
}

/* ── Header actions custom (ricerca + hamburger) ── */
.aet-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aet-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.aet-search-toggle:hover {
    color: var(--aet-orange, #faa51e);
}

.aet-search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 16px 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.aet-search-bar.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aet-search-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1366px;
    margin: 0 auto;
}

.aet-search-bar .search-form {
    flex: 1;
    display: flex;
}

.aet-search-bar .search-field {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    outline: none;
}

.aet-search-bar .search-field:focus {
    border-color: var(--aet-orange, #faa51e);
}

.aet-search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 8px;
    transition: color 0.2s ease;
}

.aet-search-close:hover {
    color: var(--aet-dark, #262626);
}

/* ── Toggle/back sottomenu + hamburger custom: nascosti su desktop ── */
.aet-submenu-toggle,
.aet-submenu-back {
    display: none;
}

.aet-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.aet-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease;
    position: absolute;
    left: 10px;
}

.aet-hamburger span:nth-child(1) { top: 14px; }
.aet-hamburger span:nth-child(2) { top: 21px; }
.aet-hamburger span:nth-child(3) { top: 28px; }

.aet-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.aet-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.aet-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 480px) {
    #site-header .header-inner {
        padding: 0 16px;
    }
}

/* ── Admin bar ── */
.admin-bar #site-header,
.admin-bar #aet-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #site-header,
    .admin-bar #aet-header {
        top: 46px;
    }
}

/* =============================================================================
   MOBILE NAV – Pannello fullscreen slide da sinistra (solo ≤1024px)
   Usa selettori #aet-header / .aet-* dal template custom del child theme
   ============================================================================= */

@media (max-width: 1024px) {

    /* Hamburger custom visibile */
    .aet-hamburger {
        display: flex;
    }

    /* Hamburger diventa scuro su sfondo bianco */
    #aet-header.is-scrolled .aet-hamburger span,
    #site-header.is-scrolled .aet-hamburger span {
        background-color: var(--aet-dark, #262626) !important;
    }

    /* Icona ricerca diventa scura */
    #aet-header.is-scrolled .aet-search-toggle,
    #site-header.is-scrolled .aet-search-toggle {
        color: var(--aet-dark, #262626) !important;
    }

    /* ── Pannello menu principale ── */
    #aet-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--aet-dark, #262626);
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 80px 40px 40px;
    }

    #aet-nav.is-open {
        transform: translateX(0);
    }

    #aet-nav .aet-menu {
        display: flex;
        flex-direction: column;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    #aet-nav .aet-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        position: relative;
    }

    #aet-nav .aet-menu > li > a,
    #aet-nav .aet-menu > li > a:visited {
        display: block !important;
        font-family: 'Roboto', sans-serif !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        color: #ffffff !important;
        text-transform: uppercase !important;
        letter-spacing: 0.06em !important;
        padding: 18px 0 !important;
        text-decoration: none !important;
    }

    #aet-nav .aet-menu > li > a:hover,
    #aet-nav .aet-menu > li.current-menu-item > a {
        color: var(--aet-orange, #faa51e) !important;
    }

    /* Nascondi la freccia ::after del desktop su mobile */
    #aet-nav .aet-menu li.menu-item-has-children > a::after {
        display: none !important;
    }

    /* ── Bottone espandi sottomenu (freccia >) ── */
    .aet-submenu-toggle {
        position: absolute;
        right: 0;
        top: 0;
        width: 56px;
        height: 100%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        border-left: 1px solid rgba(255,255,255,0.08);
        color: rgba(255,255,255,0.5);
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .aet-submenu-toggle:hover {
        color: #ffffff;
    }

    .menu-item-has-children.is-open > .aet-submenu-toggle {
        color: var(--aet-orange, #faa51e);
    }

    /* ── Sottomenu: pannello fullscreen slide da sinistra ── */
    #aet-nav .sub-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--aet-dark, #262626);
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        padding: 80px 40px 40px;
        margin: 0;
        list-style: none;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .menu-item-has-children.is-open > .sub-menu {
        transform: translateX(0) !important;
    }

    #aet-nav .sub-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    #aet-nav .sub-menu li:last-child {
        border-bottom: none;
    }

    #aet-nav .sub-menu li a,
    #aet-nav .sub-menu li a:visited {
        display: block !important;
        font-family: 'Roboto', sans-serif !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #ffffff !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        padding: 16px 0 !important;
        text-decoration: none !important;
    }

    #aet-nav .sub-menu li a:hover {
        color: var(--aet-orange, #faa51e) !important;
        background: transparent !important;
    }

    /* ── Bottone "Indietro" ── */
    .aet-submenu-back {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: rgba(255,255,255,0.5);
        font-family: 'Roboto', sans-serif;
        font-size: 13px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 16px 0;
        margin-bottom: 8px;
        cursor: pointer;
        width: 100%;
        transition: color 0.2s ease;
    }

    .aet-submenu-back:hover {
        color: #ffffff;
    }
}

@media (max-width: 480px) {
    #aet-nav {
        padding: 80px 24px 40px;
    }
}

/* ── Evita che il contenuto parta sotto l'header fixed sulle pagine senza hero ── */
.elementor-page .elementor-section:first-of-type {
    /* nessun padding: il hero copre l'header */
}

/* =============================================================================
   CONTAINER – Max-width allineato a Wanium (1366px)
   ============================================================================= */

.elementor-section.elementor-section-boxed > .elementor-container,
.e-con-inner {
    max-width: 1366px;
}

/* =============================================================================
   SEZIONI ELEMENTOR – Spaziatura verticale (96px come Wanium)
   ============================================================================= */

.elementor-section {
    padding-top: 96px;
    padding-bottom: 96px;
}

/* Prima sezione (hero) non ha padding aggiuntivo */
.elementor-section:first-child {
    padding-top: 0;
    padding-bottom: 0;
}

/* =============================================================================
   BOTTONI ELEMENTOR – Gradiente globale + border-radius 5px (come Wanium)
   ============================================================================= */

.elementor-button,
.elementor-button-link,
.elementor-size-md {
    color: #ffffff !important;
    background: linear-gradient(to right, #330a4e 0%, #faa51e 100%) !important;
    border-radius: 50px !important;
    padding: 12px 31px !important;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: opacity 0.25s ease !important;
}

.elementor-button:hover,
.elementor-button-link:hover {
    opacity: 0.88 !important;
}

/* =============================================================================
   COLORI DI SFONDO SEZIONI – palette aetmedia.it
   ============================================================================= */

:root {
    --aet-orange:  #faa51e;
    --aet-purple:  #330a4e;
    --aet-dark:    #262626;
    --aet-light:   #f4f4f4;
    --aet-white:   #ffffff;
}

/* =============================================================================
   ICON BOX – spaziatura interna coerente
   ============================================================================= */

.elementor-widget-icon-box .elementor-icon-box-wrapper {
    padding: 24px 16px;
}

.elementor-widget-icon-box .elementor-icon-box-title {
    font-size: 1.2em;
    margin-bottom: 12px;
}

.elementor-widget-icon-box .elementor-icon-box-description {
    font-size: 15px;
    line-height: 1.7;
    color: #4f4f4f;
}

/* =============================================================================
   SINGLE POST: LAYOUT – override max-width di Hello Elementor su .site-main
   L'hero deve essere full-width, il contenuto testuale resta centrato.
   ============================================================================= */

.single-post .site-main {
    max-width: 100% !important;
    padding: 0 !important;
}

.single-post .site-main > .page-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 30px 60px;
}

@media (max-width: 768px) {
    .single-post .site-main > .page-content {
        padding: 0 16px;
    }
}

/* =============================================================================
   SINGLE POST: HERO HEADER con immagine in evidenza come sfondo
   ============================================================================= */

.aet-post-hero {
    position: relative;
    width: 100%;
    min-height: 65vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: flex-end;
    margin-top: -64px; /* compensa l'header fixed */
    padding-top: 64px;
}

.aet-post-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.25) 50%,
        rgba(0, 0, 0, 0.10) 100%
    );
    z-index: 1;
}

.aet-post-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1366px;
    margin: 0 auto;
    padding: 60px 30px 48px;
}

.aet-post-hero__title {
    font-family: 'Roboto', sans-serif;
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Nasconde il .page-header originale quando c'è l'hero */
.single-post .page-header {
    display: none;
}

@media (max-width: 1024px) {
    .aet-post-hero {
        min-height: 50vh;
        background-attachment: scroll; /* parallax disattivato su tablet/mobile */
    }
    .aet-post-hero__title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .aet-post-hero {
        min-height: 45vh;
    }
    .aet-post-hero__title {
        font-size: 1.7em;
    }
    .aet-post-hero__inner {
        padding: 40px 16px 32px;
    }
}

/* =============================================================================
   SINGLE POST: PULSANTE "TORNA AL PORTFOLIO"
   ============================================================================= */

.aet-back-portfolio {
    text-align: center;
    margin: 48px 0 0;
}

.aet-back-portfolio__btn {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #ffffff !important;
    background: linear-gradient(to right, #330a4e 0%, #faa51e 100%);
    border-radius: 50px;
    padding: 12px 31px;
    text-decoration: none !important;
    transition: opacity 0.25s ease;
}

.aet-back-portfolio__btn:hover {
    opacity: 0.88;
    color: #ffffff !important;
}

/* =============================================================================
   SINGLE POST: GALLERY (Elementor image-gallery widget)
   ============================================================================= */

/* Container gallery — forza grid e resetta float/inline WP */
.single-post .gallery {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0;
}

/* Override colonne indipendentemente dal setting WP */
.single-post .gallery-columns-1 { grid-template-columns: 1fr; }
.single-post .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.single-post .gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.single-post .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.single-post .gallery-columns-5 { grid-template-columns: repeat(4, 1fr); }
.single-post .gallery-columns-6 { grid-template-columns: repeat(4, 1fr); }

/* Singola cella — annulla float e width inline di WP */
.single-post .gallery .gallery-item {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Wrapper immagine */
.single-post .gallery .gallery-icon {
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* fallback 4:3 per browser senza aspect-ratio */
}

@supports (aspect-ratio: 4 / 3) {
    .single-post .gallery .gallery-icon {
        height: auto;
        padding-bottom: 0;
    }
}

.single-post .gallery .gallery-icon a {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@supports (aspect-ratio: 4 / 3) {
    .single-post .gallery .gallery-icon a {
        position: relative;
        inset: auto;
    }
}

/* Immagine — resetta width/height inline, forza fill del contenitore */
.single-post .gallery .gallery-icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.single-post .gallery .gallery-icon:hover img {
    transform: scale(1.05);
}

/* Rimuovi br di WP che spezza le righe nella gallery classica */
.single-post .gallery br {
    display: none;
}

/* Gallery caption (se presente) */
.single-post .gallery .gallery-caption {
    margin: 0;
    padding: 8px 4px 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Responsive gallery */
@media (max-width: 1024px) {
    .single-post .gallery,
    .single-post .gallery[class*="gallery-columns-"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .single-post .gallery,
    .single-post .gallery[class*="gallery-columns-"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .single-post .gallery,
    .single-post .gallery[class*="gallery-columns-"] {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   FOOTER
   ============================================================================= */

#site-footer {
    background: var(--aet-dark, #262626);
    border-top: 3px solid var(--aet-orange, #faa51e);
    padding: 28px 30px;
}

#site-footer .footer-inner {
    max-width: 1366px;
    margin: 0 auto;
    text-align: center;
}

#site-footer .site-branding,
#site-footer .custom-logo-link,
#site-footer .custom-logo {
    display: none !important;
}

#site-footer .copyright p {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

#site-footer .copyright a,
#site-footer .copyright a:visited {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

#site-footer .copyright a:hover {
    color: var(--aet-orange, #faa51e);
}

/* Reset link globali — override del colore rosa di Hello Elementor */
a,
a:visited {
    color: var(--aet-dark, #262626);
    text-decoration: none;
}

a:hover {
    color: var(--aet-orange, #faa51e);
}

/* Link dentro contenuti — solo quelli nel testo, non bottoni */
.page-content a,
.entry-content a,
.elementor-widget-text-editor a {
    color: var(--aet-dark, #262626);
    text-decoration: underline;
    text-decoration-color: var(--aet-orange, #faa51e);
    text-underline-offset: 3px;
}

.page-content a:hover,
.entry-content a:hover,
.elementor-widget-text-editor a:hover {
    color: var(--aet-orange, #faa51e);
}

/* =============================================================================
   GUTENBERG GALLERY – wp-block-gallery (3 colonne, stessa altezza, lightbox)
   ============================================================================= */

.wp-block-gallery.has-nested-images {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 35px;
}

/* Singola immagine — altezza uniforme con object-fit */
.wp-block-gallery.has-nested-images .wp-block-image {
    margin: 0 !important;
    width: 100% !important;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
}

.wp-block-gallery.has-nested-images .wp-block-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wp-block-gallery.has-nested-images .wp-block-image:hover img {
    transform: scale(1.05);
}

/* Lightbox trigger — assicura che il link copra tutta l'immagine */
.wp-block-gallery.has-nested-images .wp-block-image a,
.wp-block-gallery.has-nested-images .wp-block-image .wp-lightbox-container {
    display: block;
    width: 100%;
    height: 100%;
}

.wp-block-gallery.has-nested-images .wp-block-image .wp-lightbox-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Nasconde il bottone expand del lightbox di default, lo mostra on hover */
.wp-block-gallery.has-nested-images .wp-block-image .wp-lightbox-container button.lightbox-trigger {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-block-gallery.has-nested-images .wp-block-image:hover .wp-lightbox-container button.lightbox-trigger {
    opacity: 1;
}

/* Lightbox overlay — sfondo nero opaco */
.wp-lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.92) !important;
}

.wp-lightbox-overlay .scrim {
    background-color: rgba(0, 0, 0, 0.85) !important;
}

.wp-lightbox-overlay .close-button {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-block-gallery.has-nested-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .wp-block-gallery.has-nested-images {
        grid-template-columns: 1fr;
    }
}

figure.wp-block-gallery.has-nested-images{margin-top:20px}