/* =======================================================
   ESTILOS DE LA SECCIÓN DE CURSOS
   ======================================================= */

.courses-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--elon-secondary) 0%, var(--elon-dark) 100%);
    position: relative;
    overflow: hidden;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://placehold.co/1920x1080/000000/333333?text=BG&font=lato&opacity=0.05') center/cover no-repeat;
    opacity: 0.05;
    z-index: 0;
}

/* =======================================================
   VARIABLES DE COLOR (si no están en style.css)
   ======================================================= */
:root {
    --elon-primary: #06A3DA;   /* Azul primario */
    --elon-secondary: #142448; /* Azul oscuro */
    --elon-dark: #0f172a;      /* Casi negro */
    --elon-accent: #FF6B6B;    /* Color de acento */
}

/* =======================================================
   TÍTULOS Y ENCABEZADOS
   ======================================================= */
.section-title {
    color: var(--elon-primary);
    margin-bottom: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--elon-accent);
    border-radius: 2px;
}

/* =======================================================
   GRID PRINCIPAL DE CURSOS
   ======================================================= */
.courses-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* =======================================================
   TARJETAS DE CURSOS
   ======================================================= */
.course-card {
    background: #142448;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(75, 202, 240, 0.2);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--elon-primary);
}

/* =======================================================
   IMÁGENES DE CURSOS
   ======================================================= */
.course-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16/9;
}

.course-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    display: block;
}

.course-card:hover .course-image img {
    transform: scale(1.1) rotate(1deg);
}

/* =======================================================
   CONTENIDO DE LA TARJETA
   ======================================================= */
.course-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-category {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--elon-primary);
    color: var(--elon-secondary);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(75, 202, 240, 0.4);
    z-index: 2;
}

.course-title {
    font-size: 1.1rem;
    margin: 15px 0 10px;
    color: white;
    font-weight: 600;
    line-height: 1.3;
    position: relative;
    padding-bottom: 10px;
}

.course-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--elon-primary);
}

.course-description {
    color: #ebece8;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.course-duration {
    display: flex;
    align-items: center;
    color: var(--elon-primary);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.course-duration i {
    margin-right: 5px;
    font-size: 1rem;
}

.course-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--elon-primary);
    color: var(--elon-secondary);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(75, 202, 240, 0.3);
    white-space: nowrap;
}

.course-button:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(75, 202, 240, 0.4);
    color: var(--elon-dark) !important;
}

/* =======================================================
   COLORES DE CATEGORÍAS
   ======================================================= */
.course-card:nth-child(1) .course-category {
    background: #FF6B6B;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.course-card:nth-child(2) .course-category {
    background: #4ECDC4;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.course-card:nth-child(3) .course-category {
    background: #45B7D1;
    box-shadow: 0 4px 15px rgba(69, 183, 209, 0.4);
}

.course-card:nth-child(4) .course-category {
    background: #FFA07A;
    box-shadow: 0 4px 15px rgba(255, 160, 122, 0.4);
}

.course-card:nth-child(5) .course-category {
    background: #98D8C8;
    box-shadow: 0 4px 15px rgba(152, 216, 200, 0.4);
}

/* =======================================================
   RESPONSIVE DESIGN
   ======================================================= */
@media (max-width: 1200px) {
    .courses-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .course-image {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 992px) {
    .courses-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .courses-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-title {
        font-size: 2rem;
    }
    .course-image {
        aspect-ratio: 16/9;
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .courses-container {
        grid-template-columns: 1fr;
    }
    .course-card {
        max-width: 350px;
        margin: 0 auto;
    }
    .course-image {
        aspect-ratio: 1.5/1;
    }
}