
/* Cursos página */
.page-hero {
    background-color: var(--color-secondary);
    color: var(--color-light);
    padding: 80px 0;
    text-align: center;
    position: relative;
}
.page-hero h1 {
    margin: 0;
    font-size: 2.2rem;
}
.page-hero p {
    margin-top: 10px;
    font-size: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #f7f7f7;
}
.hero-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}
.hero-boxes .box {
    background: var(--color-light);
    color: var(--color-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 260px;
    max-width: 320px;
}
.hero-boxes .box h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.1rem;
    color: var(--color-primary-dark);
}
.hero-boxes .box p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

/* Lista de cursos en cursos.html */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

/* ==========================
   Página de cursos (cursos.html)
   ========================== */
.cursos-hero {
    background: var(--color-primary-dark);
    color: var(--color-light);
    padding: 60px 0;
    text-align: center;
}
.cursos-hero h1 {
    margin: 0 0 10px;
    font-size: 2.2rem;
}
.cursos-hero p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1rem;
    color: var(--color-light);
}
.cursos-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.category-card {
    background: var(--color-light);
    color: var(--color-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1 1 260px;
    text-align: left;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.category-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}
.category-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.cursos-desc-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.cursos-desc-text {
    flex: 1 1 300px;
}

.cursos-desc-text p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--color-dark);
    text-align: justify;
    line-height: 1.6;
}

/* Contenedor de la imagen con estadísticas flotantes */
.cursos-desc-image-wrapper {
    position: relative;
    flex: 1 1 350px;
    min-width: 320px;
}

.cursos-desc-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.cursos-desc-image-wrapper:hover img {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(94, 125, 173, 0.2);
}

/* Tarjeta flotante de estadísticas */
.stats-floating-card {
    position: absolute;
    top: -20px;
    right: -25px;
    width: 280px;
    height: 160px;
    z-index: 10;
    animation: floatIn 0.8s ease-out 0.5s both;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px) translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Fondo con glassmorphism */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 15px 35px rgba(94, 125, 173, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stats-floating-card:hover .card-background {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 45px rgba(94, 125, 173, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1);
}

.stats-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    padding: 25px;
}

.stat {
    text-align: center;
    position: relative;
    flex: 1;
}

/* Números animados */
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #5e7dad;
    line-height: 1;
    display: inline-block;
    background: linear-gradient(135deg, #5e7dad, #7a94c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.stat-plus {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #5e7dad;
    margin-left: 2px;
    opacity: 0;
    animation: fadeInPlus 0.3s ease 2s both;
}

@keyframes fadeInPlus {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-top: 8px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Iconos decorativos */
.stat-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #5e7dad, #7a94c2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    opacity: 0;
    animation: popIn 0.4s ease 1.5s both;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0) rotate(180deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Divisor central */
.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(94, 125, 173, 0.3),
        transparent
    );
    margin: 0 10px;
    position: relative;
}

.stat-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #5e7dad;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: dotPulse 0.4s ease 1.2s both;
}

@keyframes dotPulse {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Efectos hover */
.stat:hover .stat-number {
    transform: scale(1.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat:hover .stat-icon {
    transform: scale(1.2) rotate(10deg);
    transition: all 0.3s ease;
}

/* Resto del CSS existente sin cambios */
.cursos-stats {
    background: var(--color-primary-dark);
    padding: 40px 0;
    color: var(--color-light);
    text-align: center;
}

.cursos-stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

/* Botón de contacto mejorado para sección clara */
.cursos-desc-text .btn-outline {
    border: 2px solid #5e7dad;
    color: #5e7dad;
    background: transparent;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 20px;
}

.cursos-desc-text .btn-outline:hover {
    background: #5e7dad;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(94, 125, 173, 0.3);
}

.stats {
    display: flex;
    gap: 40px;
}

.stats .stat {
    text-align: center;
}

.stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stats .stat-label {
    font-size: 0.9rem;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .cursos-desc-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .stats-floating-card {
        position: static;
        width: 100%;
        height: auto;
        margin-top: 20px;
        animation: fadeInUp 0.6s ease both;
    }
    
    .stats-content {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .cursos-stats-container {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
}
.course-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.course-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    height: 180px;
}
.course-item .course-title {
    padding: 15px;
    font-weight: 600;
    background: var(--color-light);
    color: var(--color-primary-dark);
    text-align: center;
}

/* Sección CTA de cursos */
.cta {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-grey);
}
.cta h3 {
    margin-top: 0;
    font-size: 1.6rem;
    color: var(--color-primary-dark);
}
.cta p {
    margin-top: 10px;
    color: #444;
}
.cta .btn {
    margin-top: 20px;
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
    transition: background-color #ff0000, color var(--transition);
}
.cta .btn:hover {
    background-color: var(--color-primary);
    color: var(--color-light);
}
