/* ESPE Design System - Rebuild Clean V3 */
:root {
    --color-primary: #C51631;
    --color-black: #131313;
    --color-white: #FFFFFF;
    --color-grey-light: #F9F9F9;
    --color-text: #131313;
    --color-text-dim: #555555;

    --font-main: 'Satoshi', sans-serif;

    --container-width: 1200px;
    --radius-lg: 24px;
    --radius-pill: 100px;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html { 
        font-size: 16px;
    }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.5;
    background: #FFF;
    -webkit-font-smoothing: antialiased;
    font-size: clamp(16px, 1.25vw, 19px) !important;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--color-black);
    letter-spacing: -0.03em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.1;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-dim);
    font-size: 17px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

.container-medium {
    max-width: 1000px;
    margin: 0 auto;
}

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

.text-white {
    color: white !important;
}

.text-white-dim {
    color: rgba(255, 255, 255, 0.7) !important;
}

.tight-line-height {
    line-height: 1.1 !important;
}

.mb-32 {
    margin-bottom: 32px;
}

.mb-64 {
    margin-bottom: 64px;
}

.mb-80 {
    margin-bottom: 80px;
}

.mt-32 {
    margin-top: 32px;
}

.mt-64 {
    margin-top: 64px;
}

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

.btn-primary {
    background: #c51631;
    color: white;
}

.btn-primary:hover {
    background: #ab132a;
    /*transform: translateY(-2px);*/
    box-shadow: 0 10px 20px rgba(197, 22, 49, 0.2);
}
.btn-primary:hover svg:first-child path {
    stroke: #ffffff;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Header */

.info-banner-news{
    /*info banner strip di tutto il sito espe*/
    display: none;
}
#header {
    /*header di tutto il sito espe*/
    pointer-events:auto;
    margin-top: 0px;
}
.lang-selector {
    /*lang selector di tutto il sito espe*/
    display: none;
}

.site-header-landing {
    position: fixed;
    top: 16px;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: normal;
}

.logo-wrap img {
    width: 140px;
 }   

.header-nav {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    padding: 5px 16px 5px 16px;
    border-radius: 8px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-black);
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-light {
    background: var(--color-grey-light);
}

.section-white {
    background: var(--color-white);
}

.section-dark {
    background: var(--color-black);
    color: white;
}

/* 1. HERO */
.hero-section {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: end;
    justify-content: flex-start;
    isolation: isolate;
    padding: 100px 0;
    background: #000;
    overflow: hidden;
}

.hero-bg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg-wrap picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(235deg, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0.7) 85%);
}

.hero-content {
    max-width: 650px;
    text-align: left;
}

.badge-hero {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 24px;
    display: inline-block;
    color: white;
    font-weight: 700;
}

h2.hero-title {
    font-size: 3.5rem;
}

.hero-subtitle {
    color: white;
    font-size: 1.3rem;
    margin-top: 16px;
}

.hero-extra {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 12px;
}

/* 2. COS'È */
.layout-grid-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.rounded-img {
    border-radius: var(--radius-lg);
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4;
    max-width: 450px;
    object-fit: cover;
    object-position: right;
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-black);
    font-size: 15px;
}

.icon-check {
    color: var(--color-primary);
    width: 22px;
}

/* 3. STRATEGIA */
.max-w-title {
    max-width: 600px;
    margin: 0 auto;
}

.max-w-text {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-dim);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
}

.feature-card {
    padding: 40px;
    border-radius: 32px;
    background: var(--color-grey-light);
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    background: white;
    border-color: #eee;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.icon-box {
    background: white;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.priority-block {
    padding: 32px;
    background: rgba(197, 22, 49, 0.04);
    border-radius: 24px;
    max-width: 800px;
    margin: 64px auto 0;
}

.priority-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    color: #333;
}

.block-strong {
    font-weight: 700;
    color: var(--color-primary);
}

/* 4. TARGET */
.target-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

.target-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.icon-target {
    color: var(--color-primary);
    width: 28px;
    height: 28px;
}


/* *** 5. SCENARI - STICKY STACK *** */
/* This is the only place we apply the stacking logic */
.scenarios-stack-wrapper {
    position: relative;
    padding: 100px 0 200px;
    background: #FFF;
}

.stack-card-item {
    position: sticky;
    top: 90px;
    /* Offset from top so header doesn't cover immediately */
    margin-bottom: 40px;
    /* Vertical spacing */
    width: 100%;
}

.stack-card-inner {
    background: white;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: fit-content;
    /* Increased to fit full text */
    border: 1px solid #f0f0f0;
}

.stack-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stack-content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badgy {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #999;
    font-weight: 700;
    margin-bottom: 16px;
    display: block;
}

.sc-details {
    margin-top: 32px;
}

.sc-details hr {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 24px 0;
}

.highlight-p {
    color: var(--color-primary);
    font-weight: 500;
}

/* Explicit stacking z-indices */
.stack-card-item:nth-child(2) {
    z-index: 10;
    transform: scale(0.96);
    top: 120px;
}

.stack-card-item:nth-child(3) {
    z-index: 11;
    transform: scale(0.98);
    top: 140px;
}

/* Slightly lower top to create stack visual */
.stack-card-item:nth-child(4) {
    z-index: 12;
    transform: scale(1.0);
    top: 160px;
}

/* Note: nth-child counting includes the section-head div, so: div.head(1), card(2), card(3), card(4) */


/* 6. WHY ESPE */
.layout-espe-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    /* Centered vertically */
    width: 100%;
    /* removed max-width so it fills container */
}

.espe-img-box-split {
    height: 600px;
    /* Increased for larger image */
    border-radius: 32px;
    overflow: hidden;
}

.espe-img-box-split img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.espe-services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
}

.service-box {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #eee;
    text-align: center;
}

.service-box i {
    color: var(--color-primary);
    margin-bottom: 8px;
    width: 20px;
    height: 20px;
}

.service-box h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.service-box p {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
}

.final-slogan {
    font-size: 2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.25;
}

/* 7. CONTACTS */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: baseline;
    max-width: 1000px;
    margin: 0 auto;
}

.glass-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

form label, .wpcf7-form label {
    color: #fff;
}


span.text-primary.block-strong.evidenzio {
font-size: 1.1rem;
    line-height: 1.4rem !important;
    color: #fff;
    font-style: italic;
    padding-top: 16px !important;
    display: block;
    max-width: 450px;
}

p:last-child {
    margin-bottom: 0;
    margin-top: 0;
}

p.text-limit.max-w-text {
    margin-top: 16px;
}

.btn-underline:hover {
    color: #ab132a;
}

#strategia .mt-32 {
    text-align: center;
}


.hero-section .layout-grid-text {
    grid-template-columns: 1fr 0.5fr;
}

.form-evidenzio br {
    display: block;
}

.form-evidenzio {
    font-size: 1.25rem !important;
}




/* Mobile */
@media (max-width: 1024px) {
    
    .container {
        padding: 0 20px;
    }
    
    .header-nav {
        width: 90%;
        gap: 16px;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
    }

    .layout-grid-text,
    .grid-3,
    .layout-espe-split,
    .espe-services-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }
    
    .espe-services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 40px 0;
        min-height: 90vh;
    }

    .hero-overlay {
        background: linear-gradient(214deg, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0.95) 78%);
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-title br {
        display: none;
    }

    .stack-card-inner {
        grid-template-columns: 1fr !important;
        height: auto;
    }

    .stack-media {
        height: 250px;
    }

    .stack-content {
        padding: 32px;
    }

    .espe-img-box-split {
        height: 300px;
        order: -1;
    }
}


@media (max-width: 768px) {
.stack-card-item {
    position: relative !important;
}

.rounded-img {
    max-width: 100%;
}

h2 {
    font-size: 2rem;
}    

.stack-card-item:nth-child(2) {
    top: 0px;
}
.stack-card-item:nth-child(3) {
    top: 0px;
}
.stack-card-item:nth-child(4) {
    top: 0px;
}

.mb-80 {
    margin-bottom: 0px;
}

.scenarios-stack-wrapper {
    padding: 100px 0 0px;
}


}