* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #000;
  line-height: 1.5;
  background-color: #fff;
  padding: 0 20px;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Header ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #8d1b1b;
  padding: 10px 20px;
  flex-wrap: wrap;
}

header .logo img {
  height: 60px;
  max-width: 100%;
}

#mainMenu {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 0;
}

#mainMenu li a {
  display: inline-block;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 0.3em;
  border: 1px solid #ccc;
  transition: background 0.3s;
  text-align: center;
}

#mainMenu li a:hover {
  background-color: #ddd;
}

/* ===== Perfil ===== */
.perfil {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.perfil-card {
  display: flex;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.perfil-imagen {
  flex: 1;
  min-width: 200px;
}

.perfil-imagen img {
  width: 100%;
  height: auto;
  display: block;
}

.perfil-texto {
  flex: 2;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perfil-texto p {
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

/* ===== Materias Aprobadas ===== */
.materias.aprobadas {
  background-color: #8b63b3;
  color: #000;
  padding: 40px 20px;
}

.materias.aprobadas .años {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.materias.aprobadas .año {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 250px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.materias.aprobadas .año h3 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 18px;
}

.materias.aprobadas .año ul {
  list-style: none;
  padding-left: 0;
}

.materias.aprobadas .año li {
  padding: 6px;
  margin: 4px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

/* ===== Equipo ===== */
.equipo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
}

.equipo h2 {
  margin-bottom: 30px;
  text-align: center;
  font-size: 28px;
}

.miembros {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.miembro {
  background-color: #fff;
  border-radius: 10px;
  text-align: center;
  padding: 20px;
  width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.miembro:hover {
  transform: scale(1.03);
}

.miembro img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.miembro a {
  display: block;
  font-weight: bold;
  color: #2a4e0c;
  text-decoration: none;
  font-size: 16px;
}

.miembro a:hover {
  text-decoration: underline;
}

/* ===== Prototipos ===== */
.prototipo,
.prototipo2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  text-align: center;
  flex-direction: row;
}

.prototipo h2,
.prototipo2 h2 {
  width: 100%;
  font-size: 28px;
  margin-bottom: 20px;
  color: #333;
}

.prototipo .imagen-prototipo,
.prototipo2 .imagen-prototipo {
  width: 100%;
  height: auto;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  object-fit: contain;
  transition: transform 0.3s ease;
}

.prototipo .imagen-prototipo:hover,
.prototipo2 .imagen-prototipo:hover {
  transform: scale(1.05);
}

/* NUEVO: Grid para prototipo2 */
.prototipo2 .prototipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.prototipo2 .prototipo-grid .imagen-prototipo {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  object-fit: contain;
  transition: transform 0.3s ease;
}

.prototipo2 .prototipo-grid .imagen-prototipo:hover {
  transform: scale(1.05);
}

/* ===== Datos Académicos ===== */
.datos-academicos {
  background: #f4f4f4;
  padding: 25px 15px;
  font-size: 14px;
}

.datos-academicos h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 22px;
}

.contenedor-instituciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.institucion {
  background: #fff;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.institucion h3 {
  margin-bottom: 8px;
  font-size: 16px;
  color: #7a3db8;
}

.institucion ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.institucion li {
  margin: 4px 0;
  font-size: 13px;
}

/* ===== Footer ===== */
footer {
  background-color: #8d1b1b;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: auto;
}

/* ===== Responsive (Tablet y abajo) ===== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .logo {
    text-align: center;
    width: 100%;
  }

  .logo img {
    margin: 0 auto;
  }

  #mainMenu {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  #mainMenu li a {
    font-size: 14px;
    padding: 8px 12px;
    white-space: nowrap;
  }

  .perfil-card {
    flex-direction: column;
    align-items: center;
  }

  .perfil-imagen,
  .perfil-texto {
    width: 100%;
  }

  .materias.aprobadas .años {
    flex-direction: column;
    align-items: center;
  }

  .miembros {
    flex-direction: column;
    align-items: center;
  }

  .contenedor-instituciones {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .institucion {
    width: 100%;
  }

  .prototipo,
  .prototipo2 {
    flex-direction: column;
    gap: 20px;
  }

  footer {
    font-size: 12px;
    line-height: 1.4;
    padding: 15px;
    max-width: 95%;
    margin: 0 auto;
  }
}

/* ===== Responsive (Celular pequeño) ===== */
@media (max-width: 480px) {
  .prototipo,
  .prototipo2 {
    flex-direction: column;
  }
}
