:root {
    --primary: #2970B7;
    --secondary: #00AECF;
    --dark: #20264B;
    --accent: #FF6D00;
    --light: #f8f9fa;
    --gray: #6c757d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

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

/* Brand Logo Styles */
.brand-logo, .footer-brand {
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
}

.brand-logo .co, .footer-brand .co {
    color: var(--primary);
    font-size: 2.2rem;
}

.brand-logo .to, .footer-brand .to {
    color: var(--secondary);
    font-size: 2.2rem;
}

.brand-logo .ba, .footer-brand .ba {
    color: var(--dark);
    font-size: 2.2rem;
}

/* Header */
.hero {
    background: linear-gradient(rgba(32, 38, 75, 0.8), rgba(32, 38, 75, 0.9)), url('https://images.unsplash.com/photo-1583858643718-515d192db250?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    text-align: center;
    border-bottom: 5px solid var(--secondary);
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* --- Botones base --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn:hover {
    background-color: #1d5a9b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Variante primaria --- */
.btn-primary {
    background-color: var(--primary);
}
.btn-primary:hover {
    background-color: #1d5a9b;
}

/* --- Variante secundaria --- */
.btn-secondary {
    background-color: var(--secondary);
}
.btn-secondary:hover {
    background-color: #0099b8;
}

/* --- Variante contorno --- */
.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    font-size: 0.9rem;
}
.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* --- Responsive mobile --- */
@media (max-width: 768px) {
    .btn,
    .btn-outline {
        width: 100%;
        max-width: 100%;
        margin: 0;
        text-align: center;
        padding: 10px 20px;   /* mismo padding en mobile */
        font-size: 0.9rem;     /* mismo tamaño de fuente */
    }
}


/* Main Content */
.main-content {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.courses-section {
    flex: 2;
}

.sidebar {
    flex: 1;
}

/* Course Cards */
.course-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: var(--gray);
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
}

.course-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
    border-top: 4px solid var(--secondary);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.course-card h3 {
    margin-top: 0;
    color: var(--dark);
    font-size: 1.4rem;
    font-weight: 600;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
}

.progress-container {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.course-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Sidebar */
.sidebar-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-card h3 {
    margin-top: 0;
    color: var(--dark);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    margin: 15px 0;
}

.calendar-header {
    font-weight: bold;
    padding: 5px;
    font-size: 0.85rem;
    color: var(--dark);
}

.calendar-day {
    padding: 8px;
    border-radius: 50%;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.calendar-day:hover {
    background-color: #f0f0f0;
}

.calendar-day.active {
    background-color: var(--secondary);
    color: white;
    font-weight: bold;
}

.event-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.event-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 0.95rem;
}

.event-date {
    font-weight: bold;
    color: var(--secondary);
    margin-right: 8px;
}

/* Logo */
.hero .brand-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.03);
}

/* Beneficios */
.members-benefit {
    background-color: #00AECF;
    color: white;
    padding: 12px 0;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.members-benefit .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-benefit {
    background-color: #20264B;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 5px;
    display: inline-block;
}

.btn-benefit:hover {
    background-color: #2970B7;
}

/* Estados del curso */
.course-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-proximo {
    background-color: #17a2b8;
    color: white;
}

.status-en-curso {
    background-color: #28a745;
    color: white;
}

.status-finalizado {
    background-color: #6c757d;
    color: white;
}

/* Fechas */
.date-info {
    display: block;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.date-info i {
    margin-right: 5px;
}

/* Estados de cupo */
.tag[data-cupo="disponible"] {
    background-color: #28a745 !important;
}

.tag[data-cupo="ultimos"] {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.tag[data-cupo="completo"] {
    background-color: #dc3545 !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Botones deshabilitados */
.btn-disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-logo {
        max-width: 200px;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn,
    .btn-outline {
        width: 100%;
        max-width: 100%;
        margin: 0;
        text-align: center;
    }
    
    .members-benefit {
        padding: 10px 0;
        font-size: 1rem;
    }
    
    .btn-benefit {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
    
    .progress-label {
        flex-direction: column;
        gap: 5px;
    }
    
    .course-meta {
        flex-direction: column;
    }
}

/* Mejoras de espaciado */
.course-actions {
    gap: 12px;
}

.btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estructura principal */
.course-header {
    width: 100%;
    margin-bottom: 15px;
}

.header-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.date-info {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}

/* Contenedor de docentes */
.docentes-container {
    display: flex;
    gap: 20px;
    align-items: top;
}

/* Estilo de cada docente */
.docente-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px; /* Más ancho para nombres largos */
}

.docente-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.texto-docente {
    text-align: center;
    margin-top: 5px;
    width: 100%;
}

.titulo-docente {
    font-size: 0.75rem;
    font-weight: bold;
    color: #555;
}

.nombre-docente {
    font-size: 0.85rem;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    max-width: 120px;
    margin: 0 auto;
    line-height: 1.2;
}

/* Versión móvil */
@media (max-width: 768px) {
    .header-flex-container {
        flex-direction: column;
    }
    
    .docentes-container {
        margin-top: 15px;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .docente-img {
        width: 80px;
        height: 80px;
    }
    
    .nombre-docente {
        max-width: 100px;
    }
}

.modal {
    display: none; 
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 6px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* ==== Fix superposición estado / tag en mobile ==== */
.course-card .tag {
    display: inline-block;
    margin-top: 30px; /* separa la etiqueta del estado */
    font-weight: bold;
}

/* En mobile, movemos el estado para evitar superposición */
@media (max-width: 768px) {
    .course-status {
        position: static;   /* deja de estar absoluta */
        display: inline-block;
        margin-bottom: 5px;
    }

    .course-card .tag {
        margin-top: 5px;    /* ajustamos espacio */
    }
}

/* Botón de transmisión destacado */
.btn-transmision {
    background-color: #FF0000; /* rojo YouTube */
    color: #fff;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 5px;
    margin-top: 20px;
    display: inline-block;
    animation: pulseBtn 1.5s infinite;
}

/* Pulso animado mientras está destacado */
@keyframes pulseBtn {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Estilo después de la transmisión */
.btn-transmision.inactive {
    background-color: #666;
    color: #fff;
    font-size: 1rem;
    padding: 10px 20px;
    animation: none;
    opacity: 0.7;
}
