  :root {
            --azul-marino: #003d5b; /* Extraído del borde del logo */
            --verde-institucional: #108c35; /* Extraído del campo en el logo */
            --cafe-institucional: #b8682e; /* Extraído de la montaña en el logo */
            --naranja-logo: #fb8c2d; /* Color de la palabra 'Red' */
            --blanco: #ffffff;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--blanco);
        }

        .top-accent-bar {
            height: 6px;
            background: linear-gradient(90deg, var(--verde-institucional), var(--azul-marino));
            width: 100%;
        }

        .navbar-custom {
            background-color: var(--azul-marino);
            background-image: radial-gradient(circle at center, #004d73 0%, var(--azul-marino) 100%);
            padding: 1.5rem 0 1rem 0;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
        }
        /* Cortar el texto a 2 líneas para que todas las cards midan lo mismo */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    min-height: 3em; /* Mantiene la altura aunque el texto sea corto */
}
.text-truncate-3 {
display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    min-height: 3em; /* Mantiene la altura aunque el texto sea corto */
}

/* Contenedores de botones del Slider */
.custom-slider-btn {
    width: 50px;
    opacity: 1 !important;
}
/* Clase para la card de Instagram */
.instagram-card {
    border: 3px solid transparent; /* Espacio para el borde */
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) border-box;
    border-radius: 15px; /* Ajusta según el redondeado de tus otras cards */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

/* Efecto Hover para que resalte al pasar el mouse */
.instagram-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(220, 39, 67, 0.2); /* Sombra con tono rojizo */
}

/* Opcional: El badge de Instagram con el mismo degradado */
.instagram-badge {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
}

/* El círculo del botón */
.btn-slider-circle {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.btn-slider-circle:hover {
    transform: scale(1.1);
}

/* Colores específicos de los botones */
.bg-verde { background-color: var(--verde-institucional) !important; }
.bg-naranja { background-color: var(--naranja-logo) !important; }

/* Posicionamiento para que no tapen el contenido en móviles */
@media (max-width: 768px) {
    .custom-slider-btn { display: none; } /* Ocultar flechas en móvil para usar touch */
}

.instagram-card .card-body {
    border-radius: 0 0 10px 10px;
}
        
        /* Estado al hacer Scroll */
        .navbar-scrolled {
            padding: 0.4rem 0 !important;
            background-image: none !important;
            background-color: rgba(0, 61, 91, 0.98) !important;
            backdrop-filter: blur(10px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.4);
        }

        .infinite-slow {
            animation-duration: 5s !important;
        }

        .navbar-brand img {
            max-height: 85px;
            width: auto;
            filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
            transition: transform 0.3s ease;
        }

        .navbar-scrolled .navbar-brand img {
            max-height: 60px;
        }

        /* Animación de Brillo en el Logo */
        .logo-shine {
            position: relative;
            overflow: hidden;
            display: inline-block;
        }

        .logo-shine::after {
            content: "";
            position: absolute;
            top: -50%;
            left: -60%;
            width: 20%;
            height: 200%;
            background: rgba(255, 255, 255, 0.2);
            transform: rotate(30deg);
            transition: none;
            animation: shine 4s infinite;
        }

        @keyframes shine {
            0% { left: -60%; }
            20% { left: 120%; }
            100% { left: 120%; }
        }

        .navbar-brand:hover img {
            transform: scale(1.05);
        }

        .navbar-brand {
            margin-right: 0;
            width: auto;
            padding: 5px; /* Evita que el logo se corte por el overflow:hidden */
        }

        .nav-menu-wrapper {
            background: rgba(255, 255, 255, 0.08);
            display: inline-block;
            border-radius: 50px;
            padding: 4px 15px;
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: inset 0 0 15px rgba(255,255,255,0.05);
        }

        .nav-link {
            color: var(--blanco) !important;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            padding: 10px 18px !important;
            margin: 0 5px;
            border-radius: 30px;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .nav-link:hover {
            background: var(--verde-institucional);
            color: white !important;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(16, 140, 53, 0.4);
        }

        .nav-link.active {
            background: var(--verde-institucional);
            color: white !important;
        }


        /* Estilos para el Dropdown */
        .dropdown-menu {
            background-color: var(--azul-marino);
            border: 1px solid var(--verde-institucional);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 15px 35px rgba(0,0,0,0.4);
            margin-top: 15px !important;
        }

        .dropdown-item {
            color: var(--blanco);
            font-size: 0.9rem;
            padding: 12px 20px;
            font-weight: 500;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .dropdown-item:last-child { border-bottom: none; }

        .dropdown-item:hover {
            background-color: var(--verde-institucional);
            color: white;
            padding-left: 25px;
        }

        .dropdown-divider {
            border-top: 1px solid var(--verde-institucional);
            opacity: 0.5;
        }
         /* --- SECCIÓN HERO --- */
        .hero-banner {
            position: relative;
            height: 70vh;
            min-height: 500px;
            overflow: hidden;
        }

        .hero-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Degradado azul semitransparente usando el color institucional */
            background: linear-gradient(135deg, rgba(0, 61, 91, 0.6) 0%, rgba(0, 61, 91, 0.4) 100%); /* Opacidad ajustada */
            z-index: 2; /* Por encima de las imágenes del carrusel */
        }

        .hero-content { /* Nuevo estilo para el contenedor del texto */
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 3; /* Por encima del overlay */
            width: 100%;
            padding: 0 15px; /* Añade un poco de padding para pantallas pequeñas */
        }

        .carousel-img-wrapper {
            background-size: cover; /* Para que la imagen cubra todo el espacio */
            background-position: center;
            background-repeat: no-repeat;
            height: 100%;
            width: 100%;
            background-color: var(--azul-marino); /* Color de fondo de respaldo */
        }

        .hero-line {
            width: 100px;
            height: 4px;
            background: var(--verde-institucional);
            margin: 0 auto;
            border-radius: 2px;
        }

        /* --- SECCIÓN NOTICIAS (CARDS) --- */
        .section-title {
            color: var(--azul-marino);
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 30px;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: var(--verde-institucional);
        }

        .news-card {
            border: none;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            height: 100%;
            background: white;
        }

        .news-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        }

        .news-card .card-img-top {
            height: 200px;
            object-fit: cover;
        }

        .news-card .card-body {
            padding: 1.5rem;
        }

        /* --- ESTILOS INSTAGRAM CARD --- */
        .instagram-card {
            border: 2px solid transparent;
            background: linear-gradient(white, white) padding-box,
                        linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) border-box;
        }

        .instagram-badge {
            background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
            color: white;
            font-size: 0.7rem;
        }

        .ig-icon {
            color: var(--azul-marino);
        }

        /* --- FOOTER --- */
        .footer-custom {
            background-color: var(--azul-marino);
            border-top: 5px solid var(--verde-institucional);
        }

        .footer-logo {
            max-height: 50px;
            filter: brightness(0) invert(1);
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: all 0.3s ease;
            display: block;
            margin-bottom: 10px;
        }

        .footer-links a:hover {
            color: var(--verde-institucional);
            padding-left: 5px;
        }

        .social-links a {
            color: white;
            background: rgba(255,255,255,0.1);
            width: 35px;
            height: 35px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: 0.3s;
        }

        .social-links a:hover {
            background: var(--verde-institucional);
            transform: translateY(-3px);
        }

        .footer-bottom {
            background-color: rgba(0,0,0,0.2);
        }

        .btn-verde-inst {
            background-color: var(--verde-institucional);
            color: white;
            border: none;
        }

        .btn-verde-inst:hover {
            background-color: #0d702a;
            color: white;
        }

        /* --- ÁREA DE VISUALIZACIÓN DE CONTENIDO --- */
        #content-display-area {
            display: none; /* Oculto por defecto */
            padding: 1rem 0;
            background: #e9ecef;
            border-bottom: 5px solid var(--azul-marino);
        }

        .iframe-container {
            width: 100%;
            height: 600px;
            border: 2px solid var(--azul-marino);
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            background: white;
        }

        /* Decoración del Título de Acceso */
        #display-title {
            background: white;
            padding: 12px 25px;
            border-radius: 12px;
            border-left: 6px solid var(--verde-institucional);
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            display: inline-block;
        }

        .title-tag {
            display: block;
            font-size: 0.75rem;
            color: var(--azul-marino);
            text-transform: uppercase;
            font-weight: 800;
            letter-spacing: 2px;
            margin-bottom: 2px;
            opacity: 0.8;
        }

        .title-name {
            display: block;
            color: var(--azul-marino);
            font-weight: 700;
            font-size: 1.6rem;
            line-height: 1.2;
        }

        .iframe-fallback {
            background: #fff3cd;
            border: 1px solid #ffeeba;
            border-radius: 8px;
        }

        /* Estilo para el botón de acción principal cuando falla el login */
        .btn-rescue {
            background-color: var(--naranja-logo);
            color: white;
            font-weight: 600;
            border: none;
            transition: all 0.3s ease;
        }
        .btn-rescue:hover {
            background-color: var(--cafe-institucional);
            color: white;
            transform: scale(1.05);
        }
        
        /* --- ESTILOS GLASSMORPHISM --- */
        .glass-bg-container {
            background: var(--blanco);
            padding: 80px 0;
            min-height: 100vh;
        }

        .glass-card {
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(0, 61, 91, 0.15);
            border-radius: 25px;
            padding: 2rem;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            height: 100%;
            box-shadow: 0 10px 30px rgba(0, 61, 91, 0.08);
            position: relative;
            z-index: 1;
        }

        .glass-card:hover {
            background: rgba(255, 255, 255, 0.9);
            transform: translateY(-15px) scale(1.02);
            border: 1px solid var(--verde-institucional);
            box-shadow: 0 20px 50px rgba(0, 61, 91, 0.2);
        }

        .glass-logo {
            width: 80px; /* Nuevo ancho del contenedor del logo */
            height: 80px; /* Nueva altura del contenedor del logo */
            object-fit: contain;
            background: white;
            padding: 5px; /* Padding ajustado para el nuevo tamaño */
            border-radius: 50%;
            margin-bottom: 1.5rem;
            box-shadow: 0 5px 15px rgba(0, 61, 91, 0.1);
            overflow: hidden;
            border: 2px solid rgba(0, 61, 91, 0.05);
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Animación de rotación unificada para TODOS los tipos de tarjetas */
        .glass-card:hover .glass-logo,
        .glass-card-school:hover .glass-logo,
        .glass-card-kid:hover .glass-logo {
            transform: rotateY(360deg) scale(1.1);
        }

        .glass-card h4 {
            color: #01aaff; /* Softer blue for card titles */
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .glass-card p {
            color: #555;
            font-size: 0.9rem;
        }

        /* --- NIVEL 1: INFANTIL (Jardines y Escuelas 2-5 años) --- */
        .glass-kid-container {
            background-color: #f8f9fa; 
            /* Patrón de puntos neutros: Amarillo Girasol y Verde Menta */
            background-image:  radial-gradient(#fbc02d 0.8px, transparent 0.8px), radial-gradient(#26a69a 0.8px, #f8f9fa 0.8px);
            background-size: 30px 30px;
            background-position: 0 0, 20px 20px;
            padding: 60px 0;
            border-bottom: 5px dashed #26a69a;
        }

        .glass-card-kid {
            border-radius: 40px !important;
            border: 3px dashed #26a69a !important; /* Verde Menta */
            background: rgba(255, 255, 255, 0.85) !important;
        }

        .glass-card-kid:hover {
            transform: translateY(-12px) rotate(-1deg) !important; /* Pequeña rotación divertida */
            border-color: #fbc02d !important; /* Cambia a Amarillo Girasol al pasar el mouse */
            box-shadow: 0 15px 35px rgba(38, 166, 154, 0.2) !important;
        }

        .title-kid {
            color: #fbc02d !important; /* Amarillo Girasol */
            font-weight: 800 !important;
        }

        .btn-kid {
            background-color: #4fc3f7; /* Azul infantil */
            color: white;
            border: none;
        }

        /* Ajuste para usar el verde institucional en botones infantiles según pedido */
        .btn-kid-green {
            background-color: var(--verde-institucional);
            color: white;
            border: none;
            transition: all 0.3s ease;
        }
        .btn-kid-green:hover {
            background-color: #0d702a;
            color: white;
            transform: scale(1.05);
        }

        /* --- NIVEL 2: INTERMEDIO (Colegios 6-13 años) --- */
        .glass-school-container {
            background-color: #f0f7ff; /* Celeste institucional muy suave */
            padding: 80px 0;
            min-height: 100vh;
        }

        .glass-card-school {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            border: 2px solid var(--azul-marino);
            border-radius: 30px;
            padding: 2rem;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            height: 100%;
            box-shadow: 0 10px 25px rgba(0, 61, 91, 0.1);
        }

        .glass-card-school:hover {
            transform: translateY(-10px) scale(1.03);
            border-color: var(--naranja-logo);
            box-shadow: 0 20px 40px rgba(0, 61, 91, 0.15);
            background: white;
        }

        /* Utility for multi-line text truncation */
        .text-truncate-2 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* --- AJUSTES DE TIPOGRAFÍA PARA PANTALLAS GRANDES (DESKTOP) --- */
@media (min-width: 992px) {
    /* Establece el color azul oscuro para la mayoría del texto en fondos claros */
    body:not(.dark-mode) p,
    body:not(.dark-mode) .lead:not(.hero-content .lead):not(.text-muted):not(.editorial-lead),
    body:not(.dark-mode) h1:not(.hero-content h1):not(.display-3):not(.title-kid),
    body:not(.dark-mode) h2:not(.hero-content h2):not(.h3):not(.title-kid),
    body:not(.dark-mode) h3:not(.hero-content h3):not(.title-kid),
    body:not(.dark-mode) h4:not(.hero-content h4):not(.title-kid),
    body:not(.dark-mode) .section-title {
        color: var(--azul-marino) !important; /* Attractive blue for general titles */
    }

    /* Aumento general de tamaños de fuente para una mejor legibilidad */
    h1:not(.hero-content h1):not(.display-3) {
        font-size: 3.8rem !important;
    } /* No change to font size, only color */
    h2:not(.hero-content h2):not(.h3) {
        font-size: 2.8rem !important;
    }
    h3:not(.hero-content h3) {
        font-size: 2.2rem !important;
    }
    h4:not(.hero-content h4) {
        font-size: 1.8rem !important;
    }

    .lead:not(.hero-content .lead) {
        font-size: 1.4rem !important;
        line-height: 1.7 !important;
    }

    p {
        font-size: 1.15rem !important;
        line-height: 1.8 !important;
    }

    /* Asegura que las clases de utilidad de Bootstrap mantengan sus colores específicos */
    .text-muted {
        color: #6c757d !important; /* Mantiene el color muted de Bootstrap */
    }
    .text-white-50 {
        color: rgba(255, 255, 255, 0.5) !important; /* Mantiene el blanco-50 para el banner del index */
    }
    .text-white {
        color: #fff !important; /* Mantiene el blanco para el banner del index */
    }

    /* Restaura explícitamente los estilos del banner del index a sus valores originales */
    .hero-content h1.display-3 { font-size: 3rem !important; color: #fff !important; }
    .hero-content h2.h3 { font-size: 1.75rem !important; color: rgba(255, 255, 255, 0.5) !important; }
    .hero-content .lead { font-size: 1.25rem !important; color: #fff !important; }
}
/* Estilo para los botones dentro del chat Monica */
/* Botones interactivos para Monica */
.btn-chat-opt {
    background: rgba(0, 61, 91, 0.1); /* azul-marino suave */
    border: 1px solid var(--azul-marino);
    color: var(--azul-marino);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 4px 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-chat-opt:hover {
    background: var(--verde-institucional);
    color: white;
    border-color: var(--verde-institucional);
    transform: translateY(-2px);
}