/* =========================================
   Variables & Theme
   ========================================= */
:root {
    /* Colors */
    --clr-petrolio: #0D2A3E;
    --clr-teal: #397F9C;
    --clr-corallo: #DB4E51;
    --clr-giallo: #FFC857;
    --clr-bianco: #FFFFFF;
    --clr-bg-light: hsl(200, 20%, 90%); 
    
    /* Specific Mobile Menu Colors */
    --clr-mobile-menu-bg: #A1C3DE; /* Light blue based on mobile menu reference */
    --clr-mobile-btn-bg: #A4B8B3; /* Desaturated greenish-grey button from mobile menu */
    
    /* Typography Text Sizes */
    --text-sm: 0.875rem; /* 14px */
    --text-base: 1rem;   /* 16px */
    --text-md: 1.125rem; /* 18px */
    --text-lg: 1.25rem;  /* 20px */
    
    --font-heading: 'Varela Round', sans-serif;
    --font-text: 'Montserrat', sans-serif;
    
    /* Border Radii */
    --radius-btn: 16px; /* Reduced to make buttons squarish/chip-shaped */
     
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-text);
    color: var(--clr-petrolio);
    background-color: var(--clr-bianco);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

ul {
    list-style: none;
}

/* Typography components */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
    line-height: 0;
}

.logo img {
    display: block;
    width: auto;
    height: clamp(50px, 5vw, 70px);
    max-width: min(110px, 18vw);
}

.btn {
    display: inline-block;
    font-family: var(--font-text);
    font-weight: 500;
    font-size: var(--text-base);
    padding: 12px 28px;
    border-radius: var(--radius-btn); /* Applied the squarish 16px variable */
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--clr-giallo);
    color: var(--clr-petrolio);
}

.btn-primary:hover {
    opacity: 0.9;
}

/* =========================================
   Header Styles (Desktop First)
   ========================================= */
.site-header {
    background-color: var(--clr-bianco);
    padding: 20px 40px;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}


/* Allows nav links and CTA to participate directly in the header grid */
.main-nav {
    display: contents;
}


.nav-links {
    display: flex;
    gap: 24px;
    justify-self: center;
}

.nav-cta-container {
    justify-self: end;
}

.nav-links a {
    color: var(--clr-petrolio); /* Nav links text color updated */
    font-size: var(--text-base);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--clr-teal);
}

/* Hide Hamburger on Desktop */
.hamburger-btn {
    display: none;
}

/* =========================================
   Footer Styles
   ========================================= */
.site-footer {
    /* background-color: var(--clr-bg-light); */
    background-color: var(--clr-bianco);
    padding: 60px 40px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    padding: 0;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 24px;
}

.brand-description {
    color: var(--clr-teal);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
}

.footer-links-wrapper {
    display: flex;
    gap: 120px;
    flex-wrap: wrap;
}

.footer-heading {
    font-family: var(--font-text);
    font-weight: 800;
    font-size: var(--text-sm);
    text-transform: uppercase;
    color: var(--clr-petrolio);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--clr-teal);
    font-size: var(--text-sm); /* Footer links 0.875rem applied */
    font-weight: 400;
}

.footer-links a:hover {
    color: var(--clr-petrolio);
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(57, 127, 156, 0.2);
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.copyright, .footer-bottom-link {
    color: var(--clr-teal);
    font-size: var(--text-sm); /* Footer bottom links 0.875rem applied */
    font-weight: 400;
}

.footer-bottom-link:hover {
    color: var(--clr-petrolio);
}

.form-section {
    padding-left: 0;
    padding-right: 0;
}

.form-intro {
    width: min(820px, 100%);
    margin: 0 auto clamp(36px, 5vw, 60px);
    text-align: center;
}

.form-intro h1,
.form-intro h2 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.form-intro p {
    margin: 0 auto;
    max-width: 700px;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.7;
}

.form-wrapper {
    padding: 0;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.typeform-fallback {
    margin: 18px 0 0;
    text-align: center;
    font-size: var(--text-sm);
}

.typeform-fallback a {
    color: var(--clr-teal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.typeform {
    width: 100%;
    height: 82vh;
    min-height: 700px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    opacity: 0;
    transition: opacity .3s;
}

.typeform.loaded {
    opacity: 1;
}

/* =========================================
   Responsive Design (Mobile Screens)
   ========================================= */
@media screen and (max-width: 991px) {

    
    .typeform {
        height: 90dvh;
        min-height: 70dvh;
        border-radius: 0;
    }

    .site-header {
        padding: 20px;
    }

    /*
     * Desktop uses CSS Grid and:
     * .main-nav { display: contents; }
     *
     * Restore a normal flex layout on mobile.
     */
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    /* Hamburger button */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 105;
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--clr-petrolio);
        border-radius: 2px;
        transition:
            transform 0.3s ease,
            opacity 0.3s ease,
            background-color 0.3s ease;
    }

    /* Hamburger open state */
    .hamburger-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--clr-teal);
    }

    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--clr-teal);
    }

    /* Full-screen mobile navigation */
    .main-nav {
        display: flex;
        position: fixed;
        inset: 0;
        width: 100%;
        height: fit-content;

        flex-direction: column;
        align-items: stretch;
        gap: 30px;

        padding: 90px 30px 40px;
        background-color: var(--clr-bianco);

        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-15px);

        transition:
            opacity 0.3s ease,
            transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0.3s ease;

        z-index: 99;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }

    .nav-links a {
        font-size: var(--text-md);
    }

    .nav-cta-container {
        width: 100%;
        margin-top: auto;
    }

    .nav-cta-container .btn {
        display: block;
        width: 100%;
    }

    /* Footer */
    .site-footer {
        padding: 40px 20px 30px;
    }

    .footer-top {
        flex-direction: column;
        gap: 40px;
        margin-bottom: 40px;
    }

    .footer-links-wrapper {
        justify-content: space-between;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media screen and (max-width: 600px) {
    .footer-links-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }
    .footer-col{
        display: flex;
        flex-direction: column;
    }

}
.custom-section { padding: clamp(64px, 9vw, 112px) 24px; background: #f3f5f1; }
.custom-section-inner { width: min(1120px, 100%); margin: 0 auto; }
.custom-section-inner.has-image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.custom-section-content h2 { margin: 0 0 20px; font-size: clamp(2rem, 4.5vw, 3.75rem); line-height: 1.05; }
.custom-section-content p { max-width: 680px; margin: 0 0 28px; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.7; }
.custom-section img { width: 100%; max-height: 560px; border-radius: 24px; object-fit: cover; }
@media (max-width: 760px) { .custom-section-inner.has-image { grid-template-columns: 1fr; } }

/* =========================================
   Lering modular sections
   ========================================= */
.bg-white { background-color: var(--clr-bianco); }
.bg-light { background-color: #f3f5f1; }
.bg-blue { background-color: var(--clr-mobile-menu-bg); }
.bg-coral { background-color: var(--clr-corallo); }

.btn-secondary {
    color: var(--clr-petrolio);
    background: transparent;
    border: 1px solid currentColor;
}

.btn-secondary:hover { background-color: rgba(13, 42, 62, .08); }

.module-hero,
.module-flexible {
    padding: clamp(64px, 9vw, 112px) 24px;
}

.module-hero-inner,
.module-flexible-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.module-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: center;
    gap: 12px;
    gap: clamp(36px, 7vw, 96px);
}

.module-hero:not(.has-image) .module-hero-inner {
    display: block;
}

.module-hero.align-center .module-hero-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.module-hero h1 {
    max-width: 900px;
    margin: 0 0 22px;
    font-family: var(--font-heading);
    font-size: clamp(2.65rem, 6vw, 5.6rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.04em;
}

.module-lead {
    max-width: 720px;
    margin: 0;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.65;
}

.module-eyebrow {
    margin: 0 0 14px;
    color: var(--clr-teal);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.module-hero.align-left .module-hero-content { margin-right: auto; text-align: left; }
.module-hero.align-center .module-hero-content { max-width: 820px; margin-right: auto; margin-left: auto; text-align: center; }
.module-hero.align-right .module-hero-content { max-width: 820px; margin-left: auto; text-align: right; }
.module-hero.align-left .module-actions { justify-content: flex-start; }
.module-hero.align-center .module-actions { justify-content: center; }
.module-hero.align-right .module-actions { justify-content: flex-end; }
.module-hero.has-image.vertical-top .module-hero-inner { align-items: start; }
.module-hero.has-image.vertical-center .module-hero-inner { align-items: center; }
.module-hero.has-image.vertical-bottom .module-hero-inner { align-items: end; }

.module-hero.has-background-image:not(.has-image) .module-hero-inner {
    display: flex;
    flex-direction: column;
    min-height: clamp(360px, 60vh, 720px);
}
.module-hero.has-background-image.vertical-top:not(.has-image) .module-hero-inner { justify-content: flex-start; }
.module-hero.has-background-image.vertical-center:not(.has-image) .module-hero-inner { justify-content: center; }
.module-hero.has-background-image.vertical-bottom:not(.has-image) .module-hero-inner { justify-content: flex-end; }

.module-hero-media img,
.module-flexible-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    object-fit: cover;
}

.module-flexible-inner {
    display: grid;
    align-items: center;
    gap: 12px;
    gap: clamp(32px, 6vw, 80px);
}

.module-flexible.has-image .module-flexible-inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
}

.module-flexible.layout-image-left .module-flexible-media { order: -1; }
.module-flexible.layout-image-full .module-flexible-inner { display: flex; flex-direction: column; align-items: stretch; }
.module-flexible.layout-image-full .module-flexible-media { order: -1; }

.module-flexible h2 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.module-richtext {
    max-width: 760px;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.75;
}

.module-richtext > :first-child { margin-top: 0; }
.module-richtext > :last-child { margin-bottom: 0; }
.module-flexible .btn { margin-top: 28px; }

.bg-blue .module-eyebrow { color: var(--clr-petrolio); }

@media (max-width: 760px) {
    .module-hero-inner,
    .module-flexible.has-image .module-flexible-inner {
        grid-template-columns: 1fr;
    }

    .module-hero-media,
    .module-flexible-media { order: -1; }
    .module-hero { padding-top: 48px; }
}
/* Admin-selectable vertical spacing for modular sections. */
.spacing-none { padding-top: 0 !important; padding-bottom: 0 !important; }
.spacing-compact { padding-top: clamp(32px, 5vw, 56px) !important; padding-bottom: clamp(32px, 5vw, 56px) !important; }
.spacing-standard { padding-top: clamp(56px, 8vw, 96px) !important; padding-bottom: clamp(64px, 9vw, 112px) !important; }
.spacing-spacious { padding-top: clamp(88px, 12vw, 152px) !important; padding-bottom: clamp(96px, 13vw, 168px) !important; }
/* Hero background-image controls. */
.module-hero.has-background-image {
    position: relative;
    isolation: isolate;
    background-image: var(--hero-background-image);
    background-repeat: no-repeat;
}

.module-hero.has-background-image::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.module-hero.has-background-image .module-hero-inner {
    position: relative;
    z-index: 1;
}

.module-hero.overlay-none::before { display: none; }
.module-hero.overlay-dark::before { background-color: rgba(13, 42, 62, var(--hero-overlay-opacity, .4)); }
.module-hero.overlay-light::before { background-color: rgba(255, 255, 255, var(--hero-overlay-opacity, .4)); }
.module-hero.overlay-strength-20 { --hero-overlay-opacity: .2; }
.module-hero.overlay-strength-40 { --hero-overlay-opacity: .4; }
.module-hero.overlay-strength-60 { --hero-overlay-opacity: .6; }
.module-hero.overlay-strength-80 { --hero-overlay-opacity: .8; }
.module-hero.background-position-center { background-position: center; }
.module-hero.background-position-top { background-position: top; }
.module-hero.background-position-bottom { background-position: bottom; }
.module-hero.background-position-left { background-position: left; }
.module-hero.background-position-right { background-position: right; }
.module-hero.background-size-cover { background-size: cover; }
.module-hero.background-size-contain { background-size: contain; }
.module-hero.background-parallax { background-attachment: fixed; }
.module-hero.text-light { color: var(--clr-bianco); }
.module-hero.text-light .module-eyebrow { color: var(--clr-giallo); }
.module-hero.text-light .btn-secondary { color: var(--clr-bianco); }
.module-hero.text-yellow { color: var(--clr-giallo); }
.module-hero.text-yellow .module-eyebrow { color: var(--clr-bianco); }
.module-hero.text-yellow .btn-secondary { color: var(--clr-giallo); }

@media (max-width: 991px), (prefers-reduced-motion: reduce) {
    .module-hero.background-parallax { background-attachment: scroll; }
}