/* RESET */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

/* ENLACES GENERALES */
a {
  text-decoration: none;
  color: #a8c0ff;
  font-weight: bold;
  display: block;
  margin-top: 8px;
}

a:hover {
  color: #ffd580;
}

/* HEADER */
header {
  background-color: #0f1b4c;
  padding: 2rem 1rem;
  text-align: center;
}

header img {
  max-width: 220px;
  margin-bottom: 1rem;
}

header nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

header nav ul li a {
  background-color: #ffffff;
  color: #0f1b4c;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-weight: bold;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

header nav ul li a:hover {
  box-shadow: 0 0 12px #fff7c0; /* sombra pastel */
}

.logo {
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 2rem;
  max-width: 180px;
  width: 100%;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* MAIN */
main {
  background-color: #0f1b4c;
  color: #ffffff;
  padding: 2rem 1rem;
}

.perfil-card {
  margin-top: 2rem;
}

.card-presentacion.cover {
  background-color: #ffffff;
  color: #0f1b4c;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin: auto;
  display: block;
  max-width: 100%;
  width: 100%;
}


.card-presentacion.cover .img-cover {
  width: 100%;
  height: auto;
  object-fit: contain; /* muestra toda la imagen sin recortar */
  display: block;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.card-presentacion .info-presentacion {
  padding: 1.5rem;
  text-align: center;
}

.card-presentacion h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: #0f1b4c;
  background: none;
}

.card-presentacion p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}


/* TIPOGRAFÍA */
h1 {
  font-size: 2.5rem;
  color: #ffffff;
  background-color: #1e2e96;
  border-radius: 1rem;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.8rem;
  color: #ffffff;
  background-color: #1e2e96;
  border-radius: 1rem;
  padding: 1rem 2rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  color: #ffffff;
  background-color: #4b74c4;
  border-radius: 1rem;
  padding: 1rem 2rem;
  margin-top: 2rem;
}

/* IMÁGENES Y FIGURES */
.foto-joaquin {
  width: 100%;
  max-width: 320px;
  margin: 1rem auto;
  border-radius: 1rem;
}

figure img {
  max-width: 100%;
  border-radius: 1rem;
  margin: auto;
}

/* Imagen del prototipo */
section figure img {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: 1rem;
}

/* LISTAS */
section ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

section ul li {
  margin-bottom: 0.5rem;
}

/* EQUIPO (cards estilo "eventos") */
.equipo {
  margin-top: 3rem;
}

.equipo h2 {
  margin-bottom: 2rem;
}

.equipo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card {
  background-color: #ffffff;
  color: #0f1b4c;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 12px #fff7c0; /* sombra amarillo pastel */
}

.card img {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.card p {
  margin: 0;
  font-weight: bold;
  font-size: 1.1rem;
}

/* DATOS ACADÉMICOS */
section:last-of-type {
  background-color: #1a1a2e; /* azul oscuro casi negro */
  padding: 2rem;
  border-radius: 1rem;
  margin-top: 3rem;
}

section:last-of-type h3 {
  background-color: transparent;
  color: #ffffff;
  margin-top: 2rem;
  padding: 0.5rem 0;
}

section:last-of-type ul li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

section:last-of-type div img {
  width: 180px;
  max-width: 100%;
  margin: 1rem auto;
  display: block;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}






@media (min-width: 768px) {
  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 2rem 4rem;
  }

  header img {
    margin-bottom: 0;
  }

  main {
    padding: 2rem 4rem;
  }

  .equipo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .perfil-card {
    padding: 0 2rem;
  }

  .card-presentacion.cover {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .card-presentacion.cover .img-cover {
    width: 45%;
    height: auto;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .card-presentacion .info-presentacion {
    width: 55%;
    padding: 2.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .card-presentacion .info-presentacion h2 {
    font-size: 2rem;
    margin: 0 0 1rem 0; /* elimina separación innecesaria arriba */
    padding: 0;
  }

  .card-presentacion .info-presentacion p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
  }

    section figure img {
      max-width: 500px;
    }

  section:last-of-type {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  section:last-of-type .logos-academicos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  section:last-of-type .logos-academicos img {
    width: 200px;
  }

  section:last-of-type h3 {
    text-align: left;
  }

}
