/* --- CSS Resets & Variables --- */
:root {
    /* Intense, High-Contrast Premium Palette */
    --primary: #FFB800;
    /* Vibrant Action Yellow/Gold */
    --primary-dark: #E6A600;
    --primary-light: #FFF8E5;

    --secondary: #142F7A;
    /* Deep Corporate Blue */
    --secondary-light: #1A3C9E;

    --accent: #00D4FF;
    /* Cyan highlight */

    --text-main: #344054;
    --text-muted: #667085;

    --bg-main: #ffffff;
    --bg-light: #F4F6F9;
    --bg-card: #ffffff;

    --border-color: #eaecf0;

    /* Typography */
    --font-sans: 'Poppins', sans-serif;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 24px -4px rgba(16, 24, 40, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(16, 24, 40, 0.1), 0 8px 10px -6px rgba(16, 24, 40, 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 120px;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

.section {
    padding: 100px 0;
    overflow: hidden;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary) !important;
}

.text-white {
    color: #fff !important;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-50 {
    margin-bottom: 50px;
}

.max-w-700 {
    max-width: 700px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
    /* Dark text on yellow button */
    box-shadow: 0 4px 14px rgba(255, 184, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.4);
}

.btn-white {
    background-color: white;
    color: var(--secondary);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.w-full {
    width: 100%;
}

/* --- Section Titles --- */
.section-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 6px 16px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* --- Navbar Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: 120px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.navbar .logo {
    height: 100%;
    overflow: hidden;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar .logo-img {
    height: 80px;
}

.logo-white,
.logo-dark {
    display: none;
}

/* Make logo pure white when navbar is transparent on deep blue background */
.navbar:not(.scrolled) .logo-white {
    /* Using real white logo rather than filter */
    display: block;
}

.navbar.scrolled .logo-white {
    display: none;
}

.navbar.scrolled .logo-dark {
    display: block;
    height: 70px;
}

.footer .logo-white {
    display: block;
    height: 80px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: white;
    /* White text on transparent dark blue bg */
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.navbar.scrolled .nav-link {
    color: var(--text-main);
    /* Dark text on white bg */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* --- Dropdown Menu --- */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    z-index: 1000;
    top: 100%;
    left: 0;
    padding: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.nav-item-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}

/* Keep the nav link color active when hovering the dropdown */
.nav-item-dropdown:hover>.nav-link {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    /* White icon on transparent */
    cursor: pointer;
    transition: var(--transition);
}

.navbar.scrolled .mobile-toggle {
    color: var(--secondary);
    /* Dark icon on white */
}

/* --- Hero Section Redesign --- */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 200px;
    background-color: var(--secondary);
    /* Deep Blue */
    color: white;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='-100 -100 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='50,5 60,40 95,50 60,60 50,95 40,60 5,50 40,40' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center;
    z-index: 1;
    will-change: transform;
    transform: translateY(var(--parallax-offset, 0));
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-question {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    color: white;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Bold Outline Text Effect */
.text-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
}

.hero-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Single Hero Image */
.hero-image-single {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-img-main {
    width: 100%;
    max-width: 500px;
    height: 600px;
    object-fit: cover;
    border-radius: 30px 30px 30px 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 10px solid rgba(255, 255, 255, 0.1);
}

/* Image Cluster */
.hero-image-cluster {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-pill {
    position: absolute;
    border-radius: 100px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid var(--secondary);
    transition: transform 0.1s linear, box-shadow 0.3s;
    will-change: transform;
    transform: translateY(var(--parallax-offset, 0)) scale(var(--hover-scale, 1));
}

.img-pill:hover {
    --hover-scale: 1.05;
    z-index: 10;
}

.img-pill img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-pill-1 {
    width: 320px;
    height: 480px;
    left: 0;
    top: 0;
    z-index: 3;
}

.img-pill-2 {
    width: 300px;
    height: 420px;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.pill-label {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--secondary);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

/* --- Page Header (Services) --- */
.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

/* Wavy Divider */
.hero-wave {
    position: absolute;
    bottom: -1px;
    /* overlap to fix sub-pixel rounding rendering line */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-wave .shape-fill {
    fill: var(--bg-main);
}

/* --- Chi Siamo Section --- */
.chisiamo {
    overflow: hidden;
}

.chi-siamo-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.chi-siamo-content {
    display: flex;
    flex-direction: column;
}

.chi-siamo-content p {
    margin-bottom: 20px;
}

.chi-siamo-image-wrap {
    position: relative;
    padding-left: 40px;
    padding-top: 40px;
}

.organic-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background-image: radial-gradient(var(--primary) 2px, transparent 2px);
    background-size: 20px 20px;
    z-index: 0;
    opacity: 0.3;
    border-radius: 40px;
    will-change: transform;
    transform: translateY(var(--parallax-offset, 0));
}

.mission-container {
    grid-template-columns: 1fr 1.2fr;
}

.mission-image-wrap {
    padding-left: 0;
    padding-right: 40px;
}

.mission-pattern {
    left: auto;
    right: 0;
}

.main-img {
    position: relative;
    z-index: 2;
    border-radius: 150px 150px 20px 20px;
    /* Top Arch Pill shape */
    box-shadow: var(--shadow-lg);
    border: 10px solid white;
    width: 100%;
    height: 550px;
    object-fit: cover;
}

/* Bold Outline Text Effect - Blue version for light backgrounds */
.text-outline-blue {
    color: transparent;
    -webkit-text-stroke: 2px var(--secondary);
}

.experience-card {
    position: absolute;
    bottom: -30px;
    right: 0;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 250px;
}

.exp-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.exp-text h3 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.exp-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.features-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-weight: 500;
    color: var(--secondary);
}

.features-list li i {
    flex-shrink: 0;
    width: 20px;
    margin-top: 5px;
    text-align: center;
}

/* --- Servizi Static Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    padding-bottom: 40px;
    justify-items: center;
}

.service-card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: none;
    transition: var(--transition);
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
}

@media (max-width: 768px) {
    .services-grid {
        gap: 20px;
    }
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    /* Lift and subtle scale */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    /* Deeper neutral drop shadow */
}

.service-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    transition: var(--transition);
}

.service-card:hover .service-img img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.service-content {
    padding: 24px;
}

.service-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    /* Increased for readability */
    line-height: 1.6;
}

/* --- Why Choose Us Section (Perché Noi) --- */
.perche-noi {
    background-color: var(--secondary);
    color: white;
    padding: 100px 0;
}

.perche-noi-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .perche-noi-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.perche-noi .section-title {
    margin-bottom: 24px;
    color: white;
}

.perche-noi .section-desc {
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.features-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 30px;
}

@media (max-width: 640px) {
    .features-grid-v2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.feature-item-v2 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon-v2 {
    width: 54px;
    height: 54px;
    background-color: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.2);
}

.feature-text-v2 h3 {
    font-size: 1.15rem;
    color: white;
    margin-bottom: 8px;
    font-weight: 700;
}

.feature-text-v2 p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.perche-noi-image {
    position: relative;
    padding: 20px;
    margin-top: 100px;
    /* Align top of image with .section-desc */
    display: flex;
    flex-direction: column;
    height: calc(100% - 100px);
    /* Fill remaining height */
    justify-content: space-between;
}

@media (max-width: 1024px) {
    .perche-noi-image {
        margin-top: 0;
        height: auto;
    }
}

.testimonial-badge {
    position: absolute;
    bottom: 40px;
    left: -40px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 320px;
    z-index: 10;
    animation: float 4s ease-in-out infinite;
}

@media (max-width: 1200px) {
    .testimonial-badge {
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: none;
    }
}

.testimonial-badge .stars {
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.testimonial-badge .stars span {
    color: var(--text-main);
    font-weight: 700;
    margin-left: 8px;
    font-size: 1rem;
}

.testimonial-badge p {
    color: var(--text-main);
    font-style: italic;
    font-weight: 500;
    line-height: 1.5;
    font-size: 1rem;
}

.opacity-80 {
    opacity: 0.8;
}

/* --- CTA Banner --- */
.cta-banner {
    background-color: var(--primary);
    /* Vibrant Yellow */
    padding: 100px 0;
    color: var(--secondary);
    position: relative;
    overflow: hidden;
}

.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-weight: 900;
    font-size: 2.5rem;
}

.cta-content p {
    color: var(--secondary-light);
    font-size: 1.2rem;
    font-weight: 500;
}

.cta-btn-wrap {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Custom CTA Button for Yellow Background */
.cta-banner .btn-white {
    background-color: var(--secondary);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(20, 47, 122, 0.3);
}

.cta-banner .btn-white:hover {
    background-color: var(--secondary-light);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(20, 47, 122, 0.4);
}

.cta-banner .btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
    box-shadow: none;
}

.cta-banner .btn-outline:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(20, 47, 122, 0.3);
}

/* --- Contatti Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 40px;
    /* Pill shape */
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateX(10px);
}

.info-card .icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.mt-40 {
    margin-top: 40px;
}

/* Expert Voice Section */
.expert-voice {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
    margin-top: 20px;
}

.contact-cta-small {
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.separator-line {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 25px 0;
}

.expert-avatar-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.expert-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 0 3px var(--border-color);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #039855;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 2;
}



/* Pulsing effect for online indicator */
.online-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    border: 2px solid #039855;
    border-radius: 50%;
    animation: pingslow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0;
}

@keyframes pingslow {

    75%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }

    0% {
        opacity: 1;
    }
}

.expert-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expert-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expert-name {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.expert-label {
    font-size: 0.7rem;
    font-weight: 600;
    background: #f2f4f7;
    color: #475467;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.expert-quote {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: normal;
}

.form-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-header h3 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 90%;
}

.text-primary {
    color: var(--primary) !important;
}

.contact-form-div {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.9rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 40px;
    /* More pill-like for 2026 feel */
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-light);
    transition: var(--transition);
    appearance: none;
    /* Remove native arrow */
}

/* Custom Arrow for Select */
.input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23142F7A'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
    cursor: pointer;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    /* Use brand yellow for interaction */
    background-color: white;
    box-shadow: 0 10px 30px rgba(255, 184, 0, 0.15);
    /* Soft yellow glow */
}

.input-group select option {
    padding: 15px;
    background: white;
    color: var(--secondary);
}

.privacy-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.privacy-group input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin-top: 0;
    cursor: pointer;
    flex-shrink: 0;
    appearance: auto;
    /* Use standard checkbox appearance */
    background-color: white;
}

.privacy-group label {
    display: inline !important;
    margin-bottom: 0 !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    line-height: 1.4;
}

.privacy-group label a:hover {
    color: var(--primary) !important;
}

/* --- Footer --- */
.footer {
    background-color: var(--secondary);
    color: white;
    padding: 100px 0 0;
    position: relative;
    overflow: hidden;
}

/* Footer Wave */
.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.footer-wave .shape-fill {
    fill: var(--bg-main);
}

.footer-wave.yellow .shape-fill {
    fill: var(--primary);
}

.footer-content-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.footer-desc {
    color: #9ca3af;
    font-size: 1.1rem;
    line-height: 1.8;
}

.footer-mid {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 30px;
}

.footer-nav {
    display: flex;
    gap: 32px;
}

.footer-nav a {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-info-simple {
    display: flex;
    gap: 24px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-info-simple p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opacity-50 {
    opacity: 0.5;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 24px 0;
    text-align: center;
    width: 100%;
    color: rgba(156, 163, 175, 0.6);
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}


/* --- Scroll Animations --- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* --- Sticky Mobile CTA --- */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: none;
    /* Desktop hidden */
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    border-radius: 20px 20px 0 0;
}

@media (max-width: 768px) {
    .mobile-sticky-cta {
        display: grid;
    }

    .service-card {
        max-width: 100%;
    }

    .reveal-up {
        transform: translateY(20px);
    }

    .reveal-left {
        transform: translateX(-20px);
    }

    .reveal-right {
        transform: translateX(20px);
    }

    .hero-wave svg,
    .footer-wave svg {
        height: 40px;
        width: 150%;
        left: -25%;
    }

    /* Ensure footer/content doesn't get hidden under sticky bar */
    body {
        padding-bottom: 80px;
    }

    .section {
        padding: 40px 0;
    }

    .services-grid {
        padding-bottom: 0;
    }

    .cta-banner {
        padding: 50px 0;
    }
}

.sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
}

.sticky-btn-call {
    background-color: var(--secondary);
    color: white;
}

.sticky-btn-quote {
    background-color: var(--primary);
    color: var(--secondary);
}

/* --- Social Proof Badge --- */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 18px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    width: fit-content;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

.trust-stars {
    color: #fbbc04;
    /* Google Yellow */
    display: flex;
    gap: 2px;
    font-size: 0.8rem;
}

.trust-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.trust-text span {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.footer-link {
    color: inherit;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 9999;
    background: rgba(20, 47, 122, 0.95);
    /* var(--secondary) with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: white;
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
    /* Hidden by default, shown by JS */
}

.cookie-banner.show {
    display: block;
    transform: translateY(0);
}

.cookie-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 0 !important;
}

.cookie-content {
    flex: 1;
}

.cookie-title {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 350px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-cookie-accept {
    flex: 1;
    white-space: nowrap;
}

.btn-cookie-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    white-space: nowrap;
}

.btn-cookie-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cookie-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
}

.cookie-close-btn span {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.7;
}

.cookie-close-btn:hover {
    color: white;
}

.cookie-close-btn:hover span {
    opacity: 1;
}

/* Mobile Adjustments for Cookie Banner */
@media (max-width: 991px) {
    .cookie-banner {
        padding: 25px;
        bottom: 15px;
        left: 15px;
        right: 15px;
        border-radius: 24px;
    }

    .cookie-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .cookie-actions {
        width: 100%;
        align-items: center;
        min-width: unset;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .btn-cookie-secondary,
    .btn-cookie-accept {
        width: 100%;
        padding: 14px;
        font-size: 0.95rem;
    }

    .cookie-text {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    .cookie-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 20px;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        /* Align to bottom for better mobile feel */
        border-bottom: none;
    }

    .cookie-actions {
        gap: 12px;
    }

    .cookie-close-btn {
        top: 10px;
        right: 15px;
    }

    .cookie-close-btn span {
        display: none;
        /* Only show X on small mobile to save space */
    }
}

/* =========================================
   RECENSIONI (TESTIMONIALS & SWIPER)
   ======================================== */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.testimonials-section .section-title {
    margin-bottom: 50px;
}

.review-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
    text-align: left;
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.review-quote-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: rgba(20, 47, 122, 0.05);
    width: 3rem;
    height: 3rem;
}

.review-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.review-text {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 10;
    flex-grow: 1;
    font-size: 1.1rem;
    line-height: 1.6;
}

.review-author {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.review-author-info {
    display: flex;
    align-items: center;
}

.review-author-name {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.review-author-location {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Swiper Fixes: Pallini fuori e verdi */
.testimonialsSwiper {
    padding-bottom: 60px !important;
}

.testimonialsSwiper .swiper-slide {
    height: auto;
    display: flex;
    padding: 10px;
}

.swiper-pagination {
    bottom: 0 !important;
}

.swiper-pagination-bullet {
    background-color: var(--primary) !important;
    opacity: 0.3;
    width: 10px;
    height: 10px;
    transition: var(--transition);
}

.swiper-pagination-bullet-active {
    background-color: var(--primary) !important;
    opacity: 1 !important;
    width: 30px;
    border-radius: 5px;
}

/* --- Hero Section --- */
.lp-hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 200px;
    background-color: var(--secondary);
    /* Deep Blue */
    color: white;
    overflow: hidden;
}

.lp-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='-100 -100 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='50,5 60,40 95,50 60,60 50,95 40,60 5,50 40,40' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center;
    z-index: 1;
    will-change: transform;
    transform: translateY(var(--parallax-offset, 0));
}

.lp-hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}


.lp-hero-content {
    max-width: 800px;
}

.lp-hero-question {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.lp-hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    text-transform: uppercase;
}

/* Bold Outline Text Effect */
.text-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
}

.lp-hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    letter-spacing: 1px;
}

.lp-hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Single Hero Image */
.lp-hero-image-single {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.lp-hero-img-main {
    width: 100%;
    max-width: 500px;
    height: 600px;
    object-fit: cover;
    border-radius: 30px 30px 30px 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 10px solid rgba(255, 255, 255, 0.1);
}

/* --- Page Header (Services) --- */
.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

/* Wavy Divider */
.lp-hero-wave {
    position: absolute;
    bottom: -1px;
    /* overlap to fix sub-pixel rounding rendering line */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.lp-hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.lp-hero-wave .shape-fill {
    fill: var(--bg-main);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .section {
        padding: 60px 0;
    }

    .chi-siamo-container,
    .contact-wrapper,
    .mission-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .mission-image-wrap {
        order: 2;
    }

    .chi-siamo-content {
        order: 1;
    }

    .contact-form-div {
        order: -1;
    }

    .contact-info {
        order: 1;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .img-pill-1 {
        left: 20%;
    }

    .img-pill-2 {
        right: 10%;
    }

    .main-img {
        height: 450px;
        border-radius: 80px 80px 20px 20px;
    }
    .lp-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .lp-hero-content {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lp-hero-actions {
        justify-content: center;
    }

    .lp-hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 80px;
    }

    .navbar .logo-img {
        height: 55px;
    }

    .navbar.scrolled {
        height: 70px;
    }

    .navbar.scrolled .logo-img {
        height: 50px;
    }

    .mobile-toggle {
        display: block;
        padding: 10px;
        margin-right: -10px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 40px;
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
        transform: translateX(0);
    }

    .nav-menu .nav-link {
        color: var(--secondary);
        font-size: 1.1rem;
        font-weight: 600;
        padding: 16px 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .nav-menu .nav-link.active::after {
        display: none;
    }

    .nav-menu .nav-link.active {
        color: var(--primary-dark);
    }

    .nav-item-dropdown {
        width: 100%;
    }

    .nav-item-dropdown .dropdown-toggle::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.8rem;
        transition: transform 0.3s;
    }

    .nav-item-dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: transparent;
        display: none;
        opacity: 1;
        transform: none;
        width: 100%;
        padding: 0 0 0 20px;
        margin: 0;
        border-radius: 0;
    }

    .dropdown-content a {
        padding: 12px 0;
        font-size: 1rem;
        color: var(--text-muted);
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .nav-item-dropdown.active .dropdown-content {
        display: block;
    }

    .nav-cta {
        margin-top: 30px;
        width: 100% !important;
        padding: 16px !important;
    }
    
    .lp-hero {
        padding-top: 140px;
        padding-bottom: 120px;
    }

    .lp-hero-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .lp-hero-desc {
        font-size: 1rem;
        margin-bottom: 30px;
    }


    .hero {
        padding-top: 140px;
        padding-bottom: 120px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-desc {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .hero-image-cluster {
        height: 350px;
    }

    .img-pill-1 {
        width: 180px;
        height: 280px;
        left: 0;
    }

    .img-pill-2 {
        width: 150px;
        height: 220px;
        right: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .main-img {
        height: 350px;
    }

    .chi-siamo-image-wrap {
        padding: 20px;
    }

    .experience-card {
        right: 10px;
        bottom: -20px;
        padding: 15px;
        transform: scale(0.9);
    }

    .features-list {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .cta-banner {
        padding: 60px 0;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .footer .logo-img {
        height: 100px;
    }

    .footer-mid {
        gap: 30px;
    }
}
@media (max-width: 1024px) {
    .lp-hero-image-single {
        justify-content: center !important;
        width: 100% !important;
    }
    
    .lp-hero-img-main {
        margin: 0 auto !important;
    }
}