@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #ffffff;
    --text: #111827; /* Darker, more modern gray */
    --text-muted: #4b5563;
    --accent: #5850ec; /* Vibrant Electric Blue as requested and seen in images */
    --accent-light: #f3f4f6;
    --border: #e5e7eb;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-padding-top: 80px; /* Accounts for the 72px sticky header */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    /* Subtle grid background as seen in user images */
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.main-wrapper {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* --- Layout --- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 30px; /* Increased for stronger margins */
}

.section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

h1 { font-size: clamp(40px, 8vw, 64px); margin-bottom: 24px; } /* Slightly smaller for 'less hardness' */
h2 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 24px; }
h3 { font-size: 28px; margin-bottom: 16px; }

p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 65ch;
}

.label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding: 4px 12px;
    background: rgba(88, 80, 236, 0.1);
    border-radius: 4px;
    margin-bottom: 20px;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 72px;
}

body {
    padding-top: 72px;
}

nav .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: white !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.nav-cta:hover {
    background: #4438ca;
}

/* --- Hamburger Menu --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) {
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        padding: 40px;
        transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        z-index: 999;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-links.active { 
        right: 0; 
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links a { font-size: 18px; }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px; /* Less rounded, more modern/structured like images */
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--text);
    color: white;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text);
}

/* --- Hero --- */
.hero {
    padding: 120px 0;
    text-align: left; /* Alignment check: left can feel more structured */
}

/* --- Content Blocks --- */
.block-text { grid-column: span 7; }
.block-visual { 
    grid-column: span 5;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

/* --- Grid Cards (Method & Portfolio) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 120px; /* Increased for more space */
}

.step-card {
    background: white;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 80px;
}

/* --- Industries Grid --- */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.industry-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.industry-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.industry-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.industry-item h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
}

/* --- Boost Maps Banner --- */
.boost-maps-banner {
    background: var(--text);
    color: white;
    padding: 64px;
    border-radius: 24px;
    margin-top: 48px; /* Reduced to bring it closer */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}

.boost-content { flex: 1; text-align: left; }
.boost-content h2 { color: white; margin-bottom: 16px; font-size: 32px; }
.boost-content p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }

.portfolio-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 350px;
    background: var(--accent-light);
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.portfolio-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 3s ease-in-out;
    transform: translateY(0);
}

.portfolio-card:hover img {
    transform: translateY(calc(-100% + 350px));
}

.portfolio-info {
    padding: 32px;
}

/* --- Pricing Section --- */
.pricing-section {
    background: #f9fafb;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- Pricing Grid --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
    margin-top: 64px;
    align-items: stretch;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.pricing-card.large { grid-column: span 6; }
.pricing-card.small { grid-column: span 3; }

.pricing-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.price-display {
    font-size: 56px;
    font-weight: 800;
    color: var(--text);
    margin: 16px 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.benefits-list li {
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Portfolio Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    font-family: sans-serif;
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    .lightbox-image {
        max-height: 75vh;
        object-fit: contain;
    }
    .lightbox-close {
        top: -50px;
        right: 10px;
        font-size: 40px; /* Bigger touch target */
    }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1024px) {
    .pricing-card.large, .pricing-card.small { grid-column: span 12; }
}

/* --- Footer --- */
footer {
    padding: 80px 0;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 64px;
}

.footer-brand p {
    font-size: 14px;
    margin-top: 12px;
    max-width: 300px;
    color: var(--text-muted);
}

.footer-nav {
    display: flex;
    gap: 64px;
}

.footer-nav h4 {
    font-size: 14px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-nav a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 13px;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-locali {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.footer-locali h4 {
    font-size: 11px;
    opacity: 0.5;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
}

.footer-links a {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.7;
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* --- Reveal --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive & Mobile First Overrides --- */
@media (max-width: 1024px) {
    .section { padding-top: 64px; padding-bottom: 64px; } /* tighter padding on mobile */
    .hero { text-align: left; padding-left: 30px !important; padding-right: 30px !important; }
    .hero .grid-12 { display: flex; flex-direction: column; align-items: flex-start; }
    .hero .block-text { order: 1; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
    .hero .block-text p { margin: 0 0 32px; text-align: left; }
    .hero .block-text ul { text-align: left; margin-bottom: 48px; }
    .hero .block-visual { order: 2; margin-top: 48px; } /* Image second */
    .hero .block-visual img { width: 100% !important; transform: none !important; } /* Stop overflow */
    
    .grid-12 { display: flex; flex-direction: column; gap: 40px; }
    .block-text, .block-visual { width: 100%; }

    .industries-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
    .pricing-grid { display: flex; flex-direction: column; }
    .portfolio-grid { grid-template-columns: 1fr; }
    
    .boost-maps-banner { 
        flex-direction: column; 
        text-align: center; 
        padding: 40px 24px;
        margin-top: 48px;
    }

    /* Footer Mobile */
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-nav {
        gap: 32px;
        justify-content: center;
        width: 100%;
    }

    .footer-links {
        gap: 8px 12px;
    }

    /* Prevent any element from breaking the layout */
    .hero .block-visual {
        max-width: 100%;
        overflow: hidden;
    }

    .hero .block-visual img {
        width: 100% !important;
        transform: none !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .industries-grid { grid-template-columns: 1fr !important; }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    .price-display { font-size: 40px; }
}

/* --- FAQ Accordion --- */
.faq-accordion {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 64px; /* Spazio tra le colonne */
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .faq-accordion {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.accordion-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.accordion-header {
    width: 100%;
    padding: 24px 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.accordion-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    padding-right: 40px;
}

.accordion-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: var(--accent);
    pointer-events: none; /* Impedisce che l'icona "rubi" il click al pulsante */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    padding-bottom: 0;
}

.accordion-item.is-open .accordion-content {
    max-height: 400px; /* Grande abbastanza per contenere il testo */
    padding-bottom: 24px;
}

.accordion-item.is-open .accordion-icon {
    transform: rotate(45deg); /* Trasforma il + in X o croce ruotata */
}

.accordion-content p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
}

/* --- Exit Intent Popup --- */
/* --- Native Brevo Modal --- */
.brevo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.brevo-modal-overlay.is-open {
    display: flex;
}

.brevo-modal-container {
    width: 95%;
    max-width: 540px;
    background: white;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease-out;
    overflow: hidden;
}

@media (max-width: 600px) {
    .brevo-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .brevo-modal-container iframe {
        flex: 1;
        height: 100% !important;
    }

    body {
        padding-top: 60px;
    }
    nav { height: 60px; position: fixed; top: 0; width: 100%; z-index: 9999; }
}

.brevo-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}

@media (max-width: 768px) {
    .brevo-modal-container {
        max-height: 85vh;
    }
}

/* --- Testimonial Slider --- */
.testimonial-slider {
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.slides-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide {
    min-width: 100%;
    padding-right: 20px;
}

.stars {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 14px;
}

.testimonial-text {
    font-size: 15px;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.testimonial-author {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.slider-dots {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .pricing-card.large, .pricing-card.small { grid-column: span 12; }
}
