body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: #f4f6f9;
}

/* HERO */
.cursos-hero {
    height: 65vh;
 background: url('/public/recursos/cursos/CURSOS.jpg') center/cover no-repeat;    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursos-hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,77,140,0.7);
}

.hero-content {
    position: relative;
    color: #fff;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
}

.hero-content p {
    opacity: 0.9;
}

/* SECTION */
.cursos-section {
    padding: 5rem 10%;

}

.titulo {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 600;
}

/* FILTROS */
.filtros {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 30px;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #fff;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.filter-btn.active {
    background: #0a4d8c;
    color: white;
    border-color: #0a4d8c;
    box-shadow: 0 4px 12px rgba(10,77,140,.3);
}

.filter-btn:hover {
    background: #0a4d8c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10,77,140,.3);
}

/* GRID */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* CARD */
.curso-card {
    padding: 10px;
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transition: all .3s ease;
    transform: translateY(30px);
  
}

.curso-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

/* Overlay */
.overlay-card {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.75) 0%,
        rgba(0,0,0,.3) 50%,
        transparent 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
}

.overlay-card span {
    background: #25D366;
    padding: 14px 32px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all .3s ease;
}

.overlay-card span:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* HOVER */
.curso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
}

.curso-card:hover img {
    transform: scale(1.08);
}

.curso-card:hover .overlay-card {
    opacity: 1;
}


/* ================= MODAL ================= */
.modal-preview {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 9999;
}

.modal-preview.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-preview img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
}

/* ============= BOTONES CARD ============= */
.overlay-card {
    flex-direction: column;
    gap: 12px;
}

.overlay-card button {
    border: none;
    padding: 12px 34px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: .95rem;
    transition: all .3s ease;
}

.btn-ver {
    background: rgba(255,255,255,.9);
    color: #333;
}

.btn-ver:hover {
    background: white;
    transform: translateY(-2px);
}

.btn-wa {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37,211,102,.4);
}

.btn-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37,211,102,.55);
}

/* ================= RESPONSIVE ================= */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .cursos-section {
        padding: 4rem 6%;
    }

    .cursos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.8rem;
    }

    .curso-card {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .titulo {
        font-size: 2rem;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
    .cursos-hero {
        height: 50vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .cursos-section {
        padding: 3rem 5%;
    }

    .titulo {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .filtros {
        gap: 0.8rem;
        margin-bottom: 2.5rem;
    }

    .filter-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .cursos-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    .curso-card {
        height: 380px;
    }

    /* Modal */
    .modal-preview img {
        max-width: 95%;
        max-height: 80vh;
    }

    .close-modal {
        top: 20px;
        right: 25px;
        font-size: 2.5rem;
    }

    /* Botones overlay */
    .overlay-card button {
        padding: 11px 28px;
        font-size: 0.9rem;
    }

    .overlay-card {
        gap: 10px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .cursos-hero {
        height: 45vh;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        padding: 0 1.5rem;
    }

    .cursos-section {
        padding: 2.5rem 4%;
    }

    .titulo {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }

    .filtros {
        gap: 0.6rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .filter-btn {
        padding: 9px 20px;
        font-size: 0.85rem;
    }

    .cursos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .curso-card {
        height: 250px;
        max-width: 100%;
    }

    /* Hover en móviles - siempre visible */
    .curso-card .overlay-card {
        opacity: 0.95;
    }

    .overlay-card button {
        padding: 10px 24px;
        font-size: 0.88rem;
    }

    /* Modal */
    .modal-preview img {
        max-width: 96%;
        max-height: 75vh;
        border-radius: 12px;
    }

    .close-modal {
        top: 15px;
        right: 20px;
        font-size: 2.2rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .titulo {
        font-size: 1.4rem;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.82rem;
    }

    .curso-card {
        height: 340px;
    }

    .overlay-card button {
        padding: 9px 22px;
        font-size: 0.85rem;
    }

    .overlay-card {
        gap: 8px;
    }
}