@import url("../../includes/header.css");

:root {
    --bg: #ffffff;
    --bg2: #f9f9f9;
    --accent: #00b4d8;
    --text: #1a1a1a;
    --text-accent: #ffffff;
    --text-gray: #666666;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

/* Scroll margin per nav */
#problema,
#soluzione,
#target,
#come-funziona,
#prenota {
    scroll-margin-top: 100px;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    /* padding-top: 70px; */
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px; /* Padding base mobile */
}

/* --- TYPOGRAPHY & UTILITIES --- */
.pageTitle {
    color: var(--text);
    font-size: 2.5rem;
    font-weight: 900;
    margin: 1rem 0;
    text-align: center;
    line-height: 1.2;
}

.section-head-blue {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.2;
}

.section-head-gray {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.2;
}

.accent { color: var(--accent); }

.text-center { text-align: center; }

/* --- HERO SECTION --- */
.heroSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.text-section {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.copyHero {
    margin: 10px 0;
    color: var(--text);
    font-weight: 500;
    font-size: 1.1rem;
}

.copyHeroParagraph {
    margin: 0 0 20px;
    line-height: 1.6;
    color: var(--text-gray);
}

.cta {
    text-align: center;
    margin-top: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.cta a {
    text-decoration: none;
    background-color: var(--accent);
    color: var(--text-accent);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s all;
}

.cta a.secondary {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.2);
}

.mobile-text { display: inline; }
.desktop-text { display: none; }

/* --- CAROUSEL --- */
.carouselContainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.carousel {
    position: relative;
    height: 380px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    overflow: visible; /* Importante per non tagliare le ombre */
}

.carousel img {
    width: 220px;
    height: 340px;
    border-radius: 15px;
    position: absolute;
    transition: transform 0.6s ease, opacity 0.6s ease;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.carouselBtnContainer button {
    background-color: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    margin: 10px;
    border: none;
    border-radius: 50%;
}

/* --- SEZIONI INTERNE --- */
.section-divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 40px 0;
    width: 100%;
    max-width: 800px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.sub-headline {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    font-weight: 500;
}

/* PAIN SECTION */
.pain-section {
    padding: 40px 20px;
    background-color: #fff5f5;
    border-radius: 20px;
    width: 100%;
    margin: 20px 0;
}

.pain-headline {
    color: #e63946;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 30px;
    margin-top: 0px;
    padding-top: 0px;
}

.pain-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.pain-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column; /* Impilato su mobile */
    align-items: center;
    text-align: center; /* Centrato come richiesto */
    gap: 10px;
}

.pain-icon { font-size: 2.5rem; margin-bottom: 5px; }

.pain-closure { margin-top: 30px; font-size: 1.1rem; }
.impact-text { font-weight: 800; font-size: 1.3rem; color: #e63946; }

/* SOLUTION SECTION */
.solution-section { padding: 40px 0; }

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: white;
    border: 1px solid #eee;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center; /* Centrato */
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.feature-card h4 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 10px;
}

/* TARGET SECTION */
.target-section { padding: 40px 0; width: 100%; }
.target-container { display: flex; flex-direction: column; gap: 20px; }

.target-box {
    padding: 30px;
    border-radius: 15px;
    flex: 1;
}

.target-box.yes { background-color: #e6fffa; border: 2px solid #38b2ac; }
.target-box.no { background-color: #fff5f5; border: 2px solid #fc8181; opacity: 0.9; }

.target-box h3 { margin-top: 0; font-size: 1.4rem; }
.target-box ul { list-style: none; padding: 0; text-align: left; }
.target-box ul li { margin-bottom: 12px; padding-left: 25px; position: relative; font-weight: 500; }
.target-box ul li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.target-box.yes ul li:before { background: #38b2ac; }
.target-box.no ul li:before { background: #fc8181; }

/* STEPS SECTION */
.steps-section { padding: 60px 0; text-align: center; }

.steps-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 250px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4);
}

.step-arrow {
    font-size: 2rem;
    color: #ccc;
    transform: rotate(90deg);
}

.guarantee {
    font-weight: 700;
    font-size: 1.2rem;
    background: #f0f0f0;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
}

/* CTA & FAQ */
.cta-section {
    width: 100%;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    padding: 40px 20px; /* Ridotto padding verticale */
    text-align: center;
    border-radius: 20px;
    margin: 40px 0;
    border: 2px dashed var(--accent);
}

.cta-title { font-size: 1.8rem; color: var(--accent); margin-bottom: 10px; }
.cta-sub { color: #555; margin-bottom: 30px; }

/* Calendly Override */
.calendly-placeholder div {
    padding: 10px !important; /* Ridotto padding interno */
    background: transparent !important;
}

.faq-section { width: 100%; margin: 60px 0; }
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fcfcfc;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
}
.faq-item strong { display: block; margin-bottom: 10px; color: var(--accent); font-size: 1.1rem; }
.faq-item p { margin: 0; color: #555; font-size: 0.95rem; line-height: 1.5; }

.final-close { padding: 60px 0; text-align: center; }
.final-close h3 { font-size: 2rem; margin-bottom: 20px; }

/* === DESKTOP MEDIA QUERIES (min-width: 1080px) === */
@media (min-width: 1080px) {
    main { padding: 0 40px; }

    /* Hero Layout */
    .heroSection {
        flex-direction: row;
        justify-content: space-between;
        gap: 4rem;
        padding: 60px 0;
        text-align: left; /* Reset per Hero */
    }

    .text-section {
        width: 45%;
        align-items: flex-start; /* Allinea a sinistra SOLO in hero */
        text-align: left;
    }
    
    .pageTitle { font-size: 3.5rem; text-align: left; }
    .cta { justify-content: flex-start; }
    
    .mobile-text { display: none; }
    .desktop-text { display: inline; }

    .carouselContainer { width: 50%; margin-top: 0; }
    .carousel { height: 500px; }
    .carousel img { width: 280px; height: 440px; }

    /* Griglie Desktop */
    .pain-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .pain-item { flex-direction: row; text-align: left; padding: 30px; } /* Icona a sinistra su desktop */
    
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    
    .target-container { flex-direction: row; }
    
    .steps-container { flex-direction: row; justify-content: center; gap: 50px; }
    .step-arrow { transform: rotate(0deg); } /* Freccia destra */
    
    .faq-grid { grid-template-columns: repeat(2, 1fr); }

    /* Centratura specifica desktop */
    .section-head-blue, 
    .section-head-gray,
    .pain-headline,
    .sub-headline,
    .steps-section h2,
    .final-close h3 {
        text-align: center; /* Forza centratura titoli sezioni */
    }
    
    .container-narrow {
        text-align: center;
    }
}

@media (max-width: 820px) {
    .desktop-text { display: none; }
    .mobile-text { display: inline; }
}

.calendly-spinner,
.calendly-bounce1,
.calendly-bounce2,
.calendly-bounce3 {
    display: none !important;
}