/* Global Styles */
:root {
    scroll-behavior: smooth;
    --primary-color: #A4FD01;
    /* Lime Green */
    --bg-dark: #1a1a1a;
    /* Unified Dark Background */
    --card-bg: #2C2C2C;
    /* Lighter Card Background */
    --text-light: #FFFFFF;
    --text-gray: #B0B0B0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1400px;
    /* Wider container */
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    /* Context for absolute positioning if needed */
}

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

.btn {
    display: inline-block;
    background-color: #444;
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-transform: uppercase;
    border: 2px solid #444;
}

.btn:hover {
    background-color: #444;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Header */
header {
    background-color: rgba(26, 26, 26, 0.95);
    /* Semi-transparent dark bg for readability */
    padding: 20px 0;
    position: fixed;
    /* Fixed as requested */
    width: 100%;
    top: 0;
    z-index: 1000;
    /* High z-index */
    backdrop-filter: blur(10px);
    /* Nice glass effect */
    border-bottom: 1px solid #333;
    /* Subtle separation */
}

/* Helper to lock body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

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

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}



/* Default Desktop Nav */
#main-nav {
    display: flex;
    align-items: center;
}

.hamburger-btn,
.close-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.hamburger-btn:hover,
.close-menu-btn:hover {
    color: var(--primary-color);
}

nav a {
    font-family: 'Roboto', sans-serif;
    margin-left: 30px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--bg-dark);
    min-height: 100vh;
    /* Full viewport height */
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* Space for fixed header */
    margin-bottom: 0;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 6.0rem;
    /* Larger font */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2.5rem;
}

.hero-content h1 .highlight {
    display: block;
}

.hero-image-placeholder {
    width: 40%;
    height: 900px;
    background-color: transparent;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Why Choose Us & Who We Are (Carousel Shared Styles) */
.why-us,
.who-we-are {
    padding: 80px 0;
    background-color: var(--bg-dark);
    overflow: visible;
    /* Allow buttons to stick out potentially or handle in wrapper */
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    margin: 0;
    /* REMOVED MARGIN to allow full width alignment with other boxes */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
    /* Larger gap */
}

.carousel-slide {
    /* 50% width minus half the gap to show 2 items */
    min-width: calc(50% - 15px);
    max-width: calc(50% - 15px);
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
}

/* Updated Carousel Buttons - Absolute Positioning */
.carousel-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 3rem;
    cursor: pointer;
    z-index: 20;
    padding: 0;
    transition: color 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-btn.prev {
    left: -60px;
    /* Push outside container */
}

.carousel-btn.next {
    right: -60px;
    /* Push outside container */
}

.carousel-btn:hover {
    color: var(--primary-color);
}

/* Specific Card Styles */
.card .icon-placeholder {
    font-size: 4rem;
    color: var(--primary-color) !important;
    /* Force uniform color */
    margin-bottom: 25px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

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

/* Passion Section */
.passion {
    padding: 100px 0;
    background-color: var(--bg-dark);
}

/* New Chi Siamo Text Section */
.chi-siamo-text {
    padding: 100px 0;
    background-color: var(--bg-dark);
}

/* REFACTORED: Shared Content Box Style */
.content-box {

    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: 40px;
    padding: 60px;
    gap: 60px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 40px;
    /* Space between multiple boxes if any */
}

.content-box {
    min-height: 465px;
}

.content-box:last-child {
    margin-bottom: 0;
}

/* Passion Section specific (using shared box) */
.passion-text {
    flex: 1;
}

.passion-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-transform: uppercase;
    line-height: 1.2;
}

.passion-text p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
}

.passion-image-placeholder {
    flex: 1;
    height: 450px;
    background-color: #3a3a3a;
    /* Lighter than card-bg */
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: visible;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
    position: relative;
    z-index: 10;
}

.passion-image-placeholder img {
    width: auto;
    height: 105%;
    object-fit: cover;
    /* or contain, depending on image */
    object-position: center;
}

/* Survey Section */
.survey {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

/* Survey specific vertical override */
.survey-vertical {
    flex-direction: column !important;
    text-align: center;
    gap: 40px;
}

.survey-vertical h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0px;
    color: white;
    /* Default white, can highlight spans */
}

.survey-vertical .subtitle {
    bottom: 100px;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-top: -35px;
    margin-bottom: 30px;
}

.survey-cards {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.survey-card {
    background-color: transparent;
    width: 100%;
    max-width: 350px;
    position: relative;
    text-align: center;
}

.survey-card h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    /* Slightly smaller to fit */
    font-weight: 800;
    text-transform: uppercase;
}

.card-image-placeholder {
    width: 100%;
    height: 350px;
    background-color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    margin-bottom: 0;
    overflow: hidden;
    position: relative;
}

.card-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-small {
    background-color: rgb(32, 32, 32);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    position: relative;
    margin-top: -50px;
    /* Pull button up into the image */
    z-index: 10;
    text-transform: uppercase;
    border: 1px solid #333;
    transition: all 0.3s;
    display: inline-block;
}

.btn-small:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.separator {
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 700;
}

/* Who We Are Specifics */
.team-card {
    padding: 0;
    background-color: var(--card-bg);
    overflow: hidden;
    height: 500px;
    /* Taller to fit larger image */
    justify-content: flex-start;
}

.team-img {
    width: 180px;
    /* Enlarged from 130px */
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-top: 50px;
    margin-bottom: 25px;
    border: 4px solid #444;
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* REMOVED GLOBAL ZOOM to fix pixelation */
}

/* Specific Zoom for Filippo */
.team-img img[src*="Filippo"] {
    transform: scale(1.2);
    /* Reduced zoom (was 1.4) */
}

.team-card h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.team-card p {
    padding: 0 30px;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
}

.team-card .role {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.linkedin-link {
    display: inline-block;
    margin-top: auto;
    /* Push to bottom if flex container */
    margin-bottom: 20px;
    color: white;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 2px;
    transition: color 0.3s;
}

.linkedin-link:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    background-color: var(--bg-dark);
    color: var(--text-gray);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links {
    display: inline-flex;
    /* Fit content logic */
    justify-content: center;
    align-items: center;
    gap: 30px;
    background-color: #333;
    /* Grey Pill Box */
    padding: 15px 40px;
    border-radius: 50px;
    width: fit-content;
    /* Explicitly fit content */
}

.footer-links a {
    color: var(--primary-color) !important;
    /* All 3 texts Lime Green as requested */
    font-weight: 600;
    text-transform: capitalize;
    font-size: 0.85rem;
}

/* Text Box Styles (for History/Mission) */
.text-box-content {
    width: 100%;
}

.text-box-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.text-box-content h3 {
    font-size: 2rem;
    /* Was 1.5rem, now matching h2 */
    font-weight: 800;
    /* Was 700, now matching h2 */
    color: var(--primary-color);
    /* Mission/Vision titles */
    margin-top: 30px;
    margin-bottom: 20px;
    /* Was 15px, adjusted to match h2 bottom margin */
    text-transform: uppercase;
}

.text-box-content h3:first-of-type {
    margin-top: 0;
}

.text-box-content p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }

    /* Tablet/Mobile Menu Logic */
    @media (max-width: 768px) {
        .hamburger-btn {
            display: block;
            /* Show hamburger */
        }

        #main-nav {
            position: fixed;
            top: -100vh;
            /* Hidden above screen */
            left: 0;
            width: 100%;
            height: 100vh;
            background-color: var(--bg-dark);
            /* Solid background */
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 40px;
            transition: top 0.4s ease-in-out;
            z-index: 1100;
            /* Above header */
        }

        #main-nav.active {
            top: 0;
            /* Slide down */
        }

        #main-nav a {
            margin-left: 0;
            font-size: 1.5rem;
            text-transform: uppercase;
        }

        .close-menu-btn {
            display: block;
            position: absolute;
            top: 30px;
            right: 30px;
            font-size: 2.5rem;
        }
    }

    .carousel-track {
        gap: 15px;
        /* Smaller gap for mobile peeking */
        padding-left: calc(50% - 40vw);
        /* Perfectly center 80vw card in container */
        width: max-content;
        /* Ensure track is wide enough */
    }

    .carousel-slide {
        min-width: 80vw;
        max-width: 80vw;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    /* Bring arrows back in on smaller screens */
    /* Bring arrows back in on smaller screens */
    .carousel-btn.prev {
        left: calc((100% - 100vw) / 2);
        background: none;
        padding: 10px;
        border-radius: 0 50% 50% 0;
    }

    .carousel-btn.next {
        right: calc((100% - 100vw) / 2);
        background: none;
        padding: 10px;
        border-radius: 50% 0 0 50%;
    }
}

@media (max-width: 768px) {
    .content-box {
        /* General responsive for shared box */
        flex-direction: column;
        padding: 30px;
        gap: 40px;
        text-align: center;
        /* Center content on mobile usually looks better */
    }

    .survey-text {
        text-align: center;
        /* Force center on mobile */
    }

    .gap-adjust {
        gap: 20px;
    }

    .survey-cards {
        flex-direction: column;
        gap: 40px;
    }

    .survey-box {
        padding: 40px 20px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-image-placeholder {
        display: none;
    }
}