/* =========================================
   ESTILOS DIPLOMADOS / CURSOS CORTOS
   ========================================= */

/* 1. CABECERA DE LA PÁGINA */
.short-courses-header {
    padding: 80px 20px 40px;
    text-align: center;
    background-color: #f8f1e9;
}

.short-courses-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #333;
    margin-bottom: 15px;
}

.short-courses-header p {
    color: #888;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 2. CONTENEDOR DE LA GALERÍA */
.courses-gallery {
    padding: 40px 10% 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px;
    /* Alineación natural hacia arriba para que no se fuercen a estirarse */
    align-items: start; 
}

/* 3. LA TARJETA */
.course-item {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 163, 115, 0.15);
}

/* 4. EL CUADRO DE LA IMAGEN */
.course-img-box {
    /* Altura fija para que TODAS las fotos midan exactamente lo mismo */
    height: 300px; 
    width: 100%;
    overflow: hidden;
}

.course-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.course-item:hover .course-img-box img {
    transform: scale(1.1);
}

/* 5. EL CUADRO BLANCO (AHORA SÍ, PEQUEÑO Y COMPACTO) */
.course-details {
    /* Relleno mínimo para que el cuadro no quede alto */
    padding: 15px 20px 20px; 
    text-align: center;
    background: #fff;
}

.course-details h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px; /* Espacio exacto entre el título y el botón */
}

/* Si llegas a dejar algún párrafo o nivel, así se verá */
.course-details p {
    color: #777;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.levels {
    display: block;
    font-size: 0.7rem;
    color: #d4a373;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* 6. BOTÓN MÁS INFO */
.btn-info {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid #d4a373;
    color: #d4a373;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.btn-info:hover {
    background: #d4a373;
    color: white;
}

/* 7. AJUSTES PARA CELULAR */
@media (max-width: 768px) {
    .courses-gallery {
        padding: 20px 5%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; 
    }

    .short-courses-header {
        padding-top: 40px;
    }
    
    .course-img-box {
        height: 200px; 
    }
}