/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: light4.it
Author: Luca
Author URI: https://lucadeluigi.com
Template: generatepress
Version: 1.1.0
*/

/* -------------------------------------------
   LIGHT4 DESIGN SYSTEM TOKENS
------------------------------------------- */
:root {
    --l4-contrast-light: #ffffff;
    --l4-contrast-dark: #000000;
    --l4-border-opacity-white: rgba(255, 255, 255, 0.6);
    --l4-border-opacity-black: rgba(0, 0, 0, 0.6);
}

/* -------------------------------------------
   HERO SECTION
------------------------------------------- */
.light4-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000000; /* Evita flash bianchi */
}

/* SFONDI (FORZATI SULLO SFONDO) */
.light4-hero-backgrounds {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10; 
}

.light4-hero-media {
    width: 100%; height: 100%;
    object-fit: cover;
}

.light4-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.35); 
    z-index: 20; 
}

/* BLOCCO DEI CONTENUTI */
.light4-hero-content {
    position: relative;
    z-index: 99 !important; 
    text-align: center;
    max-width: 1000px;
    padding: 0 30px;
}

.light4-hero-headline {
    color: #ffffff !important;
    font-weight: 400;
    line-height: 1.1;
    margin: 0 0 40px 0;
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    letter-spacing: -0.02em;
}

/* CONTENITORE BOTTONI */
.light4-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* LINK FLOTTANTE IN BASSO */
.light4-hero-floating-text {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 99 !important;
}

.floating-link {
    display: flex;
    align-items: center;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.floating-dot {
    width: 8px;
    height: 8px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

/* -------------------------------------------
   LIGHT4 BUTTONS DESIGN SYSTEM
------------------------------------------- */
/* 1. STRUTTURA COMUNE */
.light4-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    font-weight: 500;
    overflow: hidden; 
    border-radius: 0; 
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.3s ease; 
}

.light4-btn span {
    position: relative;
    z-index: 5; 
    pointer-events: none; 
}

/* 2. STILE 1: SOLID WHITE */
.light4-btn--solid-white {
    background-color: var(--l4-contrast-light);
    border: 1px solid var(--l4-contrast-light);
    color: var(--l4-contrast-dark) !important;
}

/* 3. STILE 2: GHOST WHITE */
.light4-btn--ghost-white {
    background-color: transparent;
    border: 1px solid var(--l4-border-opacity-white);
    color: var(--l4-contrast-light) !important;
}

/* 4. STILE 3: SOLID BLACK */
.light4-btn--solid-black {
    background-color: var(--l4-contrast-dark);
    border: 1px solid var(--l4-contrast-dark);
    color: var(--l4-contrast-light) !important;
}

/* 5. STILE 4: GHOST BLACK */
.light4-btn--ghost-black {
    background-color: transparent;
    border: 1px solid var(--l4-border-opacity-black);
    color: var(--l4-contrast-dark) !important;
}

/* -------------------------------------------
   LIGHT4 ANIMATED LINKS (UNDERLINE SLIDE)
------------------------------------------- */
.light4-link-underline {
    position: relative;
    text-decoration: none !important;
    display: inline-block; /* Garantisce il corretto posizionamento della linea */
    color: inherit; /* Eredita il colore del testo circostante se non specificato */
}

/* Creiamo la linea nascosta sotto al testo */
.light4-link-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px; /* Spessore della linea (puoi metterlo a 2px se la vuoi più spessa) */
    bottom: -2px; /* Distanza dal testo */
    left: 0;
    background-color: currentColor; /* Prende lo stesso identico colore del testo del link */
    
    /* Gestione della fisica del movimento */
    transform: scaleX(0); /* Inizialmente invisibile (lunghezza zero) */
    transform-origin: bottom left; /* Il punto di ancoraggio è a sinistra */
    transition: transform 0.35s ease-in-out; /* Transizione fluida */
}

/* Al passaggio del mouse: la linea si allunga da sinistra verso destra */
.light4-link-underline:hover::after {
    transform: scaleX(1);
    /* L'ancoraggio rimane a sinistra, quindi la linea si accorcerà verso sinistra quando il mouse esce */
}

/* -------------------------------------------
   LIGHT4 CUSTOM FLOATING HEADER (BLOCK ELEMENT)
------------------------------------------- */
/* Fissa l'header sopra a tutto in modo trasparente */
.light4-site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: transparent !important;
    pointer-events: none; /* Permette il click sugli elementi sotto l'header (es. video) */
}

/* Contenitore principale */
.light4-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    pointer-events: auto; /* Riattiva il click solo su logo e menu */
    mix-blend-mode: difference; /* Magia per far leggere il logo anche su sfondi bianchi */
}

/* Dimensioni del Logo SVG */
.light4-svg-logo {
    height: 25px;
    width: auto;
    display: block;
}

/* -------------------------------------------
   PULSANTE MENU (TESTO + 2 LINEE)
------------------------------------------- */
.light4-menu-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--l4-contrast-light) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* Scritta "Menu" con effetto Underline Slide */
.light4-menu-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.light4-menu-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom left;
    transition: transform 0.35s ease-in-out;
}

.light4-menu-trigger:hover .light4-menu-text::after {
    transform: scaleX(1);
}

/* Icona Burger Custom (2 Linee) */
.light4-burger-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 1px;
}

.burger-line {
    display: block;
    width: 24px;
    height: 1px;
    background-color: var(--l4-contrast-light);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.light4-menu-trigger:hover .burger-line:last-child {
    transform: translateX(4px);
    width: 20px;
}


/* -------------------------------------------
   PREPARAZIONE ANIMAZIONE ENTRATA GSAP
------------------------------------------- */
/* Nasconde gli elementi finché GSAP non li anima, evitando flash visivi */
.light4-hero-headline,
.light4-hero-buttons .light4-btn {
    visibility: hidden;
    opacity: 0;
}

/* -------------------------------------------
   LIGHT4 FULLSCREEN OVERLAY MENU (DYNAMIC)
------------------------------------------- */
/* Classe per bloccare lo scroll del sito */
body.l4-no-scroll {
    overflow: hidden !important;
	padding-right: var(--scrollbar-width, 0px);
}

.light4-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 9998;
    visibility: hidden; 
}

.light4-menu-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0; 
}

/* Pannello Menu (Fluttuante con Radius e Padding) */
.light4-menu-panel {
    position: absolute;
    top: 20px; right: 20px; bottom: 20px; /* Lo stacca dai bordi creando l'effetto fluttuante */
    height: calc(100vh - 40px);
    width: calc(100% - 40px); 
    max-width: 450px; 
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 20px; /* Angoli arrotondati */
    padding: 120px 40px 60px 50px; /* Padding su, destra, bottom, sinistra */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transform: translateX(120%); /* Fuori dallo schermo */
}

/* Stili per la lista generata da WordPress */
.light4-menu-list {
    list-style: none;
    padding: 0; margin: 0;
}

.light4-menu-list .menu-item {
    margin-bottom: 25px;
    overflow: hidden; /* Taglia l'animazione GSAP */
}

.light4-menu-list .menu-item a {
    display: inline-block;
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--l4-contrast-dark) !important;
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1.1;
    position: relative;
    text-decoration: none !important;
}

/* Animazione Underline integrata per i link di WP */
.light4-menu-list .menu-item a::after {
    content: '';
    position: absolute;
    width: 100%; height: 1px;
    bottom: -2px; left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom left;
    transition: transform 0.35s ease-in-out;
}
.light4-menu-list .menu-item a:hover::after {
    transform: scaleX(1);
}

/* Contenitore di testo animato */
.light4-menu-list .menu-item a span {
    display: block;
    transform: translateY(110%);
}

/* -------------------------------------------
   FIX VISIBILITÀ VOCI MENU (WP DYNAMIC)
------------------------------------------- */
/* Assicura che il contenitore del menu stia sopra a tutto nel pannello */
.light4-menu-nav {
    position: relative;
    z-index: 10;
}

/* Forza i link e gli span a essere ben visibili e scuri */
.light4-menu-list .menu-item a {
    position: relative;
    z-index: 2;
    color: var(--l4-contrast-dark) !important; /* Forza il colore scuro (nero) */
    opacity: 1 !important;
}

/* Assicura che il testo animato dentro lo span sia blocco e visibile */
.light4-menu-list .menu-item a span {
    display: block !important;
    position: relative;
    z-index: 5;
    color: var(--l4-contrast-dark) !important;
    visibility: visible !important;
    opacity: 1 !important;
}







/* -------------------------------------------
   MEDIA QUERIES (SEMPRE IN FONDO!)
------------------------------------------- */
@media (max-width: 768px) {
	
    .light4-hero-buttons { 
        flex-direction: column; 
        width: 100%; 
    }
    
    .light4-btn {
        width: 100%; /* Fa allargare i bottoni a tutto schermo sul cellulare */
    }

    .light4-hero-floating-text { 
        bottom: 20px; 
        right: 20px; 
    }
	
	.light4-header-container {
        padding: 25px 20px;
    }
	
	.light4-menu-panel {
        top: 15px; right: 15px; bottom: 15px;
        width: calc(100% - 30px);
        height: calc(100vh - 30px);
        padding: 100px 30px 40px 30px;
    }
}


/* -------------------------------------------
   RESPONSIVE HEADER (Aggiungi dentro le tue @media in fondo al file)
------------------------------------------- */
/* Copia SOLO il contenuto qui sotto dentro la tua @media (max-width: 768px) esistente */
/* 
    .light4-header-container {
        padding: 30px 20px;
    }
*/