:root {
    --azul-oscuro: #002d5a;
    --dorado: #d4af37;
    --rojo-alerta: #b22222;
    --gris-claro: #f4f7f9;
    --blanco: #ffffff;
    --texto: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gris-claro);
    color: var(--texto);
    margin: 0;
    padding: 0;
}

/* Ajuste del contenedor que ya tenías */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px; /* Espacio entre logo y texto */
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilo específico para la imagen del logo */
.header-logo img {
    height: 110px; /* Tamaño ideal para un header institucional */
    width: auto;
    display: block;
    /* Esto ayuda a que el logo resalte sobre el fondo azul */
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3));
}

/* Ajuste de los textos para que no pierdan estilo */
.header-text {
    text-align: left;
}

.header-text h1 {
    margin: 0;
}

.header-text p {
    margin: 5px 0 0 0;
}

/* Responsivo: Si se ve en celular, el logo se pone arriba del texto */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    .header-text {
        text-align: center;
    }
    .header-logo img {
        height: 80px;
    }
}

.status-badge {
    display: inline-block;
    background: #28a745;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 15px;
}

/* Carrusel */
.carousel-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.carousel {
    display: flex;
    width: 400%; /* 4 slides */
    height: 100%;
    animation: slideRotation 16s infinite ease-in-out;
}

.slide { 
    width: 25%; /* 4 slides */
    position: relative; 
}

.slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.slide-text {
    position: absolute; 
    bottom: 30px; 
    left: 30px;
    color: white; 
    font-size: 1.6rem; 
    font-weight: bold;
    background: rgba(0, 45, 90, 0.8); 
    padding: 12px 25px;
    border-left: 5px solid var(--dorado);
}

/* Animación para 4 imágenes */
@keyframes slideRotation {
    0%, 16%   { transform: translateX(0); }       /* Imagen 1 */
    20%, 36%  { transform: translateX(-100%); }   /* Imagen 2 */
    40%, 56%  { transform: translateX(-200%); }   /* Imagen 3 */
    60%, 76%  { transform: translateX(-300%); }   /* Imagen 4 */
    80%, 96%  { transform: translateX(-400%); }   /* Imagen 1 (Copia) */
    100%      { transform: translateX(0); }       /* Salto invisible al inicio */
}

/* Contenedor */
.container {
    max-width: 1100px;
    margin: -40px auto 40px;
    background: var(--blanco);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: relative;
    z-index: 10;
}

.section { padding: 40px 0; border-bottom: 1px solid #eee; }

/* Caja de Emergencia */
.emergency-box {
    background: var(--rojo-alerta);
    color: white;
    text-align: center;
    padding: 40px;
    border-radius: 10px;
}
.phone-numbers { font-size: 2.2rem; font-weight: bold; margin: 15px 0; }

/* Grid Identidad (Misión, Visión, Objetivos) */
.grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card-identity {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s ease;
    border-top: 5px solid var(--dorado);
}

.card-identity:hover { transform: translateY(-10px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
.card-header-icon { font-size: 3rem; margin-bottom: 15px; }
.list-identity { text-align: left; padding-left: 20px; font-size: 0.95rem; }

/* Logos Convenios */
.centered-title { text-align: center; border: none; margin-bottom: 30px; }
.grid-logos {
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap; 
    gap: 30px;
}
.logo-item { text-align: center; width: 150px; }
.logo-item img { width: 100%; border-radius: 5px; filter: none; transition: 0.3s; }
.logo-item img:hover { filter: grayscale(0); transform: scale(1.1); }
.logo-item p { font-size: 0.75rem; font-weight: bold; margin-top: 8px; color: var(--azul-oscuro); }

/* Grid de Servicios y Avisos */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin: 30px 0; }
.card { border: 1px solid #ddd; border-radius: 10px; padding: 25px; background: #f9f9f9; }
.card-img img { width: 100%; border-radius: 6px; margin-bottom: 15px; }

h2 { color: var(--azul-oscuro); border-left: 6px solid var(--dorado); padding-left: 15px; margin-bottom: 25px; }

/* Alertas */
.alert-yellow { background: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; margin-bottom: 15px; border-radius: 4px; }
.alert-blue { background: #d1ecf1; border-left: 5px solid #0dcaf0; padding: 15px; border-radius: 4px; }

/* Layout Flex */
.flex-layout { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; }
.text-side { flex: 1; min-width: 300px; }
.image-side {
    flex: 0 0 250px; /* Limita el ancho del contenedor a 250px */
    display: flex;
    justify-content: center;
}

.image-side img {
    width: 100%;       /* Se adapta al tamaño del contenedor de arriba */
    max-width: 250px;  /* Tamaño máximo de la imagen */
    height: auto;
    border-radius: 10px;
}

/* Mapa */
.map-wrapper { width: 100%; height: 400px; border-radius: 10px; overflow: hidden; border: 3px solid #eee; }
.map-wrapper iframe { width: 100%; height: 100%; border: none; }

.confidential-footer { background: #f1f1f1; padding: 25px; margin-top: 30px; border-radius: 8px; font-size: 0.85rem; color: #666; }
.bottom-bar { text-align: center; padding: 25px; background: #1a1a1a; color: #888; font-size: 0.8rem; }

@media (max-width: 768px) {
    .container { margin-top: 0; width: 95%; padding: 15px; }
    .carousel-container { height: 250px; }
    .phone-numbers { font-size: 1.6rem; }
}

/* --- Mantener todos los estilos anteriores del CERI --- */

:root {
    --azul-oscuro: #002d5a;
    --dorado: #d4af37;
    --rojo-alerta: #b22222;
    --gris-claro: #f4f7f9;
    --blanco: #ffffff;
    --texto: #333333;
    --whatsapp-green: #25d366;
}

/* Estilos base (Mismos que el paso anterior...) */
body { font-family: 'Segoe UI', sans-serif; background-color: var(--gris-claro); margin: 0; }
header { background: var(--azul-oscuro); color: white; padding: 35px; text-align: center; border-bottom: 5px solid var(--dorado); }
.status-badge { background: #28a745; padding: 6px 18px; border-radius: 20px; font-weight: bold; margin-top: 15px; display: inline-block; }

/* Botón Flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--whatsapp-green);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.whatsapp-float .tooltip {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    right: 125%;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.whatsapp-float:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Resto de estilos: Carrusel, Grid, Cards (Igual que el anterior) --- */
.carousel-container { width: 100%; height: 400px; overflow: hidden; position: relative; background: #000; }
.carousel { display: flex; width: 300%; height: 100%; animation: slideRotation 15s infinite ease-in-out; }
.slide { width: 33.33%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.slide-text { position: absolute; bottom: 30px; left: 30px; color: white; background: rgba(0, 45, 90, 0.8); padding: 12px 25px; border-left: 5px solid var(--dorado); font-weight: bold; }

@keyframes slideRotation {
    0%, 30% { transform: translateX(0); }
    33%, 63% { transform: translateX(-33.33%); }
    66%, 96% { transform: translateX(-66.66%); }
    100% { transform: translateX(0); }
}

.container { max-width: 1100px; margin: -40px auto 40px; background: white; padding: 35px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); position: relative; z-index: 10; }
.section { padding: 40px 0; border-bottom: 1px solid #eee; }
.emergency-box { background: var(--rojo-alerta); color: white; text-align: center; padding: 40px; border-radius: 10px; }
.phone-numbers { font-size: 2.2rem; font-weight: bold; margin: 15px 0; }

.grid-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.card-identity { background: #fff; border: 1px solid #eef0f2; border-radius: 12px; padding: 30px; text-align: center; border-top: 5px solid var(--dorado); transition: 0.3s; }
.card-identity:hover { transform: translateY(-10px); }
.card-header-icon { font-size: 3rem; margin-bottom: 15px; }

.grid-logos { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 30px; }
.logo-item { text-align: center; width: 150px; }
.logo-item img { width: 100%; filter: grayscale(1); transition: 0.3s; }
.logo-item img:hover { filter: grayscale(0); transform: scale(1.1); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin: 30px 0; }
.card { border: 1px solid #ddd; border-radius: 10px; padding: 25px; background: #f9f9f9; }
h2 { color: var(--azul-oscuro); border-left: 6px solid var(--dorado); padding-left: 15px; margin-bottom: 25px; }

.alert-yellow { background: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; margin-bottom: 15px; }
.alert-blue { background: #d1ecf1; border-left: 5px solid #0dcaf0; padding: 15px; }

.flex-layout { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; }
.text-side { flex: 1; min-width: 300px; }
.image-side img { width: 100%; border-radius: 10px; }

.map-wrapper { width: 100%; height: 400px; border-radius: 10px; overflow: hidden; border: 3px solid #eee; }
.map-wrapper iframe { width: 100%; height: 100%; border: none; }

.confidential-footer { background: #f1f1f1; padding: 25px; margin-top: 30px; border-radius: 8px; font-size: 0.85rem; color: #666; }
.bottom-bar { text-align: center; padding: 25px; background: #1a1a1a; color: #888; font-size: 0.8rem; }