:root {
    --teal: #21aa9f;
    --navy: #051340;
    --gray-dark: #5b5e6c;
    --gray-light: #b1b4bd;
    --bg-white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg-white); color: var(--gray-dark); overflow-x: hidden; }

h1, h2, h3 { color: var(--navy); }
p { line-height: 1.6; }

/* --- 1. NAVBAR Y MENÚ --- */
/* --- 1. NAVBAR Y MENÚ --- */
.navbar {
    position: fixed; width: 100%; top: 0; z-index: 1000;
    height: 80px; background: var(--navy);
    border-bottom: 1px solid var(--gray-dark);
    display: flex; 
    align-items: center; 
    padding: 0 5%;
}

.logo-img {
    position: absolute; /* Lo sacamos del flujo para que desborde */
    top: 5px; /* Controla desde dónde cuelga */
    left: 5%;
    height: 110px; /* Mayor que los 80px del navbar para crear el desborde */
    width: auto;
    filter: drop-shadow(0 6px 10px rgba(5, 19, 64, 0.4));
    z-index: 1010;
}

.nav-links { 
    display: flex; gap: 30px; align-items: center; 
    margin-left: auto; /* Empuja el menú estrictamente a la derecha */
}
.nav-links a {
    color: #ffffff; text-decoration: none; font-weight: 600; font-size: 15px;
    text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.3s;
}
.nav-links a:hover { color: var(--teal); }

/* Ocultar menú en móvil */
@media (max-width: 768px) {
    .nav-links { display: none; }
}

/* --- 2. HERO SECTION --- */
.hero {
    position: relative; padding: 160px 5% 80px;
    text-align: center; min-height: 80vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background-image: linear-gradient(rgba(5, 19, 64, 0.85), rgba(5, 19, 64, 0.95)), url('imagenChemestry.jpg');
    background-size: cover; background-position: center;
}

.hero-text { max-width: 1000px; margin: 0 auto; }
.hero h1 {
    font-family: 'Urbanist', sans-serif; font-size: 42px; color: var(--bg-white);
    margin-bottom: 30px; line-height: 1.2;
}
.highlight-teal { color: var(--teal); }

.btn-main {
    background-color: var(--teal); color: var(--bg-white); border: none;
    padding: 15px 35px; font-size: 1.1rem; font-weight: 600; border-radius: 5px;
    cursor: pointer; transition: background 0.3s, transform 0.2s; margin-bottom: 20px;
    text-transform: uppercase;
}
.btn-main:hover { background-color: #178a80; transform: scale(1.02); }

.hero-expandable {
    display: none; 
    margin-top: 20px;
}
.hero-expandable.active {
    display: block; 
}
.hero p {
    color: #e2e8f0; font-size: 1.15rem; text-align: justify; margin-bottom: 15px;
}
.text-accent { color: var(--teal); font-weight: bold; }

/* --- 3. SECCIONES CON IMAGEN DE FONDO GLOBAL --- */
.secciones-fondo-global {
    /* AQUÍ VA TU ENLACE PARA LA IMAGEN DE FONDO TRAS LAS ETIQUETAS */
    background-image: url('media/IndustriaQuímica.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    position: relative;
}
/* Capa oscura para que el fondo no sature */
.secciones-fondo-global::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(248, 249, 250, 0.85); 
    z-index: 0;
}
.secciones-fondo-global > * { position: relative; z-index: 1; } 

.padding-section { padding: 80px 5%; }
.section-title { text-align: center; font-size: 2.3rem; margin-bottom: 50px; color: var(--navy); }
.grid-container, .grid-3-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

/* Tarjetas sin imagen individual, color sólido blanco */
.service-card, .method-card {
    background-color: var(--bg-white);
    padding: 40px 30px; border-radius: 8px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    min-height: 200px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: 1px solid #eee;
}

.service-card h3, .method-card h3 { color: var(--navy); font-size: 1.4rem; margin-bottom: 0; transition: margin-bottom 0.4s ease; }
.method-card .step-number { color: var(--teal); font-size: 2rem; font-weight: bold; margin-bottom: 10px; }

/* Efecto de mostrar texto en tarjetas al hacer hover */
.service-card p, .method-card p {
    color: var(--gray-dark); max-height: 0; opacity: 0; overflow: hidden;
    text-align: justify; transition: max-height 0.6s ease, opacity 0.5s ease, margin-top 0.4s ease;
}
.service-card:hover h3, .method-card:hover h3 { margin-bottom: 20px; color: var(--teal); }
.service-card:hover p, .method-card:hover p { max-height: 500px; opacity: 1; margin-top: 10px; }

/* --- 4. SECCIÓN DE CONTACTO --- */
.contact-section { background-color: var(--navy); color: var(--bg-white); }
.section-title-left { font-size: 2.3rem; margin-bottom: 30px; color: var(--bg-white); text-align: left; }
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

.contact-text p { color: #e2e8f0; margin-bottom: 20px; text-align: justify; }

.b2b-form { background: var(--bg-white); padding: 40px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.b2b-form .input-group { margin-bottom: 20px; }
.b2b-form label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--navy); }
.b2b-form input, .b2b-form textarea { width: 100%; padding: 12px; border: 1px solid var(--gray-light); border-radius: 4px; font-family: 'Inter', sans-serif; transition: border-color 0.3s; }
.b2b-form input:focus, .b2b-form textarea:focus { outline: none; border-color: var(--teal); }
.b2b-form .submit-btn { background: var(--teal); color: white; border: none; padding: 15px 30px; cursor: pointer; border-radius: 4px; font-weight: bold; width: 100%; text-transform: uppercase; transition: background 0.3s, transform 0.2s; }
.b2b-form .submit-btn:hover { background: #178a80; transform: translateY(-2px); }

/* Adaptación a móviles para el contacto */
@media (max-width: 900px) {
    .contact-container { grid-template-columns: 1fr; }
}

/* --- 6. CONSENTIMIENTO LEGAL FORMULARIO --- */
.legal-consent { margin-bottom: 20px; text-align: left; }
.checkbox-container { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; margin-bottom: 12px; cursor: pointer; color: var(--navy); font-weight: 600; }
.checkbox-container input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--teal); }
.checkbox-container a { color: var(--teal); text-decoration: underline; }
.legal-text-box { background: #f8f9fa; padding: 12px; border: 1px solid var(--gray-light); border-radius: 4px; font-size: 0.75rem; color: var(--gray-dark); line-height: 1.4; text-align: justify; }

/* --- 5. FOOTER Y LEGAL --- */
.legal-footer {
    background-color: #020a22; /* Tono ligeramente más oscuro que var(--navy) para diferenciarlo */
    color: var(--gray-light);
    padding: 40px 5%;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-social .social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s, transform 0.2s;
}

.footer-social .social-link:hover {
    color: var(--teal);
    transform: translateY(-2px); /* Pequeño salto al pasar el ratón */
}

/* Adaptación a móviles */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
}

/* --- 7. DOCUMENTOS LEGALES (Privacidad, Cookies, Aviso Legal) --- */
.legal-document {
    max-width: 900px;
    margin: 140px auto 80px auto; /* Margen superior amplio para salvar el navbar fijo */
    padding: 0 5%;
    color: var(--gray-dark);
}

.legal-document h1 {
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 40px;
    text-align: center;
}

.legal-document h2 {
    font-size: 1.5rem;
    color: var(--teal);
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 5px;
}

.legal-document h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-document p {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-document ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.legal-document li {
    margin-bottom: 8px;
    line-height: 1.6;
}