/* AGREGA ESTO AL INICIO DEL CSS */
* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* Importante para Safari/iPhone */
}
/* --- VARIABLES --- */
:root {
    --brand-green: #083A26;
    --brand-black: #000000;
    --brand-white: #ffffff;
    --text-gray: #333333;
    --bg-light: #fdfdfd;
}

/* --- ESTILOS GENERALES --- */
body { 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    color: var(--text-gray); 
    background-color: #f1f5f3; /* Fondo de respaldo */
    line-height: 1.6; 
    overflow-x: hidden; /* Evitar scroll horizontal */
}

/* FONDO GLOBAL FIJO 
   (Se usa para TODAS las secciones EXCEPTO el Home)
*/
.global-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* CAMBIO: Gradiente blanco casi sólido sobre la imagen */
    background-image: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.96)), url('IMG_9273.JPG');
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease-in-out;
    opacity: 1;
}

.hidden-bg {
    opacity: 0 !important;
    visibility: hidden;
}
/* Clase auxiliar para ocultar el fondo estático en el HOME */
.global-background.hidden-bg {
    opacity: 0;
}

/* CARRUSEL DEL HOME (FONDO) */
.home-carousel {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
    transform: scale(1.05); 
    animation: slowZoom 20s infinite alternate; 
}

.carousel-slide.active {
    opacity: 1;
}

/* Capa oscura sobre el carrusel de fondo */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(8, 58, 38, 0.6), rgba(8, 58, 38, 0.7)); 
    z-index: 1;
}

@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* --- ANIMACIÓN LIQUID GLASS --- */
@keyframes liquidShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* Títulos en Verde Corporativo (Más elegante sobre blanco) */
h1, h2, h3, .section-title { 
    font-family: 'Optima', 'Playfair Display', 'Segoe UI', serif; 
    
    /* CAMBIO: Color verde oscuro en lugar de blanco */
    color: var(--brand-green); 
    
    text-shadow: none; 
    transition: all 0.3s ease; 
}

/* Párrafos en Gris Oscuro */
p { 
    text-align: justify; 
    /* CAMBIO: Color oscuro para lectura */
    color: #333333; 
}

/* Ajuste específico para el HERO del HOME (Para que se siga leyendo sobre el carrusel oscuro) */
/* Agrega esto al final de tu CSS */
.hero h1, .hero p {
    color: #ffffff !important; /* El Hero del home se mantiene blanco */
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
} 


/* Efecto Liquid Glass (Blancos) */
h1:hover, .section-title:hover {
    background: linear-gradient(90deg, #ffffff 0%, #d0f0e6 25%, #ffffff 50%, #d0f0e6 75%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidShine 3s linear infinite;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    cursor: default;
}

/* Efecto Liquid Glass (Verdes - Títulos internos) */
.cc-card h2:hover, 
.service-card-menu h3:hover, 
.service-detail-title:hover,
.news-title:hover,
.news-slide-home h3:hover {
    background: linear-gradient(90deg, var(--brand-green) 0%, #2e7d5a 25%, var(--brand-green) 50%, #2e7d5a 75%, var(--brand-green) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidShine 3s linear infinite;
    cursor: default;
}

p { text-align: justify; }

a { text-decoration: none; color: inherit; cursor: pointer; }

.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 40px; 
    box-sizing: border-box; 
}

/* --- HEADER --- */
header { 
    background-color: var(--brand-white); 
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: nowrap; 
}

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

/* --- NAV LINKS --- */
.nav-links { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 30px; 
    position: relative; 
}

.nav-links > a, .dropbtn { 
    margin-left: 0; 
    font-size: 16px; 
    text-transform: none; 
    letter-spacing: 0.5px; 
    font-weight: 400; 
    color: var(--brand-black); 
    transition: color 0.3s; 
    font-family: 'Optima', 'Playfair Display', serif; 
    line-height: 1.2;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--brand-green);
    font-style: italic; 
}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(8px);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-top: 2px solid var(--brand-green);
    padding: 10px 0;
    text-align: right;
    border-radius: 0 0 10px 10px; /* Ligero redondeado abajo */
}
.dropdown-content a {
    color: var(--text-gray);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-family: 'Optima', 'Playfair Display', serif;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.dropdown-content a:hover {
    background-color: rgba(8, 58, 38, 0.05);
    color: var(--brand-green);
    font-weight: 600;
}
.dropdown:hover .dropdown-content { display: block; }

.btn-contact { 
    background-color: transparent; 
    color: var(--brand-black) !important; 
    padding: 0; 
    border-radius: 0; 
    font-family: 'Optima', 'Playfair Display', serif;
}
.btn-contact:hover { color: var(--brand-green) !important; }

/* --- SPA SECTIONS --- */
.page-section { display: none; animation: fadeIn 0.5s ease; }
.page-section.active { display: block; }
.sub-section { display: none; animation: fadeIn 0.5s ease; }
.sub-section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- HERO --- */
.hero { 
    background: transparent; 
    color: var(--brand-white); 
    padding: 140px 0; 
    text-align: center; 
    position: relative; /* Asegura que esté sobre el carrusel */
    z-index: 2;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: lighter; margin-top: 30px; font-family: 'Optima', sans-serif; text-align: center; text-shadow: none; }
.hero p { font-size: 1.15rem; max-width: 700px; margin: 0 auto; opacity: 0.95; font-weight: 300; line-height: 1.5; text-align: justify; text-align-last: center; }
.rb-highlight { font-family: 'Optima', 'Playfair Display', serif; font-weight: 600; font-style: italic; }
.hero-underline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.hero-monogram-img { height: 100px; width: auto; opacity: 0.9; margin-bottom: 20px; display: inline-block; }

/* --- INTERNAL PAGE --- */
.internal-page { padding: 80px 0; color: var(--brand-white); }

/* --- ESTILO "LA FIRMA" --- */
/* --- CAMBIO: ESTRUCTURA VERTICAL (FILAS) --- */
.cc-grid-container {
    display: grid;
    
    /* ESTA ES LA CLAVE: 1fr significa "1 sola columna" */
    /* Al haber solo una columna, los elementos se apilan en filas hacia abajo */
    grid-template-columns: 1fr; 
    
    /* Opcional: limita el ancho para que no se vean "estirados" si quieres */
    max-width: 800px; 
    margin-left: auto;
    margin-right: auto;
    
    gap: 30px; 
    margin-top: 40px;
}



.cc-card {
    background: rgba(255, 255, 255, 0.80); 
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--brand-black); 
    padding: 40px 30px;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 20px;
}

.cc-card:hover {
    background: rgba(255, 255, 255, 0.80);
    border-left: 4px solid var(--brand-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.cc-card h2 {
    color: var(--brand-black); 
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 400; 
    text-align: left;
    text-shadow: none;
    transition: color 0.3s;
}

.cc-card:hover h2 { color: var(--brand-green); }

.cc-card p {
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 30px;
    flex-grow: 1;
}

.cc-link-icon {
    display: flex;
    align-items: center;
    color: var(--brand-green);
    opacity: 0.7;
    transition: opacity 0.3s;
    align-self: flex-start;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}
.cc-card:hover .cc-link-icon { opacity: 1; }


/* --- SERVICIOS (MENÚ) --- */
.services { 
    padding: 80px 0; 
    background-color: transparent; 
    text-align: center; 
    position: relative; 
    z-index: 2;
}

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; align-items: stretch; }

.service-card-menu { 
    padding: 20px 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    height: 200px; 
    cursor: pointer; 
    background: #ffffff; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}
.service-card-menu:hover { border-color: var(--brand-green); transform: translateY(-5px); background: rgba(255, 255, 255, 0.95); box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.service-card-menu .service-icon { color: var(--brand-green); margin-bottom: 20px; transform: scale(1.5); }
.service-card-menu h3 { color: var(--brand-green); font-size: 1.4rem; text-transform: uppercase; letter-spacing: 2px; margin: 0; font-weight: 600; text-shadow: none; }

 /* --- NUEVO: CARRUSEL DE NOTICIAS EN HOME --- */
        .home-news-section {
            padding: 60px 0;
            background-color: transparent;
            position: relative;
            z-index: 2;
        }

        .news-carousel-container {
            position: relative;
            max-width: 800px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            text-align: center;
            overflow: hidden; /* Oculta los slides que no están activos */
            border: 1px solid rgba(255,255,255,0.3);
        }

        .news-slides-wrapper {
            display: flex;
            transition: transform 0.5s ease-in-out;
            width: 100%;
        }

        .news-slide-home {
            min-width: 100%;
            flex-shrink: 0;
            box-sizing: border-box;
            padding: 0 40px; /* Espacio para las flechas */
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .news-badge-home {
            background-color: var(--brand-green);
            color: #fff;
            padding: 5px 10px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 15px;
            border-radius: 4px;
            font-family: 'Optima', sans-serif;
        }

        .news-slide-home h3 {
            color: var(--brand-black);
            font-size: 1.6rem;
            margin-bottom: 10px;
            font-family: 'Playfair Display', serif;
            line-height: 1.3;
            transition: color 0.3s;
        }
        
        .news-slide-home:hover h3 {
            color: var(--brand-green);
        }

        .news-slide-home p {
            color: var(--text-gray);
            font-size: 1rem;
            text-align: center;
            margin-bottom: 20px;
            max-width: 600px;
        }

        .btn-news-link {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--brand-green);
            font-weight: bold;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            border-bottom: 1px solid transparent;
            transition: all 0.3s;
        }
        
        .btn-news-link:hover {
            border-bottom: 1px solid var(--brand-green);
        }

        /* Botones de navegación del carrusel de noticias */
        .news-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--brand-green);
            opacity: 0.5;
            font-size: 2rem;
            cursor: pointer;
            z-index: 10;
            padding: 10px;
            transition: opacity 0.3s;
        }
        .news-nav-btn:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
        .news-nav-btn.prev { left: 10px; }
        .news-nav-btn.next { right: 10px; }



/* --- CLIENTES --- */
.clients-section { padding: 40px 0; background-color: transparent; text-align: center; position: relative; z-index: 2; }


.clients-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);

    width: 85%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}


.clients-box .section-title {
    color: var(--brand-black);
    margin-bottom: 20px;
}

.clients-box .section-title:hover {
    background: linear-gradient(90deg, var(--brand-green) 0%, #2e7d5a 25%, var(--brand-green) 50%, #2e7d5a 75%, var(--brand-green) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: default;
}

.clients-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 40px; 
    align-items: center; 
    justify-items: center; 
}

.client-logo { 
    max-width: 100%; 
    height: 80px; 
    width: auto;
    max-width: 160px; 
    object-fit: contain; 
    mix-blend-mode: multiply;
    filter: grayscale(100%);
    opacity: 0.8; 
    transition: all 0.4s ease; 
}

.client-logo:hover { 
    filter: none;
    opacity: 1; 
    transform: scale(1.1); 
}

/* --- VISTA DETALLE SERVICIO --- */
.service-detail-view { 
    max-width: 1000px; margin: 0 auto; 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 60px; 
    border-radius: 20px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); 
}
.service-detail-header { border-bottom: 1px solid #eee; padding-bottom: 30px; margin-bottom: 40px; text-align: center; }
.service-detail-logo { color: var(--brand-green); margin-bottom: 20px; display: inline-block; transform: scale(1.3); }
.service-detail-title { color: var(--brand-green); font-size: 2.2rem; font-family: 'Optima', serif; text-transform: uppercase; letter-spacing: 2px; text-shadow: none; margin: 0; }
.service-detail-subtitle { font-size: 1.5rem; color: var(--brand-black); text-align: center; margin-bottom: 40px; font-family: 'Optima', serif; }

.key-services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; align-items: start; }
.key-service-item { display: flex; gap: 20px; align-items: flex-start; }
.key-service-icon { flex-shrink: 0; width: 50px; height: 50px; border: 2px solid var(--brand-black); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--brand-black); }
.key-service-content h4 { color: var(--brand-black); font-size: 1.1rem; margin: 0 0 5px 0; font-weight: 700; font-family: 'Helvetica Neue', sans-serif; }
.key-service-content p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.5; margin: 0; text-align: left; }

.btn-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px; color: var(--brand-white); cursor: pointer; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; transition: opacity 0.3s; }
.btn-back:hover { opacity: 0.8; }

/* --- ESTILOS SECCIÓN EN LA PRÁCTICA --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(8px);
    border-left: 1px solid var(--brand-black);
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 20px;
}

.news-card:hover {
    transform: translateY(-5px);
    border-left: 4px solid var(--brand-green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.news-date {
    font-family: 'Optima', sans-serif;
    font-size: 0.85rem;
    color: var(--brand-green);
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--brand-black);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-black);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-reader-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 20px;
}
.news-reader-date { color: var(--brand-green); font-family: 'Optima'; font-weight: bold; margin-bottom: 10px; display: block;}
.news-reader-title { font-size: 2.5rem; color: var(--brand-black); margin-bottom: 30px; line-height: 1.2; font-family: 'Playfair Display', serif;}
.news-reader-body p { margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8; color: #444; }


/* --- FOOTER --- */
footer { background-color: #062b1c; color: var(--brand-white); padding: 80px 0 30px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 2; }
.footer-logo img { height: 70px; margin-bottom: 20px; opacity: 0.9; width: auto; margin-left: auto; margin-right: auto; }
.footer-info p { margin: 10px 0; font-size: 1rem; opacity: 0.8; text-align: center; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.footer-legal a { font-size: 0.9rem; opacity: 0.7; transition: opacity 0.3s; border-bottom: 1px solid transparent; }
.footer-legal a:hover { opacity: 1; border-bottom: 1px solid rgba(255,255,255,0.5); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.copyright { font-size: 12px; opacity: 0.4; text-transform: uppercase; letter-spacing: 1px; margin: 0; }

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-white);
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}
.linkedin-btn:hover { opacity: 1; transform: translateY(-2px); color: var(--brand-white);}
/* --- SELECTOR DE IDIOMA --- */
.google-translate-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.google-translate-wrapper button {
    background: transparent;
    border: none;
    color: var(--brand-black);
    font-family: 'Optima', 'Playfair Display', serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.google-translate-wrapper button:hover {
    color: var(--brand-green);
    font-style: italic;
}

/* Ocultar definitivamente el widget nativo de Google para que no estorbe */
#google_translate_element {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    display: none !important;
}
.lang-floating {
    position: fixed;
    bottom: 20px;
    left: 20px; /* O 'right: 20px' si lo prefieres a la derecha */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--brand-green);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
}

/* El menú que se abre hacia arriba */
.lang-floating .dropdown-content {
    top: auto;
    bottom: 110%; /* Se abre hacia arriba */
    left: 0;
    border-radius: 10px;
    min-width: 120px;

/* =========================================
   BOTÓN FLOTANTE DE IDIOMA (Blindado)
========================================= */
.lang-floating {
    position: fixed !important; /* ESTA ES LA MAGIA: Lo ancla a la pantalla del celular/PC */
    bottom: 30px !important;    /* Distancia desde abajo */
    right: 30px !important;     /* Distancia desde la derecha */
    z-index: 99999 !important;  /* Para que SIEMPRE esté sobre cualquier carrusel o foto */
    
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 2px solid var(--brand-green);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lang-floating:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.lang-floating .dropdown-content {
    top: auto;
    bottom: 120%; /* Se abre hacia arriba */
    right: 0;
    left: auto;
    min-width: 130px;
    border-radius: 10px;
    border-top: none;
    border-bottom: 2px solid var(--brand-green); 
    padding: 5px 0;
}

/* Ajuste Móvil */
@media (max-width: 768px) {
    .lang-floating {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px;
        height: 45px;
    }
    .lang-floating .dropbtn {
        font-size: 20px !important;
    }
}    
}
 /* MEDIA QUERIES ANIMACIÓN DE ATOMO */
        @media (max-width: 768px) {
            nav { flex-direction: column; gap: 15px; }
            .nav-links { flex-direction: row; justify-content: center; align-items: center; gap: 15px; margin-top: 5px; width: 100%; flex-wrap: nowrap; }
            .nav-links > a, .dropbtn { margin-left: 0; font-size: 13px; white-space: nowrap; padding: 0 5px; }
            .dropdown-content { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); text-align: center; min-width: 200px;}
            .btn-contact { border: 1px solid var(--brand-green); padding: 4px 10px; border-radius: 2px; }
            .hero h1 { font-size: 2.2rem; }
            .hero { padding: 80px 0; }
            .hero p { font-size: 1.05rem; }
            .services-grid { grid-template-columns: 1fr; }
            .service-card-menu { padding: 40px 20px; height: auto; min-height: 200px;}
            .footer-legal { flex-direction: column; gap: 15px; }
            .container { padding: 0 20px; }
            
            .cc-grid-container { grid-template-columns: 1fr; }
            .key-services-grid { grid-template-columns: 1fr; }
            .service-detail-view { padding: 30px 20px; }
            
            .clients-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
            
            /* Footer mobile */
            .footer-bottom { flex-direction: column-reverse; gap: 20px; text-align: center; }
        }
        /* --- ANIMACIÓN ÁTOMO (AGITACIÓN + EXPLOSIÓN + ÓRBITA) --- */
        .atom-container {
            position: relative;
            width: 100%;
            height: 450px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 40px;
            z-index: 2; /* Importante para estar sobre el carrusel */
        }

        /* Rastro de órbita (aparece después) */
        .orbit-track {
            position: absolute;
            width: 350px;
            height: 350px;
            border: 1px dashed rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            opacity: 0;
            transition: opacity 1.5s ease;
        }
        .atom-container.exploding .orbit-track { opacity: 1; transition-delay: 0.8s; }

        /* Núcleo Central (PI) */
        .atom-nucleus {
            position: absolute;
            width: 130px;
            height: 130px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 50%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 20;
            box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: transform 0.3s ease;
            
            /* Fase 1: Agitación Inicial */
            animation: nucleusShake 0.1s infinite;
        }

        .atom-container.exploding .atom-nucleus {
            animation: nucleusPulse 3s infinite ease-in-out; /* Calma después de la explosión */
        }

        .atom-nucleus h3 {
            color: var(--brand-green);
            font-size: 2.2rem;
            margin: 0;
            font-weight: bold;
            line-height: 1;
            font-family: 'Optima', sans-serif;
        }
        .atom-nucleus span {
            font-size: 0.65rem;
            color: var(--brand-black);
            text-transform: uppercase;
            margin-top: 5px;
            letter-spacing: 1px;
            text-align: center;
        }

        /* Sistemas de Rotación (Contenedores invisibles que giran) */
        .orbit-carrier {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0; 
            height: 0;
        }
        
        /* Cuando explota, empiezan a girar */
        .atom-container.exploding .orbit-carrier-1 {
            animation: carrierSpin 12s linear infinite 1s; /* Delay para esperar la explosión */
        }
        .atom-container.exploding .orbit-carrier-2 {
            animation: carrierSpin 12s linear infinite 1s; 
        }

        /* Partículas (Bolas Satélites) */
        .particle {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100px;
            height: 100px;
            margin-top: -50px;
            margin-left: -50px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
            cursor: pointer;
            z-index: 10;
            
            /* Estado Inicial: En el centro (ocultas tras el núcleo) */
            transform: translate(0, 0) scale(0.5);
            opacity: 0;
        }

        /* Fase 2: Explosión (Salen disparadas) */
        .atom-container.exploding .particle-1 {
            animation: 
                shootLeft 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, /* Disparo */
                counterSpin 12s linear infinite 1s; /* Contra-rotación para leer texto */
        }

        .atom-container.exploding .particle-2 {
            animation: 
                shootRight 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
                counterSpin 12s linear infinite 1s;
        }

        .particle span {
            color: var(--brand-green);
            font-family: 'Optima', sans-serif;
            font-size: 0.85rem;
            font-weight: bold;
            text-transform: uppercase;
        }

        /* --- KEYFRAMES DE ANIMACIÓN --- */
        @keyframes nucleusShake {
            0% { transform: translate(1px, 1px) rotate(0deg); }
            25% { transform: translate(-2px, 2px) rotate(-1deg); }
            50% { transform: translate(2px, -2px) rotate(1deg); }
            75% { transform: translate(-2px, -2px) rotate(-1deg); }
            100% { transform: translate(2px, 2px) rotate(1deg); }
        }

        @keyframes nucleusPulse {
            0% { transform: scale(1); box-shadow: 0 0 30px rgba(255,255,255,0.4); }
            50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(255,255,255,0.6); }
            100% { transform: scale(1); box-shadow: 0 0 30px rgba(255,255,255,0.4); }
        }

        @keyframes shootLeft {
            0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
            50% { opacity: 1; }
            100% { transform: translate(-175px, 0) scale(1); opacity: 1; } 
        }

        @keyframes shootRight {
            0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
            50% { opacity: 1; }
            100% { transform: translate(175px, 0) scale(1); opacity: 1; }
        }

        @keyframes carrierSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes counterSpin {
            from { transform: translate(-175px, 0) rotate(0deg); }
            to { transform: translate(-175px, 0) rotate(-360deg); }
        }
        
        .atom-container.exploding .particle-2 {
             animation: 
                shootRight 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
                counterSpinRight 12s linear infinite 1s;
        }
        @keyframes counterSpinRight {
            from { transform: translate(175px, 0) rotate(0deg); }
            to { transform: translate(175px, 0) rotate(-360deg); }
        }
        
        /* Ajuste móvil */
        @media (max-width: 768px) {
            .atom-container { height: 300px; transform: scale(0.7); margin-top: 0; }
        }
/* --- FORZAR JUSTIFICADO EN TEXTOS Y LISTAS --- */

/* Aplica a párrafos (p) y elementos de lista (li) dentro de las tarjetas */
.cc-card p, 
.cc-card li,
.news-reader-body p,
.news-reader-body li,
.service-detail-view p,
.service-detail-view li {
    text-align: justify;
    text-justify: inter-word; /* Ayuda a que los espacios sean más uniformes */
}

/* Opcional: Si usas listas (ul), aseguramos que tengan margen para las viñetas */
.cc-card ul, 
.news-reader-body ul,
.service-detail-view ul {
    padding-left: 20px;
    margin-bottom: 20px;
}
/* --- CORRECCIÓN DE COLOR DEL FOOTER --- */

/* Forzamos que TODOS los textos dentro del footer sean blancos */
footer p, 
footer a, 
footer span, 
footer h1, 
footer h2, 
footer h3,
.footer-info p, 
.copyright {
    color: #ffffff !important;
    opacity: 0.9; /* Un poco de transparencia para que se vea elegante */
}

/* Aseguramos que los enlaces del footer también sean blancos al pasar el mouse */
footer a:hover {
    color: #ffffff !important;
    opacity: 1;
    border-bottom: 1px solid #ffffff;
}

/* Líneas divisorias del footer (si las tienes) en blanco suave */
.footer-legal, 
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
/* --- CORRECCIONES DE VISIBILIDAD (AGREGAR AL FINAL DEL CSS) --- */

/* 1. ARREGLO DEL FOOTER (Textos Blancos sobre Fondo Verde) */
footer, 
footer p, 
footer a, 
footer h1, footer h2, footer h3, 
footer li, 
footer span,
.footer-info p, 
.copyright {
    color: #ffffff !important; /* Blanco obligado */
    opacity: 0.9;
}

footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
    opacity: 1;
}

/* 2. ARREGLO DE ARTÍCULOS Y LISTAS (Textos Oscuros sobre Fondo Blanco) */
.news-reader-body p, 
.news-reader-body ul, 
.news-reader-body li,
.news-reader-body span,
.news-reader-body strong {
    color: #333333 !important; /* Gris oscuro obligado para leer */
}

/* Arreglo específico para las cajas de advertencia/resumen dentro de artículos */
.news-reader-body div[style*="background-color"] li,
.news-reader-body div[style*="background-color"] p,
.news-reader-body div[style*="background-color"] strong {
    color: #000000 !important; /* Negro total dentro de las cajas de color */
}

/* 3. LISTAS GENERALES */
ul, li {
    color: #333333; /* Por si acaso alguna lista quedó suelta */
}
/* --- FIX 5: FOOTER SEGURO --- */

/* 1. Estructura para que el footer siempre baje */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Mínimo el alto de la pantalla */
}

main, .page-section, .internal-page {
    flex: 1; /* Esto empuja el footer hacia abajo si hay poco contenido */
}

/* 2. Espacio extra abajo en móviles para evitar cortes por la barra del navegador */
@media (max-width: 768px) {
    footer {
        padding-bottom: 80px !important; /* Espacio de seguridad extra */
    }
}
/* --- FIX 2: NEWSLETTER MÓVIL --- */
@media (max-width: 768px) {
    .iframe-wrapper {
        height: 100vh !important; /* Usar toda la altura de la pantalla disponible */
        min-height: 600px;
    }
}
/* --- FIX FINAL: NOTICIAS IPHONE --- */
@media (max-width: 768px) {
    
    /* 1. La caja blanca contenedora */
    .news-carousel-container {
        width: 90% !important; /* Deja 5% de aire a cada lado */
        margin: 0 auto !important; /* Centrada */
        padding: 30px 10px !important; /* Menos relleno interno */
        overflow: hidden; /* Corta lo que se salga */
    }

    /* 2. La diapositiva individual */
    .news-slide-home {
        min-width: 100% !important; /* Ocupa el 100% del espacio disponible */
        flex-shrink: 0 !important; /* PROHIBIDO encogerse */
        padding: 0 5px !important; /* Casi sin padding lateral para dar espacio al texto */
    }

    /* 3. Títulos más pequeños para que quepan */
    .news-slide-home h3 {
        font-size: 1.25rem !important; 
        line-height: 1.3;
        margin-bottom: 10px;
        white-space: normal; /* Permite que el texto baje de renglón */
    }
    
    /* 4. Flechas flotantes (para que no empujen el contenido) */
    .news-nav-btn {
        position: absolute;
        top: 50%;
        width: 30px;
        height: 30px;
        background: rgba(255,255,255,0.9); /* Fondo para que se note */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 20;
    }
    .news-nav-btn.prev { left: 5px !important; }
    .news-nav-btn.next { right: 5px !important; }
}
/* --- CORRECCIÓN CRÍTICA CARRUSEL (OBLIGATORIA) --- */

/* 1. El contenedor que se mueve */
.news-slides-wrapper {
    display: flex;
    flex-wrap: nowrap; /* Prohibido bajar de línea */
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* Movimiento suave */
}

/* 2. La diapositiva individual (LA CLAVE ESTÁ AQUÍ) */
.news-slide-home {
    /* "flex: 0 0 100%" significa: No crezcas, No te encojas, Mide exactamente el 100% */
    flex: 0 0 100% !important; 
    
    width: 100% !important;
    max-width: 100% !important; /* Aseguro que no se desborde */
    
    box-sizing: border-box; /* El relleno no aumenta el tamaño */
    padding: 0 20px; /* Espacio para que el texto no toque los bordes */
    
    /* Centrado del contenido */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 3. El marco exterior (La caja blanca) */
.news-carousel-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden !important; /* CORTA todo lo que se salga de la caja */
    position: relative;
}
.clients-carousel-wrapper {
    width: 100%;
    overflow: hidden;
}

.clients-carousel-track {
    display: flex;
    align-items: center;
    gap: 40px;
    width: max-content;
    animation: mover-clientes 25s linear infinite;
}

.client-logo {
    width: 150px;
    height: 90px;
    object-fit: contain;
    flex: 0 0 auto;
}

@keyframes mover-clientes {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 20px));
    }
}