/* ==============================================
   RESET Y CONFIGURACIÓN GENERAL
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background: #f4f4f4;
    overflow-x: hidden;
    color: #333;
}

/* ==============================================
   HEADER Y NAVEGACIÓN UNIFICADA
   ============================================== */
.header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

.logo img { height: 75px; }


/* ================================
MENU PRINCIPAL
================================ */

.menu > ul{
    display:flex;
    list-style:none;
    gap:20px;
}

.menu ul li{
    position:relative;
}

.menu ul li a{
    text-decoration:none;
    color:#333;
    font-weight:600;
    padding:10px 0;
    display:block;
}

/* ================================
SUBMENU
================================ */

.sub-menu{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    background:white;
    min-width:220px;
    box-shadow:0 8px 15px rgba(0,0,0,0.2);
    list-style:none;
    padding:0;
}

.sub-menu li{
    border-bottom:1px solid #eee;
}

.sub-menu li a{
    padding:12px 20px;
}

/* Mostrar submenu */

.menu li:hover > .sub-menu{
    display:block;
}



/* ==============================================
   SLIDER
   ============================================== */
.slider-container-boxed {
    width: 92%;
    max-width: 1300px;
    margin: 30px auto;
}
.slider-profesional {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: transparent;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.caption {
    position: absolute;
    bottom: 40px;
    left: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 20px;
    border-left: 5px solid #f1c40f;
    border-radius: 0 10px 10px 0;
    max-width: 500px;
    animation: fadeInUp 0.8s ease;
}
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
    z-index: 10;
}
.prev:hover, .next:hover { background: rgba(255,255,255,0.5); }
.prev { left: 20px; border-radius: 50%; }
.next { right: 20px; border-radius: 50%; }
.dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; }
.dot.active { background: #f1c40f; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   SECCIÓN DE TARJETAS
   ============================================== */
.grid-servicios {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}
.grid-servicios .card {
    flex: 1 1 300px;
    max-width: 350px;
    background: #fff;
    border-radius: 20px;
    border: 2px solid #f1c40f;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 40px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.grid-servicios .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}
.grid-servicios .card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}
.grid-servicios .card h3 {
    color: #20419e;
    font-size: 1.6rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.grid-servicios .card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 25px;
}
.grid-servicios .card .btn-index {
    display: inline-block;
    padding: 12px 25px;
    background: #f1c40f;
    color: #20419e;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s ease;
}
.grid-servicios .card .btn-index:hover {
    background: #20419e;
    color: #f1c40f;
}

/* ==============================================
   SECCIÓN DE FRASES
   ============================================== */
.banner-frase {
    padding: 80px 20px;
    background: #20419e;
    color: #f1c40f;
    text-align: center;
    border-radius: 25px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.banner-frase h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}
.banner-frase p {
    font-size: 1.2rem;
}

/* Frase estilizada */
.frase-estilizada {
    font-size: 1.4rem;
    color: #444;
    line-height: 1.6;
    text-align: center;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5px;
}
.frase-estilizada p { 
    margin: 0; 
    padding: 0; 
}

/* ==============================================
   HERO Y SECCIONES GENERALES
   ============================================== */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.2rem;
}

/* ==============================================
   HERO RETIROS
   ============================================== */

.hero-wrapper{
    position:relative;
    width:100%;
}

.seccion-hero{
    height:350px;
    width:100%;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    position:relative;
}

.tarjeta-mensaje{
    background:white;
    max-width:900px;
    margin:-120px auto 40px auto;
    padding:40px;
    text-align:center;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
    position:relative;
    z-index:2;
}

/* ==============================================
   CONTENIDO INFERIOR
   ============================================== */

.contenido-inferior{
    max-width:1200px;
    margin:0 auto;
    padding:40px 20px;
}

/* ==============================================
   SLIDER CALENDARIO
   ============================================== */

.slider-calendario{
    position:relative;
    overflow:hidden;
}

.slider-track{
    display:flex;
    transition:transform .5s ease;
    width:100%;
}

.slide-item{
    min-width:100%;
    display:flex;
    justify-content:center;
}

/* ==============================================
   TARJETA RETIRO
   ============================================== */

.ficha-retiro{
    width:350px;
    background:white;
    border-radius:20px;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    overflow:hidden;
    text-align:center;
}

.mes-titulo{
    color:#20419e;
    font-size:2rem;
    font-weight:bold;
    margin-bottom:15px;
}

.retiro-info{
    font-size:1.2rem;
    margin-bottom:20px;
}

.dias-badge{
    display:inline-block;
    background:#f1c40f;
    color:#20419e;
    padding:10px 20px;
    border-radius:30px;
    font-weight:bold;
}

/* ==============================================
   BOTÓN INSCRIBIRME
   ============================================== */

.open-modal-btn{
    display:block;
    padding:18px;
    background:#f1c40f;
    color:#20419e;
    text-decoration:none;
    font-weight:bold;
    transition:.3s;
}

.open-modal-btn:hover{
    background:#20419e;
    color:#f1c40f;
}

/* ==============================================
   BOTONES DEL SLIDER
   ============================================== */

.nav-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:#20419e;
    color:white;
    border:none;
    font-size:25px;
    width:45px;
    height:45px;
    border-radius:50%;
    cursor:pointer;
    z-index:10;
}

.nav-btn:hover{
    background:#f1c40f;
    color:#20419e;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
/* ==============================================
   RESPONSIVE (PARA CELULARES Y TABLETS)
   ============================================== */
@media (max-width: 900px) {

    /* El menú principal se pone en vertical */
    .menu ul { 
        flex-direction: column; 
        width: 100%;
    }

    .menu li { 
        margin: 0; 
        width: 100%;
        border-top: 1px solid #eee; 
    }

    .menu a { 
        display: block; 
        padding: 15px; 
    }

    /* --- AJUSTE PARA SUBMENÚS EN MÓVIL --- */
    .menu .sub-menu {
        position: static !important; /* En el cel no debe "flotar", debe empujar */
        display: block !important;  /* Que se vean los hijos debajo del padre */
        box-shadow: none !important;
        padding-left: 30px !important; /* Sangría para que se note que son hijos */
        background: #fafafa !important;
        width: 100% !important;
    }

    .menu .sub-menu li {
        border-top: 1px solid #f0f0f0 !important;
    }

    /* El slider se ajusta para que no se vea gigante */
    .slider-profesional { height: 400px; }
    .slide img { height: 400px; }

    .banner-frase { 
        padding: 60px 20px; 
        font-size: 1.2rem; 
    }

    .seccion-hero {
        height: 250px;
    }
}

/* =============================================
   ESTILOS DEL FOOTER MEJORADOS
   ============================================= */

.footer-principal {
    background: #111; /* Un poco más oscuro para dar elegancia */
    color: white;
    padding: 80px 0 30px 0;
    margin-top: 80px;
    border-top: 4px solid #f1c40f; /* Detalle superior amarillo */
}

.footer-container {
    max-width: 1200px;
    width: 92%;
    margin: 0 auto;
    display: grid;
    /* Tres columnas claras: Misión | Enlaces | Redes */
    grid-template-columns: 1.5fr 2fr 1fr; 
    gap: 60px;
}

.footer-col h3 {
    color: #f1c40f;
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

/* Línea decorativa debajo de los títulos */
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #f1c40f;
}

/* --- MANEJO DE ENLACES EN COLUMNAS --- */
.footer-col ul.main-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Divide los enlaces en 2 columnas */
    gap: 15px 20px;
}

.footer-col ul li {
    list-style: none;
    line-height: 1.4;
}

.footer-col ul li a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #f1c40f;
    transform: translateX(8px);
}

/* --- SUBMENÚS (HIJOS) MÁS DISCRETOS --- */
.footer-col .footer-submenu {
    padding-left: 12px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-left: 1px solid #333; /* Línea más fina */
}

.footer-col .footer-submenu li {
    margin-bottom: 3px;
}

.footer-col .footer-submenu li a {
    color: #888 !important; /* Más sutil para no distraer */
    font-size: 0.85rem;
}

/* --- REDES SOCIALES ESTILIZADAS --- */
.redes-sociales {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #333; /* Fondo gris oscuro */
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Los hace circulares */
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Colores de marca al pasar el mouse (hover) */
.social-icon:hover {
    transform: translateY(-5px); /* Pequeño salto hacia arriba */
    background: #f1c40f; /* Color amarillo de tu tema */
    color: #1a1a1a !important;
}

/* Opcional: Colores originales d

/* --- AJUSTE RESPONSIVE --- */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr; /* 2 columnas en tablets */
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr; /* 1 columna en celulares */
        text-align: center;
    }
    .footer-col h3::after { left: 50%; transform: translateX(-50%); }
    .footer-col ul.main-links { grid-template-columns: 1fr; }
    .redes-sociales { align-items: center; }
}

/* Regla Universal para Imágenes Responsive */
img {
    max-width: 100%; 
    height: auto;    
    display: block;  
}

/* Ajuste específico para el Slider */
.slide img {
    width: 100%;     
    height: 500px;   
    object-fit: cover; 
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .slide img {
        height: 300px; 
    }
}

/* Esto asegura que las fotos dentro de las secciones no se "salgan" de la pantalla */
.frase-estilizada img, 
.seccion-servicios img, 
.admin-content img {
    height: auto !important; 
    max-width: 100% !important;
}

/* ==============================================
   AJUSTES QUIRÚRGICOS DE ESPACIADO
   ============================================== */

/* 1. Para que el texto amarillo no esté pegado a los bordes */
.seccion-banner, .seccion-servicios, .seccion-contacto {
    padding: 60px 20px !important; /* Espacio moderado adentro */
    margin-bottom: 20px; /* Separa un bloque del siguiente */
}

/* 2. Para que las tarjetas de servicios no estén pegadas al bloque de arriba */
.grid-servicios {
    margin-top: 50px !important; 
    padding: 20px 0 !important;
}

/* 3. Ajuste de tamaño para la sección de servicios (para que no sea tan grande) */
.seccion-servicios {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 4. Ajuste específico para el texto de la imagen (el banner amarillo) */
.seccion-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto; /* Evita que crezca demasiado hacia abajo */
}

/* ==============================================
   AJUSTE: UNA SOLA FILA Y ESPACIO
   ============================================== */

/* 1. Forzar una sola fila en servicios */
.grid-servicios {
    display: flex !important;
    flex-wrap: nowrap !important; /* Evita que se bajen a otra fila */
    justify-content: space-between !important; /* Las distribuye a lo ancho */
    gap: 20px !important;
    margin-top: 50px !important;
    overflow-x: auto; /* Si son muchas, permite scroll lateral en vez de romperse */
    padding: 20px 0 !important;
}

/* 2. Ajustar el tamaño de las tarjetas para que quepan */
.grid-servicios .card {
    flex: 1 !important; /* Todas crecen igual */
    min-width: 250px !important; /* Tamaño mínimo para que no se aplasten */
    max-width: 350px !important;
}

/* 3. Separar los bloques (Banner amarillo y Servicios) */
.seccion-banner {
    padding: 60px 20px !important;
    /* CAMBIO AQUÍ: Añadimos margen para separar los colores */
    margin-bottom: 50px !important; 
}

.seccion-servicios {
    padding: 40px 20px !important;
    /* Aseguramos que el fondo de la sección servicios no "empuje" al amarillo */
    margin-top: 0 !important;
}

/* Ajuste opcional: Si quieres que el banner azul de frase también se separe */
.banner-frase {
    margin-top: 50px !important;
    margin-bottom: 50px !important;
}

/* Contenedor del extracto */
.contenedor-extracto {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Texto recortado profesional (Sin degradados) */
.texto-recortado-profesional {
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Muestra exactamente 4 líneas */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    line-height: 1.6;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-overflow: ellipsis; /* Añade los "..." automáticamente */
}

/* Eliminamos el pseudo-elemento ::after que causaba el efecto blanco */
.texto-recortado-profesional::after {
    display: none;
}

.boton-wrapper{
    text-align:center;
    margin-top:15px;
}


/* ============================================================
   REPARACIÓN DEFINITIVA DEL SUBMENÚ
   ============================================================ */

/* 1. Ocultar los hijos y sacarlos de la fila */
.menu ul li .sub-menu {
    display: none !important; 
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: white !important;
    min-width: 220px !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    border: 1px solid #eee;
    flex-direction: column !important; /* evita que se alineen en fila */

}

/* 2. Asegurar que el padre sea el punto de referencia */
.menu ul li {
    position: relative !important;
}

.menu .sub-menu {
    display: none;
}

.menu .sub-menu li {
    display: block !important;
}

/* 3. Acción de mostrar al pasar el mouse */
.menu ul li:hover > .sub-menu {
    display: block !important;
}

/* 4. Estilo de los links internos (Misión, Historia) */
.menu .sub-menu li {
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    border-bottom: 1px solid #f9f9f9;
}


.menu .sub-menu li a {
    padding: 12px 20px !important;
    color: #444 !important;
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: left !important;
}

/* 5. Efecto hover dentro del submenú */
.menu .sub-menu li a:hover {
    background: #f8f9fa !important;
    color: #20419e !important;
}

/* 6. Quitar la línea azul animada de los hijos */
.menu .sub-menu li a::after {
    display: none !important;
}

/* ============================================================
   ESTILOS ESPECÍFICOS DEL INDEX (MODAL, ETC)
   ============================================================ */

.banner-frase { 
    padding: 80px 20px; 
    text-align: center; 
    transition: background 0.3s ease; 
}
.banner-frase * { 
    color: inherit; 
}

/* Estilos para el Modal de "Leer Más" */
.modal-lectura {
    position: fixed; z-index: 10000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.85);
    display: none; align-items: center; justify-content: center;
}
.modal-contenido {
    background-color: #fff; padding: 40px; border-radius: 12px;
    max-width: 850px; width: 90%; max-height: 85vh; overflow-y: auto;
    position: relative; animation: fadeIn 0.3s; color: #333; text-align: left;
}
.cerrar-modal {
    position: absolute; right: 20px; top: 15px;
    font-size: 35px; font-weight: bold; cursor: pointer; color: #999;
}
.cerrar-modal:hover { color: #333; }
@keyframes fadeIn { from {opacity: 0; transform: translateY(-20px);} to {opacity: 1; transform: translateY(0);} }

/* Botón Leer Más */
.btn-leer-mas {
    display: inline-block; margin-top: 25px; padding: 12px 30px;
    background-color: transparent; color: inherit; text-decoration: none;
    border-radius: 50px; cursor: pointer; border: 2px solid currentColor; 
    font-weight: bold; transition: all 0.3s ease;
}
.btn-leer-mas:hover { background-color: #fff; color: #20419e; border-color: #fff; transform: scale(1.05); }