/* ===========================
    IMPORTAZIONE FONT
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800;900&family=Open+Sans:wght@300;400;600&display=swap');

:root {
    --primary: #1f2f44; /* Blu scuro */
    --light: #f5f5f5;
    --text: #ffffff;    
    --topbar-height: 70px; /* Aumentata per compensare il padding */
    
    --font-titles: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* ===========================
    RESET BASE
   =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: #1e4d8e;
    line-height: 1.6;
}

h1, h2, h3, h4, .logo, .hero-brand, .menu-item span {
    font-family: var(--font-titles);
}

/* ===========================
    TOP BAR (SPECULARE AL FOOTER)
   =========================== */
.top-bar {
    min-height: 55px;
    background: rgba(31, 47, 68, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    
    display: flex;
    justify-content: flex-end; /* Spinge le icone social a destra */
    align-items: center;
    
    /* Layout speculare al Footer */
    margin-left: 70px; 
    padding: 15px 30px; /* Padding verticale aumentato */
    border-radius: 0 0 20px 20px; /* Angoli stondati solo sotto */
    
    position: sticky; 
    top: 0; /* Parte sempre dal bordo superiore */
    z-index: 10000; /* Sotto al menu laterale */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Etichette Contatti CENTRATE */
.top-left {
    display: flex;
    align-items: center;
    gap: 25px;
    
    /* Posizionamento assoluto per centratura perfetta */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.top-left span {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
}

.top-right.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

/* Icone Social Top Bar */
.top-right.social-icons img {
    width: 28px; 
    height: 28px; 
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.top-right.social-icons a:hover img {
    transform: scale(1.2);
    opacity: 0.9;
}

/* ================= TOP BAR LINK FIX ================= */
.top-bar a {
    color: #fff; /* testo bianco */
    text-decoration: none; /* niente sottolineatura */
    font-weight: 600;
}

    .top-bar a:hover {
        text-decoration: underline; /* opzionale, feedback hover */
    }


/* ===========================
    MENU TOGGLE (HAMBURGER)
   =========================== */
.menu-toggle {
    display: none;
    position: fixed;
    font-size: 1.8rem;
    background: var(--primary);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 2px 8px;
    color: #ffffff;
    cursor: pointer;
    z-index: 12000; /* Sempre in cima */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===========================
    MENU LATERALE (GLASS STYLE)
   =========================== */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 100vh;
    padding-top: 20px;
    background: rgba(31, 47, 68, 0.7); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 10px;
    padding-right: 10px;
    overflow: hidden;
    transition: width 0.35s ease, transform 0.3s ease;
    z-index: 11000; /* Sopra la Top Bar (10000) */
}

.side-menu:hover {
    width: 240px;
}

.side-menu .logo {
    margin-top: 10px;
    margin-bottom: 30px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.side-menu:not(:hover):not(.open) .logo {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

/* ===========================
    NAV MENU
   =========================== */
.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.25s ease;
}

.menu-item img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain; 
    mix-blend-mode: lighten; 
    transition: transform 0.25s ease;
}

.menu-item:hover img {
    transform: scale(1.2);
}

.menu-item span {
    white-space: nowrap;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.side-menu:hover .menu-item span,
.side-menu.open .menu-item span {
    opacity: 1;
    transform: translateX(0);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
}

/* ===========================
    CONTENUTO & FOOTER
   =========================== */
.content {
    margin-left: 70px;
    padding: 40px;
    min-height: calc(100vh - 140px);
    color: #ffffff;
}

.site-footer {
    margin-left: 70px;
    margin-top: 40px;
    padding: 40px;
    background: rgba(31, 47, 68, 0.8);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo img { height: 75px; }
.site-footer a { 
    color: #fff; 
    text-decoration: none; 
    font-weight: 600; 
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: #4facfe;
}

.site-footer .social-icons img {
    width: 32px; 
    height: 32px; 
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.site-footer .social-icons a:hover img {
    transform: translateY(-5px) scale(1.1);
    filter: brightness(1.2);
}

/* ===========================
    RESPONSIVE (MOBILE OPTIMIZED)
   =========================== */
@media (max-width: 992px) {
    .top-bar {
        margin-left: 0; /* Occupa tutto lo schermo */
        border-radius: 0; /* Rimuove arrotondamento su mobile */
    }

    .menu-toggle {
        display: flex;
        bottom: 25px; 
        right: 20px;  
        width: 55px;
        height: 55px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 2px solid rgba(255,255,255,0.3);
        z-index: 12000; 
    }

    .side-menu {
        transform: translateX(-100%);
        width: 280px;
        z-index: 11500; /* Sopra la top-bar anche su mobile */
        padding-top: 80px; 
        top: 0;
        background: rgba(26, 40, 58, 0.95); 
    }

    .side-menu.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .side-menu .logo {
        display: block;
        opacity: 1 !important;
        transform: none !important;
        padding-left: 10px;
    }

    .content, .site-footer {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 20px 15px;
        flex-direction: column;
        gap: 15px;
        height: auto;
    }

    .top-left {
        position: static; /* Rimuove centratura assoluta su mobile */
        transform: none;
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .top-left span {
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.05);
        padding: 8px;
        border-radius: 6px;
        white-space: normal;
        display: block;
        text-align: center;
        width: 100%;
    }
	
	.top-bar {
        position: relative; /* 🔥 non più sticky su mobile */
    }
}

//* ===========================
   FOOTER LOGO + ORARI (INLINE)
   =========================== */
.footer-brand {
    display: flex;
    align-items: center;        /* 🔥 allineati verticalmente */
    gap: 22px;                  /* spazio elegante logo → orari */
}

.footer-logo img {
    height: 60px;               /* coerente, non gigante */
    width: auto;
}

/* ORARI */
.footer-hours {
    display: flex;
    flex-direction: column;
    gap: 4px;

    font-size: 0.85rem;
    line-height: 1.3;
    opacity: 0.95;
}

.footer-hours strong {
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-hours span {
    white-space: nowrap;        /* 🔥 evita rotture brutte */
}

.footer-hours b {
    color: #f1c40f;
    font-weight: 700;
}

@media (max-width: 768px) {
    .footer-brand {
        flex-direction: row;        /* 🔒 resta orizzontale */
        align-items: center;
        justify-content: center;
        gap: 16px;
        text-align: left;
    }

    .footer-logo img {
        height: 52px;               /* leggermente più compatto */
    }

    .footer-hours {
        font-size: 0.8rem;
        gap: 3px;
    }

    .footer-hours span {
        white-space: nowrap;        /* 🔥 MAI a capo */
    }
}




/* ===========================
    POPUP SUCCESS
   =========================== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.popup-overlay.active { display: flex; }

.popup-box {
    background: #fff;
    max-width: 480px;
    width: 90%;
    padding: 35px 30px;
    border-radius: 12px;
    text-align: center;
    animation: popupFade 0.35s ease;
}

.popup-box h2 { color: var(--primary); margin-bottom: 12px; font-family: var(--font-titles); }
.popup-box p { color: #333; margin-bottom: 25px; }
.popup-close {
    padding: 10px 26px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

/* ===========================
   OVERRIDE TESTO POPUP SUCCESS
   =========================== */

.popup-overlay .popup-box h2,
.popup-overlay .popup-box p {
    color: #1f2f44 !important;
}


@keyframes popupFade {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}