/* =========================================
   VARIABILI GLOBALI E SETUP
========================================= */
:root {
    --text-main: #0f172a;
    --text-sec: #64748b;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --green-main: #10b981;  
    --green-dark: #059669;
    --green-light-bg: #ecfdf5;
    --card-bg: #ffffff;
    --card-border: #f1f5f9;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-soft: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --border-rad: 16px;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.bg-light { background-color: var(--bg-light); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-5 { margin-bottom: 3rem; }
.w-100 { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* =========================================
   TIPOGRAFIA & TITOLI
========================================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
}

.top-line-sep {
    height: 3px;
    width: 40px;
    background: var(--green-main);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }

/* =========================================
   COMPONENTI CLEAN E BOTTONI
========================================= */
.clean-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff; /* Sfondo solido */
    padding: 15px 5%;
    transition: var(--transition-fast);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* Ombra leggera per staccarlo dallo sfondo */
}

.clean-nav .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-main);
    z-index: 1001; /* Sopra il menu mobile */
}

.logo-icon {
    color: var(--green-main);
    font-size: 1.4rem;
}

.nav-links {
    display: flex; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 40px;
    position: fixed;
    top: 0;
    right: -100vw; /* Menu chiuso lontano dallo schermo */
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    z-index: 998;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 0;
}

.nav-links.active {
    right: 0;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.8rem; /* Font più grande per il full-screen mobile */
    transition: var(--transition-fast);
}

.nav-links li a:hover { color: var(--green-main); }

html.no-scroll, body.no-scroll {
    overflow: hidden !important;
}

.hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
    z-index: 1001; /* Sopra il menu mobile */
}

.nav-cta {
    display: none;
    background: var(--green-main);
    color: #fff;
    padding: 10px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.nav-cta:hover { background: var(--green-dark); }

/* Buttons */
.btn-primary, .btn-secondary, .btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--green-main);
    color: #fff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-white {
    background: #fff;
    color: var(--green-main);
}
.btn-white:hover {
    background: #f1f5f9;
}

.action-btn-full { width: 100%; text-align: center; }

/* Cards & Containers */
.clean-container {
    max-width: 1100px;
    margin: 0 auto;
}

.clean-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-rad);
    padding: 2rem;
    transition: var(--transition-slow);
}
.clean-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    background: radial-gradient(circle at top right, #e8f5e9 0%, #ffffff 60%);
}

.hero-content {
    z-index: 10;
    max-width: 700px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.8);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-main);
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.dot-green {
    width: 6px;
    height: 6px;
    background: var(--green-main);
    border-radius: 50%;
}

.hero-title {
    font-size: 3.5rem; /* Ripristinato dimensione desktop */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}
.hero-title span { color: var(--green-main); }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-sec);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 4rem;
    justify-content: center;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
    border-bottom: none;
    padding-bottom: 0;
}
.stat-item h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--green-main);
    line-height: 1;
}
.stat-item p {
    font-size: 0.8rem;
    color: var(--text-sec);
    margin-top: 5px;
}

/* Apple 3D Model */
.hero-3d-wrapper {
    display: none; /* Nascondi di nuovo su mobile */
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 550px;
    margin-top: 2rem;
    z-index: 1;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: transparent;
    --poster-color: transparent;
}

/* =========================================
   SEZIONI GENERICHE
========================================= */
.section { padding: 80px 20px; }

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

/* Chi Sono */
.chi-sono {
    max-width: 800px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.1rem;
    color: var(--text-sec);
}

.chi-sono-pills {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}

.pill-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--green-light-bg);
    padding: 12px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.icon-square {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}
.bg-green-light { background: var(--green-main); }
.bg-teal-light { background: #0ea5e9; } /* Azzurro moderno */


/* Servizi */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card { text-align: left; }

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--green-light-bg);
    color: var(--green-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* Dieta e BMI - Nuovo Layout */
.dieta-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-pill {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--card-border);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.bg-gray-light { background: #f1f5f9; }
.text-green { color: var(--green-main); }
.text-blue { color: #3b82f6; }
.text-pink { color: #ec4899; }

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}
.feature-text p {
    font-size: 0.9rem;
    color: var(--text-sec);
}

.feature-card-big {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--card-border);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card-content {
    padding: 40px 30px;
    flex: 1;
}

.plate-icon-wrapper {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.feature-card-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.feature-card-content p {
    color: var(--text-sec);
    font-size: 0.95rem;
}

.input-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}
.input-col label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-sec);
}
.input-col input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: #f8fafc;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}
.input-col input:focus { border-color: var(--green-main); background: #fff; }

.bmi-result-wrapper {
    margin-top: 25px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bmi-number { font-size: 2.2rem; font-weight: 800; margin-bottom: 0px; }
.bmi-category { font-size: 1rem; font-weight: 600; margin-bottom: 15px; }
.bmi-bar {
    height: 8px;
    width: 100%;
    background: linear-gradient(to right, #38bdf8, #10b981, #f59e0b, #ef4444);
    border-radius: 4px;
    position: relative;
}
.bmi-indicator {
    width: 16px; height: 16px; background: #fff; border: 3px solid #1f2937;
    border-radius: 50%; position: absolute; top: 50%;
    transform: translate(-50%, -50%); left: 50%; transition: left 0.5s ease;
}

.feature-card-cta {
    background: var(--green-main);
    padding: 30px;
    color: #fff;
}
.feature-card-cta p {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.gallery-item { padding: 0; overflow: hidden; aspect-ratio: 1; }
.gallery-item img {
    width: 100%; height: 100%; object-fit: contain; padding: 15px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-item:hover img { transform: scale(1.08); }

/* Recensioni */
.reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}
.review-card { position: relative; padding: 2.5rem; }
.review-stars { color: #f59e0b; margin-bottom: 1rem; }
.review-text { font-style: italic; font-size: 1.05rem; margin-bottom: 1.5rem; color: var(--text-sec); }
.review-author { font-weight: 700; text-align: right; color: var(--green-main); }

/* Dove Siamo */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.info-block { margin-bottom: 1.5rem; }
.info-block:last-child { margin-bottom: 0; }
.icon-large { font-size: 2rem; color: var(--green-main); margin-bottom: 0.5rem; }
.map-container { padding: 0; height: 350px; overflow: hidden; }

/* Footer */
.clean-footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 4rem 20px 2rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}
.footer-col h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #fff; }
.footer-col p { color: #94a3b8; font-size: 0.95rem; }
.footer-col.links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-col.links a { color: #94a3b8; text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.footer-col.links a:hover { color: var(--green-main); }
.footer-bottom { text-align: center; border-top: 1px solid #334155; padding-top: 2rem; color: #64748b; font-size: 0.85rem; }

/* =========================================
   MEDIA QUERIES (TABLET & DESKTOP)
========================================= */
@media (min-width: 768px) {
    .section-title { font-size: 2.8rem; }
    .hero-title { font-size: 4.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    
    .hero-buttons { flex-direction: row; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); text-align: left; }
    
    .chi-sono-pills { grid-template-columns: repeat(2, 1fr); }
    
    .grid-2-col { grid-template-columns: 1fr 1fr; gap: 4rem; }
    .dieta-layout { grid-template-columns: 1fr 400px; align-items: stretch; }
    
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { flex-direction: row; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr 2fr; }
    
    .footer-content { grid-template-columns: repeat(3, 1fr); text-align: left; }

    .hamburger { display: none; }
    .nav-links { 
        display: flex; 
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        gap: 30px;
        transition: none;
    }
    .nav-links li a {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-sec);
    }
    .nav-cta { display: inline-block; }

    .reverse-mobile .text-content { order: -1; }
}

/* =========================================
   NEW: STYLES FOR LINKS AND MODALS
========================================= */
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6; /* Blue as requested */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: lowercase; /* Lowercase as requested */
    margin-top: 1rem;
    transition: var(--transition-fast);
}

.btn-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-link:hover {
    color: #2563eb;
}

.btn-link:hover i {
    transform: translateX(4px);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center; /* Desktop centered */
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    overflow-y: auto; /* Allow overlay to scroll if content is too tall */
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto; /* Important for flex center and overflow */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--text-sec);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    margin-top: 10px;
}

.modal-body {
    color: var(--text-sec);
    font-size: 1rem;
    line-height: 1.7;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.text-justify {
    text-align: justify;
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-start; /* Start from top on mobile to ensure X is visible */
        padding: 40px 15px;
    }
    .modal-content {
        padding: 40px 20px 30px;
        width: 100%;
        border-radius: 20px;
    }
    .modal-content h2 {
        font-size: 1.5rem;
    }
    .modal-close {
        top: 10px;
        right: 15px;
        background: #f1f5f9;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        z-index: 10;
    }
}

@media (min-width: 1024px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    
    .hero-3d-wrapper {
        display: block; /* Visibile su desktop */
        position: absolute;
        top: 50%;
        right: 2%;
        transform: translateY(-50%);
        width: 600px;
        height: 600px;
        margin-top: 0;
    }
    .hero {
        align-items: flex-start;
        text-align: left;
        padding-left: 8%;
    }
    .hero-subtitle { margin-left: 0; text-align: left; }
    .hero-buttons { justify-content: flex-start; }
    
    .gallery-grid { grid-template-columns: repeat(5, 1fr); }
}
