/* --- style.css --- */

/* 1. VARIABLES Y BASE */
:root {
    --mi-turquesa: #6EC6C6;
    --mi-azul: #1A5F66;
    --mi-salmon: #F6B092;
    --mi-crema: #FFFEF9;
    --mi-celeste-claro: #E0F2F2;
    --mi-gris-oscuro: #343a40;
    --mi-verde-exito: #28a745;
    --mi-rojo-error: #dc3545;
    --mi-amarillo-alerta: #ffc107;
}

body { 
    font-family: 'Nunito', sans-serif; 
    color: var(--mi-azul); 
    background-color: var(--mi-crema); 
    overflow-x: hidden; 
}

h1, h2, h3, h4, h5 { 
    font-family: 'Quicksand', sans-serif !important; 
    font-weight: 700; 
    color: var(--mi-azul);
}

/* 2. REDONDEADO GLOBAL Y FORMULARIOS */
.form-control, 
.custom-select, 
.input-group-text {
    border-radius: 15px !important;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    height: auto;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--mi-turquesa);
    box-shadow: 0 0 0 0.2rem rgba(110, 198, 198, 0.25);
    background-color: #fff;
}

textarea.form-control {
    border-radius: 15px !important;
}

.card, 
.card-custom, 
.modal-content, 
.alert, 
.list-group-item:first-child, 
.list-group-item:last-child {
    border-radius: 20px !important;
    border: none; 
}

/* 3. BARRA LATERAL (SIDEBAR) */
#sidebar-menu, .sidebar {
    background-color: var(--mi-gris-oscuro) !important;
    color: #ffffff !important;
    min-height: 100vh;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

#sidebar-menu .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

#sidebar-menu .nav-link:hover, 
#sidebar-menu .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--mi-turquesa);
    text-decoration: none;
}

#sidebar-menu i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.profile-img-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px auto;
    border: 3px solid rgba(255,255,255,0.3);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-container.big {
    width: 150px;
    height: 150px;
    border: 5px solid var(--mi-turquesa);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4. BOTONES (ESTILO PÍLDORA) */
.btn {
    border-radius: 50px !important;
    padding: 8px 24px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-primary { background-color: var(--mi-azul) !important; color: white !important; }
.btn-primary:hover { background-color: #124247 !important; }

.btn-info { background-color: var(--mi-turquesa) !important; color: white !important; }
.btn-info:hover { background-color: #5ab1b1 !important; }

.btn-warning { background-color: var(--mi-salmon) !important; color: white !important; }
.btn-warning:hover { background-color: #e09b7f !important; }

.btn-success { background-color: var(--mi-verde-exito) !important; color: white !important; }
.btn-danger { background-color: var(--mi-rojo-error) !important; color: white !important; }

.btn-outline-primary {
    border: 2px solid var(--mi-azul) !important;
    color: var(--mi-azul) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background-color: var(--mi-azul) !important;
    color: white !important;
}

.btn-xs, .btn-sm {
    padding: 5px 15px;
    font-size: 0.75rem;
    text-transform: none;
}

.btn-login { 
    background-color: var(--mi-salmon); color: white !important; 
    border-radius: 25px !important; padding: 8px 20px; font-weight: 700; 
    margin-left: 15px; 
}
.btn-login:hover { background-color: var(--mi-azul) !important; text-decoration: none; }

.btn-submit, .btn-solicitar {
    background-color: var(--mi-salmon);
    color: white !important;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 15px 45px;
    border-radius: 50px !important;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(246, 176, 146, 0.4);
    text-decoration: none !important;
    margin-top: 20px;
    text-align: center;
}
.btn-submit:hover, .btn-solicitar:hover {
    background-color: var(--mi-azul);
    transform: translateY(-3px);
}

/* 5. NAVEGACIÓN Y COMPONENTES PÚBLICOS */
.site-navbar { background-color: #dffffd !important; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.navbar-brand img { max-height: 50px !important; width: auto !important; }
.nav-link.public-link { color: var(--mi-salmon) !important; font-weight: 700; }

.hero-section {
    background-color: #d1d9db;
    padding: 80px 0;
    display: flex;
    align-items: center;
}
.hero-section img, .col-lg-6 img { 
    max-width: 100%; height: auto; max-height: 350px; object-fit: contain; 
}

/* 6. TARJETAS Y CONTENEDORES */
.card-custom {
    background: white;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.package, .contact-form-container, .contact-info-card, .total-box {
    border: 2px solid var(--mi-celeste-claro);
    border-radius: 20px !important;
    background: white;
    padding: 35px;
    transition: 0.3s;
    height: 100%;
}

.package:hover, .contact-form-container:hover {
    transform: translateY(-5px);
    border-color: var(--mi-salmon);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.teacher-card {
    background: white;
    border: 1px solid #eef2f3;
    border-radius: 20px !important;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}
.teacher-card:hover {
    transform: translateY(-5px);
    border-color: var(--mi-turquesa);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.faq-box {
    background-color: white;
    padding: 25px;
    border-radius: 20px !important;
    border: 1px solid #eef2f3;
    height: 100%;
    transition: 0.3s;
}
.faq-box:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--mi-celeste-claro);
}

/* 7. CHAT */
.chat-container { 
    height: 75vh; display: flex; background: white; 
    border-radius: 20px !important; overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid #eee;
}
.chat-sidebar { width: 300px; border-right: 1px solid #eee; overflow-y: auto; background: #f8f9fa; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: #fff; }

.contact-item { padding: 15px; border-bottom: 1px solid #eee; cursor: pointer; display: flex; align-items: center; transition: 0.2s; gap: 15px; }
.contact-item:hover { background: #e9ecef; }
.contact-avatar { width: 45px; height: 45px; min-width: 45px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.contact-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }

.msg-area { flex: 1; padding: 20px; overflow-y: auto; background-color: #f0f2f5; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble { max-width: 75%; padding: 10px 15px; border-radius: 15px !important; font-size: 0.9rem; word-wrap: break-word; }
.msg-sent { align-self: flex-end; background-color: var(--mi-turquesa); color: white; border-bottom-right-radius: 2px !important; }
.msg-received { align-self: flex-start; background-color: white; border: 1px solid #ddd; border-bottom-left-radius: 2px !important; }

/* 8. FOOTER Y EXTRAS */
.site-footer {
    background-color: var(--mi-azul) !important;
    color: white !important;
    padding: 40px 0; margin-top: 50px;
    text-align: center !important;
    width: 100%;
}
.site-footer p { color: white; margin: 0; }

.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px;
    background-color: #25d366; color: white !important;
    border-radius: 50%; text-align: center; font-size: 30px;
    box-shadow: 2px 2px 3px #999; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; text-decoration: none !important;
}
.whatsapp-float:hover { transform: scale(1.1); background-color: #128c7e; }

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: white; z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}

/* 9. RESPONSIVE (MÓVIL) */
.mobile-nav-toggle {
    display: none;
    position: fixed; top: 15px; left: 15px; z-index: 9999;
    background: var(--mi-gris-oscuro); color: white; border: none;
    padding: 10px 15px; border-radius: 10px !important;
}

#sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1040; backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .mobile-nav-toggle { display: block; }
    .sidebar {
        position: fixed; top: 0; left: -260px; height: 100vh; width: 260px;
        z-index: 1050; transition: 0.3s;
    }
    .sidebar.active { left: 0; }
    #sidebar-overlay.active { display: block; }
    main { padding-top: 70px !important; }
    
    .chat-container { flex-direction: column; height: 85vh; margin: -20px; width: calc(100% + 40px); }
    .chat-sidebar { width: 100%; height: 100%; }
    .chat-main { display: none; width: 100%; height: 100%; }
    .chat-container.chat-active .chat-sidebar { display: none; }
    .chat-container.chat-active .chat-main { display: flex; }
}

img.img-fluid { max-width: 100%; height: auto; }

/* ==========================================================
   MODO IMPRESIÓN (Ctrl + P)
   ========================================================== */
@media print {
    /* Ocultar elementos innecesarios en papel */
    #sidebar-menu, .site-navbar, .site-footer, .mobile-nav-toggle, 
    #sidebar-overlay, .whatsapp-float, button, .btn {
        display: none !important;
    }
    
    /* Expandir el contenido principal a toda la hoja */
    main, .col-md-10, .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Quitar sombras y poner bordes limpios para ahorrar tinta */
    body { background-color: white !important; }
    .card-custom, .card, .modal-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid; /* Evita que una tarjeta se corte a la mitad de la hoja */
    }

    /* Asegurar que los colores de fondo (ej. badges o alertas) se impriman */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}