
/* =====================
   TOP STRIP
===================== */
.top-strip {
    display: flex;
    justify-content: space-between;
    background: #999997;
    color: #fff;
    padding: 5px 15px;
    font-size: 14px;
}

.top-strip a {
    color: white;
    margin-left: 10px;
    text-decoration: none;
}

/* =====================
   HEADER LOGO
===================== */
.main-header {
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
}

.main-header {
    position: relative;
    z-index: 10; /* molto più basso dell’overlay */
}


.logo {
    font-size: 28px;
    font-weight: bold;
}

.header-image img {
    max-height: 100px;
}

/* =====================
   MENU DESKTOP
===================== */
.desktop-menu {
    display: flex;
    justify-content: flex-start;
    width: 100%;              /* 🔥 fondamentale */
    background: #DCDCDA;
    padding-left: 20px;
    box-sizing: border-box;   /* evita sforamenti */
}

.desktop-menu a {

    padding: 15px 20px;
    text-decoration: none;
}

.interne .desktop-menu a {
    color: #404040;
    padding: 15px 20px;
    text-decoration: none;
}

.desktop-menu a:hover {
    background: #555;
}

.desktop-menu {
    outline: 0px solid #ffcc00;
}



/* =====================
   HEADER / MOBILE ELEMENTS
===================== */
.main-header {
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative; /* fondamentale per icone absolute */
}

/* LOGO IMAGE */
.logo-image {
    margin-left: auto;
    width: auto;
    max-width: 25%;
}

@media (max-width: 1200px) {
    .logo-image {
        max-width: 25%;
    }
}

@media (max-width: 992px) {
    .logo-image {
        max-width: 25%;
    }
}

.logo-image img {
    width: 100%;
    height: auto;
    max-height: 120px;
}




/* HEADER IMAGE */
.header-image {
    margin-left: auto;
    width: auto;
    max-width: 50%;
}

@media (max-width: 1200px) {
    .header-image {
        max-width: 50%;
    }
}

@media (max-width: 992px) {
    .header-image {
        max-width: 50%;
    }
}

.header-image img {
    width: 100%;
    height: auto;
    max-height: 120px;
}



/* PANNELLI MOBILE */
.side-panel {
    position: fixed;
    top: 0;
    width: 78%;
    height: 100%;
    background: #222;
    padding: 20px;
    transform: translateX(-100%);
    transition: 0.3s;
    z-index: 2000 !important; 
}

/* PANNELLO SINISTRO */
.side-panel.left {
    left: 0;
}

/* PANNELLO DESTRO */
.side-panel.right {
    right: 0;
    transform: translateX(100%);
}

/* APERTURA PANNELLO */
.side-panel.open {
    transform: translateX(0);
}

/* LINK INTERNI PANNELLO */
.side-panel a {
    color: white;
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
}

/* ICONE MOBILE */
.mobile-icon {
    display: none; /* nascoste di default */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    cursor: pointer;
    z-index: 3000 !important; /* sopra logo e pannelli */
}

.mobile-icon.left {
    left: 15px;
}

.mobile-icon.right {
    right: 15px;
}

/* PULSANTE CHIUSURA PANNELLO */
.close-btn {
    font-size: 24px;
    cursor: pointer;
    display: block;
    text-align: right;
    margin-bottom: 20px;
	color: #ffffff;
}
.close-btn:hover {
    color: #ffffff;
}

/* OVERLAY SEMITRASPARANTE */
.panel-overlay {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000 !important;
}

.panel-overlay.active {
    display: block;
}

body.no-scroll {
    overflow: hidden;
}






/* =====================
   MEDIA QUERY MOBILE
===================== */
@media (max-width: 768px) {

    .top-strip {
        display: none;
    }

    .main-header {
        justify-content: center;
        min-height: 60px; /* forza altezza header */
    }

    .header-image {
        display: none;
    }

    .desktop-menu {
        display: none;
    }

    /* mostra le icone mobile */
    .mobile-icon {
        display: block;
    }
}

/* FORZA L’ORDINE CORRETTO */


.desktop-menu {
    position: relative;
    z-index: 1;
}

.side-panel {
    position: fixed;
    z-index: 9999 !important;
}

.panel-overlay {
    z-index: 9000 !important;
}



/* VIDEO HERO */
.hero-video {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    z-index: 1;
}

.hero-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

/* Overlay scuro */
.hero-video::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    z-index: 2;
}

/* HEADER IN OVERLAY */
.overlay-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 20px 40px;
	background-color: #0000004D;


}

/* =====================
   VERSIONE CORRETTA .interne
   (solo colori, nessuna modifica al layout)
===================== */

.interne .overlay-header {
    background-color: #ffffff99 !important;
    color: #000000 !important;
}

.interne .overlay-header a {
    color: #000000 !important;
    text-decoration: none;
}

.interne .mobile-icon {
    color: #000000 !important;
}








.header-inner {
    display: flex;
    align-items: center;
    width: 100%;
	
}


/* Logo */
.logo-area img {
    height: auto !important;
    width: auto !important;
    max-height: 53px; /* scegli tu l’altezza massima */
    object-fit: contain !important;
}


/* Menu desktop */
.video .desktop-menu {
    display: flex;
    gap: 25px;
    margin-left: auto; /* spinge il menu a destra */
    justify-content: flex-end; /* allinea le voci a destra */
}


.desktop-menu a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
	font-size: 18px;
}

/* Nascondi menu desktop su mobile */
@media (max-width: 1050px) {
    .desktop-menu {
        display: none !important;
    }
}


/* Icone mobile */
.mobile-icon {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: inherit; /* colore normale nelle pagine interne */
}

/* SOLO nella home, sopra il video */
.video .mobile-icon {
    color: #ffffff;
}

/* SOLO nella home, sopra il video */
 .video.interne .mobile-icon {
    color: #000000;
}


@media (max-width: 1050px) {
    .mobile-icon {
        display: block;
    }
}

/* Rimuove qualsiasi sfondo o bordo dal contenitore del menu */
.video .desktop-menu {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
	outline: 0 !important;
}

/* Rimuove eventuali sfondi o bordi dai link */
.video .desktop-menu a {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}


/* testo animato su video */

.hero-text-rotator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 30;
    width: 80%;
}

.text-slide {
    display: none;
}

.text-slide h1 {
    font-size: 3rem;
    font-weight: 700;
	color: #ffffff;
}

.text-slide p {
    font-size: 1.4rem;
    font-weight: 500;
    color: #ffffff;
}




@media (max-width: 768px) {
    .overlay-header {
        padding: 10px 15px; /* molto più stretto */
    }

    .header-inner {
        justify-content: center;
        position: relative;
    }

    .mobile-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 999;
    }

    .video .mobile-icon.left {
        left: 0;   /* ora funziona davvero */
    }

    .video .mobile-icon.right {
        right: 0;  /* ora funziona davvero */
    }
}


/* Immagine top */
.top {
    position: relative;
    width: 100%;
    height: 25vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* immagine come elemento HTML */
.top-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;   /* equivalente di background-size: cover */
    object-position: center;
    z-index: 0;
}

/* overlay */
.top::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #0000004D; /* 0.3 */
    z-index: 1;
}

/* contenuto */
.top-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 90%;
}

.top-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow:
        0 0 6px rgba(255,255,255,0.8),
        0 3px 8px rgba(0,0,0,0.7);
}

.top-content p {
    font-size: 1.4rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow:
        0 0 6px rgba(255,255,255,0.8),
        0 3px 8px rgba(0,0,0,0.7);
}




/* mobile */
@media (max-width: 600px) {
    .top {
        height: 50vh;
        min-height: 300px;
    }

    .top-content h1 {
        font-size: 1.6rem;
    }

    .top-content p {
        font-size: 1rem;
    }
}




/* Contenitore voce con submenu */
.main-header .desktop-menu .menu-item {
    position: relative;
    display: inline-block;
}

/* Pannello submenu */
.main-header .desktop-menu .menu-item .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    padding: 8px 8px; /* padding interno anche a sinistra */
    min-width: 210px;

    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);

    z-index: 9999;
}

/* Link del submenu */
.main-header .desktop-menu .menu-item .submenu a {
    display: block !important;
    padding: 9px 14px 9px 16px !important; /* padding sinistro ben visibile */
    white-space: nowrap;
    color: #333 !important;
    font-size: 16px;
    border-radius: 6px;
    background: transparent;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

/* Hover: colore + movimento a destra */
.main-header .desktop-menu .menu-item .submenu a:hover {
    background: rgba(0,0,0,0.07) !important;
    padding-left: 22px !important;
}

/* Mostra submenu al passaggio del mouse */
.main-header .desktop-menu .menu-item:hover .submenu {
    display: block;
}


.desktop-menu .social-icon {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.desktop-menu .social-icon svg {
    stroke: currentColor;
    width: 22px;
    height: 22px;
    transition: opacity 0.2s ease;
}

.desktop-menu .social-icon:hover svg {
    opacity: 0.6;
}


.btn svg,
.btn-secondary svg {
    margin-right: 10px !important;
    vertical-align: middle;
}


/* FIX: centratura logo a 1050px */
@media (max-width: 1050px) {

    .main-header {
        justify-content: center;
    }

    .logo-image {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* opzionale: se vuoi centratura perfetta */
    .header-image {
        display: none;
    }
}

@media (max-width: 1050px) {
    .desktop-menu {
        margin-left: 0 !important;
    }

    .main-header .header-inner {
        justify-content: center;
    }
}

.side-panel .close-btn {
    color: #ffffff !important;
}

.side-panel .close-btn:hover {
    color: #ffffff !important;
}
