/* ═══════════════════════════════════════════════════════════════════════════
   illillo-custom.css — Override manuali per www.illillo.it
   Caricato ULTIMO dopo tutti gli altri CSS.
   Gestibile via FTP in /home/illilloijz/www/illillo-custom.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Header: rimuovi sfondo rosso Enfold (--enfold-socket-color-bg) ────── */
#header,
#header_main,
#header .container,
.header_color,
.html_header_top,
.header_main,
body #header,
body .html_header_top #header,
#header .av-logo-container,
.av-logo-container,
.main_menu,
.av-main-nav {
    background-color: #fff !important;
}

cms-main cms-full-layout
/* ── Socket (fascia sotto il footer): rimuovi rosso ────────────────────── */
#socket,
.socket_color,
#socket .container {
    background-color: #1a1a1a !important;
    color: #ccc !important;
}
#socket a {
    color: #fff !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — compensa il JavaScript Enfold rimosso dall'export statico
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Colonne Avia: stack su tablet (< 990px) ──────────────────────────── */
@media (max-width: 989px) {
    .av_one_half,
    .av_one_third,
    .av_two_third,
    .av_one_fourth,
    .av_three_fourth,
    .av_one_fifth,
    .av_two_fifth,
    .av_three_fifth,
    .av_four_fifth,
    .flex_column,
    .av-layout-column {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        clear: both !important;
    }

    /* Flex containers: stack verticale */
    .flex_column_table,
    .av-flex-cells {
        display: block !important;
    }
    .flex_column_table .flex_cell,
    .av-flex-cells .flex_cell {
        width: 100% !important;
        display: block !important;
    }

    /* Container: padding laterale */
    .container {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;

    }

    /* Sezioni Avia: padding ridotto */
    .avia-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Sidebar: sotto il contenuto */
    .sidebar,
    .av-layout-column-separator {
        width: 100% !important;
        float: none !important;
        margin: 20px 0 0 !important;
    }
}

/* ── Mobile (< 768px) ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Colonne: forza stack */
    .av_one_half,
    .av_one_third,
    .av_two_third,
    .av_one_fourth,
    .av_three_fourth,
    .av_one_fifth,
    .av_two_fifth,
    .av_three_fifth,
    .av_four_fifth,
    .flex_column,
    .av-layout-column {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Header: logo centrato, compatto */
    #header .container,
    #header_main .container {
        padding: 10px 15px !important;
    }
    .av-logo-container img,
    #header #logo img {
        max-height: 50px !important;
        width: auto !important;
    }

    /* Titoli: dimensioni adattive */
    h1, .av-special-heading h1 { font-size: 1.6rem !important; line-height: 1.3 !important; }
    h2, .av-special-heading h2 { font-size: 1.3rem !important; line-height: 1.3 !important; }
    h3, .av-special-heading h3 { font-size: 1.1rem !important; line-height: 1.3 !important; }

    /* Avia builder: padding ridotto */
    .avia-section,
    .avia-section .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Colonne con padding interno: riduci */
    .avia-column-no-border .flex_column_div,
    .av-column-separator .flex_column_div {
        padding: 15px 0 !important;
    }

    /* Tabelle: scroll orizzontale */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Immagini: mai fuori schermo */
    img,
    .avia-image-container img,
    .wp-post-image {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Galleria / Grid Enfold: colonna singola */
    .av-horizontal-gallery .av-horizontal-gallery-inner,
    .avia-fullwidth-gallery {
        flex-wrap: wrap !important;
    }
    .av-horizontal-gallery .av-horizontal-gallery-inner > * {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Tab Enfold: stack verticale */
    .av-tab-section-outer-container .av-section-tab-title {
        display: block !important;
        width: 100% !important;
    }
    .av-tab-section-inner-container .av-animation-delay-container {
        width: 100% !important;
    }

    /* Bottoni: non overflow */
    .avia-button,
    .av-button-big {
        max-width: 100% !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* Video embed: responsive */
    iframe[src*="youtube"],
    iframe[src*="vimeo"],
    .avia-video iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    /* Footer: padding ridotto */
    #footer,
    #footer .container {
        padding: 20px 15px !important;
    }
    #footer .flex_column {
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    /* Nascondi sidebar su mobile */
    .sidebar {
        display: none !important;
    }

    /* Enfold: rimuovi min-height forzato da JS */
    .avia-section,
    .av-section-color-main,
    .container_wrap {
        min-height: 0 !important;
    }
}

/* ── Piccolo mobile (< 480px) ─────────────────────────────────────────── */
@media (max-width: 479px) {
    h1, .av-special-heading h1 { font-size: 1.35rem !important; }
    h2, .av-special-heading h2 { font-size: 1.15rem !important; }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Grid news: colonna singola */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}
