/* --- VARIABLES Y RESET --- */
:root {
    --primary-blue: #0a2e52;
    /* Azul Corporativo Profundo */
    --accent-green: #00d664;
    /* Verde Energía Brillante */
    --dark-grey: #333333;
    --light-grey: #f4f6f8;
    --white: #ffffff;
    --text-color: #4a4a4a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-blue);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- UTILIDADES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-green);
    color: var(--primary-blue);
    border: 2px solid var(--accent-green);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-green);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.section-title span.underline {
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-green);
    margin: 0 auto;
}

.section-subtitle {
    display: block;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* --- HEADER --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 80px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-green);
}

.cta-header {
    background-color: var(--primary-blue);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
}

.cta-header:hover {
    background-color: var(--accent-green);
    color: var(--primary-blue) !important;
}

/* --- HERO SECTION --- */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(10, 46, 82, 0.6), rgba(10, 46, 82, 0.7)),
        url('images/hero-concept.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 100px;
    /* Offset for fixed header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* --- LOGO CAROUSEL --- */
.logo-slider {
    background-color: var(--light-grey);
    padding: 40px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slider::before,
.logo-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.logo-slider::before {
    left: 0;
    background: linear-gradient(to right, var(--light-grey), transparent);
}

.logo-slider::after {
    right: 0;
    background: linear-gradient(to left, var(--light-grey), transparent);
}

.slider-track {
    display: flex;
    width: calc(200px * 34);
    /* 17 logos * 2 */
    animation: scroll 60s linear infinite;
}

.slide {
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.slide img {
    max-width: 100%;
    max-height: 80px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.3s;
}

.slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 17));
    }
}

@media (max-width: 768px) {
    .slide img {
        filter: grayscale(0%);
        opacity: 1;
    }
}

/* --- VALORES (CARDS) --- */
.values {
    padding: 80px 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.value-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
    border-bottom: 4px solid transparent;
}

.value-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--accent-green);
}

.value-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.value-card h3 {
    margin-bottom: 15px;
}

/* --- SERVICIOS --- */
.services {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 80px 0;
}

.services .section-title h2 {
    color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item h3 {
    color: var(--accent-green);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.service-item ul {
    margin-top: 15px;
    padding-left: 20px;
}

.service-item ul li {
    list-style: disc;
    font-size: 0.85rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

/* --- PROYECTOS --- */
.projects {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 250px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.project-content {
    padding: 25px;
}

.project-tag {
    background-color: var(--light-grey);
    color: var(--primary-blue);
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

.project-content h3 {
    margin: 15px 0 10px;
    font-size: 1.5rem;
}

.project-link {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- FOOTER --- */
footer {
    background-color: #051a2e;
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
}

.footer-col ul li a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.iso-logos {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.iso-logos img {
    max-width: 250px;
    opacity: 1;
    filter: none;
    transition: 0.3s;
}

.iso-logos img:hover {
    filter: brightness(1.1);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-container nav {
        position: absolute;
        width: 100%;
        left: 0;
        top: 0;
        pointer-events: none;
    }

    .nav-links {
        pointer-events: auto;
        display: flex;
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        background-color: var(--white);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        opacity: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-links .cta-header {
        margin-top: 10px;
        display: inline-block;
    }

    /* En un caso real, añadiríamos menú hamburguesa */
    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        margin: 10px 0;
    }

    .btn-outline {
        margin-left: 0;
    }

    .trust-logos img {
        filter: grayscale(0%);
        opacity: 1;
    }
}