/*
+--------------------+
| COPYRIGHT (C) 2025 |
|    ATHENAEUP SRL   |
|   FRANCESCO ADAMO  |
+--------------------+
*/

/* ==================================================
   1. VARIABILI E RESET GLOBALE
   ================================================== */
:root {
    --primary-color: #0056b3;
    --primary-dark: #003d82;
    --secondary-color: #f0ad4e;
    --secondary-dark: #df982f;
    --light-bg: #f8f9fa;
    --text-color: #343a40;
    --white: #ffffff;
    --grey: #6c757d;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    padding-top: 40px; /* Spazio per la top-bar */
    position: relative;
}

body.menu-open {
    overflow: hidden;
}


/* ==================================================
   2. ELEMENTI RIUTILIZZABILI (Layout e Bottoni)
   ================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    border-bottom: 1px solid #eee;
    scroll-margin-top: 120px; /* 80px (header) + 40px (top-bar) */
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    max-width: 700px;
    margin: -30px auto 40px;
    color: var(--grey);
}

.cta-button,
.cta-button-secondary {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button,
button.cta-button,
a.cta-button {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(240, 173, 78, 0.4);
}

.cta-button:hover,
button.cta-button:hover,
a.cta-button:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(240, 173, 78, 0.5);
}

.cta-button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}


/* ==================================================
   3. TOP BAR E HEADER
   ================================================== */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
}

.top-bar p {
    margin: 0;
}

.top-bar a {
    color: var(--white);      /* Mantiene il testo bianco */
    text-decoration: none;    /* Rimuove la sottolineatura di default */
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: var(--secondary-color); /* Diventa giallo/oro in hover */
    text-decoration: underline;    /* Sottolinea solo quando ci passi sopra */
}

.main-header {
    position: sticky;
    top: 40px;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 80px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    max-height: 50px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-dark);
}

.nav-links .nav-cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
}

.nav-links .nav-cta:hover {
    color: var(--white);
    background-color: var(--primary-dark);
}


/* ==================================================
   4. HERO SECTION
   ================================================== */
.hero {
    background: linear-gradient(to right, #eef5ff, #ffffff);
    padding: 40px 0 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-big-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--secondary-dark);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--grey);
    margin-bottom: 40px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 25px 35px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.badge {
    font-weight: 700;
    color: var(--primary-color);
}

.badge i {
    color: var(--secondary-color);
    margin-right: 8px;
}

.no-break {
    display: inline-block;
}


/* ==================================================
   5. ALTRE SEZIONI (Vantaggi, Come Funziona, Corsi, FAQ)
   ================================================== */
.benefits-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-card {
    background-color: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.benefit-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.how-it-works-section {
    padding: 80px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.step {
    text-align: center;
    max-width: 30%;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-arrow {
    font-size: 2rem;
    color: #ccc;
    margin-top: 50px;
}

.testimonials-section {
    padding: 80px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background-color: var(--light-bg);
    border: 1px solid #e9ecef;
    padding: 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.testimonial-stars {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    color: var(--grey);
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.courses-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.courses-list ul {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px;
    display: inline-block;
    text-align: left;
    columns: 2;
    gap: 20px;
}

.courses-list li {
    margin-bottom: 10px;
    font-weight: 500;
}

.courses-list i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.faq-section {
    padding: 80px 0;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding-bottom: 20px;
    margin: 0;
}

.contact-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

/* --- Stili per la Nuova Sezione Mappa --- */
.map-section {
    padding-bottom: 60px;
    border-bottom: none; /* Rimuoviamo il bordo inferiore */
}

/* Contenitore per rendere la mappa responsive */
.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 50%; /* Aspect Ratio della mappa (altezza / larghezza) */
    margin-top: 40px;
    border: 3px solid var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Stili per la Nuova Sezione Galleria --- */
.gallery-section {
    padding: 80px 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 15px;
    margin-top: 50px;
}

.photo-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assicura che l'immagine riempia lo spazio senza distorcersi */
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.photo-item img:hover {
    transform: scale(1.05);
    filter: brightness(0.9);
}

/* Stile per un'immagine pi첫 alta nella griglia */
.photo-item.tall {
    grid-row: span 2;
}

/* Stile per un'immagine pi첫 larga nella griglia (opzionale) */
.photo-item.wide {
    grid-column: span 2;
}

/* --- Stili per la Lightbox --- */
.lightbox {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #ccc;
}

/* --- Stili per la Nuova Sezione Partnership --- */
.partnership-section {
    background-color: #eef5ff; /* Un azzurro molto leggero per farla risaltare */
    padding: 40px 0; /* Sezione più sottile per un look a "fascia" */
    border-bottom: 1px solid #dee2e6;
}

.partnership-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.partnership-logo img {
    max-height: 80px; /* Adatta l'altezza secondo le proporzioni del logo */
    width: auto;
}

.partnership-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.partnership-text p {
    margin: 0;
    font-size: 1rem;
    color: var(--grey);
    max-width: 600px; /* Limita la larghezza del testo per una migliore leggibilità */
}

/* ==================================================
   6. MODULO DI CONTATTO E FOOTER
   ================================================== */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 400px;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--grey);
    margin-top: 5px;
}

.form-buttons-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.form-buttons-container .cta-button,
.form-buttons-container .cta-button-whatsapp {
    width: 100%;
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--grey);
    width: 100%;
}

.or-divider .line {
    flex-grow: 1;
    height: 1px;
    background-color: #ccc;
}

.or-divider span:not(.line) {
    padding: 0 15px;
    font-weight: 700;
    font-size: 0.9rem;
}

.cta-button-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    background-color: #25D366;
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.cta-button-whatsapp:hover {
    background-color: #1DA851;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

#form-status {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 700;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-dark);
    color: var(--white);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Fix per i link nel Footer --- */
footer a {
    color: var(--white);      /* Lo rende bianco come il resto del testo */
    text-decoration: none;    /* Rimuove la sottolineatura standard */
    font-weight: 700;         /* Lo rende un po' più evidente (grassetto) */
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color); /* Diventa giallo/oro quando ci passi sopra */
    text-decoration: underline;    /* Aggiunge la sottolineatura solo in hover */
}

/* ==================================================
   7. ELEMENTI FISSI (WhatsApp, Scroll-Top)
   ================================================== */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 52px;
    height: 52px;
    background-color: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 999;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0.3s, background-color 0.3s;
}

#back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: scale(1.1);
    background-color: var(--secondary-dark);
}

.floating-whatsapp.hidden-by-menu,
#back-to-top.hidden-by-menu {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}


/* ==================================================
   8. MENU MOBILE E RESPONSIVE
   ================================================== */
.hamburger-menu,
.mobile-nav,
.menu-overlay {
    display: none;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 992px) {
    body {
        padding-top: 36px;
    }

    h2 {
        font-size: 2.2rem;
    }

    .main-header {
        top: 36px;
    }

    .nav-container {
        justify-content: center;
        position: relative;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        user-select: none;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .hamburger-menu span {
        width: 30px;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 10px;
        transition: all 0.3s ease-in-out;
        position: relative;
    }

    .hamburger-menu.is-active span:nth-of-type(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger-menu.is-active span:nth-of-type(2) { opacity: 0; }
    .hamburger-menu.is-active span:nth-of-type(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .mobile-nav,
    .menu-overlay {
        display: block;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100%; /* Full height */
        background-color: var(--primary-dark);
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 999;
        
        /* LAYOUT FIXES */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Aligns items to top (safe) instead of center */
        padding-top: 140px; /* Pushes content down to look centered, but safe */
        padding-bottom: 40px; /* Extra space at bottom */
        overflow-y: auto; /* ENABLE SCROLLING for short phones */
    }

    .mobile-nav.is-open {
        transform: translateX(0);
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0 20px;
        margin: 0;
    }

    .mobile-nav li { 
        text-align: center; 
        margin-bottom: 15px; /* Reduced from 25px to tighten the menu */
    }

    .mobile-nav a {
        color: var(--white);
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 700;
        text-transform: uppercase;
        padding: 10px;
        display: block;
    }

    .mobile-nav .mobile-nav-cta,
    .mobile-nav .mobile-nav-whatsapp {
        display: inline-block;
        padding: 10px 25px;
        border-radius: 50px;
        transition: background-color 0.3s, color 0.3s;
        width: 100%;
    }
    
    .mobile-nav .mobile-nav-cta {
        border: 2px solid var(--white);
    }

    .mobile-nav .mobile-nav-cta:hover {
        background-color: var(--white);
        color: var(--primary-dark);
    }

    .mobile-nav .mobile-nav-whatsapp {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background-color: #25D366;
        border: 2px solid #25D366;
    }

    .mobile-nav .mobile-nav-whatsapp:hover {
        background-color: #1DA851;
        border-color: #1DA851;
    }
    
    .hero-big-logo {
        max-width: 140px; /* Leggermente più piccolo su mobile */
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .partnership-container {
        flex-direction: column; /* Impila logo e testo in verticale */
        text-align: center;
        gap: 20px;
    }

    .partnership-text h3 {
        font-size: 1.2rem;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 90%;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .courses-list ul {
        columns: 1;
    }
	
	.photo-grid {
        grid-template-columns: repeat(2, 1fr); /* Griglia a 2 colonne su tablet */
        grid-auto-rows: 200px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .photo-grid {
        grid-template-columns: 1fr; /* Griglia a 1 colonna su smartphone */
        grid-auto-rows: 250px;
    }
    /* Rimuoviamo gli span per un layout pi첫 semplice */
    .photo-item.tall, .photo-item.wide {
        grid-row: span 1;
        grid-column: span 1;
    }
}