/*
  Name: base.css
  Version: v2025.08.02-01
  Language: css
  Runtime: browser
  Notes: CSS base extraído de styles.css preservando diseño exacto
*/

/* =========================================
   TUTORDS - ESTILOS BASE GLOBALES
   Extraído de styles.css con preservación exacta
   ========================================= */

/* =========================================
   1. VARIABLES CSS (Custom Properties)
   ========================================= */
:root {
    /* Colores principales */
    --primary-color: #E91E63;        /* Rosa principal de Tutords */
    --primary-hover: #D81B60;        /* Rosa más oscuro para hover */
    --primary-dark: #C2185B;         /* Rosa dark para variaciones */
    --fuscia-color: #E91E63;         /* Fucsia para palabras destacadas */
    
    /* Colores de texto */
    --heading-color: #1a202c;        /* Color para títulos */
    --body-text-color: #4a5568;      /* Color para texto normal */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    
    /* Colores de UI */
    --card-border-color: #e2e8f0;    /* Bordes de tarjetas */
    --gray-light: #f7fafc;           /* Fondo gris claro */
    --white: #ffffff;                /* Blanco puro */
    --background-light: #f8f9fa;
    --border-light: #e0e0e0;
    
    /* Sombras */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    
    /* Medidas y espaciados */
    --border-radius: 12px;           /* Radio de bordes estándar */
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 20px;
    --border-radius-xl: 25px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Tipografías */
    --font-heading: 'Poppins', sans-serif;  /* Fuente para títulos */
    --font-body: 'Lato', sans-serif;        /* Fuente para texto */
}

/* =========================================
   2. RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    charset: 'UTF-8';
}

body {
    font-family: var(--font-body);
    color: var(--body-text-color);
    line-height: 1.6;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 45px; /* Espacio para el cintillo del footer */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   3. TIPOGRAFÍA
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin: 0;
    line-height: 1.2;
}

/* =========================================
   4. LAYOUT Y CONTENEDORES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Contenedor principal */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 2vh 20px;
    background-color: #f7fafc;
    overflow-y: auto;
}

/* Contenedor index main - sin background que interfiera */
main.index-main {
    background-color: transparent !important;
    padding: 0 !important;
}

/* Dashboard específicamente centrado */
main.dashboard-main {
    justify-content: center;
}

/* Otras páginas empiezan desde arriba */
main.profesores-main,
main.chat-nueva-main {
    justify-content: flex-start;
}

main .container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* =========================================
   5. BOTONES BASE
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-xl);
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-logout {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background-color: var(--primary-hover);
}

.btn-login {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

/* =========================================
   6. LOADING Y UTILIDADES
   ========================================= */

/* Pantalla de loading */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none; /* CRÍTICO: No bloquear clicks */
}

.loading-screen.active {
    display: flex;
    pointer-events: auto;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Spinner de loading */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =========================================
   7. ANIMACIONES BASE
   ========================================= */

/* Animación de loading */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Animaciones de fade */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* =========================================
   8. UTILIDADES Y HELPERS
   ========================================= */

/* Ocultar elementos */
.hidden {
    display: none !important;
}

/* Texto centrado */
.text-center {
    text-align: center;
}

/* Color primario */
.text-primary {
    color: var(--primary-color);
}

/* Márgenes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Padding */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* SVG Icons */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Palabra destacada en fucsia */
.fuscia-word {
    color: var(--fuscia-color);
}

/* Espaciado de 30px entre breadcrumbs y títulos */
.breadcrumb + main,
main.profesores-main,
main.soporte-main,
main.login-main,
main.dashboard-main,
main.categorias-main,
main.planes-main,
main.como-funciona-main,
main.pantone-main {
    padding-top: 30px;
}

/* TAMAÑOS UNIFORMES DE TÍTULOS Y SUBTÍTULOS EN TODAS LAS PÁGINAS */
h1[class$="-title"],
.hero-title,
.soporte-title,
.pantone-title,
.como-funciona-title,
.login-title,
.dashboard-title,
.categorias-title,
.profesores-title,
.planes-title,
.sesiones-title {
    font-size: 2.2rem !important;
    font-weight: 600 !important;
    color: var(--heading-color) !important;
    margin-bottom: 0.5rem !important;
}

[class$="-subtitle"],
.hero-subtitle,
.soporte-subtitle,
.pantone-subtitle,
.como-funciona-subtitle,
.login-subtitle,
.dashboard-subtitle,
.categorias-subtitle,
.profesores-subtitle,
.planes-subtitle,
.sesiones-subtitle {
    font-size: 1.1rem !important;
    color: var(--body-text-color) !important;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    main {
        justify-content: flex-start;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 20px 15px;
    }
    
    /* PERMITIR SCROLL EN MÓVILES - CRÍTICO PARA TODAS LAS PÁGINAS */
    /* EXCEPTO CHAT QUE TIENE SU PROPIO LAYOUT */
    body:not(.chat-page) {
        overflow: visible !important;
        overflow-y: auto !important;
    }
    
    html:not(.chat-html) {
        overflow: visible !important;
        overflow-y: auto !important;
    }
    
    .soporte-main,
    .login-main,
    .dashboard-main,
    .profesores-main,
    .categorias-main,
    .planes-main,
    .como-funciona-main,
    .pantone-main,
    .sesiones-main,
    main[class*="main"] {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        overflow-y: auto !important;
    }
    
    /* Contenedores que deben permitir scroll en móviles */
    .main-content,
    .faq-section,
    .contact-section-wrapper,
    .modal-content {
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    /* Cards y grids deben ser visibles completamente */
    .teacher-card,
    .dashboard-card,
    .support-card {
        overflow: visible !important;
    }
    
    /* SCROLL POSITION - TODAS LAS PÁGINAS EMPIEZAN ARRIBA */
    html:not(.chat-html) {
        scroll-behavior: auto !important;
    }
    
    body:not(.chat-page) {
        scroll-behavior: auto !important;
    }
}

/* GLOBAL SCROLL TO TOP FOR ALL PAGES */
@media (max-width: 768px) {
    /* Forzar scroll al top en mobile load */
    html:not(.chat-html) {
        scroll-top: 0 !important;
    }
    
    body:not(.chat-page) {
        scroll-top: 0 !important;
    }
}

/* =========================================
   HERO SECTION UNIFICADO - TODAS LAS PÁGINAS
   ========================================= */

/* BREADCRUMB STYLES UNIFICADOS */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 4px;
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 500;
}

/* HERO SECTION ESTÁNDAR PARA TODAS LAS PÁGINAS */
.page-hero {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.page-title .highlight,
.page-title .fuscia-word {
    color: var(--primary-color);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--body-text-color);
    margin-bottom: 0;
    line-height: 1.4;
}

/* RESPONSIVE PARA HERO UNIFICADO */
@media (max-width: 768px) {
    .page-hero {
        margin-bottom: 30px;
        padding-top: 20px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
}

/* =========================================
   CLASE FUSCIA WORD
   ========================================= */
.fuscia-word {
    color: #E91E63 !important;
}

/* Especificidad extra para títulos */
.page-title .fuscia-word,
.hero-title .fuscia-word,
h1 .fuscia-word {
    color: #E91E63 !important;
}