:root {
    --primary-color: #0056b3;
    --primary-dark: #004494;
    --secondary-color: #28a745;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-grey: #343a40;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

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

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

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    /* Let links define height */
}

.header__inner {
    display: flex;
    justify-content: space-between;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav__list {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    font-weight: 500;
    color: var(--text-color);
    color: var(--text-color);
    display: inline-block;
    padding: 30px 15px;
    /* Vertical padding to fill header height */
}

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

.mobile-menu-toggle {
    display: none;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    border: none;
}

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

.btn--primary:hover {
    background: var(--primary-dark);
}

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

/* Hero Redesign (Split Layout with Slider) */
.hero {
    background-image: url('/assets/img/sfondo_hero_home.jpg');
    /* Absolute path */
    background-color: var(--white);
    /* Fallback */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* CSS shape removed */

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__content h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--dark-grey);
    line-height: 1.1;
    font-weight: 800;
}

.hero__content p {
    font-size: 1.25rem;
    margin-bottom: 35px;
    color: #555;
    max-width: 90%;
}

/* Right side Image/Slider Placeholder */
/* Hero Slider (Ken Burns) */
.hero__image {
    display: block;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__slider-container {
    width: 100%;
    max-width: 600px;
    height: 400px;
    /* Fixed height per user request */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background: #000;
}

.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform-origin: center center;
    transform: scale(1);
    z-index: 1;
}

.hero__slide.active {
    opacity: 1;
    z-index: 2;
    animation: kenBurns 7s linear forwards;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
        /* Gentle zoom */
    }
}

@media (max-width: 991px) {
    .hero {
        text-align: center;
        padding: 60px 0;
    }

    .hero::before {
        width: 100%;
        height: 50%;
        /* Yellow at bottom? */
        top: auto;
        bottom: 0;
        clip-path: polygon(0 20%, 100% 0, 100% 100%, 0% 100%);
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
        background: transparent;
        padding: 0;
        margin: 0;
    }

    .hero__content p {
        margin: 0 auto 30px auto;
    }

    .hero__image {
        margin-top: 20px;
    }
}

/* Form */
.lead-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.lead-form h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.form-row {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

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

.form-action {
    margin-top: 20px;
}

/* Specific Gold Button for Lead Form */
.lead-form .btn--primary {
    background-color: #f7b90e !important;
    /* Force Gold */
    color: #fff;
    transition: background-color 0.3s ease;
}

.lead-form .btn--primary:hover {
    background-color: #dfa60c !important;
    /* Darker Gold */
}

/* Service Detail Page Styles */
.service-use-cases strong,
.service-use-cases b,
.feature-list strong,
.feature-list b,
.service-content strong,
.service-content b {
    color: #f7b90e !important;
    /* Force Gold */
}

.btn--full {
    width: 100%;
    text-align: center;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    margin-bottom: 15px;
    color: #f7b90e;
    /* Updated color per user request */
}

.service-card a {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    background: #f7b90e;
    /* Gold background per user request */
    margin-bottom: 30px;
    width: 100%;
    color: var(--white);
    /* Ensure text is visible on gold */
}

.breadcrumbs ul {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--white);
    /* White links on gold */
    font-weight: 500;
}

.breadcrumbs span {
    color: rgba(255, 255, 255, 0.8);
    /* Lighter white for separators */
}

/* Footer */
.footer {
    background: var(--dark-grey);
    color: #ccc;
    padding: 50px 0;
    margin-top: auto;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #555;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Legal Pages */
.legal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.legal-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--dark-grey);
    border-bottom: 2px solid #f7b90e;
    padding-bottom: 10px;
    display: inline-block;
}

.legal-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Mobile */
@media (max-width: 768px) {
    .header__inner {
        flex-wrap: wrap;
        justify-content: center;
        /* Center logo if no menu */
    }

    .nav {
        display: none;
        /* Hide nav completely on mobile */
    }

    .breadcrumbs {
        display: none;
    }

    .hero__grid {
        grid-template-columns: 1fr;
    }

    .hero {
        text-align: center;
        padding: 40px 0;
    }

    .hero__content h1 {
        font-size: 2rem;
    }

    .hero__content {
        padding: 0 15px;
    }

    .section h3 {
        padding: 0 15px;
    }
}

/* Mega Menu */
.nav__item--has-dropdown {
    position: static;
    /* Key for full-width */
}

.nav__megamenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid #f1f1f1;
    border-top: 1px solid #f1f1f1;
    padding: 30px 0;

    /* Reset previous hacks */
    margin-top: 0;
}

.nav__item--has-dropdown:hover .nav__megamenu {
    display: block;
}

.megamenu__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.megamenu__col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    /* Little accent */
    padding-bottom: 10px;
    display: inline-block;
}

.megamenu__col ul {
    list-style: none;
}

.megamenu__col li {
    margin-bottom: 10px;
}

.megamenu__col a {
    color: var(--text-color);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
    transition: transform 0.2s, color 0.2s;
}

.megamenu__col a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    background: transparent;
}

@media (max-width: 991px) {

    /* Changed breakpoint slightly */
    .nav__megamenu {
        position: static;
        box-shadow: none;
        padding: 0;
        border-top: none;
        display: none;
        /* Hidden by default on mobile */
    }

    .nav__item--has-dropdown:hover .nav__megamenu {
        display: block;
        /* Show if clicked/tapped */
    }

    .megamenu__container {
        display: block;
        /* Stack on mobile */
        padding: 10px 20px;
    }

    .megamenu__col {
        margin-bottom: 20px;
    }
}

/* Features List */
/* Features List */
.feature-list {
    list-style: none;
    margin-top: 15px;
    margin-bottom: 40px;
}

.feature-list li {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.feature-list li strong {
    color: var(--primary-color);
}

/* Service Content Layout */
.service-content h2 {
    margin-bottom: 20px;
    font-size: 2.2rem;
    color: var(--primary-color);
}

.service-content h3 {
    margin-top: 50px;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--dark-grey);
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.service-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}