/* ====================================================== */
/* SETUP GLOBALE E VARIABILI                            */
/* ====================================================== */
:root {
    --colore-sfondo: #14213D;
    --colore-accento: #FEAE00;
    --colore-testo: #FFFFFF;
    --colore-bordi: #2a3a5a;
    --font-principale: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-principale);
    margin: 0;
    background-color: var(--colore-sfondo);
    color: var(--colore-testo);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
/* Add this to the end of the global styles section */
.bg-darker {
    background-color: #0c172c;
}
/* Add this new rule for scroll lock */
body.menu-open {
    overflow: hidden;
}

/* Helper class for white background sections */
.bg-white {
    background-color: var(--colore-testo);
    color: var(--colore-sfondo);
    
}

.bg-white .info-title,
.bg-white .cta-title {
    color: var(--colore-sfondo); /* Makes titles blue on white background */
}

.bg-white .info-subtitle strong,
.bg-white .cta-subtitle strong {
    color: var(--colore-accento); /* Keeps highlighted text yellow */
}


/* ====================================================== */
/* HEADER (Mobile First)                                 */
/* ====================================================== */
.site-header {
    padding: 15px 0;
    position: absolute;
    width: 100%;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    position: relative; /* Necessary for z-index to work */
    z-index: 101;      /* Puts the logo on the top layer */
}

.logo img {
    height: 100px;
}

.main-nav {
    display: none;
}

.nav-toggle {
    display: block;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: relative; /* Aggiunto: necessario per attivare lo z-index in ogni contesto */
    z-index: 101;      /* Forza il bottone a stare sopra il menu (che ha z-index: 100) */
}

/* New styles for the 3-span hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 21px; /* Height based on 3 lines + 2 gaps */
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--colore-testo);
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform-origin: center;
}

/* "X" transformation when the button is active */
.nav-toggle.is-active .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.nav-toggle.is-active .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Stile del menu di navigazione quando è attivo/aperto su mobile */
.main-nav.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 100px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: -webkit-fill-available;
  background-color: var(--colore-sfondo);
  z-index: 100;
}

.main-nav.is-active .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.main-nav.is-active a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--colore-testo);
    padding: 10px;
    transition: color 0.3s ease;
}

.main-nav.is-active a:not(.button-primary):hover {
    color: var(--colore-accento);
}

.main-nav.is-active .button-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 32px;
    width: auto;
    color: var(--colore-sfondo);
}

/* ====================================================== */
/* HERO SECTION (Mobile First)                           */
/* ====================================================== */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 60px 20px;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 100;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/F50.avif');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--colore-accento);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin: 0 auto 50px auto;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.cta-main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cta-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
}

.button-primary, .button-secondary {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.button-primary {
    background-color: var(--colore-accento);
    color: var(--colore-sfondo);
    border: 2px solid var(--colore-accento);
}

.button-secondary {
    background-color: transparent;
    color: var(--colore-testo);
    border: 2px solid var(--colore-bordi);
}

.button-primary:hover {
    background-color: #ffc43d;
    border-color: #ffc43d;
}

.button-secondary:hover {
    background-color: var(--colore-testo);
    color: var(--colore-sfondo);
    border-color: var(--colore-testo);
}

/* ====================================================== */
/* FOOTER (Mobile First)                                 */
/* ====================================================== */
.site-footer {
    padding: 60px 0 30px 0;
    background-color: #14213D;
    font-size: 0.9rem;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

.footer-column.about .logo {
    display: inline-block;
    margin-bottom: 15px;
}


.footer-description {
    max-width: 300px;
    margin: 0 auto 20px auto;
    opacity: 0.8;
    line-height: 1.5;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social a {
    color: var(--colore-testo);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--colore-accento);
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.footer-column.links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column.links li {
    margin-bottom: 10px;
}

.footer-column.links a {
    text-decoration: none;
    color: var(--colore-testo);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-column.links a:hover {
    opacity: 1;
}

.footer-divider {
    border: none;
    height: 1px;
    background-color: var(--colore-bordi);
    margin: 40px 0;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

.footer-bottom p {
    margin: 5px 0;
}

/* ====================================================== */
/* RESPONSIVE - Stili per Tablet e schermi più grandi    */
/* ====================================================== */
@media (min-width: 768px) {
    .container {
        padding-left: 40px;
        padding-right: 40px;
    }

    .nav-toggle {
        display: none;
    }

    .main-nav {
        display: block;
    }
    
    .nav-menu {
        display: flex;
        align-items: center;
        list-style: none;
        gap: 25px;
        margin: 0;
        padding: 0;
    }

    .nav-menu a {
        text-decoration: none;
        color: var(--colore-testo);
        font-weight: 600;
    }

    .nav-menu .button-primary {
        width: auto;
        padding: 8px 20px;
    }

    .nav-menu a.button-primary {
        color: var(--colore-sfondo);
    }

    .nav-menu a.button-primary:hover {
        color: var(--colore-sfondo);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }

    .button-primary, .button-secondary {
        width: auto;
    }
    
    /* Stili Responsive per il Nuovo Footer */
    .footer-main {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-column.about {
        flex: 2;
    }

    .footer-column.links {
        flex: 1;
    }

    .footer-column.about .logo {
        display: block;
    }

    .footer-description {
        margin-left: 0;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* ====================================================== */
/* RESPONSIVE - Stili per Desktop e schermi grandi       */
/* ====================================================== */
@media (min-width: 1024px) {
    .nav-menu {
        gap: 35px;
    }
}

/* ====================================================== */
/* SEZIONE TESTIMONIAL (Miki Biasion) - Corrected Version */
/* ====================================================== */
.testimonial-section {
    padding: 60px 0;
    min-height: 70vh; /* A good height for impact */
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* We need to ensure the inner containers can stretch */
.testimonial-section .container {
    flex-grow: 1;
}

.testimonial-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* CHANGED: This re-centers the content */
    text-align: center;   /* CHANGED: This re-centers the text */
    gap: 30px;
}


.testimonial-image img {
    width: 100%;
    max-width: 300px; /* Limit size on mobile */
    height: auto;
}

.testimonial-text {
    /* No specific styles needed for mobile layout */
}

.testimonial-intro {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.8;
}

.testimonial-name {
    font-size: 3rem;
    font-weight: 700;
    color: var(--colore-testo);
    margin: 5px 0;
    line-height: 1.1;
}

.testimonial-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--colore-accento); /* This is the line that makes the text yellow */
    font-weight: 600;
}

/* Stili per schermi più grandi (Tablet e Desktop) */
@media (min-width: 768px) {
    .testimonial-content {
        flex-direction: row; /* Side-by-side layout */
        text-align: left;
        align-items: stretch; /* KEY CHANGE: This makes the columns full-height */
        gap: 5%;
        height: 100%;
        min-height: 500px; /* Ensures a minimum height for the content */
    }

    .testimonial-image {
        flex-basis: 50%;
        max-width: 50%;
    }

    .testimonial-image img {
        width: 100%;
        height: 100%; /* KEY CHANGE: Makes the image fill the stretched column */
        object-fit: cover; /* Prevents image distortion */
        object-position: left center; /* ADD THIS LINE */
        max-width: none; /* Override mobile max-width */
        mask-image: linear-gradient(to right, black 75%, transparent 100%);
    }
    
    .testimonial-text {
        flex-basis: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Vertically centers the text */
        padding-left: 20px; /* Adds some space */
    }

    .testimonial-name {
        font-size: 4rem;
    }
}
/* ====================================================== */
/* SEZIONE STATS (ex-Features)                          */
/* ====================================================== */
.features-section {
    background-color: var(--colore-testo); /* Sfondo bianco */
    color: var(--colore-sfondo); /* Testo blu scuro di default */
    padding: 120px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr; /* Su mobile, una sola colonna */
    gap: 50px; /* Spazio tra gli elementi */
}

.stat-item {
    text-align: center; /* Centra il contenuto di ogni colonna */
}

.stat-number {
    font-size: 3.5rem; /* Grande */
    font-weight: 700;
    color: var(--colore-accento); /* Giallo */
    line-height: 1.1;
}

.stat-label {
    font-size: 1.5rem;
    color: var(--colore-sfondo); /* Blu */
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stili per schermi più grandi (Tablet e Desktop) */
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonne uguali */
        gap: 40px;
    }
    .stat-number {
        font-size: 4rem; /* Ancora più grande su desktop */
    }
}
/* ====================================================== */
/* SEZIONE INFO (Scegli l'auto, etc.)                     */
/* ====================================================== */
.info-section {
    padding: 80px 0;
    border-top: 1px solid var(--colore-bordi);
}

.info-content {
    display: flex;
    flex-direction: column; /* Su mobile, immagine sopra */
    gap: 40px;
}

.info-image img {
    border-radius: 16px; /* Aggiunge un po' di stile all'immagine */
}

.info-text {
    /* Il testo si adatta automaticamente */
}

.info-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--colore-accento); /* Titolo in giallo */
    margin: 0;
    line-height: 1.1;
}

.info-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 10px 0 20px 0;
}

.info-paragraph {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.8;
}

/* Stili per schermi più grandi (Tablet e Desktop) */
@media (min-width: 768px) {
    .info-content {
    flex-direction: row; /* Set this back to the default */
    align-items: center;
    gap: 5%;
}

/* ADD THIS NEW RULE for flipping sections */
.info-content.layout-reverse {
    flex-direction: row-reverse;
}


    .info-image {
        flex: 1; /* Occupa metà dello spazio */
    }

    .info-text {
        flex: 1; /* Occupa l'altra metà */
    }

    .info-title {
        font-size: 3rem;
    }
}
/* ====================================================== */
/* SEZIONE CTA (Come funziona)                            */
/* ====================================================== */
.cta-section {
    padding: 80px 0;
     /* A lighter border for the white background */
    background-color: var(--colore-testo); /* CHANGED: White background */
    color: var(--colore-sfondo);          /* ADDED: Default text is now blue */
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--colore-sfondo); /* CHANGED: Title is now blue */
    margin: 0 0 10px 0;
}

.cta-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

/* Stili per schermi più grandi */
@media (min-width: 768px) {
    .cta-title {
        font-size: 3rem;
    }
    .cta-subtitle {
        font-size: 1.4rem;
    }
}
/* ====================================================== */
/* SEZIONE IMMAGINE PROCESSO                              */
/* ====================================================== */
.image-section {
    padding: 80px 0;
    background-color: var(--colore-testo); /* Sfondo bianco */
    
}

.image-section img {
    margin: 0 auto; /* Centra l'immagine orizzontalmente */
    border-radius: 16px;
}
/* ====================================================== */
/* SEZIONE TESTO + IMMAGINE (Perchè investire)            */
/* ====================================================== */
.text-image-section {
    padding: 80px 0;
    background-color: var(--colore-testo); /* CHANGED: White background */
    color: var(--colore-sfondo);          /* ADDED: Default text is now blue */
    
}

.text-image-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.text-image-content .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--colore-sfondo); /* CHANGED: Title is now blue */
    margin: 0 0 10px 0;
}

.text-image-content .section-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 0 40px 0;
    opacity: 0.9;
}

.text-image-content .section-subtitle strong {
    color: var(--colore-accento); /* The highlighted text remains yellow */
}

.text-image-content .section-image img {
    border-radius: 16px;
}

/* Stili per schermi più grandi */
@media (min-width: 768px) {
    .text-image-content .section-title {
        font-size: 3rem;
    }
    .text-image-content .section-subtitle {
        font-size: 1.4rem;
    }
}
/* ====================================================== */
/* SEZIONE TESTIMONIANZE                                  */
/* ====================================================== */
.testimonials-section {
    padding: 80px 0;
    border-top: 1px solid var(--colore-bordi);
}

.testimonials-section .section-title {
    text-align: center;
    color: var(--colore-accento);
    font-size: 2.5rem;
    margin: 0 0 50px 0;
}

.testimonials-slider {
    width: 100%;
    overflow: hidden; /* Important for Swiper */
}

/* Make sure the cards inside the slides are full height */
.swiper-slide {
    display: flex;
    height: auto;
}

.testimonial-card {
    background-color: #0c172c;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--colore-bordi);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%; /* Ensure card fills the slide */
}

.testimonial-quote {
    font-style: italic;
    opacity: 0.9;
    margin: 0 0 25px 0;
    position: relative;
    padding-left: 30px;
}

.testimonial-quote::before {
    content: '“';
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--colore-accento);
    position: absolute;
    top: -20px;
    left: -10px;
    opacity: 0.2;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-name {
    font-weight: 700;
    margin: 0;
}

.author-title {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* Custom Swiper Styles */
.swiper-pagination-bullet {
    background-color: var(--colore-testo) !important; /* White for INACTIVE dots */
    opacity: 0.6 !important;
}

.swiper-pagination-bullet-active {
    background-color: var(--colore-accento) !important; /* Yellow for ACTIVE dot */
    opacity: 1 !important; /* Makes sure it's fully visible */
}

.swiper-button-next, .swiper-button-prev {
    display: none; /* Keeps the arrows hidden as requested */
}
/* ====================================================== */
/* SEZIONE CTA FINALE (Iscriviti)                         */
/* ====================================================== */
.final-cta-section {
    padding: 80px 0;
    background-color: var(--colore-accento); /* Sfondo Giallo */
    color: var(--colore-sfondo); /* Testo Blu Scuro */
}

.final-cta-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una colonna su mobile, tutto impilato */
    gap: 40px;
    align-items: center;
}

.final-cta-column {
    text-align: center;
}

.cta-image-content img {
    border-radius: 16px;
    margin-bottom: 20px; /* Spazio tra l'immagine e il suo testo sotto */
}

.final-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.final-cta-link {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--colore-sfondo);
    text-decoration: none;
    margin-bottom: 20px;
}

.final-cta-text {
    opacity: 0.9;
    margin-bottom: 30px;
}

.final-cta-text-secondary {
    font-style: italic;
    opacity: 0.8;
}

.button-dark {
    display: inline-block;
    background-color: var(--colore-sfondo);
    color: var(--colore-testo);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button-dark:hover {
    background-color: #000;
}


/* Stili per schermi grandi (Desktop) */
@media (min-width: 768px) {
    .final-cta-grid {
        grid-template-columns: 1fr 1fr; /* Layout a 2 colonne */
        gap: 5%;
        align-items: stretch;
    }

    .final-cta-column {
        text-align: left;
    }
    .final-cta-column.cta-image-content {
        justify-content: flex-start; /* Optional: Aligns image content to the top */
    }
}
/* ====================================================== */
/* STILI PAGINA FAQ                                       */
/* ====================================================== */
.page-title-section {
    padding: 150px 0 80px 0;
    text-align: center;
    
}

.page-title-section h1 {
    font-size: 3rem;
    color: var(--colore-accento);
    margin: 0 0 10px 0;
}

.page-title-section p {
    font-size: 1.2rem;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.8;
}

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

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

.faq-item {
    border-bottom: 1px solid var(--colore-bordi);
    padding: 20px 0;
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* Rimuove la freccia di default */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Icona + / - custom */
.faq-question::after {
    content: '+';
    font-size: 2rem;
    font-weight: 300;
    color: var(--colore-accento);
    transition: transform 0.3s ease;
}

.faq-item[open] > .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 20px 0 0 0;
    line-height: 1.7;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .page-title-section h1 {
        font-size: 4rem;
    }
    .faq-question {
        font-size: 1.4rem;
    }
}
/* ====================================================== */
/* STILI PAGINA CONTATTI                                  */
/* ====================================================== */
.contact-email-link {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--colore-accento);
    text-decoration: none;
    margin: 10px 0 25px 0;
    transition: opacity 0.3s ease;
}

.contact-email-link:hover {
    opacity: 0.8;
}

.contact-details p {
    margin: 5px 0;
    opacity: 0.8;
    line-height: 1.8;
}

.image-caption {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .image-caption {
        text-align: left;
    }
}
/* Color Corrections for Contact Section on Yellow BG */
.final-cta-section .info-title {
    color: var(--colore-sfondo); /* Changes title from yellow to blue */
}

.final-cta-section .image-caption {
    color: var(--colore-sfondo); /* Changes image caption to blue */
    opacity: 0.8;
}
.final-cta-section .contact-email-link {
    color: var(--colore-sfondo);
}
/* ====================================================== */
/* STILI PAGINA COMING SOON                               */
/* ====================================================== */
.coming-soon-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.coming-soon-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 20px 60px 20px; /* AGGIUNGI QUESTA RIGA */
}

.coming-soon-title {
    font-size: 3rem;
    color: var(--colore-accento);
    margin: 0 0 10px 0;
}

.coming-soon-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .coming-soon-title {
        font-size: 4.5rem;
    }
    .coming-soon-subtitle {
        font-size: 1.4rem;
    }
}
/* Removes the divider between consecutive white sections */
.bg-white + .bg-white {
    border-top: none;
}
/* Removes the divider ONLY between two consecutive white sections */
.bg-white + .bg-white {
    border-top: none !important;
}
/* Helper class to make specific titles yellow */
.text-yellow .info-title,
.text-yellow .info-subtitle {
    color: var(--colore-accento);
}
/* ====================================================== */
/* SEZIONE WHY INVEST (Perchè investire)                  */
/* ====================================================== */
.why-invest-section {
    padding: 80px 0;
    background-color: var(--colore-testo); /* White background */
    color: var(--colore-sfondo);
   
}

.why-invest-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--colore-sfondo); /* Blue title */
    margin: 0 0 60px 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.why-card {
    background-color: var(--colore-sfondo); /* CHANGED: Dark blue background for the card */
    border: 1px solid var(--colore-bordi);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.why-card:hover {
    transform: translateY(-8px);
}

.why-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background-color: var(--colore-accento);
}

.why-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--colore-sfondo);
}

.why-card h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: var(--colore-testo); /* CHANGED: White text */
}

.why-card p {
    color: var(--colore-testo); /* CHANGED: White text */
    opacity: .8;
    line-height: 1.5;
    font-size: 0.95rem;
}

.why-chart {
    margin: 80px auto 60px;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
}

.big-cta {
    display: block;
    width: max-content;
    margin: 0 auto;
    padding: 16px 40px;
    background: var(--colore-accento);
    color: var(--colore-sfondo);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.big-cta:hover {
    background-color: #ffc43d;
}

/* Responsive for the grid */
@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .why-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .why-invest-section .section-title {
        font-size: 3rem;
    }
}
/* Stile per il disclaimer di fine sezione */
.section-disclaimer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.7;
}
/* ====================================================== */
/* PAGINA GARAGE e EFFETTO FLIP                           */
/* ====================================================== */
.garage-page-section { padding: 80px 0; background-color: var(--colore-sfondo); }
.garage-section-title { font-size: 2rem; color: var(--colore-sfondo); margin: 0 0 30px 0; padding-bottom: 15px; border-bottom: 1px solid #e0e0e0; }
.garage-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 60px; }
.garage-card { perspective: 1500px; background: none; border: none; cursor: pointer; min-height: 450px; }
.garage-card:hover { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-radius: 16px; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.garage-card.is-flipped .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; background-color: #0c172c; border: 1px solid var(--colore-bordi); border-radius: 16px; color: var(--colore-testo); overflow: hidden; display: flex; flex-direction: column; }
.card-front .card-image img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.card-front .card-body { padding: 20px; flex-grow: 1; }
.card-front .card-title { font-size: 1.2rem; font-weight: 600; margin: 0.5; }
.card-front .card-footer { background-color: var(--colore-bordi); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-top: auto; }
.card-front .card-footer strong { font-size: 1.2rem; color: var(--colore-accento); }
.card-back { transform: rotateY(180deg); justify-content: center; align-items: center; text-align: center; padding: 20px; }
.card-back-title { font-size: 1.4rem; font-weight: 600; margin: 0 0 20px 0; color: var(--colore-accento); }
.card-back-actions { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.card-back-actions .button-primary { max-width: 100%; background-color: var(--colore-accento); color: var(--colore-sfondo); }
.back-link { color: var(--colore-testo); font-weight: 600; margin-top: 10px; text-decoration: underline; }


/* Responsive Grid per Garage */
@media (min-width: 600px) { .garage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .garage-grid { grid-template-columns: repeat(4, 1fr); } }

/* ====================================================== */
/* STILI PAGINA SCUDERIA CLUB (Layout a 2 sezioni)        */
/* ====================================================== */

/* Sezione 2: Corpo su sfondo bianco */
.club-content-section {
    padding: 80px 0;
    background-color: var(--colore-testo); /* Sfondo bianco */
    color: var(--colore-sfondo); /* Testo blu scuro */
    text-align: center;
}

.club-content-section .club-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: inline-block;
    text-align: left;
}

.club-content-section .club-benefits li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.club-content-section .club-benefits li svg {
    width: 28px;
    height: 28px;
    fill: var(--colore-accento);
    flex-shrink: 0;
}

.club-content-section .club-fee {
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.club-content-section .button-primary {
    padding: 15px 40px;
    font-size: 1.2rem;
}
/* ====================================================== */
/* STILI SEZIONE IMMAGINE (Pagina Scuderia Club)          */
/* ====================================================== */

.club-image-section {
    width: 100%;
    height: 60vh; /* Altezza pari al 60% dello schermo. Puoi cambiare questo valore. */
    background-color: #0c172c; /* Colore di sfondo di riserva */
    
    /* Inserisci qui il percorso della TUA immagine */
    background-image: url('images/ca_casino_square_2020_0108.jpg.webp'); 
    
    background-size: cover;
    background-position: center;
}
.card-body .card-conditions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  color: #E6E6E6; /* grigio elegante */
  margin-top: 8px;
  line-height: 1.4;
}

.card-body .card-conditions .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #16a34a; /* verde premium per check */
}

.card-body .card-conditions .brand {
  color: #FCA311; /* colore istituzionale EPOQ */
  font-weight: 600;
}
/* ====================================================== */
/* STILI PAGINA CHI SIAMO                                 */
/* ====================================================== */

.bg-off-white {
    background-color: #f5f5f5; /* Bianco Sporco */
    color: var(--colore-sfondo);
}

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

.founder-content {
    display: flex;
    flex-direction: column; /* Su mobile, immagine sopra */
    gap: 30px;
    align-items: center;
    text-align: center;
}

.founder-image {
    flex-shrink: 0;
}
.founder-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.founder-text h2 {
    font-size: 2rem;
    color: var(--colore-sfondo); /* Blu scuro */
    margin: 0;
}

.founder-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--colore-accento); /* Giallo */
    margin: 5px 0 20px 0;
}

.founder-text p {
    line-height: 1.8;
    opacity: 0.8;
}

/* Responsive per Desktop */
@media (min-width: 768px) {
    .founder-content {
        flex-direction: row; /* Immagine e testo affiancati */
        gap: 60px;
        text-align: left;
    }
    
    .founder-content.layout-reverse {
        flex-direction: row-reverse; /* Inverte l'ordine */
    }
    
    .founder-image img {
        width: 300px;
        height: 300px;
    }
}
/* ====================================================== */
/* STILI PAGINE LEGALI                                    */
/* ====================================================== */
.legal-page-main {
  display: block;        /* <-- togli il flex: è la causa */
  width: 100%;           /* (opzionale) esplicita piena larghezza */
  /* min-width: 100%; */ /* (opzionale) se vuoi essere super-prudente su Safari */
  background-color: var(--colore-testo);
  color: var(--colore-sfondo);
  padding: 120px 0 80px 0;
}

.legal-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* Una colonna su mobile */
    gap: 40px;
}

/* --- Stili Menu Laterale --- */
.legal-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Menu orizzontale su mobile */
    overflow-x: visible;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}
.legal-sidebar nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--colore-sfondo);
    font-weight: 600;
    border-radius: 8px;
    white-space: normal;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.legal-sidebar nav a:hover {
    opacity: 1;
    background-color: #f0f0f0;
}
.legal-sidebar nav a.active {
    opacity: 1;
    background-color: var(--colore-sfondo);
    color: var(--colore-testo);
}

/* --- Stili Contenuto --- */
.legal-content {
    max-width: 800px;
}
.legal-content h1 { font-size: 2.8rem; margin: 0 0 10px 0; }
.legal-content .last-updated { font-size: 0.9rem; opacity: 0.6; margin-bottom: 40px; border-bottom: 1px solid #e0e0e0; padding-bottom: 20px; }
.legal-content h2 { font-size: 1.8rem; margin: 40px 0 15px 0; }
.legal-content h3 { font-size: 1.4rem; margin: 30px 0 15px 0; }
.legal-content p { line-height: 1.8; margin-bottom: 20px; }

/* Responsive per Desktop */
@media (min-width: 1024px) {
    .legal-layout-wrapper {
        grid-template-columns: 220px 1fr; /* Due colonne su desktop */
        gap: 60px;
    }
    .legal-sidebar nav ul {
        flex-direction: column; /* Menu verticale su desktop */
        border-bottom: none;
        padding-bottom: 0;
    }
}
/* ====================================================== */
/* ALLINEAMENTO MENU LATERALE (Pagina Legale)             */
/* ====================================================== */

@media (min-width: 1024px) {
    .legal-sidebar nav {
        padding-top: 135px; /* Aggiunge spazio sopra il menu per allinearlo */
    }
}
/* ====================================================== */
/* STILI HEADER SEMPLIFICATO (Pagine Legali)              */
/* ====================================================== */

.legal-header .main-nav,
.legal-header .nav-toggle {
    display: none; /* Nasconde il menu e l'hamburger */
}

.legal-header .header-content {
    justify-content: space-between;
}

.back-button {
    font-weight: 600;
    color: var(--colore-sfondo);
    text-decoration: none;
    border: 2px solid var(--colore-bordi);
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--colore-testo);
    color: var(--colore-sfondo);
}
/* --- FIX TAGLI A DESTRA (Safari) --- */
.container, .header-content, .legal-layout-wrapper, .legal-body { min-width: 0; }
.legal-page-main { display:block; width:100%; }         /* evita shrink-to-fit */
html, body { overflow-x: visible; }                      /* niente taglio globale */
.legal-body, .legal-body * { overflow: visible; }        /* evita clipping discendenti */

.legal-body h1, .legal-body h2, .legal-body h3,
.legal-body p, .legal-body li { overflow-wrap:anywhere; word-break:break-word; }

.legal-sidebar nav ul { overflow-x:auto; -webkit-overflow-scrolling:touch; }
@media (max-width: 480px){ .legal-sidebar nav a { white-space:normal; } } /* niente pill “rigide” su mobile */