/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --primary-color: #8c3232;
    /* Deep red / maroon */
    --primary-hover: #732828;
    --text-dark: #3a221f;
    --text-light: #ffffff;
    --text-muted: #665b57;
    --bg-light: #eee1c9;
    /* Main beige */
    --bg-darker: #eaddd3;
    /* Darker beige */
    --bg-footer: #742d2a;
    --border-color: #d5b99f;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.container {
    width: 100%;
    max-width: 1470px;
    /* Larghezza aumentata come da richiesta */
    margin: 0 auto;
    padding: 0 40px;
    /* Un po' più di padding laterale per schermi molto larghi */
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(140, 50, 50, 0.3);
}

.btn-primary-light {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.btn-primary-light:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #d1c1af;
    color: var(--text-dark);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background-color: transparent;
}

.site-header.scrolled {
    background-color: #ffffff;
    /* Solid white background as requested */
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.header-logo-img {
    height: 40px;
    /* Adjust based on the actual logo proportions */
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 40px;
    /* Spazio tra il menu e il bottone contattaci */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    color: var(--text-dark);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding-top: 100px;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
}

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

.shape-macchia {
    position: absolute;
    /* max-width impostato per bilanciare l'aspetto sulle viewport larghe */
    max-width: 400px;
    width: 40%;
    height: auto;
}

.shape-macchia.left {
    bottom: 80px;
    left: 0;
    width: 40%;
    max-width: 900px;
    /* aumentiamo in proporzione anche il limite massimo */
}

.shape-macchia.right {
    top: 80px;
    right: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    height: 100%;
}

.hero-content {
    flex: 1;
    max-width: 800px;
    position: relative;
    /* utile se vuoi staccare lo scrolldown in modo assoluto */
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 170px;
    /* aggiunto ampio margine per spingerlo giù in basso */
}

.scroll-down img.arrow-down-img {
    height: 100px;
    /* Altezza fissa moderata per l'icona */
    width: auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    /* Ridotta da 550px per essere più piccola e stare sotto l'header */
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.hero-mask-overlay {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    z-index: 2;
    pointer-events: none;
    display: block;
}

/* ==========================================================================
   Logos Strip
   ========================================================================== */
.logos-strip {
    background-color: #ffffff;
    padding: 30px 0;
    text-align: center;
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.logo-item {
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

/* Loghi 1, 3, 6 (più alti) */
.logo-item:nth-child(1),
.logo-item:nth-child(3),
.logo-item:nth-child(6) {
    height: 70px;
}

/* Loghi 2, 4, 5 (più bassi) */
.logo-item:nth-child(2),
.logo-item:nth-child(4),
.logo-item:nth-child(5) {
    height: 45px;
}

.logo-item:hover {
    transform: scale(1.05);
    /* Effetto hover di espansione */
}

.funding-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   Full Width Banners
   ========================================================================== */
.full-width-banner {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    background-color: #333;
}

.crossfade-banner {
    position: relative;
    overflow: hidden;
    /* prevents slides from escaping */
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0;
    /* starts hidden */
    animation: fadeAnim 12s infinite;
    /* 12s total duration for the loop */
}

/* Immagine 1 */
.slide-1 {
    background-image: url('assets/images/foto-bg-1.png');
    animation-delay: 0s;
}

/* Immagine 2 */
.slide-2 {
    background-image: url('assets/images/foto-bg-2.png');
    animation-delay: 6s;
    /* starts fading in exactly halfway through the loop */
}

/* Animazione CSS per sfumare l'opacità */
@keyframes fadeAnim {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    65% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.banner-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    text-align: center;
    z-index: 2;
    /* deve stare sopra alle slide animate */
}

.banner-overlay h2 {
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    font-size: 2.2rem;
    line-height: 1.4;
}

.banner-overlay .btn {
    margin-top: 2rem;
}

/* ==========================================================================
   Timeline Section
   ========================================================================== */
.timeline-section {
    padding: 100px 0;
    background-color: var(--bg-light);
    /* Uguale allo sfondo della Hero */
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 3rem;
}

.timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Linea svg rimossa */

.timeline-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.timeline-img {
    width: 100%;
    max-width: 600px;
    /* Aumentato da 400px per farle decisamente più grandi */
    height: auto;
    object-fit: contain;
    z-index: 2;
    /* Optional shadow if desired */
    /* filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15)); */
}

/* Nuova linea di sfondo fissa (mare-linea.png) */
.timeline-line-bg {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 90%;
    z-index: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.timeline-line-bg img {
    height: 100%;
    width: auto;
    object-fit: cover;
    opacity: 0.8;
    /* Regola l'opacità se necessario */
}

.step-content {
    flex: 1;
    z-index: 2;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.step-left .step-content {
    padding-left: 40px;
}

.step-right .step-content {
    padding-right: 40px;
}

/* ==========================================================================
   Contact Form Section
   ========================================================================== */
.contact-section {
    position: relative;
    padding: 100px 0;
    min-height: 800px;
    display: flex;
    align-items: center;
}

.contact-bg-split {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, var(--bg-light) 50%, var(--bg-footer) 50%);
}

.contact-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 50px;
}

.contact-illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration-placeholder {
    position: relative;
    width: 300px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.character-shape {
    font-size: 150px;
    line-height: 1;
}

.speech-bubble {
    position: absolute;
    top: 50px;
    left: -50px;
    background: white;
    padding: 20px;
    border-radius: 50%;
    font-weight: 800;
    text-align: center;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-form-card {
    flex: 1;
    background: #ffffff;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
}

.form-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.contact-form-card h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.custom-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    font-family: inherit;
    font-size: 1rem;
    background: transparent;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

.privacy-checkbox input {
    margin-top: 3px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-footer);
    color: #ffffff;
    padding-top: 80px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.brand-col {
    flex: 2;
    min-width: 300px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: inline-block;
}

.company-info,
.contact-info {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.cta-col {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.links-col {
    flex: 2;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.link-group h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 0.8rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: #ffffff;
    color: var(--primary-color);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.bottom-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mwc-logo {
    font-weight: 700;
    letter-spacing: 1px;
}

.bottom-right {
    display: flex;
    gap: 30px;
}

.bottom-right a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 80px;
    }

    .scroll-down {
        align-items: center;
        margin-bottom: 40px;
    }

    .timeline-step {
        flex-direction: column;
        text-align: center;
    }

    .step-right {
        flex-direction: column-reverse;
    }

    .step-left .step-content,
    .step-right .step-content {
        padding: 0;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-bg-split {
        background: linear-gradient(to bottom, var(--bg-light) 30%, var(--bg-footer) 30%);
    }

    .links-col {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .header-right {
        order: 3;
        width: 100%;
        margin-top: 20px;
        flex-direction: column;
        gap: 20px;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
    }

    h1 {
        font-size: 2.2rem;
    }

    .organic-image-round {
        width: 250px;
        height: 250px;
    }

    .contact-form-card {
        padding: 30px;
    }

    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-top {
        flex-direction: column;
    }
}