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

img {
  max-width: 100%;
}

body {
  font-family: 'neutiva', sans-serif;
  background-color: #f9dfc6; 
  color: #1b1284;        
 
}

header {
  background-color: #ff8400; 
  padding: 20px 20px;
  border-radius: 12px;
  margin: 1rem;

}

main {
  margin-top: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 2em;
  padding: 1rem;
}
 
article {
  flex-wrap: wrap;
  flex-direction: row;
  display: flex;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center; 
}
footer {
  background-color: #ff8400;
    font-size: 0.6rem;
  color: white;
  display: block;
  padding: 1em;
  text-align: left;
  padding-block-end: 3em;
  margin-block-start: 3em;
  
}

.logo img {
  height: 50px;
}

.navegacion {
  list-style: none;
  display: flex;
  gap: 1.2em;
}

.navegacion a {
  text-decoration: none;
  color: #1b1284;
  font-size: .9em;
  font-weight: 400;
}
.sobremi {
  padding: 20px;
  background-color: #f9dfc6;
  gap: 3.5em;
  border-radius: 12px;
  border: 2.5px solid #ff8400;
}

/* Grid aplicado al article dentro de .sobremi, así .texto y .imagen son grid items */
.sobremi > article {
  display: grid;
  grid-template-columns: 2fr 1fr; /* texto a la izquierda, imagen a la derecha en desktop */
  align-items: center;
  gap: 3.5em;
}

.sobremi .imagen {
  justify-self: end; /* alinear la caja de la imagen a la derecha en desktop */
}

.sobremi .imagen img {
  width: 300px; /* tamaño en desktop */
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}


.sobremi .texto h1 {
  margin-top: 10px;
  font-size: 1.5rem;
  color: #1b1284;
  margin-bottom: 10px;
}

.sobremi .texto h2 {
  font-size: 1.2rem;
  margin-top: 10px;
}

.sobremi .texto p {
  font-size: 1rem;
  margin-bottom: 10px;
  margin-top: 10px;
}

.contactame ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin-top: 20px;
  padding: 0;
}

.contactame a {
  text-decoration: none;
  background-color: #ff8400;
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
}


.contenedor-materias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2em ;
  padding: 20px 20px;
}

.materia {
  background-color: #f9dfc6;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #ff8400;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
#materia h2 {
  font-size: 0.5rem;
  color: #1b1284;
 margin-top: 20px;
}

.materia h4 {
  text-align: center;
  margin-bottom: 10px;
  color: #0B0829;
}

.materia ul {
  padding-left: 20px;
}

.equipo {
  text-align: center;
  padding: 40px 20px;
  background-color: #f9dfc6;
  border-radius: 12px
}

.equipo h2 {
  font-size: 2rem;
  color: #ff8400;
  margin-bottom: 30px;
}


.equipo ul {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.equipo li {
 
  text-align: left;          
  display: flex;            
  flex-direction: column;    
  align-items: center;       
  gap: 20px;                
  background-color: #758ede;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.equipo li:hover {
  transform: translateY(-5px);
}

.equipo li img {
 
  width: 100px;            
  height: 100px;            
  border-radius: 50%;
  flex-shrink: 0;            /* evita que la imagen se reduzca en desktop IA*/
}

.equipo li a {
  display: flex;             
  flex-direction: column;    
  justify-content: center;
  font-size: 1rem;           
  text-align: center;        
  text-decoration: none;
  color: white;
  font-weight: bold;
}

/* --- MODIFICACIÓN RESPONSIVE --- */
@media (min-width: 768px) {
  .equipo li {
    flex-direction: row;      /* ahora fila en desktop */
    align-items: center;      /* centra verticalmente imagen y texto */
    padding: 20px 30px;
  }

  .equipo li a {
    text-align: left;         /* alinea texto a la izquierda en desktop */
    margin-left: 20px;        /* separa texto de la imagen */
  }
}


/* Use ia para ayuda del responsive 
/* Mobile: imagen arriba del texto, todo centrado (no modifica vista de PC) */  
@media (max-width: 767px) {
  .sobremi > article {
    grid-template-columns: 1fr; /* una columna */
    align-items: center;
    text-align: center;
    gap: 1.5em;
  }

  .sobremi > article .imagen {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  /* Texto debajo de la imagen y centrado */
  .sobremi > article .texto {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .sobremi .imagen img {
    width: 200px;     
    max-width: 60%;
    height: auto;
  }

  .contactame {
    display: flex;
    justify-content: center;
  }
  .contactame ul { padding: 0; }
}

.prototipo {
  padding: 1em;
}

.prototipo > .prototipo { /* contenedor de columnas */
  display: flex;       /* columnas en fila */
}

/* Cada columna apila las imágenes verticalmente */
.columna1,
.columna2,
.columna3 {
  display: flex;
  flex-direction: column;
}

.columna2 img + img,
.columna3 img + img {
  margin-top: 1em; 
}

.columna2 img + img {
  margin-top: 10px; 
}

.columna3 img + img {
  margin-top: 10px;  
} 

.columna1 img,
.columna2 img,
.columna3 img {
  width: 100%;
  display: block;
}


.columna1 {
  margin-right: 1em;  /* espacio entre columna 1 y 2 */
}

.columna2 {
  margin-right: 1em;  /* espacio entre columna 2 y 3 */
}

html {
  scroll-behavior: smooth;
}  */ IA