@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
    --primary-color: #428a78;
    /* Updated to user specification */
    --primary-dark: #326d5e;
    --sage-bg: #e8f0ec;
    --input-bg: #f4f7f6;
    --text-main: #333333;
    --text-light: #666666;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 400;
}

em,
i {
    font-style: italic;
    color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-sage {
    background-color: var(--sage-bg) !important;
}

.bg-white {
    background-color: #fff !important;
}

/* Global Utilities */
.section-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #111;
    line-height: 1.2;
}

.py-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-outline-custom {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-outline-custom:hover {
    background-color: white;
    color: var(--primary-color) !important;
}

.btn-outline-primary-custom {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
}

.btn-outline-primary-custom:hover,
.checkable-card.active .btn-outline-primary-custom {
    background-color: var(--primary-color);
    color: white !important;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    transition: all 0.3s;
    background: transparent;
}

.navbar.scrolled {
    background: white;
    padding: 0.8rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled .nav-link,
.navbar.scrolled .btn-outline-custom {
    color: var(--text-main) !important;
}

.navbar.scrolled .btn-outline-custom {
    border-color: var(--text-main);
}

.navbar.scrolled .btn-outline-custom:hover {
    background-color: var(--text-main);
    color: white !important;
}

.navbar.scrolled .filter-white {
    /* Target color: #6f6f6e */
    filter: invert(47%) sepia(2%) saturate(121%) hue-rotate(314deg) brightness(91%) contrast(88%);
}

.navbar-brand img {
    height: 35px;
}

.filter-white {
    filter: brightness(0) invert(1);
}

.nav-link {
    color: white !important;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 1rem;
    opacity: 0.9;
}

/* Hero */
.hero-section {
    position: relative;
    padding: 8rem 0 4rem 0;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(39, 78, 68, 0.95) 0%, rgba(39, 78, 68, 0.8) 50%, rgba(39, 78, 68, 0.2) 100%);
    z-index: -1;
}

.hero-label {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 500;
}

.hero-title {
    font-size: 5.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-title em {
    color: white;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 680px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-tag {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
}

/* Metodo Section Styles */
.metodo-card {
    background-color: #f7f9f8;
    border: 1px solid #ebf1ef;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    height: 100%;
    transition: transform 0.3s;
}

.metodo-card:hover {
    transform: translateY(-5px);
}

.metodo-icon-wrapper {
    background-color: #dcece8;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.metodo-card-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.metodo-card-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
}

/* I 4 Stadi */
.stadio-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    padding-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stadio-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.stadio-content {
    padding: 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stadio-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.text-light {
    color: var(--text-light) !important;
}

.stadio-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #111;
}

.stadio-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Formulazione */
.formulazione-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.formulazione-list li {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.formulazione-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.formulazione-quote {
    border-left: 2px solid var(--primary-color);
    padding-left: 1.5rem;
    margin-top: 3rem;
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Risultati Stat */
.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: lowercase;
    color: var(--text-light);
}

.comparison-container {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    cursor: ew-resize;
    user-select: none;
}

.comparison-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.comparison-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* clip-path is managed by JS */
}

/* Added vertical line to handle */
.comparison-handle::before {
    content: '';
    position: absolute;
    top: -5000px;
    bottom: -5000px;
    left: 50%;
    width: 2px;
    background: white;
    transform: translateX(-50%);
    z-index: -1;
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.comparison-handle svg {
    width: 12px;
    height: 12px;
}

.comparison-labels {
    position: absolute;
    top: 15px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10;
    pointer-events: none;
}

.comparison-labels span {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 4px 10px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    border-radius: 12px;
}

/* Protocollo (Trattamento) */
.protocol-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.protocol-step {
    background: white;
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: 4px;
    flex: 1;
    min-width: 130px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.protocol-step h5 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.protocol-step p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

.protocol-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.protocol-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 2rem;
}

/* Tecnica */
.tecnica-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.tecnica-list li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.tecnica-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Contatti Form */
.form-box {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.form-label {
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.form-control {
    background-color: var(--input-bg);
    border: 1px solid #e0e5e3;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-control:focus {
    background-color: white;
    box-shadow: 0 0 0 2px rgba(66, 138, 120, 0.2);
    border-color: var(--primary-color);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.form-check-input {
    margin-top: 0.2rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.text-xs {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Footer  */
footer {
    background-color: #1d302d;
    color: white;
    font-size: .8rem;
    ;
}

@media (max-width: 768px) {
    .py-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.2rem !important;
        margin-bottom: 1.2rem;
    }

    .hero-section {
        height: 100vh;
        min-height: auto;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .hero-text {
        font-size: 0.95rem !important;
    }

    .hero-text.fs-4 {
        font-size: 1.05rem !important;
    }

    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-item {
        margin-bottom: 0 !important;
    }

    .section-label {
        font-size: 0.65rem !important;
    }

    .metodo-card-text {
        font-size: 0.85rem !important;
    }

    .stadio-title {
        font-size: 1.25rem !important;
    }

    .stadio-desc {
        font-size: 0.85rem !important;
    }

    .tecnica-list li {
        font-size: 0.85rem !important;
    }

    footer {
        padding: 3rem 0 !important;
    }

    footer fs-7 {
        font-size: 0.7rem !important;
    }

    .protocol-flow {
        flex-direction: column;
        align-items: stretch;
    }

    .protocol-step {
        margin-bottom: 0.5rem;
    }

    .protocol-arrow {
        display: none;
    }

    .form-box {
        padding: 2rem 1.5rem;
    }

    /* Bundle adjustments for mobile */
    .bundle-content .p-4 {
        padding: 1.25rem !important;
    }

    .bundle-content h3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem !important;
    }

    .bundle-content .bg-sage .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .bundle-content .bg-sage .d-flex.justify-content-between > .btn {
        width: 100%;
        margin-top: 0.25rem;
        padding: 0.8rem !important;
    }

    .bundle-content h5.font-heading {
        font-size: 1.15rem !important;
        line-height: 1.3;
    }

    .bundle-content .text-secondary {
        font-size: 0.9rem !important;
    }

    .bundle-content h6.fs-5 {
        font-size: 1.15rem !important;
    }

    .bundle-content .d-flex.flex-wrap.gap-2 > .btn {
        width: 100%;
        margin-bottom: 0.35rem;
        padding: 0.8rem !important;
    }
}

/* Autodiagnosi & Bundles */
.checkable-card {
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}
.checkable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(66, 138, 120, 0.15);
}
.checkable-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(66, 138, 120, 0.2);
}
.checkable-card.active .btn-outline-custom {
    background-color: var(--primary-color);
    color: white !important;
}

.bundle-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-placeholder {
    border: 1px solid #e0e5e3;
    transition: transform 0.3s ease;
}
.product-placeholder:hover {
    transform: translateY(-3px);
}