/* ============================
   1. SEZIONE HERO (Testi principali)
============================ */
.hero-section {
    text-align: center;
    padding: 4rem 1rem 1rem 1rem; /* Ridotto il padding inferiore */
    margin-bottom: 2.5rem; /* Dimezzato lo spazio tra bottoni e card (prima era 5rem) */
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main, #ffffff);
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted, #9ca3af);
    max-width: 800px;
    margin: 0 auto 3rem auto; /* Tanto spazio tra il testo e i bottoni */
    line-height: 1.6;
}

/* ============================
   2. BOTTONI & HERO ACTIONS
============================ */
.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; 
    gap: 1.5rem; /* Distanza laterale e verticale tra i bottoni */
}

/* Stile base per TUTTI i bottoni */
.btn-primary, .btn-secondary, .btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    white-space: nowrap; 
    min-height: 48px; 
    box-sizing: border-box;
    font-size: 1rem;
}

/* Colori specifici */
.btn-primary {
    background-color: var(--primary-color, #2563eb);
    color: #fff;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background-color: var(--primary-hover, #1d4ed8);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main, #ffffff);
    border: 2px solid #334155;
}

.btn-secondary:hover {
    background-color: #334155;
    color: #fff;
    transform: translateY(-2px);
}

.btn-google {
    gap: 0.8rem; /* Spazio tra l'icona G e il testo */
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.15);
}

/* ============================
   3. SEZIONE FEATURES (Griglia Card)
============================ */
/* ============================
   3. SEZIONE FEATURES (Centrata con Flexbox)
============================ */
.features-section {
    display: flex; /* Passiamo a flexbox */
    flex-wrap: wrap; /* Permette di andare a capo */
    justify-content: center; /* Centra orizzontalmente TUTTO, anche le card spaiate */
    gap: 2.5rem;
    padding: 0 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    flex: 1 1 350px; /* La card parte da 350px di base e si adatta */
    max-width: 420px; /* Fondamentale: evita che la 3° card diventi larga 1000px da sola */
    
    /* Il design figo di prima rimane intatto */
    background: linear-gradient(145deg, var(--surface-color, #1e293b), #0f172a);
    padding: 2.5rem; 
    border-radius: 16px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* (Qui sotto lascia intatto tutto il codice .feature-card::before, :hover, h2 e p) */

/* Linea di accento in alto che appare all'hover (effetto figo) */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color, #2563eb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px); /* Si alza un po' di più */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); /* L'ombra diventa più intensa */
    border-color: rgba(37, 99, 235, 0.2); /* Il bordo prende un leggero riflesso blu */
}

.feature-card:hover::before {
    opacity: 1; /* Accende la linea blu in alto */
}

.feature-card h2 {
    color: var(--primary-color, #3b82f6); /* Un blu un pelo più acceso per contrastare il buio */
    margin-bottom: 1.2rem;
    font-size: 1.5rem; /* Titolo leggermente più grande */
    font-weight: 800;
    letter-spacing: -0.5px;
}

.feature-card p {
    color: var(--text-muted, #94a3b8); /* Grigio-azzurrino chiaro e leggibile */
    font-size: 1.05rem; 
    line-height: 1.7; /* Più respiro tra le righe */
}

/* ============================
   4. RESPONSIVE (Tablet & Mobile)
============================ */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .features-section {
        grid-template-columns: 1fr; 
        max-width: 700px; /* Più largo su tablet */
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column; 
        gap: 1.2rem;
        width: 100%;
        max-width: 350px; /* Su mobile non facciamo tasti larghi mezzo metro */
        margin: 0 auto;
    }

    .btn-primary, .btn-secondary, .btn-google {
        width: 100%;
    }
}


/* ========================================== */
/* STILE COOKIE BANNER (DA AGGIUNGERE)        */
/* ========================================== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: var(--surface-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    z-index: 10001; /* Più alto di tutto, anche della navbar */
    display: none; /* Verrà attivato dal JS */
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.cookie-text { font-size: 0.9rem; color: var(--text-main); line-height: 1.4; }
.cookie-text a { color: var(--primary-color); text-decoration: underline; }

.cookie-btn-container { display: flex; gap: 0.8rem; flex-shrink: 0; }

.cookie-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid #475569;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner { flex-direction: column; text-align: center; bottom: 10px; }
}