/* Variables de colores */
:root {
    --primary-red: #e31010;
    --black: #000000;
    --white: #FFFFFF;
    --dark-grey: #1a1a1a; /* Un gris oscuro para fondos */
    --light-grey: #f0f0f0; /* Un gris claro para texto secundario */
}

/* Reseteo básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', sans-serif;
    line-height: 1.6;
    background-color: var(--black); /* Fondo general oscuro */
    color: var(--white);
    overflow-x: hidden; /* Previene scroll horizontal */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--black);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Estilos para la imagen del logo */
.logo .logo-img {
    height: 120px; /* Ajusta la altura de tu logo para que se vea bien */
    width: auto; /* Mantiene la proporción */
    display: block; /* Elimina espacio extra si la imagen es inline */
}


.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-right: 30px;
}

.nav-links li a {
    color: var(--white);
    text-decoration: none;
    font-family: 'Barlow', sans-serif; /* Barlow Stralight para enlaces */
    font-weight: 400; /* Stralight */
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--primary-red);
}

.hamburger {
    display: none; /* Oculto por defecto en desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--white);
}

.close-menu {
    display: none; /* Oculto por defecto en desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--white);
    position: absolute;
    top: 20px;
    right: 30px;
}

/* --- Estilos Corregidos y Robustos para Banderas --- */
.languages {
    display: flex;
    align-items: center; /* Centra verticalmente los enlaces */
    gap: 10px;
}

/* Forzamos el tamaño del ENLACE que contiene la bandera */
.languages a {
    display: block; /* Importante para que acepte las dimensiones */
    width: 25px;
    height: 16px;
    line-height: 0; /* Evita espacios extra verticales */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Hacemos que la IMAGEN ocupe el 100% de su enlace */
.languages .flag {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que no se deforme */
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* [cite: 31] */
    /* Placeholder, reemplaza con una imagen relevante de TRES SISTEMAS */
    background: url('https://via.placeholder.com/1920x1080/000000/FFFFFF?text=Fondo+Tres+Sistemas') no-repeat center center/cover;
    overflow: hidden;
    margin-top: 80px; /* Espacio para el header fijo */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)); /* Superposición oscura [cite: 34] */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    text-align: center; /* Asegura el centrado del texto dentro del contenedor  */
}

.hero-content h1 {
    font-family: 'Barlow', sans-serif; /* Barlow para títulos [cite: 36] */
    font-weight: 700; /* Negrita [cite: 36] */
    font-size: 4.5em;
    margin-bottom: 20px;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-family: 'Barlow', sans-serif; /* Barlow Stralight para cuerpo [cite: 39] */
    font-weight: 400; /* Stralight [cite: 39] */
    font-size: 1.4em;
    color: var(--light-grey);
    line-height: 1.5;
}

/* Features Section (Cards) - Página de Inicio */
.features-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px 40px;
    background-color: var(--black);
    color: var(--white);
    flex-wrap: wrap; /* Permite que las tarjetas se envuelvan en pantallas pequeñas [cite: 41] */
}

.feature-card {
    background-color: var(--dark-grey); /* Fondo de la tarjeta [cite: 42] */
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    max-width: 380px;
    flex: 1;
    min-width: 300px; /* Asegura un tamaño mínimo para las tarjetas [cite: 43] */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.card-icon {
    font-size: 3.5em;
    color: var(--primary-red);
    margin-bottom: 25px;
}

.card-title {
    font-family: 'Barlow', sans-serif; /* Barlow Medium para subtítulos [cite: 47] */
    font-weight: 500; /* Medium [cite: 47] */
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--white);
    text-transform: uppercase;
}

.card-description {
    font-family: 'Barlow', sans-serif; /* Barlow Stralight para cuerpo [cite: 49] */
    font-weight: 400; /* Stralight [cite: 49] */
    font-size: 1.1em;
    color: var(--light-grey);
    line-height: 1.6;
}

/* Sección de Servicios - Nueva */
/* --- ESTILOS CORREGIDOS Y COMPLETOS PARA PÁGINA DE SERVICIOS --- */

/* Contenedor principal de la sección */
.services-section {
    padding: 80px 40px;
    margin-top: 80px;
}

/* Bloque del título y subtítulo */
.services-section .hero-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 100px; /* <-- Espacio aumentado solicitado */
    text-align: center;
}

/* Contenedor de la cuadrícula de tarjetas */
.service-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Estilo individual de cada tarjeta de servicio */
.service-card {
    background-color: var(--dark-grey);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.service-card .service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5em; /* [cite: 51] */
    }
    .hero-content p {
        font-size: 1.2em; /* [cite: 52] */
    }
    .feature-card, .service-card {
        max-width: 45%; /* Dos columnas en tablets [cite: 53] */
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px; /* [cite: 54] */
    }
    .logo .logo-img {
        height: 45px; /* Ajuste del tamaño del logo para móviles [cite: 55] */
    }
    .nav-links {
        position: fixed; /* [cite: 56] */
        top: 0;
        right: -100%; /* Oculto por defecto [cite: 56] */
        width: 70%;
        height: 100%; /* [cite: 57] */
        background-color: var(--dark-grey); /* [cite: 57] */
        flex-direction: column;
        justify-content: center;
        gap: 25px;
        transition: right 0.4s ease-in-out;
        z-index: 999; /* [cite: 58] */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.7); /* [cite: 58] */
    }
    .nav-links.active {
        right: 0; /* Muestra el menú [cite: 59] */
    }
    .nav-links li a {
        font-size: 1.5em; /* [cite: 60] */
    }
    .hamburger {
        display: block; /* Muestra el botón de hamburguesa [cite: 61] */
    }
    .close-menu {
        display: block; /* Muestra el botón de cerrar [cite: 62] */
    }
    .languages {
        margin-right: 20px; /* Ajuste para el espacio del menú [cite: 63] */
    }

    .hero-section, .services-section {
        margin-top: 65px; /* Ajusta el margen para el header más pequeño [cite: 64] */
    }
    .hero-content h1 {
        font-size: 2.8em; /* [cite: 65] */
    }
    .hero-content p {
        font-size: 1.1em; /* [cite: 66] */
    }
    .features-section, .services-section {
        flex-direction: column;
        align-items: center;
        padding: 50px 20px; /* [cite: 67] */
    }
    .feature-card, .service-card {
        max-width: 90%; /* Una columna en móviles [cite: 68] */
        width: 100%;
        padding: 30px; /* [cite: 69] */
    }
    .card-title {
        font-size: 1.6em; /* [cite: 70] */
    }
    .card-description {
        font-size: 1em; /* [cite: 71] */
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2em; /* [cite: 72] */
    }
    .hero-content p {
        font-size: 0.95em;
    }
}
/* --- Estilos para el Footer --- */

.site-footer {
    background-color: var(--primary-red); /* Color rojo principal, igual al de los iconos */
    color: var(--white);
    padding: 60px 40px 0;
    font-family: 'Barlow', sans-serif;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 280px;
    padding: 0 15px;
}

.footer-column h3 {
    font-weight: 700;
    font-size: 1.5em;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 10px;
}

.footer-column p {
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-column a:hover {
    opacity: 0.8;
}

.footer-certs .cert-images {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-certs img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-certs img:hover {
    transform: scale(1.1);
}

.footer-bottom {
    background-color: var(--black);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    margin-left: -40px;
    margin-right: -40px;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9em;
    color: var(--light-grey);
}


/* --- Ajustes responsivos para el Footer --- */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px 0;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        min-width: 100%;
        max-width: 400px;
    }

    .footer-column h3 {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .footer-certs .cert-images {
        justify-content: center;
    }

    .footer-bottom {
        margin-left: -20px;
        margin-right: -20px;
    }
}
/* --- Estilos para la Página "Nosotros" --- */
.about-section {
    padding: 60px 40px;
    background-color: var(--black);
    color: var(--white);
    margin-top: 80px; /* Espacio para el header fijo */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--dark-grey);
    padding: 50px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-content h1 {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 2.8em;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 30px;
    text-align: center;
}

.about-content .intro-text {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--light-grey);
    margin-bottom: 30px;
    text-align: justify;
}

.about-content h2 {
    font-weight: 500;
    font-size: 1.6em;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 25px;
    color: var(--white);
    border-bottom: 1px solid var(--primary-red);
    padding-bottom: 10px;
}

.milestones-list {
    list-style: none;
    padding-left: 0;
}

.milestones-list li {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--light-grey);
    padding-left: 35px;
    position: relative;
    margin-bottom: 20px;
}

.milestones-list li::before {
    content: '\f135'; /* Icono de cohete de Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-red);
    position: absolute;
    left: 0;
    top: 5px;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .about-section {
        margin-top: 65px; /* Ajuste para header móvil */
        padding: 40px 20px;
    }
    .about-content {
        padding: 30px 25px;
    }
    .about-content h1 {
        font-size: 2.2em;
    }
}
/* --- Estilos para el Banner de Cookies --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-grey);
    color: var(--light-grey);
    padding: 25px 40px;
    z-index: 2000;
    display: none; /* Oculto por defecto, JavaScript lo mostrará */
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9em;
    flex-grow: 1; /* Permite que el texto ocupe el espacio disponible */
}

.cookie-banner p a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner p a:hover {
    color: var(--primary-red);
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

.cookie-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.cookie-btn.accept {
    background-color: var(--primary-red);
    color: var(--white);
}

.cookie-btn.reject {
    background-color: #555;
    color: var(--light-grey);
}

/* --- Responsive para el banner de cookies --- */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}
/* Ocultar elementos del Traductor de Google */
body { top: 0 !important; }
.goog-te-banner-frame { display: none !important; }

/* --- Estilos para enlaces legales en el footer --- */
.footer-legal {
    margin-top: 15px;      /* Reduce el espacio para subir los enlaces */
    text-align: left;        /* Alinea los enlaces a la izquierda */
}

.footer-legal a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 400; 
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 0.8;
}

.footer-legal .separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

/* En móvil los dejamos centrados que queda mejor */
@media (max-width: 768px) {
    .footer-legal {
        text-align: center;
        margin-top: 20px;
    }
}