html {
    font-size: 62.5%;
}
body {
    background-color: #f5f3f3
}
h1 {
    text-align: center;
}
h2 {
    font-size: 3rem;
}
h4 {
    font-size: 16px;
    font-weight: 700;
}
header {
    padding: 20px 0 0 0;
    background: white;
    text-align: center;
}
@media (min-width: 750px) {
    header {
        text-align: left;
    }
}
.borrar-curso {
    background-color: red;
    border-radius: 50%;
    padding: 5px 10px;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

ul {
    list-style: none;
}

#encabezado {
    margin: 30px 0;
}
.submenu {
    position: relative;
}

.submenu #carrito {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
    background-color: white;
    padding: 20px;
    min-height: 200px;
    min-width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    /* puente invisible para no perder el hover al bajar el mouse */
    margin-top: 0;
}

/* Se mantiene abierto al hacer clic (clase .activo) o al pasar el mouse */
.submenu.activo #carrito,
.submenu:hover #carrito {
    display: block;
}

.carrito-icono-wrap {
    cursor: pointer;
    padding: 8px;
    display: inline-block;
}
.vacio {
    padding: 10px;
    background-color: crimson;
    text-align: center;
    border-radius: 10px;
    color: white;
}

.contenido-hero form {
    position: relative;
    margin-bottom: 0;
}
.contenido-hero form #buscador {
    height: 50px;
    margin-bottom: 0;
}
.contenido-hero form .submit-buscador {
    position: absolute;
    right:0;
    top:0;
    height: 100%;
    padding: 0;
    display: block;
    text-indent: -9999px;
    width: 50px;
    background-image: url(../img/lupa.png);
    background-position: right center;
    background-repeat: no-repeat;
    border:none;
}


.barra {
    padding: 20px 0;
    background: #1a5276;
    background: linear-gradient(to right, #1a5276 0%, #2980b9 100%);
}

.barra p {
    margin:0;
    color: white;
}
.icono {
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 60px;
    background-size: 30px;
    margin-bottom: 40px;
    text-align: center;
}
@media (min-width: 750px) {
    .icono {
        margin-bottom:0;
    }
}
.icono1 {
    background-image: url(../img/icono1.png);
}
.icono2 {
    background-image: url(../img/icono2.png);
}
.icono3 {
    background-image: url(../img/icono3.png);
}

#lista-cursos .row {
    margin-bottom:20px;
}
.agregar-carrito {
    margin:10px 0;
    
}

.card {
    text-align: center;
    border: 1px solid #e1e1e1;
    background: white;
}
@media (min-width: 550px) {
    .card {
        text-align: left;
    }
}
.info-card  {
    padding: 10px 20px;
}

.info-card p, 
.card h4 {
    margin-bottom: 5px;
}
.info-card .precio {
    text-decoration: line-through;
    font-size: 18px;
    margin-top: 10px;
}
.info-card .precio span {
    font-weight: 700;
    font-size: 22px;
}


.footer {
    margin-top: 40px;
    border-top:1px solid #aaa;;
    padding-top: 40px;   
}
.footer .menu a{
display: block;
margin-bottom: 10px;
text-decoration: none;
}

/* Carrito: total y botón pagar */
.total-carrito {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: right;
    margin: 12px 0 8px;
    color: #333;
}

#ir-a-pagar {
    margin-top: 8px;
    background-color: #27ae60;
    border-color: #27ae60;
}

#ir-a-pagar:hover {
    background-color: #1e8449;
    border-color: #1e8449;
}

#vaciar-carrito {
    margin-bottom: 0;
}


/* Badge contador del carrito */
.submenu {
    position: relative;
}
#img-carrito {
    position: relative;
    cursor: pointer;
}
.submenu > #img-carrito + .cart-badge,
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    display: none;
    z-index: 5;
    pointer-events: none;
}
.cart-badge.visible {
    display: block;
}




/* Badge cantidad carrito */
.carrito-icono-wrap {
    position: relative;
    display: inline-block;
}
.badge-carrito {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    display: none;
}
.badge-carrito.visible {
    display: block;
}

/* Hero overlay for readability */




#hero {
    background-image: url(../img/hero.jpg);
    height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
}
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
#hero .container {
    position: relative;
    z-index: 1;
}
.contenido-hero {
    margin-top: 90px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Imágenes de productos uniformes */
.card .imagen-curso {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
