/* ---------------------- Estilos Generales ---------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    max-width: 200px;
    height: auto;
}

h1 {
    margin-top: 120px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.top-bar {
    margin-top: 20px;
    height: 50px;
    background-color: #033787;
}

/* ---------------------- Cursos disponibles ---------------------- */

.titulo-cursos {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 24px;
    color: #222;
}

.contenedor-cursos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 280px));
    gap: 1.5rem;
    padding: 0 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.curso-box {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.curso-box:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.curso-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.curso-nombre {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.precio {
    font-size: 16px;
    color: #2C8F39;
    margin-bottom: 1rem;
}

.btn-ver {
    display: inline-block;
    padding: 10px 18px;
    background-color: #1f8d4d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.btn-ver:hover {
    background-color: #156837;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.mt-1 {
    margin-top: 0.5rem;
}

.texto-sin-cursos {
    text-align: center;
    margin-top: 20px;
    color: #888;
}

/* ---------------------- Responsivo ---------------------- */

@media (max-width: 768px) {
    h1 {
        font-size: 24px;
        margin-top: 100px;
        padding: 0 1rem;
    }

    .logo {
        max-width: 160px;
        top: 10px;
        left: 10px;
    }

    .curso-img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .btn-ver,
    .btn-secondary {
        font-size: 14px;
        padding: 8px 12px;
    }

    .curso-box {
        padding: 1rem 0.8rem;
    }

    .curso-nombre {
        font-size: 16px;
    }

    .precio {
        font-size: 14px;
    }
}

.info-box {
    background-color: #fffef7;
    border: 2px solid #f1c40f;
    padding: 30px;
    border-radius: 14px;
    margin-top: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1.6;
}

.info-box h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.precio-box {
    background-color: #fdf3d6;
    padding: 14px;
    border-radius: 8px;
    font-size: 18px;
    color: #d35400;
    margin-bottom: 25px;
    text-align: center;
}

.info-box p strong {
    display: block;
    font-size: 17px;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #34495e;
}

.info-box ul {
    margin-left: 25px;
    padding-left: 10px;
    margin-bottom: 20px;
}

.info-box ul li {
    margin-bottom: 8px;
    color: #444;
    list-style-type: disc;
}

.info-box ul ul {
    margin-top: 5px;
    margin-left: 20px;
}

.info-box a {
    color: #0066cc;
    text-decoration: underline;
}

.info-box a:hover {
    color: #004a99;
    text-decoration: none;
}
