/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Brand Colors */
    --clr-cyan: #009FE3;
    --clr-brand-dark: #002B49; 
    --clr-cyan-10: rgba(0, 159, 227, 0.1);
    --clr-orange: #EC7F20;
    --clr-orange-10: rgba(236, 127, 32, 0.1);
    --clr-orange-hover: #D67018;
    --clr-dark: #1D3557;
    --clr-gray: #87888A;
    --clr-gray-light: #d1d5db;
    --clr-light-gray: #F4F6F8;
    --clr-white: #FFFFFF;
    
    /* Typography */
    --font-primary: 'Outfit', Arial, sans-serif;
    
    /* Spacing */
    --container-max: 1300px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-primary); color: var(--clr-dark); line-height: 1.6; background-color: var(--clr-white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; transition: color 0.3s; }
ul { list-style: none; }

/* Utilities */
.text-cyan { color: var(--clr-cyan) !important; }
.text-orange { color: var(--clr-orange); }
.text-white { color: var(--clr-white) !important; }
.text-dark { color: var(--clr-dark); }
.text-brand-dark { color: var(--clr-brand-dark); }
.text-gray { color: var(--clr-gray); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }
.m-0 { margin: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.pt-5 { padding-top: 3rem; }
.pb-5 { padding-bottom: 3rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 3rem; padding-right: 3rem; }
.p-0 { padding: 0 !important; }
.p-4 { padding: 1.5rem !important; }
.py-5 { padding-top: 4rem; padding-bottom: 4rem; }
.py-xl { padding-top: 6rem; padding-bottom: 6rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; }
.max-w-1000 { max-width: 1000px; }
.bg-white { background-color: var(--clr-white); }
.bg-light-gray { background-color: var(--clr-light-gray); }
.bg-cyan-10 { background-color: var(--clr-cyan-10); }
.bg-orange-10 { background-color: var(--clr-orange-10); }
.bg-orange { background-color: var(--clr-orange); }
.bg-brand-dark { background-color: var(--clr-brand-dark); }
.border-cyan-light { border: 1px solid rgba(0, 159, 227, 0.1); }
.border-white { border-color: var(--clr-white) !important; }
.opacity-80 { opacity: 0.8; }
.overflow-hidden { overflow: hidden; }
.object-cover { width: 100%; height: 100%; object-fit: cover; }
.object-contain { width: 100%; height: 100%; object-fit: contain; }
.hover-underline:hover { text-decoration: underline; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.rounded-img { border-radius: 16px; }

/* Typo */
h1, h2, h3, h4 { font-weight: 700; color: var(--clr-dark); }
.line-tight { line-height: 1.15; }
.title-primary { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.05; }
.subtitle-primary { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 400; line-height: 1.4; }
h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.2; }
h3 { font-size: 1.8rem; line-height: 1.3; }
.huge-title { font-size: clamp(2.5rem, 5vw, 3.8rem); letter-spacing: -1px; line-height: 1.1; }
.text-large { font-size: 1.25rem; }
.text-xl { font-size: 2.2rem; }
.text-small { font-size: 0.9rem; }
.caption-text { font-style: italic; letter-spacing: 0.5px; }
.lead-text { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 400; line-height: 1.7; }
.vantaggio-testo { font-size: 1.4rem; font-weight: 700; color: var(--clr-brand-dark); line-height: 1.4; }

/* Font size scalato e leggero per la Hero Section box, niente wrap forzato */
.hero-feature-text { font-size: clamp(1.1rem, 1.5vw, 1.4rem); line-height: 1.2; }

/* Container */
.container { width: 90%; max-width: var(--container-max); margin: 0 auto; }
.section { padding: 6rem 0; position: relative; }

/* ==========================================================================
   Header Glass Dinamico
   ========================================================================== */
.site-header {
    height: 100px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: fixed;
    top: 0; left: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.85); 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; max-width: 1500px; margin: 0 auto; padding: 0 40px;
}
.logo img { max-height: 45px; transition: transform 0.3s ease; }
.logo img:hover { transform: scale(1.05); }

.main-nav ul { display: flex; gap: 2rem; align-items: center; }

.main-nav a:not(.btn-nav) { 
    color: var(--clr-white); 
    font-weight: 600; 
    font-size: 1.05rem; 
    transition: color 0.3s ease;
}
.main-nav a:not(.btn-nav):hover { color: var(--clr-orange); }

.site-header.scrolled .main-nav a:not(.btn-nav) { color: var(--clr-brand-dark); }
.site-header.scrolled .main-nav a:not(.btn-nav):hover { color: var(--clr-cyan); }

.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 10001; }
.hamburger, .hamburger::before, .hamburger::after { 
    display: block; width: 30px; height: 3px; 
    background-color: var(--clr-white); 
    transition: 0.3s; position: relative; 
}
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.site-header.scrolled .hamburger,
.site-header.scrolled .hamburger::before,
.site-header.scrolled .hamburger::after {
    background-color: var(--clr-brand-dark);
}

/* ==========================================================================
   Hero & Animated Gradient Backgrounds
   ========================================================================== */
.hero-section {
    position: relative; width: 100%; min-height: 100vh; display: flex;
    align-items: center; padding-top: 130px; padding-bottom: 50px; overflow: hidden;
}

.promo-hero { position: relative; width: 100%; overflow: hidden; }

.animated-gradient-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #001B36; overflow: hidden; z-index: 1;
}

.ag-blob {
    position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.85;
    animation: drift 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.ag-blob-1 { width: 80vw; height: 80vw; background: #009FE3; top: -20%; left: -20%; }
.ag-blob-2 { width: 70vw; height: 70vw; background: #007BB3; bottom: -20%; right: -20%; animation-delay: -3s; }
.ag-blob-3 { width: 60vw; height: 60vw; background: #00C6FF; top: 20%; left: 10%; animation-delay: -6s; }

@keyframes drift {
    0% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.3) translate(30vw, -25vh); }
    66% { transform: scale(0.7) translate(-20vw, 30vh); }
    100% { transform: scale(1.4) translate(25vw, 15vh); }
}

.z-10 { z-index: 10; position: relative; }

/* ==========================================================================
   Bento Box Design System
   ========================================================================== */
.glass-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 32px; padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.bento-card {
    background: var(--clr-white); border-radius: 24px; padding: 2.5rem;
    border: 1px solid rgba(0, 159, 227, 0.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
    display: flex; flex-direction: column;
}

.shadow-medium { box-shadow: 0 10px 30px rgba(29, 53, 87, 0.06); }
.shadow-lg { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); } 

.bento-card.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(29, 53, 87, 0.12);
}

/* Grids */
.hero-bento-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 90%; max-width: var(--container-max); margin: 0 auto; }
.hero-right-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto 1fr; gap: 24px; }

.img-box { 
    grid-column: 1 / -1; 
    min-height: 250px; 
    padding: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Fix altezze uguali Hero Boxes */
.small-bento { padding: 1.8rem 1.5rem; display: flex; align-items: center; justify-content: center; height: 100%; }

.perche-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.align-stretch { align-items: stretch; } 
.h-100 { height: 100%; justify-content: center; }

.bento-2-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.bento-3-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bento-4-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Badge Promozionale Overlap */
.badge-overlapping {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(236, 127, 32, 0.3);
}

/* Didascalie Prima/Dopo */
.badge-top {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: var(--clr-brand-dark);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.badge-bottom {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: var(--clr-brand-dark);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Helpers Distanze */
.flex-row-center-gap { display: flex; flex-direction: row; align-items: center; gap: 1rem; }
.box-gap-large { gap: 1.5rem; }

/* ==========================================================================
   UI Elements & Graphics
   ========================================================================== */
.icon-svg {
    width: 36px; height: 36px; 
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.icon-wrap {
    width: 70px; height: 70px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}
.icon-small { width: 48px; height: 48px; }
.icon-small .icon-svg { width: 24px; height: 24px; }

.semicircle {
    width: 100px; height: 50px;
    border-bottom-left-radius: 100px; border-bottom-right-radius: 100px;
    border: 22px solid var(--clr-cyan); border-top: 0;
    display: inline-block; box-sizing: border-box;
}

.semi-anim-float { animation: semiFloat 3s ease-in-out infinite; }
@keyframes semiFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.stopwatch-wrapper {
    color: var(--clr-orange);
    animation: tick 1.5s infinite ease-in-out;
}
.icon-huge { width: 140px; height: 140px; } 
.w-100 { width: 100%; } .h-100 { height: 100%; }

@keyframes tick {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.05); }
}

.list-checked { list-style: none; padding: 0; }
.list-checked li { position: relative; padding-left: 2rem; margin-bottom: 0.8rem; }
.list-checked li::before { content: '✓'; color: var(--clr-orange); position: absolute; left: 0; top: 0; font-weight: bold; font-size: 1.2rem; }

/* Buttons */
.btn {
    display: inline-block; padding: 1.2rem 2.5rem; border-radius: 50px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    text-align: center; cursor: pointer; transition: all 0.3s; border: none;
}
.btn-orange { background-color: var(--clr-orange); color: var(--clr-white) !important; }
.btn-orange:hover { background-color: var(--clr-orange-hover); box-shadow: 0 10px 20px rgba(236,127,32,0.3); transform: translateY(-3px); }

.btn-nav { padding: 0.8rem 1.8rem; font-size: 0.95rem; margin-left: 1rem; }
.btn-huge { font-size: 1.4rem; padding: 1.5rem 4rem; }

.btn-wrap-bg {
    background-color: rgba(236, 127, 32, 0.15);
    padding: 15px;
    border-radius: 80px;
    display: inline-block;
}

.pulse-btn { animation: pulseShadow 2s infinite; }
@keyframes pulseShadow {
    0% { box-shadow: 0 0 0 0 rgba(236, 127, 32, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(236, 127, 32, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 127, 32, 0); }
}

.price-strike { text-decoration: line-through; }
.price-big { font-weight: 800; }
.badge-discount { background: var(--clr-orange); padding: 0.5rem 1.5rem; border-radius: 50px; font-weight: 700; font-size: 1.2rem; display: inline-block; }

.flex-col-center-left { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.flex-col-center { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.flex-row-center { display: flex; flex-direction: row; align-items: center; }
.align-center { align-items: center; }

/* ==========================================================================
   CTA Final Section (Parallax & Multiply Overlay)
   ========================================================================== */
.cta-final-bg {
    position: relative;
    background-image: url('images/sfondo-cta-pazienti-2-scaled.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallasse */
    z-index: 1;
}

/* Sfondo Brand Dark con effetto Multiply */
.cta-final-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--clr-brand-dark);
    mix-blend-mode: multiply;
    opacity: 0.90; 
    z-index: -1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--clr-brand-dark);
    padding: 80px 5%; 
}
.footer-container { max-width: 800px; margin: 0 auto; }
.footer-logo { max-width: 180px; transition: transform 0.3s ease; }
.footer-logo:hover { transform: scale(1.05); }

/* ==========================================================================
   Animations Intersection
   ========================================================================== */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-bento-wrapper, .perche-grid { grid-template-columns: 1fr; }
    .hero-section { min-height: auto; padding-bottom: 80px; }
    .bento-2-grid, .bento-3-grid, .bento-4-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-right-grid { grid-template-columns: repeat(3, 1fr); } 
    .glass-box { padding: 2.5rem; }

    /* Immagine di sfondo CTA Responsive Tablet */
    .cta-final-bg { background-image: url('images/sfondo-cta-pazienti-tablet.webp'); }
}

@media (max-width: 768px) {
    .site-header { padding: 0; height: 80px; background: rgba(255, 255, 255, 0.4); }
    .header-container { padding: 0 20px; }
    
    .main-nav { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); transition: 0.4s; overflow-y: auto; }
    .main-nav.active { left: 0; }
    .main-nav ul { flex-direction: column; padding: 3rem 0; gap: 2rem; }
    
    .site-header .main-nav a:not(.btn-nav),
    .site-header.scrolled .main-nav a:not(.btn-nav) { color: var(--clr-brand-dark) !important; }
    
    .btn-nav { margin-left: 0; }
    .mobile-menu-toggle { display: block; }
    .mobile-menu-toggle.active .hamburger { background-color: transparent !important; }
    .mobile-menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
    .mobile-menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }
    
    .bento-2-grid, .bento-3-grid, .bento-4-grid { grid-template-columns: 1fr; }
    .hero-right-grid { grid-template-columns: 1fr; grid-template-rows: auto; } 
    .section { padding: 4rem 0; }
    .title-primary { font-size: 2.5rem; }
    .glass-box, .bento-card { padding: 2rem; }

    /* Immagine di sfondo CTA Responsive Mobile - Disabilito fixed per evitare problemi iOS */
    .cta-final-bg { 
        background-image: url('images/sfondo-cta-pazienti-mobile.webp'); 
        background-attachment: scroll;
    }
}