/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --accent: #22c55e;
    /* Verde Checkcode */
    --accent-dark: #16a34a;
    --text-white: #fafafa;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.hidden {
    display: none !important;
}

/* =========================================
   1. BARRA DE NAVEGACIÓN (INDEX)
   ========================================= */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    position: relative;
    /* No persigue al usuario */
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.btn-login {
    background: var(--accent);
    color: #000 !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
}

/* =========================================
   2. SECCIÓN HERO Y MISIÓN (INDEX)
   ========================================= */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    max-width: 600px;
    margin: 0 auto 4rem;
}

#hero {
    padding: 80px 10%;
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #fff 50%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-cta {
    background: var(--accent);
    color: black;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
}

.hero-image img {
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.15);
}

.vision-mision {
    padding: 4rem 10%;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.card-info h2 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* =========================================
   3. DISCIPLINAS Y METODOLOGÍA (INDEX)
   ========================================= */
.grid-metodos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 5%;
    margin-bottom: 5rem;
}

.card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* =========================================
   4. HISTORIAS DE CAMPEONES (INDEX)
   ========================================= */
.historias-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    padding: 0 5%;
    margin-bottom: 5rem;
}

.historia-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: 0.4s;
}

.historia-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.historia-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.historia-header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
}

.puesto {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
}

.fecha-lugar {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.historia-body p {
    margin-bottom: 1rem;
    color: var(--text-white);
    font-size: 0.95rem;
}

.historia-body p strong {
    color: var(--accent);
}

/* =========================================
   5. EQUIPO DOCENTE (INDEX)
   ========================================= */
.grid-equipo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 5%;
    margin-bottom: 5rem;
}

.mentor-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
}

.mentor-card.destaque,
.mentor-card.destaque-jefe {
    border: 1px solid var(--accent);
}

/* Regla universal para fotos de profesores */
.mentor-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--accent);
}

.rol {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.skills {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================================
   6. PORTAL LOGIN Y REGISTRO (LOGIN.HTML)
   ========================================= */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
}

.auth-tabs {
    display: flex;
    background: var(--bg-dark);
    padding: 5px;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.auth-tabs button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s;
}

.auth-tabs button.active {
    background: var(--accent);
    color: black;
    font-weight: bold;
}

.input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    outline: none;
}

.input-group input:focus {
    border-color: var(--accent);
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: black;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    margin-top: 1rem;
    cursor: pointer;
}

/* =========================================
   7. DASHBOARD EMPRESARIAL (DASHBOARD.HTML)
   ========================================= */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.sidebar-top {
    margin-bottom: 2rem;
}

.user-brief {
    margin-top: 1rem;
}

.badge {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.side-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.side-menu a {
    color: var(--text-muted);
    padding: 0.8rem;
    border-radius: 8px;
    transition: 0.3s;
}

.side-menu a.active,
.side-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: auto;
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

.main-view {
    flex: 1;
    padding: 3rem;
    background: var(--bg-dark);
}

.status-banner {
    background: linear-gradient(90deg, var(--bg-card), #1a2e1a);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border-left: 5px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.dashboard-card h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.schedule-list p {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--text-muted);
}

.price-tag {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.file-custom {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    cursor: pointer;
}

.btn-report {
    background: var(--accent);
    color: black;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* =========================================
   8. COMPONENTES ESTILO GOOGLE CLASSROOM
   ========================================= */

/* Header Financiero Superior */
.payment-header {
    background: linear-gradient(135deg, #18181b, #1a2e1a);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
}

.payment-header h2 {
    margin-bottom: 0.2rem;
}

.payment-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.file-custom-small {
    background: var(--bg-dark);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 8px;
}

.btn-pay {
    background: var(--accent);
    color: black;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-pay:hover {
    transform: scale(1.05);
}

/* Cuadrículas de Clases */
.section-title-dash {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.classroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* La Tarjeta Individual (El alma de Classroom) */
.class-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 250px;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cabecera de la tarjeta (Color dinámico) */
.class-card-header {
    padding: 1.5rem;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    /* El color de fondo vendrá de la base de datos (theme_color) */
}

.class-card-header h3 {
    color: white;
    font-size: 1.25rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Cuerpo de la tarjeta */
.class-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.class-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Footer de la tarjeta (Botones de acción) */
.class-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.btn-join {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn-join:hover {
    background: var(--text-white);
    color: black;
}

.btn-enter {
    color: var(--accent);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-enter:hover {
    text-decoration: underline;
}