/* --- VARIABILI & RESET --- */
:root {
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

body { 
    background-color: #000; 
    height: 100vh; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden;
}

/* --- CONTENITORE DISPOSITIVO --- */
.kiosk-container {
    width: 100vw; 
    height: 100vh;
    /*max-width: 1200px; 
    max-height: 800px; */
    /* Immagine di fallback o background generico */
    background-color: #1a1a1a; 
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
    border: 14px solid #111; 
    border-radius: 36px; 
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 40% 1fr; 
    grid-template-rows: 1fr auto; 
    grid-template-areas: 
        "hero menu"
        "hero footer";
}

/* Overlay scuro globale */
.kiosk-container::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px); z-index: 0;
}

/* --- MEDIA QUERY MOBILE --- */
@media (max-width: 768px) {
    .kiosk-container {
        max-width: 100%; max-height: 100%;
        border: none; border-radius: 0;
        grid-template-columns: 1fr;
        grid-template-rows: 35% 1fr auto;
        grid-template-areas: "hero" "menu" "footer";
    }
    .slider-section { border-right: none !important; border-bottom: 1px solid var(--glass-border); }
}

/* --- SEZIONE SLIDER (HERO) --- */
.slider-section {
    grid-area: hero; 
    position: relative; z-index: 1; 
    overflow: hidden;
    border-right: 1px solid var(--glass-border);
}

.slider-container { height: 100%; width: 100%; position: relative; }

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease-in-out;
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 40px;
}
.slide.active { opacity: 1; z-index: 2; }
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent 60%); z-index: 1;
}
.slide-content {
    position: relative; z-index: 2; color: white;
    transform: translateY(20px); opacity: 0;
    transition: transform 0.8s ease-out 0.3s, opacity 0.8s ease-out 0.3s;
}
.slide.active .slide-content { transform: translateY(0); opacity: 1; }
.slide-content h1 {
    font-size: 2.8rem; font-weight: 700; margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.slide-content p { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 25px; }

.slider-indicators {
    position: absolute; bottom: 25px; right: 30px; z-index: 10; display: flex; gap: 10px;
}
.indicator {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: all 0.3s;
}
.indicator.active { background: white; transform: scale(1.2); width: 25px; border-radius: 5px; }

.btn-cta { 
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4);
    color: white; padding: 12px 28px; 
    border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1rem; 
    display: inline-flex; align-items: center; gap: 10px; transition: all 0.3s;
}
.btn-cta:hover { background: rgba(255, 255, 255, 0.4); }

/* --- GRIGLIA MENU --- */
.grid-menu {
    grid-area: menu; 
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    grid-auto-flow: dense; 
    grid-auto-rows: minmax(165px, 1fr); 
    gap: 16px;
    z-index: 1; 
    background: #343434;
    overflow-y: auto;
}

/* --- TESSERE (GLASS CARDS) --- */
.menu-item {
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
    padding: 20px; text-decoration: none; 
    background: var(--bg-color, rgba(40, 40, 40, 0.3));
    backdrop-filter: blur(25px) saturate(150%); -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid var(--glass-border); border-radius: 24px; 
    box-shadow: var(--shadow-soft);
    position: relative; overflow: hidden; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* WIDGET METEO SPECIALE */
.menu-item:nth-child(1) { grid-row: span 2; }
.menu-item:nth-child(1) .icon-container { 
    width: 100px; height: 100px; margin-bottom: 0;
    background: rgba(255,255,255,0.15);
}
.menu-item:nth-child(1) i { font-size: 3.5rem; }

.menu-item:hover { 
    transform: translateY(-4px); filter: brightness(1.2);
    border-color: rgba(255, 255, 255, 0.5);
}
.menu-item:active { transform: scale(0.98); }

.icon-container {
    width: 48px; height: 48px; background: rgba(255, 255, 255, 0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.menu-item i { font-size: 1.4rem; color: white; text-shadow: 0 0 10px rgba(255,255,255,0.3); }

.menu-item span { 
    color: rgba(255, 255, 255, 0.95); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.3px;
    align-self: flex-end; text-align: right; width: 100%;
}

/* --- STILI TESTO METEO & BIG STATS --- */
#meteo-temp { 
    font-size: 4rem; font-weight: 700; line-height: 1; 
    color: #ffffff; text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 5px;
}
#meteo-desc { 
    font-size: 1.3rem; color: rgba(255, 255, 255, 0.95); 
    font-weight: 500; text-transform: capitalize; 
}

.big-stat-text {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    align-self: flex-end;
    text-align: right;
    width: 100%;
}
.big-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    align-self: flex-end;
}

/* Footer */
footer { 
    grid-area: footer; z-index: 1; background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px); border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.4); padding: 15px; text-align: center; 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; 
}