/* --- VARIABLES & RESET --- */
:root {
    --primary: #009FE3; /* Azul vibrante de tu logo (aprox) */
    --primary-dark: #007bb0;
    --dark: #111111;
    --grey: #f4f4f4;
    --text: #333333;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TIPOGRAFÍA --- */
h1, h2, h3 { color: var(--dark); font-weight: 700; line-height: 1.2; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; text-align: center; }
.section-subtitle {
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 14px 30px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    border-radius: 5px;
    border: 2px solid var(--primary);
}
.btn:hover { background: transparent; color: var(--primary); }

/* --- HEADER --- */
header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0; /* Reducido un poco para que sea más elegante */
}
.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; /* ESTO centra verticalmente todo el contenido */
    height: 60px; /* Altura fija para asegurar el centrado real */
}
.logo {
    display: flex;
    align-items: center;
}

.logo img { 
    height: 50px; 
    width: auto;
    display: block;
}

.nav-links { 
    display: flex; 
    gap: 30px; 
    align-items: center; /* Centra los enlaces entre sí */
    margin: 0;
    padding: 0;
}

.nav-links a { 
    font-weight: 500; 
    font-size: 0.95rem; 
    display: flex;
    align-items: center;
    height: 100%; /* Para que el área de clic sea proporcional */
    line-height: 1; /* Evita que el interlineado empuje el texto hacia abajo */
}
.nav-links a:hover { color: var(--primary); }

.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTION --- */
#hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; color: var(--white); }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* --- SERVICIOS --- */
section { padding: 80px 0; }
.bg-grey { background: var(--grey); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-10px); }
.service-card i { font-size: 3rem; color: var(--primary); margin-bottom: 20px; }
.service-card h3 { margin-bottom: 15px; }

/* --- QUIENES SOMOS (Split Layout) --- */
.split-layout {
    display: flex;
    align-items: center; 
    gap: 50px;
}
.split-content {
    flex: 1; 
}
.split-image {
    flex: 1; 
    display: flex;
    justify-content: center; 
}
.split-image img {
    width: 100%; 
    height: auto; 
    max-height: 600px; 
    object-fit: contain; 
    border-radius: 10px;
    box-shadow: var(--shadow);
}


/* --- LOCALIZACIÓN & CONTACTO --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 10px;
    overflow: hidden;
}
.contact-info { padding: 50px; background: var(--dark); color: var(--white); }
.contact-info h3 { color: var(--white); margin-bottom: 20px; }
.info-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.info-item i { color: var(--primary); font-size: 1.2rem; }
.map-frame { width: 100%; height: 100%; min-height: 400px; border: 0; }

/* --- FOOTER (El diseño mejorado) --- */
footer { background: #0a0a0a; color: #bbb; padding-top: 60px; font-size: 0.9rem; }
.footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer h4 { color: var(--white); margin-bottom: 20px; border-left: 3px solid var(--primary); padding-left: 10px; }
.footer-bottom {
    border-top: 1px solid #222;
    padding: 30px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espacio entre el copyright y los enlaces */
}

.footer-bottom p {
    margin: 0;
    color: #bbbbbb;
    font-size: 0.9rem;
}

.legal-links {
    font-size: 0.85rem; /* Un poco más pequeño que el texto principal */
    color: #888888;
}

.legal-links a {
    color: #bbbbbb; /* Mismo gris que el texto */
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--primary); /* Se ilumina en azul al pasar el ratón */
    text-decoration: underline; /* Opcional: subrayado al pasar el ratón */
}

.legal-links .separator {
    margin: 0 8px; /* Espacio alrededor de los guiones */
    color: #555555; /* Un gris más oscuro para que los guiones no distraigan */
}
.social-links a { font-size: 1.2rem; margin-right: 15px; color: var(--white); }
.social-links a:hover { color: var(--primary); }

/* --- PÁGINAS LEGALES (Aviso Legal, Privacidad, Cookies) --- */

.legal-section {
    padding: 80px 0;
    background-color: var(--white);
    min-height: 60vh; /* Asegura que no quede vacío si hay poco texto */
}

/* Contenedor más estrecho para facilitar la lectura */
.legal-container {
    max-width: 800px; 
    margin: 0 auto;
}

.legal-container h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: left; /* Títulos alineados a la izquierda para documentos */
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.legal-container h2 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--dark);
    text-align: left;
}

.legal-container p {
    margin-bottom: 15px;
    color: #555;
    text-align: justify; /* Justificado para aspecto de documento formal */
}

/* Caja de datos de empresa */
.company-data-box {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary); /* Borde azul a la izquierda */
    margin: 30px 0;
}

.company-data-box ul {
    padding: 0;
    list-style: none;
}

.company-data-box li {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.company-data-box strong {
    color: var(--dark);
    font-weight: 600;
    min-width: 150px;
    display: inline-block;
}

.company-data-box a {
    color: var(--primary);
    font-weight: 500;
}

.company-data-box a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-container h1 {
        font-size: 2rem;
    }
    .company-data-box {
        padding: 20px;
    }
    .company-data-box strong {
        display: block; /* En móvil, poner la etiqueta encima del dato */
        margin-bottom: 2px;
    }
    .company-data-box li {
        margin-bottom: 15px;
    }
}

/* --- COOKIE CONSENT STYLES --- */
.cookie-overlay {
    position: fixed;
    top: 0; /* Cambiado de bottom a top para asegurar cobertura total */
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85); /* Más oscuro para que se note */
    z-index: 999999; /* Máxima prioridad */
    display: none; 
    align-items: center; 
    justify-content: center;
    padding: 20px;
}

.cookie-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.cookie-box h3 { margin-bottom: 15px; font-size: 1.4rem; color: #111; }
.cookie-box p { font-size: 0.95rem; color: #666; margin-bottom: 20px; }

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cookie {
    background: #009FE3; /* Tu azul */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-cookie:hover { background: #007bb0; }
.btn-outline { background: #eee; color: #333; }
.btn-outline:hover { background: #ddd; }
.btn-link { background: none; color: #888; border: none; text-decoration: underline; cursor: pointer; }

/* Opciones de configuración */
.cookie-option {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.cookie-option label { display: block; cursor: pointer; }
.cookie-option span { display: block; font-size: 0.8rem; color: #999; margin-left: 25px; }

@media (min-width: 768px) {
    .cookie-overlay { align-items: center; } /* En PC centrado total */
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: var(--white); flex-direction: column; padding: 20px; text-align: center; box-shadow: 0 10px 10px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .hero-content h1 { font-size: 2.5rem; }
    .split-layout {
        flex-direction: column; 
    }
    
    .split-image {
        width: 100%;
        margin-bottom: 30px;
    }

    .split-image img {
        width: auto; 
        max-width: 100%; 
        max-height: 500px; 
    }
}
    .contact-wrapper { grid-template-columns: 1fr; }
}