/* ============================================
   VARIABILI CSS - Tema scuro professionale
   Ispirato ai terminali di trading
   ============================================ */
:root {
    /* Colori principali */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-card-hover: #1f2937;
    
    /* Colori accento energia */
    --energy-green: #10b981;
    --energy-green-glow: rgba(16, 185, 129, 0.3);
    --energy-blue: #3b82f6;
    --energy-blue-glow: rgba(59, 130, 246, 0.3);
    --energy-amber: #f59e0b;
    --energy-amber-glow: rgba(245, 158, 11, 0.3);
    --energy-red: #ef4444;
    --energy-purple: #8b5cf6;
    --energy-cyan: #06b6d4;
    
    /* Testo */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Bordi */
    --border-color: #374151;
    --border-glow: rgba(59, 130, 246, 0.5);
    
    /* Font */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Transizioni */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    /* Sfondo con griglia sottile */
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================================
   HEADER / NAVIGAZIONE
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.4);
    padding: 0 2rem;
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

/* Icona Fulmine - Senza sfondo, pulita */
.logo-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
    transition: filter 0.3s ease;
}

.logo:hover .logo-icon {
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.7));
}

/* Tipografia Titolo */
.logo-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    display: flex;
    gap: 5px;
    align-items: baseline;
}

/* Parola "ENERGIA" con gradiente */
.logo-text span {
    font-weight: 700;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 0.25rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav a.active {
    color: var(--energy-green);
    background: rgba(16, 185, 129, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================
   DROPDOWN MENU - Menu a tendina elegante
   ============================================ */

/* Contenitore del dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

/* Pulsante toggle del dropdown */
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Stato attivo quando una sottopagina è selezionata */
.nav-dropdown-toggle.has-active {
    color: var(--energy-green);
    background: rgba(16, 185, 129, 0.1);
}

/* Freccia del dropdown con animazione rotazione */
.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-arrow,
.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Menu dropdown - pannello che si apre */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 1001;
    /* Effetto glassmorphism */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Freccia superiore del menu (triangolo) */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

/* Apertura del dropdown - hover su desktop */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Intestazione del dropdown */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-header-icon {
    font-size: 1rem;
}

/* Singola voce del dropdown */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Effetto glow al hover */
.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: background 0.2s ease;
}

.dropdown-item:hover::before {
    background: var(--energy-green);
}

/* Voce attiva */
.dropdown-item.active {
    background: rgba(16, 185, 129, 0.1);
}

.dropdown-item.active::before {
    background: var(--energy-green);
}

.dropdown-item.active .dropdown-item-title {
    color: var(--energy-green);
}

/* Icona della voce */
.dropdown-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-item:hover .dropdown-item-icon {
    transform: scale(1.1);
}

/* Colori icone per categoria */
.dropdown-item-icon.energia {
    background: rgba(16, 185, 129, 0.15);
}

.dropdown-item-icon.gas {
    background: rgba(249, 115, 22, 0.15);
}

.dropdown-item-icon.fondamentali {
    background: rgba(59, 130, 246, 0.15);
}

.dropdown-item-icon.previsioni {
    background: rgba(139, 92, 246, 0.15);
}

/* Colori icone dropdown PREZZI */
.dropdown-item-icon.free {
    background: rgba(107, 114, 128, 0.15);
}

.dropdown-item-icon.pro {
    background: rgba(245, 158, 11, 0.15);
}

.dropdown-item-icon.forecaster {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
}

.dropdown-item-icon.cta {
    background: rgba(16, 185, 129, 0.15);
}

/* Divider nel dropdown */
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 14px;
}

/* Voce CTA evidenziata */
.dropdown-item.dropdown-item-cta {
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    margin-top: 4px;
}

.dropdown-item.dropdown-item-cta:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--energy-green);
}

.dropdown-item.dropdown-item-cta .dropdown-item-title {
    color: var(--energy-green);
}

/* Contenuto testuale della voce */
.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.dropdown-item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   HAMBURGER MENU - Menu mobile
   ============================================ */

/* Pulsante hamburger - nascosto su desktop */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.2s ease;
}

.nav-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--energy-green);
}

/* Linee dell'hamburger */
.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animazione X quando attivo */
.nav-mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   RESPONSIVE - Dropdown e menu mobile
   ============================================ */
@media (max-width: 900px) {
    /* Mostra hamburger */
    .nav-mobile-toggle {
        display: flex;
        order: 2;
        position: relative;
        z-index: 2001;
    }
    
    /* Nascondi navigazione di default */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background: var(--bg-secondary);
        padding: 80px 1.5rem 2rem;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 2000;
        overflow-y: auto;
    }
    
    .nav.nav-mobile-open {
        display: flex;
    }
    
    /* Dropdown full width su mobile */
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--bg-card);
        border-radius: 10px;
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 8px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .nav-dropdown-menu::before {
        display: none;
    }
    
    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
        opacity: 1;
        padding: 8px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
    }
    
    /* Link nav normali su mobile */
    .nav > a {
        display: block;
        width: 100%;
        padding: 12px 16px;
        background: var(--bg-card);
        border-radius: 10px;
    }
    
    .header-actions {
        order: 3;
    }
}

/* Pulsante Secondario (Area Riservata) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--energy-green);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--energy-green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ============================================
   USER DROPDOWN - Menu utente loggato
   ============================================ */
.user-dropdown {
    position: relative;
}

.user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--energy-green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.user-avatar {
    font-size: 1.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
}

.user-name {
    color: var(--energy-green);
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Menu dropdown utente */
.user-menu {
    min-width: 220px;
    right: 0;
    left: auto;
}

.user-menu .dropdown-item {
    transition: all 0.2s ease;
}

.user-menu .logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--energy-red);
}

.user-menu .logout-item .dropdown-item-icon {
    filter: hue-rotate(0deg);
}

/* Responsive user dropdown */
@media (max-width: 768px) {
    .user-toggle {
        padding: 8px 12px;
    }
    
    .user-name {
        max-width: 100px;
    }
}

/* ============================================
   NEWS TICKER - Barra Notizie Scorrevole
   ============================================ */
.news-ticker-bar {
    background: rgba(5, 8, 15, 0.95);
    border-top: 1px solid rgba(55, 65, 81, 0.4);
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}

.news-ticker-inner {
    display: flex;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.news-ticker-label {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--energy-green), var(--energy-blue));
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

.news-ticker-content {
    display: flex;
    gap: 3rem;
    animation: tickerScroll 120s linear infinite;
    white-space: nowrap;
}

.news-ticker-content:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-item:hover {
    color: var(--text-primary);
}

.news-item::before {
    content: '●';
    color: var(--energy-green);
    font-size: 0.5rem;
}

.news-item .news-source {
    color: var(--energy-blue);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.news-item .news-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Header con ticker - aumenta altezza */
.header.has-ticker {
    height: auto;
}

.header.has-ticker .header-inner {
    border-bottom: none;
}

/* Responsive ticker */
@media (max-width: 768px) {
    .news-ticker-label {
        display: none;
    }
    
    .news-ticker-inner {
        padding: 0 1rem;
    }
    
    .news-item {
        font-size: 0.75rem;
    }
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--energy-green);
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--energy-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Indicatore orario aggiornamento */
.update-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
    transition: all var(--transition-fast);
}

/* Verde: dati aggiornati oggi */
.update-time.status-today {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Giallo: dati di ieri */
.update-time.status-yesterday {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Rosso: dati più vecchi */
.update-time.status-old {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--energy-green), var(--energy-blue));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    box-shadow: 0 4px 15px var(--energy-green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--energy-green-glow);
}

/* ============================================
   NEWS TICKER (Notizie Scorrevoli)
   ============================================ */
.news-ticker-container {
    width: 100%;
    height: 32px;
    background: rgba(10, 14, 23, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    font-size: 0.8rem;
    z-index: 999;
}

.news-ticker-label {
    background: var(--energy-green);
    color: #fff;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 4px 0 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
}

.news-ticker-content {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    padding-left: 20px;
}

/* Pausa l'animazione quando il mouse è sopra */
.news-ticker-content:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    margin-right: 3rem;
    font-weight: 500;
}

.news-item strong {
    color: var(--energy-blue);
    margin-right: 6px;
    font-weight: 700;
}

.news-item::before {
    content: '●';
    color: var(--energy-green);
    margin-right: 10px;
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

.news-source {
    opacity: 0.6;
    font-size: 0.7rem;
    margin-left: 6px;
    border: 1px solid var(--border-color);
    padding: 1px 4px;
    border-radius: 4px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ============================================
   HERO SECTION - Compatto
   ============================================ */
.hero {
    padding: 110px 2rem 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* ... */

/* Hero compatto per pagine interne */
.page-hero {
    padding: 110px 2rem 40px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), transparent);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 300px;
    background: radial-gradient(ellipse, var(--energy-green-glow), transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--energy-amber);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--energy-green), var(--energy-blue), var(--energy-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--energy-green);
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   CONTAINER E LAYOUT
   ============================================ */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 2rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-filter {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-filter:hover, .btn-filter.active {
    background: var(--bg-card-hover);
    border-color: var(--energy-green);
    color: var(--text-primary);
}

/* ============================================
   KPI CARDS - Layout compatto orizzontale
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.kpi-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--kpi-color, var(--energy-green));
}

.kpi-card.pun { --kpi-color: var(--energy-green); }
.kpi-card.psv { --kpi-color: var(--energy-blue); }
.kpi-card.load { --kpi-color: var(--energy-amber); }
.kpi-card.forecast { --kpi-color: var(--energy-purple); }
.kpi-card.co2 { --kpi-color: #6b7280; }
.kpi-card.gas { --kpi-color: #f97316; }
.kpi-card.hydro { --kpi-color: var(--energy-cyan); }
.kpi-card.meteo { --kpi-color: #ec4899; }

.kpi-gauge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(
        var(--energy-green) calc(var(--gauge-percent, 88) * 3.6deg),
        var(--border-color) calc(var(--gauge-percent, 88) * 3.6deg)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.kpi-gauge::after {
    content: '';
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 50%;
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kpi-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.kpi-badge.up {
    background: rgba(16, 185, 129, 0.15);
    color: var(--energy-green);
}

.kpi-badge.down {
    background: rgba(239, 68, 68, 0.15);
    color: var(--energy-red);
}

.kpi-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex: 1;
}

.kpi-main {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}

.kpi-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.kpi-datetime {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font-mono);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.kpi-footer-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.kpi-footer-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.kpi-sparkline {
    width: 80px;
    height: 35px;
    flex-shrink: 0;
}

/* ============================================
   GRAFICI
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.chart-card:hover {
    border-color: var(--border-glow);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

/* Card Prezzi del Giorno */
.daily-prices-card .daily-prices-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.daily-price-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.daily-price-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.daily-price-item:first-child {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.daily-price-item:first-child:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.daily-price-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 12px;
}

.daily-price-info {
    flex: 1;
}

.daily-price-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.daily-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.daily-price-item:first-child .daily-price-value {
    color: var(--energy-green);
}

.daily-price-item:last-child .daily-price-value {
    color: var(--energy-purple);
}

.daily-price-range {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-family: var(--font-mono);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--energy-green);
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.chart-container {
    position: relative;
    height: 250px;
}

.chart-container.tall {
    height: 300px;
}

/* ============================================
   TABELLE DATI
   ============================================ */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.zone-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.zone-badge.north { border-color: var(--energy-blue); color: var(--energy-blue); }
.zone-badge.south { border-color: var(--energy-amber); color: var(--energy-amber); }
.zone-badge.sicily { border-color: var(--energy-red); color: var(--energy-red); }
.zone-badge.sardinia { border-color: var(--energy-purple); color: var(--energy-purple); }
.zone-badge.center { border-color: var(--energy-green); color: var(--energy-green); }

.value-positive {
    color: var(--energy-green);
}

.value-negative {
    color: var(--energy-red);
}

.value-highlight {
    color: var(--energy-amber);
    font-weight: 600;
}

/* ============================================
   MAPPA ITALIA (SVG semplificato)
   ============================================ */
.map-section {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .map-section {
        grid-template-columns: 1fr 1fr;
    }
    .map-legend {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .map-section {
        grid-template-columns: 1fr;
    }
}

.map-legend {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-legend-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.map-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.italy-map {
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

.italy-map .zone {
    transition: all var(--transition-fast);
    cursor: pointer;
}

.italy-map .zone:hover {
    filter: brightness(1.2);
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.map-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.zone-details {
    display: grid;
    gap: 1rem;
}

.zone-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.zone-detail-card:hover {
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.zone-detail-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zone-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.zone-detail-icon.north { background: rgba(59, 130, 246, 0.15); }
.zone-detail-icon.center { background: rgba(16, 185, 129, 0.15); }
.zone-detail-icon.south { background: rgba(245, 158, 11, 0.15); }
.zone-detail-icon.sicily { background: rgba(239, 68, 68, 0.15); }
.zone-detail-icon.sardinia { background: rgba(139, 92, 246, 0.15); }

.zone-detail-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.zone-detail-load {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.zone-detail-value {
    text-align: right;
}

.zone-detail-price {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
}

.zone-detail-change {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   SEZIONE PREVISIONI
   ============================================ */
.forecast-section {
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
}

.forecast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.forecast-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.forecast-title-icon {
    font-size: 2rem;
}

.forecast-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.forecast-accuracy {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.accuracy-ring {
    width: 60px;
    height: 60px;
    position: relative;
}

.accuracy-ring svg {
    transform: rotate(-90deg);
}

.accuracy-ring circle {
    fill: none;
    stroke-width: 6;
}

.accuracy-ring .bg {
    stroke: var(--border-color);
}

.accuracy-ring .progress {
    stroke: var(--energy-green);
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 15.7; /* 90% accuracy */
}

.accuracy-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
}

.accuracy-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.accuracy-label strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.forecast-hour {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.forecast-hour:hover {
    border-color: var(--energy-green);
    transform: translateY(-4px);
}

.forecast-hour-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.forecast-hour-price {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.forecast-hour-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forecast-hour-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.forecast-hour-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.7;
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--energy-green);
}

.footer-bottom {
    max-width: 1600px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-badges {
    display: flex;
    gap: 1rem;
}

.footer-badge {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   ANIMAZIONI DI ENTRATA
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 1rem 0;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero {
        padding: 90px 1rem 20px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .news-ticker-label {
        padding: 0 8px;
        font-size: 0.65rem;
    }
    
    .news-item {
        font-size: 0.75rem;
    }
}

/* ============================================
   EFFETTI GLASSMORPHISM
   ============================================ */
.glass {
    background: rgba(26, 35, 50, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

/* ============================================
   SCROLLBAR PERSONALIZZATA
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   OVERLAY "IN COSTRUZIONE"
   Imposta SITO_IN_COSTRUZIONE = false per nasconderlo
   ============================================ */
.overlay-costruzione {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    /* Sfondo con gradiente animato */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #00b894 50%, #0984e3 75%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradienteOverlay 15s ease infinite;
}

.overlay-costruzione.nascosto {
    display: none !important;
}

@keyframes gradienteOverlay {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particelle decorative fluttuanti */
.overlay-particella {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: fluttuaOverlay 20s infinite;
    pointer-events: none;
}

.overlay-particella:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 10%; animation-delay: 0s; }
.overlay-particella:nth-child(2) { width: 60px; height: 60px; top: 70%; left: 80%; animation-delay: 2s; }
.overlay-particella:nth-child(3) { width: 40px; height: 40px; top: 40%; left: 5%; animation-delay: 4s; }
.overlay-particella:nth-child(4) { width: 100px; height: 100px; top: 80%; left: 20%; animation-delay: 6s; }
.overlay-particella:nth-child(5) { width: 50px; height: 50px; top: 20%; left: 85%; animation-delay: 8s; }

@keyframes fluttuaOverlay {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 0.6; }
}

/* Card centrale dell'overlay */
.overlay-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: apparizioneCard 1s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes apparizioneCard {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.overlay-icona {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: pulsazioneIcona 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulsazioneIcona {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.overlay-titolo {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: 'DM Sans', sans-serif;
}

.overlay-titolo span {
    background: linear-gradient(135deg, #00b894, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-messaggio {
    font-size: 1.25rem;
    color: #636e72;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 300;
}

.overlay-messaggio strong {
    color: #00b894;
    font-weight: 600;
}

/* Barra di progresso animata */
.overlay-progresso {
    background: #e0e0e0;
    border-radius: 50px;
    height: 8px;
    margin: 2rem 0;
    overflow: hidden;
}

.overlay-progresso-barra {
    height: 100%;
    background: linear-gradient(90deg, #00b894, #0984e3, #fdcb6e);
    background-size: 200% 100%;
    border-radius: 50px;
    animation: caricamentoOverlay 2s ease-in-out infinite;
    width: 85%;
}

@keyframes caricamentoOverlay {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sezione contatti nell'overlay */
.overlay-contatti {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.overlay-contatti p {
    color: #636e72;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.overlay-link-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #00b894, #0984e3);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.overlay-link-email:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.5);
}

.overlay-link-email svg {
    width: 20px;
    height: 20px;
}

/* Link Area Riservata nell'overlay */
.overlay-link-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    cursor: pointer;
}

.overlay-link-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.overlay-footer {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Responsive overlay */
@media (max-width: 768px) {
    .overlay-titolo { font-size: 1.75rem; }
    .overlay-messaggio { font-size: 1rem; }
    .overlay-card { padding: 2rem 1.5rem; }
    .overlay-icona { font-size: 4rem; }
}
