/* --- ESTILOS GENERALES Y RESET --- */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #fff;
    font-family: sans-serif;
}

/* --- CABECERA PRINCIPAL (FIJA Y ESTABLE) --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    
    /* Tamaño fijo estricto */
    height: 90px;
    min-height: 90px;
    max-height: 90px;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    
    background-color: #ffffff;
    border-bottom: 1px solid #dcdcdc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Distribución de los 3 bloques internos del header */
.main-header > * {
    flex: 1;
    display: flex;
    align-items: center;
}

.main-header > *:first-child {
    justify-content: flex-start;
}

.main-header > *:nth-child(2) {
    justify-content: center;
}

.main-header > *:last-child {
    justify-content: flex-end;
}

/* --- LOGO Y MENSAJES --- */
.logo-link {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.logo-link:hover {
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

#tabmessage-container,
#tabmessage-container * {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- MENÚ Y NAVEGACIÓN --- */
.breadcrumb-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-menu a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 1000;
    font-size: 20px;
    padding: 18px 32px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb-menu a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

/* --- BOTÓN HAMBURGUESA --- */
.menu-toggle {
    display: none; 
    background: transparent;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    flex: 0 0 44px !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    color: #1b2650;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.menu-toggle:hover {
    background-color: #f3f4f6;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- MODO CELULAR (Pantallas menores a 768px) --- */
@media (max-width: 768px) {
    .main-header {
        padding: 0 15px;
    }

    .menu-toggle {
        display: flex !important;
        margin-left: auto;
    }

    .nav-links {
        display: none; 
        position: absolute;
        top: 90px;     
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid #dcdcdc;
        gap: 15px;
        z-index: 9999;
    }

    .nav-links.active {
        display: flex !important;
    }
}

/* --- HERO SECTION APILADO --- */
.hero-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

.hero-text {
    width: 100%;
}

.hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 650px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- SECCIÓN DE ESCUELAS --- */
.trusted-schools {
    text-align: center;
}

.trusted-schools h3 {
    text-align: center;
}

/* --- CONTENEDOR DESTACADO (Y QUÉ MÁS OFRECEMOS) --- */
.fun-section {
    width: 100%;
    max-width: 1050px;
    margin: 60px auto;
    padding: 0 20px;
}

.fun-banner {
    background: linear-gradient(135deg, #fce7f3 0%, #e0f2fe 100%);
    border-radius: 24px;
    padding: 45px 35px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.fun-banner h2 {
    color: #0f172a;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
}

.fun-banner p {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 35px;
    text-align: center;
}

.fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.fun-card {
    background: #ffffff;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.fun-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.fun-emoji {
    font-size: 2.4rem;
    display: inline-block;
    margin-bottom: 12px;
}

.fun-card h4 {
    color: #1e293b;
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.fun-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* --- FOOTER SEGURO --- */
.main-footer {
    width: 100%;
    box-sizing: border-box;
    background-color: #1e293b;
    padding: 24px 16px;
    text-align: center;
    margin-top: 60px;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.main-footer p {
    font-size: 0.88rem;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.4;
    width: 100%;
}

.footer-subtext {
    font-size: 0.78rem;
    color: #cbd5e1;
}

/* --- MODAL DE LOGIN FLOTANTE --- */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    box-sizing: border-box;
    padding: 16px;
}

.login-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.login-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
}

.modal-header-content {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header-content h3 {
    margin: 10px 0 4px 0;
    color: #0f172a;
    font-size: 1.4rem;
}

.modal-header-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* --- BOTÓN DE GOOGLE REACTIVO (ÚNICO Y OPTIMIZADO) --- */
.google-login-btn-large {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.google-login-btn-large:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
}

.google-login-btn-large:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f1f5f9;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Spinner de carga moderno */
.btn-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
}

.spinner-circle {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- SECCIÓN DE AYUDA / ERRORES COMUNES --- */
.login-help-section {
    margin-top: 24px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    text-align: left;
}

.help-dropdown {
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
}

.help-dropdown summary {
    font-weight: 500;
    color: #475569;
    user-select: none;
    transition: color 0.2s;
}

.help-dropdown summary:hover {
    color: #0f172a;
}

.help-content {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.4;
}

.help-content p {
    margin: 0 0 6px 0;
}

.help-content ul {
    margin: 0 0 10px 0;
    padding-left: 18px;
}

.help-content li {
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.help-action {
    font-size: 0.82rem;
    color: #1e293b;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    margin: 0 !important;
}