
:root {
  --rojo: #aa3824;
  --amarillo: #c9902b;
  --texto: #0F172A;
  --gris: #334155;
  --gris-claro: #E5E7EB;
  --blanco: #FFFFFF;
}

/* === ANIMACIONES === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-carreras {
  background: linear-gradient(to right, #aa3824, #7f2418);
  color: var(--blanco);
  text-align: center;
  padding: 4.5rem 1rem 3rem;
  margin-top: 6rem;
}
.hero-carreras h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease;
}
.hero-carreras p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.5;
  animation: fadeInUp 1s ease 0.2s backwards;
}

.carreras-lista {
  padding: 3rem 0;
}
.carreras-lista h2 {
  text-align: center;
  color: var(--texto);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease;
}

.grid-carreras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.8rem;
  animation: fadeInUp 0.8s ease;
}

.carrera {
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.carrera:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.carrera img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 3px solid var(--rojo);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.carrera:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.carrera h3 {
  color: var(--rojo);
  font-size: 1.25rem;
  margin: 1rem 0 0.6rem;
}
.carrera p {
  color: var(--gris);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 1rem 1.2rem;
  flex-grow: 1; 
}


.btn-carrera {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  font-weight: 600;
  transition: background 0.25s ease;
  margin-top: auto; 
  margin-bottom: 1.2rem;
  align-self: center; 
}

.btn-carrera:hover {
  background: #a00c24;
}

.volver {
  text-align: center;
  margin-top: 2rem;
}
.btn-volver {
  color: var(--texto);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--gris-claro);
  padding: 0.6rem 1.4rem;
  border-radius: 0.6rem;
  transition: all 0.25s ease;
}
.btn-volver:hover {
  background: var(--rojo);
  color: var(--blanco);
  border-color: var(--rojo);
}

/*========= RESPONSIVE ========*/
@media (max-width: 768px) {
  .carrera img {
    height: 150px;
  }
}
footer {
  background: var(--rojo);
  text-align: center;
  padding: 1rem;
  color: var(--blanco);
  font-size: 0.9rem;
}
