/* 1. General */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #0b3055;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

h1, h2, h3, h4 {
  font-family: Georgia, serif;
  color: #0b3055;
  margin-top: 0;
  transition: transform 0.2s ease;
}

h1:hover, h2:hover, h3:hover {
  transform: translateY(-2px);
  cursor: default;
}

a {
  text-decoration: none;
  color: #0b3055;
  font-weight: bold;
}

a:hover {
  color: #c20101;
}

a:focus {
  outline: none;
}

/* 2. Layout general */
header, main, footer {
  margin: auto;
  padding: 20px;
}

/* 3. Header */
header {
  display: flex;
  width: 100%;
  background-color: #c0d1e1;
  padding: 0.8rem;
  border-radius: 10px;
  margin-top: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  justify-content:space-between;
  flex-wrap: wrap;
  align-items: center;
}

header img {
  width: auto;
  height: auto;
  max-height: 80px;
  max-width: 100%;
}

/* Menú del header, botones individuales */
.menu {
  display: flex;
  gap: 10px;
}

.menu a {
  color: #0b3055;
  font-weight: bold;
  background-color: #dbe7f3;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.menu a:hover {
  color: #c20101;
  background-color: #ffdfdf;
}

.menu a:focus {
  outline: none;
}

/* 4. Presentación */
.presentacion {
  padding: 2rem;
}

.presentacion h1 {
  text-align: center;
  background-color: #c0d1e1;
  color: #091c54;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.presentacion img {
  display: block;
  margin: 3rem auto;
  height: auto;
  border-radius: 10px;
  border: 3px solid #0b3055;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.presentacion img:hover {
  transform: scale(1.03);
}

.presentacion-personal {
  text-align: center;
  margin: 2rem auto;
}

.presentacion-personal h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  border-bottom: 2px solid #091c54;
  display: inline-block;
  padding-bottom: 0.4rem;
  color: #091c54;
}

.presentacion-personal p {
  font-size: clamp(1rem, 1.2vw, 1.05rem);
  margin-top: 1rem;
}

/* 5. Secciones generales */
section {
  background-color: #dbe7f3;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 6. Materias */
.materias h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: #091c54;
  border-bottom: 2px solid #091c54;
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.grilla-materias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grilla-materias article {
  background-color: #c0d1e1;
  padding: 1.8rem;
  border-radius: 10px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}

.grilla-materias h3 {
  margin-bottom: 1rem;
  color: #091c54;
}

/* 7. Equipo */
.equipo-vm34 {
  background-color: #c0d1e1;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.equipo-vm34 a {
  background-color: #c0d1e1;
  color: #091c54;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.equipo-vm34 a:hover {
  background-color: #ffdfdf;
  color: #c20101;
}

.equipo-vm34 a:focus {
  outline: none;
}

/* 8. Integrantes */
.integrantes-vm34 h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  border-bottom: 2px solid #091c54;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  color: #091c54;
  text-align: center;
}

.grilla-integrantes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grilla-integrantes article {
  background-color: #c0d1e1;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.grilla-integrantes img {
  display:block;
  margin: 1rem auto;
  height: auto;
  border-radius: 10px;
  border: 3px solid #0b3055;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 12rem;
}

.grilla-integrantes img:hover {
  transform: scale(1.03);
}

.grilla-integrantes h4 {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 0.5rem;
  color: #091c54;
}

.grilla-integrantes a {
  background-color: #c0d1e1;
  color: #091c54;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.grilla-integrantes a:hover {
  background-color: #ffdfdf;
  color: #c20101;
}

/* 9. Datos académicos */
.datos-academicos h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: #091c54;
  text-align: center;
  border-bottom: 2px solid #091c54;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.datos-academicos img {
  display: block;
  margin: 3rem auto;
  height: 3rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.grilla-academica {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grilla-academica article {
  background-color: #c0d1e1;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
  font-size: clamp(0.9rem, 1.2vw, 0.95rem);
}

.grilla-academica h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #091c54;
}

/* 10. Footer */
footer {
  background-color: #dbe7f3;
  text-align: center;
  color: #091c54;
  font-size: clamp(0.85rem, 1vw, 0.9rem);
  padding: 20px;
  border-top: 2px solid #8e0000;
  margin-top: 3rem;
  border-radius: 0 0 12px 12px;
}

/* Responsive: transición temprana a columna única para tarjetas */
@media (max-width: 1000px) {
  .grilla-materias,
  .grilla-integrantes,
  .grilla-academica {
    grid-template-columns: 1fr;
  }
}

/* 11. Responsive: Mobile */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .menu {
    justify-content: center;
    flex-wrap: wrap;
  }

  header img {
    margin-bottom: 1rem;
  }

  .grilla-integrantes,
  .grilla-materias,
  .grilla-academica {
    gap: 1.5rem;
  }

  section {
    padding: 1.8rem;
  }

  .presentacion-personal {
    padding-inline: 1rem;
  }

  .equipo-vm34 {
    align-items: center;
  }
}

/* 12. Responsive: iPad */
@media (min-width: 769px) and (max-width: 1024px) {
  .menu {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .equipo-vm34 {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
  }
}