/* ==========================================================================
   ESTILOS DE LA SECCIÓN CURSOS
   ========================================================================== */

/* --- 1. SECCIÓN HERO (Título Principal) --- */
.cursos-hero {
    text-align: center;
    padding: 180px 0 80px; /* Espacio para el header fijo */
    background: transparent; /* Fondo transparente (usa el del body theme-light) */
}

.cursos-hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #0f172a; /* Azul muy oscuro para contraste */
}

.cursos-hero p {
    color: #475569; /* Gris oscuro */
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* --- 2. GRILLA DE CURSOS --- */
.cursos-grid {
    display: grid;
    /* Define 2 columnas de igual ancho */
    grid-template-columns: repeat(2, 1fr);
    gap: 40px; /* Espacio entre tarjetas */
    padding-bottom: 120px;
}

/* --- 3. TARJETA ESTÁNDAR (VERSIÓN CLARA) --- */
.curso-card {
    background: #ffffff; /* Fondo Blanco */
    border: 1px solid #e2e8f0; /* Borde gris muy suave */
    border-radius: 20px; /* Bordes redondeados */
    overflow: hidden; /* Recorta el contenido que sobresale */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación suave */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Sombra sutil inicial */
    min-height: 500px;
}

/* Efecto al pasar el mouse (Hover) */
.curso-card:hover {
    transform: translateY(-8px); /* Se eleva */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); /* Sombra más fuerte */
    border-color: var(--accent-cyan); /* Borde cambia a color acento */
}

/* Contenedor de la Imagen */
.curso-img-box {
    position: relative;
    height: 240px;
    width: 100%;
    overflow: hidden;
}
.curso-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Llena el espacio recortando si es necesario */
    transition: transform 0.5s ease;
}
/* Zoom en la imagen al hacer hover */
.curso-card:hover .curso-img-box img {
    transform: scale(1.05);
}

/* Contenido de texto */
.curso-content {
    padding: 30px;
    flex: 1; /* Ocupa el espacio restante */
    display: flex;
    flex-direction: column;
}

/* Etiqueta de Precio */
.curso-meta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}
.curso-meta .price {
    color: #0284c7; /* Azul fuerte */
    font-weight: 800;
    font-size: 1.25rem;
    background: #e0f2fe; /* Azul muy clarito de fondo */
    padding: 5px 12px;
    border-radius: 8px;
}

.curso-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #0f172a; /* Texto casi negro */
    font-weight: 800;
}

.curso-content p {
    font-size: 0.95rem;
    color: #64748b; /* Gris medio */
    margin-bottom: 25px;
    flex: 1;
    line-height: 1.6;
}

/* Botón "Ver Temario" */
.btn-curso {
    text-align: center;
    background: #f1f5f9; /* Gris muy claro */
    color: #0f172a; /* Texto oscuro */
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.btn-curso::after {
    content: "→"; /* Flecha decorativa */
    transition: 0.3s;
}
.btn-curso:hover {
    background: var(--accent-cyan); /* Cambia a Cyan */
    color: white;
    border-color: var(--accent-cyan);
}
.btn-curso:hover::after {
    transform: translateX(5px); /* La flecha se mueve */
}

/* --- 4. ESTILOS PARA EL CURSO DESTACADO (PRIMERO DE LA LISTA) --- */
/* Solo aplica en pantallas grandes (Desktop) */
@media (min-width: 900px) {
    .curso-card.featured-course {
        grid-column: 1 / -1; /* Ocupa todo el ancho (las 2 columnas) */
        flex-direction: row; /* Diseño horizontal: Imagen Izq / Texto Der */
        min-height: 480px;
        align-items: stretch;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); /* Sombra más elegante */
    }

    .curso-card.featured-course .curso-img-box {
        width: 55%; /* Imagen ocupa 55% del ancho */
        height: auto;
        min-height: 100%;
        /* Corte diagonal estético (Clip Path) */
        clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
    }

    .curso-card.featured-course .curso-content {
        width: 45%; /* Contenido ocupa 45% del ancho */
        padding: 60px 50px 60px 20px;
        justify-content: center;
    }

    .curso-card.featured-course h3 {
        color: #0f172a;
        font-size: 2.8rem; /* Título más grande */
        margin-bottom: 20px;
    }
    .curso-card.featured-course p {
        color: #475569;
        font-size: 1.15rem;
        margin-bottom: 40px;
    }

    .curso-card.featured-course .btn-curso {
        background: #0f172a; /* Botón oscuro para destacar */
        color: white;
        width: fit-content;
        padding: 16px 40px;
        font-size: 1.1rem;
        border: none;
    }
    .curso-card.featured-course .btn-curso:hover {
        background: var(--accent-cyan);
        color: white;
        box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
    }
}

/* --- 5. RESPONSIVE MÓVIL (< 900px) --- */
@media (max-width: 900px) {
    .cursos-hero {
        padding: 140px 20px 60px;
    }
    .cursos-hero h1 {
        font-size: 2.8rem;
    }

    .cursos-grid {
        grid-template-columns: 1fr; /* Pasa a 1 columna */
        gap: 30px;
    }

    /* Resetear estilos del destacado para que se vea como tarjeta normal en móvil */
    .curso-card.featured-course {
        grid-column: auto;
        flex-direction: column;
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .curso-card.featured-course .curso-img-box {
        width: 100%;
        height: 250px;
        clip-path: none; /* Quita el corte diagonal */
    }

    .curso-card.featured-course .curso-content {
        width: 100%;
        padding: 30px 20px;
    }

    .curso-card.featured-course h3 {
        font-size: 1.8rem;
    }

    .curso-card.featured-course .btn-curso {
        width: 100%;
    }
}