/*
Theme Name: LAD-light
Theme URI: https://example.com
Author: Giuseppe Baldino
Description: Tema leggero e ottimizzato con Opzione di header fisso
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: LAD-Light
*/


/*Gestione icone social e contatti*/

.social ul li {
    list-style: none;
    box-shadow: 0 0px 6px #ddd2;
    padding: 0 10px;
}

.social ul li a {
    text-decoration: none;
    padding: 20px 0;
    margin-block: 10px;
}

.social h4 a {
    display: flex;
    justify-content: start;
    align-items: center;
}

.intestazione a {
    color: #d7b474 !important
}

.fa-whatsapp {
    font-size: 2em !important;
    color: limegreen !important;
    margin-right: 10px;
}

.fa-instagram {
    font-size: 2em;
    color: #fff;
    margin-right: 10px;
}

.fa-facebook {
    font-size: 2em;
    color: #212ddd;
    margin-right: 10px;
}


.fa-google {
    font-size: 2em;
    margin-right: 10px;
}

/*Header Customizer*/
.header--fixed {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: top 0.3s
}

.custom-logo-link {
    display: block;
    height: 100%;
}

#scroll-detector {
    position: absolute;
    top: 0;
    height: 11px;
    width: 100%;
}

.header--scrolled {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav.breadcrumb {
    width: fit-content;
    margin: 0 auto;

}

nav.breadcrumb a,
nav.breadcrumb span {
    margin: 0;
    padding: 1em 0.2em;
}

:focus-visible {
    border: 7px solid #a00;
    padding: 0.5em;
    outline: none;
    border-radius: 12PX;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ff1: "lato";
    --ff2: "";
    --fz2: 16px;
    --c1: #222;
    --c2: #fff;
    --c3: #4A618E;
    --c3-hover: #00629a;
    --bg1: transparent;
    --c-header: #fff;
    --c-footer: #252535;
    --shadow: 0px 1px 6px var(--c1);
    --logo-size: 50px;
    --margin-body: 150px;
    --margin-body-mobile: 1vw;
    --padding-w: 50px;
    --header-height: 90px;
}

/* Helper */
.cta {
    padding: 0.8em 1em;
    /* background: var(--c3); */
    color: var(--c2) !important;
    border: none;
    border-radius: 8px;
    font-size: 1.3em;
    transition: 0.3s ease-out;
    position: relative;
    top: 0;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    font-size: 1.4em !important;
    font-weight: 900;
    box-shadow: 0 4px 4px #3338 !important;
    width: fit-content !important;
    text-align: center;
    line-height: 1.5em;
}

.cta:hover {
    background: var(--c3-hover);
}

.cta-gradient a:focus-visible {
    border: 2px solid #a00 !important;
    padding: 0.2em !important;
}


.text-center {
    text-align: center;
}

.big {
    font-size: 2.8em !important;
    line-height: 1.2em;
}

.cta-blur {
    display: block;
    background: #3335;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    height: 100%;
    margin: 5% 0;
}

.max-height {
    max-height: 90vh !important;
}

[data-widget_type="html.default"] {
    height: 100%;

}

/* Helper WordPress */
main {
    min-height: 80vh;
}

article.custom-single-post {
    padding: 1.5em 50px;
}

#mio_tema_contact_widget {
    position: relative;
    width: 100%;
}

.wp-block-buttons>.wp-block-button.cta {
    display: block;
    margin: 1em auto;
    position: relative;
    font-size: 1.8em;
    font-weight: 100;

    a {
        background: var(--c3);
        transition: background 0.5s;
    }
}

.wp-block-buttons>.wp-block-button.cta a:hover {
    background: var(--c3-hover);
}


.wp-block-cover {
    height: calc(100vh - 70px);
}


body {
    font-family: var(--ff1);
    margin: 0;
    padding: 0;
}

/* === POST === */

form.classic-search-form {
    width: fit-content;
    margin: 1em auto;
}

form.classic-search-form :is(input, button) {
    font-size: 1.2em;
    padding: 0.2em 0.8em;
}

.custom-archive-container {
    display: flex;
    flex-wrap: wrap;
    margin: 2em 50px;
    gap: 3%;
}

.custom-archive-container a {
    max-width: 350px;
    width: 25vw;
    height: auto;
    border: 1px solid #888;
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;
}

.custom-archive-post p {
    color: var(--c3);
    margin: 1em 10px;
    font-size: var(--fz2);
}

.custom-archive-post h2 {
    font-size: 30px;
    margin: 0.5em 0;
    color: var(--c1);
    margin: 10px;
}

.custom-archive-post .post-img {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.custom-archive-post .post-img img {
    object-fit: cover !important;
    width: 100%;
    height: 100%;
    border-radius: 0px 0px 12px 0px;
    box-shadow: 0 0px 24px #3335;
}

.custom-archive-pagination {
    display: block;
    width: fit-content;
    position: relative;
    margin: 1em auto;
}


.page-numbers {
    padding: 0.5em;
    margin: 0.2em 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background: #aaa;
    color: #222;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1em;
}

.page-numbers.current {
    background: var(--c3-hover);
    color: var(--c2);
    font-weight: 600;
    font-size: 1em;
}

.post-navigation {
    width: fit-content;
    margin-inline: auto;
}

.post-navigation>* a {
    padding: 0.8em 1.0em;
    border-radius: 12px;
    background: var(--c3);
    color: var(--c2) !important;
    text-align: center;
}

/* === FINE POST === */

/* Header */
header #header-desktop .container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: var(--header-height);
}

.logoContent a img {
    height: 70px;
    width: auto;
    object-fit: contain;
    object-position: center;
}

header#mobile {
    display: none;
}

nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

nav ul li {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1em;
}

.current_page_item a:not(footer) {
    background: #d7b474;
    color: #512210 !important;
    padding: 0.5em;
    border-radius: 6px;
}


/* Contenitore base del sub-menu */
.sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1c1c1c;
    padding: 0.5em 0;
    min-width: 200px;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 10;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.menu-item-has-children {
    position: relative;
}

.menu-item-has-children>a {
    position: relative;
    padding-right: 1.5em;
}

/* Voce attiva: mostra il submenu */
.menu-item-has-children.active>.sub-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Stile dei link */
.sub-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    box-shadow: 1px 2px 5px #ddd;
    border-radius: 12px;
}

/* Hover sui link */
.sub-menu a:hover {
    background-color: var(--c3-hover);
}

/* Voce principale con submenu (aggiungo un'icona ▼ se vuoi, opzionale) */
.menu-item-has-children>a::after {
    content: "▼";
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    font-size: 0.7em;
    pointer-events: none;
}

/* Rotazione dell'icona al hover */
.menu-item-has-children.active>a::after {
    transform: translateY(-50%) rotate(90deg);
}

nav a {
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    font-family: var(--ff1);
    color: #414141;
    transition: 0.2s linear;
    padding: 0.2em;
}

nav a:hover {
    color: #999;
}

/* Header Mobile */
header #header-mobile .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 var(--padding-w);
    margin: 10px 0;
}

header #header-mobile .hamburgher {
    display: block;
    width: 60px;
    height: 50px;
    border: none;
    background: none;
}

header #header-mobile span {
    display: flex;
    flex-direction: column;
    margin: 0.5em auto;
    width: 80%;
    height: 5px;
    background: #333;
}


/* FOOTER */

footer {
    width: 100%;
}

.footer {
    display: flex;
    justify-content: space-around;
    align-items: start;
    margin: 30px 0;
}

.footer .current_page_item a {
    background: none;
    color: inherit;
}

.footer .intestazione ul li,
.footer .link ul li {
    list-style: none;
    text-align: left;
    line-height: 1.7em;
}

.footer .intestazione ul li a,
.footer .link ul li a {
    color: #d7b474 !important
}

/* @media */

@media (max-width: 770px) {

    .cta-blur {
        margin: 0;
    }

    .big {
        font-size: 1.5em;
        text-align: center;
        padding: 10% 0
    }

    header #header-mobile {
        display: flex;
    }

    header #header-desktop {
        display: none;
    }

    .nascondi_nav {
        display: none;
    }

    header #header-mobile nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        height: 97vh;
        width: 90vw;
        background: #222;
        z-index: 10;
    }

    header #header-mobile nav ul {
        display: flex;
        flex-direction: column;
        font-size: 1.0em;
        position: relative;
        top: 50px;
    }



    header #header-mobile nav ul a {
        padding: 2em;
        color: #fff;
        border: 1px solid #d7b474;
        margin-bottom: 0.5em;
        box-shadow: 0 2px 6px #ddd3;
        border-radius: 12px;
    }

    .mobile-menu .menu-item {
        margin-bottom: 1rem;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        text-align: left;
        background: none;
        border: none;
        font-size: 1.2rem;
    }

    .submenu {
        display: none;
        padding-left: 1rem;
    }

    .submenu a {
        display: block;
        margin: 0.5rem 0;
    }

    nav .chiudi-nav {
        font-size: 3em;
        font-weight: 900;
        position: absolute;
        right: 10px;
        top: 10px;
        color: #d7b474;
        padding: 10px;
    }

    footer .flex.footer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    footer .intestazione {
        grid-column: span 2;
        margin-bottom: 1.3em;
    }

    footer .link {
        grid-column: 1;
        grid-row: 2;
    }

    footer .social {
        grid-column: span 2;
        grid-row: 3;
    }

    .footer .social ul {
        margin-inline: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 90%;
        justify-content: center;
        align-items: center;
    }

    .footer .social ul li {
        width: 50%;
    }
}



/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: var(--c-footer);
    color: var(--c2);
}

footer .container {
    font-size: 14px;
}

footer .container p span {
    font-weight: 100;
    color: #59f;
    font-style: italic;
}

footer .documentazione>* {
    display: block;
    padding: 0.8em;
    color: var(--c2) !important;
}

footer .fa-solid {
    font-size: 1.2em;
    margin-right: 0.5em;
}