body {
    background-image: url('../assets/img/explanada-biblioteca25.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh; /* Permite que toda la página pueda hacer scroll si el contenido es largo */
    font-family: Arial, sans-serif; /* Fuente por defecto para el texto */
    padding-left: 280px; /* Espacio para el sidebar fijo */
    transition: padding-left 0.3s ease;
}

/* Estilos del Sidebar (Diseño tipo Apple / Glassmorphism) */
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.25); /* Fondo mucho más transparente */
    backdrop-filter: blur(20px); /* Efecto blur de fondo más pronunciado */
    -webkit-backdrop-filter: blur(20px); /* Soporte adicional para navegadores Safari */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Borde sutil */
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    position: fixed; /* Mantiene el menú arriba al hacer scroll */
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto; /* Permite hacer scroll vertical dentro del menú si excede la pantalla */
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08); /* Sombra suave lateral */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.sidebar .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* Espacio entre el logo y el texto */
    color: #192d63; /* Texto oscuro tipo Apple */
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sidebar .logo img {
    width: 70px; /* Tamaño pequeño, ajústalo según necesites */
    height: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    align-items: flex-start;
    width: 100%;
}

.nav-links li a {
    color: #ffffff; /* Gris oscuro para enlaces */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nav-links li a:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.05); /* Efecto de hover similar a macOS */
}

/* Estilos para el Menú Desplegable */
.dropdown {
    width: 100%;
}

.dropdown-menu {
    display: none; /* Oculto por defecto */
    list-style: none;
    padding: 5px 0 0 15px; /* Indentación estilo acordeón */
    margin: 0;
    width: 100%;
}

.dropdown-menu li a {
    padding: 10px 16px;
    color: #f0f0f0; /* Un tono más cercano al blanco */
    font-weight: 400;
}

.dropdown-menu li a:hover {
    color: #192d63;
    background: transparent;
    font-weight: 500;
}

/* Estilos para el Sub-menú Desplegable (Nivel 3) */
.sub-dropdown-menu {
    display: none; /* Oculto por defecto */
    list-style: none;
    padding: 5px 0 5px 15px; /* Más indentación */
    margin: 0;
}

.sub-dropdown-menu li a {
    padding: 8px 16px;
    color: #e0e0e0; /* Un tono claro para que se distinga bien */
    font-size: 0.85rem; /* Letra ligeramente más pequeña */
}

.sub-dropdown-menu li a:hover {
    color: #192d63;
}

/* Estilos para el botón derecho */
.nav-actions {
    margin-top: auto; /* Empuja el botón al final del sidebar */
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-primary {
    background-color: #192d63;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.btn-primary:hover {
    background-color: #000000;
    transform: translateY(-2px); /* Pequeña elevación al pasar el mouse */
}

/* --- Contenedor Principal de Contenido (Componente Glassmorphism) --- */
.content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}

.glass-container {
    background: rgba(255, 255, 255, 0.75); /* Blanco semitraslúcido */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px; /* Esquinas redondeadas */
    padding: 40px;
    width: 100%;
    max-width: 800px; /* Ancho máximo para pantallas grandes */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    
    /* Altura máxima y scroll interno responsivo */
    max-height: 85vh;
    overflow-y: auto;
}

/* Estilo de la barra de scroll para el contenedor */
.glass-container::-webkit-scrollbar { width: 8px; }
.glass-container::-webkit-scrollbar-track { background: transparent; }
.glass-container::-webkit-scrollbar-thumb { 
    background: rgba(25, 45, 99, 0.3); 
    border-radius: 10px; 
}

.glass-container > h1{

    text-align: center;
    color: #192d63

}

/* --- Diseño Responsivo --- */

/* Botón hamburguesa */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #192d63;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Overlay oscuro para fondo */
.sidebar-overlay {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    body {
        padding-left: 0; /* Quita el espacio en dispositivos móviles */
    }

    .sidebar {
        transform: translateX(-100%); /* Oculta el sidebar por defecto */
    }

    .glass-container {
        padding: 24px; /* Menos espacio interior en móviles */
        border-radius: 16px;
        max-height: 88vh; /* Aprovecha un poco más la pantalla */
    }

    .sidebar.active {
        transform: translateX(0); /* Muestra el sidebar cuando tiene la clase activa */
    }

    .mobile-toggle {
        display: flex; /* Muestra el botón hamburguesa */
    }

    .sidebar-overlay.active {
        visibility: visible;
        opacity: 1;
    }
}

/* estilos de chatbot */
/* Botón flotante del chat */
.chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #192d63;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.2s;
}
.chat-toggle:hover { transform: scale(1.05); }

/* Ventana de chat Glassmorphism */
.chat-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.chat-header {
    background: #192d63;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.chat-header button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-msg, .user-msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-msg {
    background: rgba(25, 45, 99, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-msg {
    background: #192d63;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
}

.chat-input-area button {
    background: #192d63;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    margin-left: 10px;
    cursor: pointer;
}
.glass-card{
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.365);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    max-width: 400px;
    color: #e0e0e0;

}
/* temina estilos de chatbot */
.card-container{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    margin-top: 20px;

}