/* --- VARIABLES DE COLORES (Paleta Minimalista) --- */
:root {
    /* MODO CLARO (MEJORADO PARA LECTURA) */
    --bg-color: #ffffff;          /* Blanco puro para máximo contraste */
    --text-color: #121212;        /* Casi negro (antes era gris suave) */
    --primary-color: #2E7D32;     /* Verde un poco más oscuro y serio para leer mejor */
    --secondary-color: #1B5E20;   
    --card-bg: #f4f7f4;           /* Un gris verdoso muy sutil para diferenciar tarjetas */
    --nav-bg: #ffffff;            
    --shadow: 0 4px 15px rgba(0,0,0,0.1); /* Sombra un poco más marcada */
    --hero-overlay: rgba(255, 255, 255, 0.4); /* Capa clara sobre la imagen del hero */
    --footer-bg: #e0e8e0;
}

/* MODO OSCURO (Agradable, no negro puro) */
body.dark-mode {
    --bg-color: #1a2622;          /* Verde/Gris muy oscuro (Dark Jungle) */
    --text-color: #e0e0e0;        /* Blanco hueso */
    --primary-color: #81c784;     /* Verde pastel brillante */
    --secondary-color: #66bb6a;
    --card-bg: #24342e;           /* Un tono más claro que el fondo */
    --nav-bg: #1a2622;
    --shadow: 0 4px 15px rgba(0,0,0,0.3);
    --hero-overlay: rgba(0, 0, 0, 0.4);
    --footer-bg: #141e1b;
}

/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- NAVEGACIÓN --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--nav-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links li a:hover, .nav-links li a.active {
    color: var(--primary-color);
}

.btn-contact-nav {
    border: 2px solid var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
}

.btn-contact-nav:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

/* Botón Hamburguesa (Oculto en PC) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Botón Tema */
.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

/* --- HERO SECTION --- */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?q=80&w=2560&auto=format&fit=crop') no-repeat center center/cover;
    /* Nota: He puesto una imagen genérica de bosque de Unsplash, puedes cambiarla */
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a2622; /* Texto oscuro sobre imagen clara si no carga, ajustar según imagen */
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
}

body.dark-mode .hero-content h1 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    transition: transform 0.3s;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* --- SECCIONES GENERALES --- */
.section {
    padding: 4rem 5%;
    text-align: center;
}

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

.section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-subtitle {
    margin-bottom: 3rem;
    color: var(--text-color);
    opacity: 0.8;
}

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

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-align: left;
}

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

.icon-card {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 1rem;
}

/* CTA Section Intermedia */
.cta-section {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}
.cta-section h2 { color: white; }

/* --- FOOTER / CONTACTO --- */
.footer {
    background-color: var(--footer-bg);
    padding: 3rem 5%;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 2rem 0;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 10px;
    border-radius: 10px;
    background-color: var(--card-bg);
    width: fit-content;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 1.5rem;
}

.fa-whatsapp { color: #25D366; }
.fa-google { color: #DB4437; }

.social-icons {
    margin-top: 1rem;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-color);
    opacity: 0.6; /* Efecto deshabilitado/próximamente */
}
/* --- ESTILOS NUEVOS PARA REDES SOCIALES --- */
.social-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.8rem; /* Íconos más grandes */
    transition: transform 0.3s, color 0.3s;
}

/* Colores específicos al pasar el mouse */
.social-link:hover .fa-tiktok { color: #000000; }
.social-link:hover .fa-youtube { color: #FF0000; }
.social-link:hover .fa-instagram { color: #E1306C; }

/* Animación al pasar el mouse */
.social-link:hover {
    transform: translateY(-5px); /* El ícono salta un poquito */
}

/* Corrección extra para texto en modo claro */
body:not(.dark-mode) .hero-content h1, 
body:not(.dark-mode) .hero-content p {
    color: #000; /* Fuerza negro puro en el título principal en modo claro */
    text-shadow: 0 0 10px rgba(255,255,255, 0.8); /* Halo blanco para que se lea sobre la foto */
}

/* --- RESPONSIVE (CELULAR) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* Mostrar hamburguesa */
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-150%); /* Ocultar arriba */
        transition: transform 0.3s ease-in-out;
        box-shadow: var(--shadow);
        border-bottom: 2px solid var(--primary-color);
    }

    .nav-links.active {
        transform: translateY(0); /* Mostrar al hacer click */
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* --- ESTILOS PÁGINA PERFIL --- */
.profile-hero {
    padding: 100px 5%;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
}

.grid-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.profile-text h1 {
    font-size: 3.5rem;
    margin: 10px 0;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Espacio para la foto */
.image-placeholder {
    width: 100%;
    height: 450px;
    background: #e0e0e0;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: #bbb;
    border: 5px solid var(--primary-color);
}

/* Grid de Valores */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Ventajas Competitivas */
.competencies {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.comp-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.comp-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.1;
}

/* Ajustes Responsive para Perfil */
@media (max-width: 768px) {
    .grid-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .profile-text h1 { font-size: 2.5rem; }
    .image-placeholder { height: 300px; }
}
/* --- ESTILOS PÁGINA SERVICIOS AMBIENTALES --- */
.services-header {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 5% 60px;
    text-align: center;
}

.services-header h1 { font-size: 3rem; margin-top: 15px; }

.section-title-box {
    margin-bottom: 40px;
    border-left: 5px solid var(--primary-color);
    padding-left: 20px;
    text-align: left;
}

.services-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-item-detail {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
}

.service-item-detail .number {
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0.5;
}

/* Sección Oscura/Verde para Planes */
.bg-dark-green {
    background-color: #1b2e25;
    color: #e8f5e9;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
}

.quote {
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 15px 0;
}

.custom-list {
    list-style: none;
    margin-top: 20px;
}

.custom-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.custom-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Video/Foto Placeholder */
.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #2a4036;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--primary-color);
    cursor: pointer;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Cards Especiales */
.card-special {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.card-img-placeholder {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.cta-mini {
    margin-top: 20px;
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.cta-mini:hover {
    background: var(--primary-color);
    color: white;
}

/* Celular */
@media (max-width: 768px) {
    .split-content { grid-template-columns: 1fr; }
    .services-header h1 { font-size: 2rem; }
}
/* --- ESTILOS ESPECÍFICOS PARA SG-SST (CORREGIDO) --- */

/* 1. HERO SECTION (Arregla el texto amontonado) */
.hero-sst {
    min-height: 80vh; /* Altura flexible */
    background: url('https://images.unsplash.com/photo-1581094794329-cd1361dca027?q=80&w=2000&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px; 
    padding-bottom: 40px;
}

.hero-overlay-dark {
    background-color: rgba(0, 0, 0, 0.65);
    width: 100%;
    height: 100%;
    min-height: 80vh; 
    display: flex;
    flex-direction: column; /* <--- ¡ESTO ES LO QUE ARREGLA EL TEXTO AMONTONADO! */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-sst h1 {
    margin: 20px 0;
    line-height: 1.3;
}

.hero-sst p {
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 2. CICLO PHVA (Cuadros del proceso) */
.phva-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 50px auto 0;
    position: relative;
}

.phva-step {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.phva-step:hover {
    transform: translateY(-10px);
    background-color: var(--nav-bg);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Círculo central "Mejora Continua" */
.phva-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(46, 125, 50, 0.4);
    z-index: 2;
}

/* 3. TARJETA VISUAL (Le da estilo al código nuevo que pegaste) */
.sst-visual-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    padding: 40px;
    border-radius: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

.sst-visual-card .icon-circle {
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.sst-visual-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.sst-visual-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* 4. RESPONSIVE (Para celular) */
@media (max-width: 768px) {
    .phva-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .phva-center { display: none; }
    
    .hero-sst {
        min-height: 60vh;
        padding-top: 100px;
    }

    .hero-sst h1 { font-size: 1.8rem; }
}
/* --- CORRECCIÓN GLOBAL DE HERO (Para que no se monten los textos) --- */

/* 1. Estilo para el fondo de Acompañamiento */
.hero-acompanamiento {
    min-height: 80vh; /* Usar min-height para que crezca si el texto es largo */
    background: url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    /* Quitamos el display flex de aquí para dejarle el trabajo al overlay */
    color: white;
    padding-top: 80px; 
}

/* 2. LA CLASE MÁGICA (Esto arregla el texto amontonado en TODAS las páginas) */
.hero-overlay-dark {
    background-color: rgba(0, 0, 0, 0.65);
    width: 100%;
    min-height: 80vh; /* Asegura que cubra todo el alto */
    height: 100%;
    
    /* AQUÍ ESTÁ EL ARREGLO: */
    display: flex;
    flex-direction: column; /* <--- IMPORTANTE: Pone los elementos en columna vertical */
    justify-content: center;
    align-items: center;
    
    padding: 20px; /* Margen para que no toque los bordes en celular */
    box-sizing: border-box;
}

/* Ajustes de texto para el Hero de Acompañamiento */
.hero-acompanamiento h1 {
    margin: 20px 0;
    line-height: 1.3;
    font-size: 2.5rem;
}

.hero-acompanamiento p {
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.2rem;
}

/* Ajuste para celular */
@media (max-width: 768px) {
    .hero-acompanamiento {
        min-height: 60vh;
    }
    .hero-overlay-dark {
        min-height: 60vh;
    }
    .hero-acompanamiento h1 {
        font-size: 1.8rem;
    }
}
/* --- ESTILOS PÁGINA ARTÍCULOS --- */

/* Hero Específico */
.hero-articles {
    min-height: 60vh; /* Un poco más corto que el home */
    background: url('https://images.unsplash.com/photo-1455390582262-044cdead277a?q=80&w=2073&auto=format&fit=crop') no-repeat center center/cover;
    /* Imagen de escritorio/escritura */
    position: relative;
    padding-top: 80px;
}
/* Nota: Usa la clase .hero-overlay-dark que ya arreglamos en el paso anterior */

/* Barra de categorías */
.categories-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.cat-btn:hover, .cat-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Grilla de Blog */
.blog-grid {
    display: grid;
    /* Esto hace la magia responsive automática: */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden; /* Para que la imagen respete los bordes redondos */
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para que llene el cuadro sin deformarse */
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1); /* Zoom suave en la imagen al pasar el mouse */
}

/* Etiquetas sobre la imagen */
.blog-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.tag-normativa { background-color: #d32f2f; } /* Rojo */
.tag-ambiental { background-color: #2E7D32; } /* Verde */
.tag-seguridad { background-color: #F57C00; } /* Naranja */

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Para que todos los botones queden alineados abajo */
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
    margin-bottom: 10px;
}

.blog-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-content p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 10px; /* La flechita se mueve a la derecha */
}

/* Responsive para el input del Newsletter */
@media (max-width: 768px) {
    .cta-section input {
        width: 100% !important;
        margin-bottom: 10px;
    }
    .categories-bar {
        gap: 10px;
    }
}
/* --- CORRECCIÓN FOOTER SIMPLE (Página Contacto) --- */

/* Esto asegura que si el footer solo tiene el texto de copyright,
   tenga suficiente espacio arriba y abajo para no verse aplastado */
.footer .container p {
   padding: 25px 0; /* Espacio vertical */
   margin: 0;       /* Quita márgenes por defecto */
   font-weight: 500;
   font-size: 1rem;
   opacity: 0.9;
}

/* Ajuste opcional si sientes que la página de contacto queda muy corta en pantallas grandes */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

footer.footer {
    margin-top: auto; /* Empuja el footer al fondo si hay poco contenido arriba */
}