*{
    margin: 0;
    padding: 0;
}

*,*::before,*::after{
    box-sizing: border-box;
}

body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: black;
    line-height: 1.6;
}

.encabezado-principal{
    background-color: white;
    padding: 15px 5%;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-nav ul{
    list-style: none;
    display: flex;
    gap: 20px;

}

.menu-nav a{
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 5px 10px;
}

#logo{
    color: #1a252f;
    font-size: 1.8rem;
}

#logo span{
    color: #3498db;
}

.subtitulo{
    color: #555555;
}

/*cursos*/
.seccion-cursos{
    padding: 40px;
}

.grid-curso{
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 25px;
    margin-top: 20px;
}

.tarjeta-cursos{
    background-color: white;
    width: 100%;
    min-width: 350px;
    padding: 25px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.seccion-cursos h2{
    color: #2c3e50;
    margin-bottom: 20px;
}

.tarjeta-cursos h3{
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.baner-oferta{
    background-color: orange;
    color: white;
    text-align: center;
    padding: 10px 15px;
    border-bottom: 3px solid orangered;
    font-weight: bolder;
    font-size: 0.9rem;
    position:sticky;
    top: 0;
    z-index: 100;
}

.precio{
    display: inline-block;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #231ff3;
}

/*Diseño responsive */
@media(max-width:768px){
    .encabezado-pricipal{
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .hero h2{
        font-size: 1.5rem;
    }
    .grid-cursos{
        grid-template-columns: 1fr;
    }
}

/*Hero color degradado*/
.hero{
    background: linear-gradient(135deg,#2c3e50,#3498db);
    color: #ffff;
    text-align: center;
    padding: 60px 20px;
}

.hero h2{
    color: #dddd;
}

.hero .subtitulo{
    color: #ecf0f1;
}

.tarjeta-cursos{
    border-radius: 8px;
    box-shadow: 0.4px 6px rgb(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tarjeta-cursos:hover{
    transform: translateY(-8px);
    box-shadow: 0 12px rgb(0,0,0,0.15);
}

/*etiqueta de destacados*/
.tarjeta-cursos.destacado::before{
    content: "MÁS POPULAR";
    position: absolute;
    top: -12px;
    right: 11px;
    background-color: red;
}

.tarjeta-cursos.destacado{
    border: 2px solid #3498db;
    position: relative;
}

.btn-principal{
    background-color: #27ae60;
    color: #ffff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.btn-principal:hover{
    background-color: #219150;
}
.btn-principal:focus{
    outline: 2px solid #f1c40f;
}

.pie-pagina{
    background-color: #1a252f;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Botón Volver al inicio*/
.btn-volver {
  display: inline-block;
  padding: 8px 16px;
  background: #2563eb;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 20px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-volver:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}