/* public/css/modern-style.css */

/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #0D47A1; /* Azul institucional más profundo */
    --secondary-color: #1976D2; /* Azul más brillante para acentos */
    --tertiary-color: #FFC107;  /* Amarillo para acentos de estudiante */
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #1e7e34;
    --font-family: 'Poppins', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- SECCIÓN HERO --- */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    padding: 80px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* --- BOTONES --- */
.btn {
    padding: 12px 28px;
    border-radius: 50px; /* Botones más redondeados */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--light-color);
    color: var(--primary-color);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--light-color);
    border-color: var(--light-color);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--success-color);
    color: var(--light-color);
}
.btn-secondary:hover {
    background-color: #2a9d4a;
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: var(--tertiary-color);
    color: var(--dark-color);
}
.btn-tertiary:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn-disabled {
    background-color: var(--gray-color);
    color: #ccc;
    cursor: not-allowed;
}

/* --- BARRA DE NAVEGACIÓN/REGISTRO --- */
.main-nav {
    background-color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-text {
    font-weight: 600;
    color: var(--dark-color);
}

/* --- SECCIÓN DE CONSULTAS (NUEVA) --- */
.consultas-cta {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    margin: 40px auto;
    gap: 20px;
    flex-wrap: wrap;
}
.consultas-icon {
    font-size: 3rem;
    color: var(--secondary-color);
}
.consultas-content {
    flex: 1;
}
.consultas-content h2 {
    margin: 0 0 5px;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.consultas-content p {
    margin: 0;
    color: var(--gray-color);
}

/* --- SECCIÓN DE CARACTERÍSTICAS --- */
.features-section {
    padding: 40px 0;
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.feature-card h3 {
    font-size: 1.3rem;
    margin: 0 0 10px;
    color: var(--dark-color);
}

/* --- FOOTER --- */
.main-footer {
    text-align: center;
    padding: 25px 20px;
    background: var(--dark-color);
    color: var(--light-color);
    margin-top: 40px;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 992px) {
    .consultas-cta {
        flex-direction: column;
        text-align: center;
    }
    .consultas-action {
        margin-top: 15px;
    }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .main-nav { flex-direction: column; }
}

/* --- ESTILOS DEL CHATBOT "TUTORITO" --- */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px D10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-window.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chat-window {
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-window.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* --- REGLAS MODIFICADAS PARA UN HEADER MINIMALISTA --- */
.chat-header {
    background: transparent; /* 1. Eliminamos el fondo sólido */
    color: var(--dark-color); /* 2. Cambiamos el color de texto a oscuro */
    padding: 15px;
    border-bottom: 1px solid #eee; /* 3. Añadimos un borde inferior sutil */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

/* --- NUEVAS REGLAS PARA EL ICONO Y TÍTULO --- */
.header-title-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre el icono y el texto */
}

.header-icon {
    color: var(--primary-color); /* Damos al icono el color principal de la marca */
    font-size: 1.2rem;
}

.chat-header h3 { 
    margin: 0; 
    font-size: 1.1rem; 
    font-weight: 600; /* 4. Hacemos la fuente un poco menos pesada */
}

.close-chat-btn { 
    background: none; 
    border: none; 
    color: var(--gray-color); /* 5. Cambiamos el color del botón a gris */
    font-size: 1.5rem; 
    cursor: pointer;
    transition: color 0.2s ease;
}
.close-chat-btn:hover {
    color: var(--dark-color);
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.4;
}
.chat-message p { margin: 0; }
.chat-message.user {
    background-color: #e0e0e0;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.chat-message.bot {
    background-color: var(--secondary-color);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}
#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
#chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}
#send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}
#send-btn:hover {
    background-color: var(--secondary-color);
}

.typing-indicator p span {
    display: inline-block;
    animation: bounce 1.4s infinite;
    font-size: 1.2rem;
}
.typing-indicator p span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-indicator p span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}
/* --- ESTILOS ADICIONALES PARA EL CHATBOT --- */

/* Estilo para cuando el bot hace una pregunta directa */
.chat-message.bot-question p {
    background-color: #e8f5e9; /* Un fondo verde muy claro */
    color: #1b5e20; /* Texto verde oscuro */
    border-left: 5px solid #ffc107; /* Borde izquierdo amarillo para llamar la atención */
    font-weight: 600;
    font-style: italic;
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* --- NUEVA CLASE PARA RESALTAR PALABRAS --- */
.highlight-word {
    color: var(--tertiary-color); /* Usamos el color de acento amarillo */
    font-weight: 700; /* Hacemos la fuente más gruesa */
}