/* Importar fuente desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

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

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background-color: #f9f9fb;
  color: #333;
  font-size: 1rem;
  padding: 1rem;
}

h1, h2, h3 {
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  color: #3e1f47;
}

h1 {
  font-size: 2.5rem;
  margin-top: 1rem;
  text-align: left;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  color: #5a2c82;
}

header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center; 
  gap: 2rem;
  margin: 2rem auto; 
  max-width: 960px; 
  width: 100%;
  flex-wrap: nowrap;
  text-align: left;
  background-color: #e0e0e0;
  padding: 2rem 1rem; 
  height: auto;
  border-radius: 8px; 
}

header img {
  width: 200px;
  height: 200px;
  border-radius: 8px; 
  box-shadow: none;
  object-fit: cover;
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

.header-text h1 {
  font-size: 1.8rem;
  text-align: left;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.institucion {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1.5rem;
  text-align: left;
}

.header-text .carrera {
  font-size: 1.2rem;
  color: #5a2c82;
  margin: 0;
  text-align: left;
  font-weight: 500;
}

p.carrera {
  font-size: 1.1rem;
  color: #5a2c82;
  margin-bottom: 1rem;
}

nav.menu-principal, nav.menu-secundario {
  background-color: #3e1f47;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

nav.menu-principal ul, nav.menu-secundario ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

nav.menu-principal a, nav.menu-secundario a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

nav.menu-principal a:hover, nav.menu-secundario a:hover {
  background-color: #5a2c82;
  transform: scale(1.05);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.05);
}

section {
  margin-bottom: 3rem;
  text-align: center;
}

article {
  margin-bottom: 2rem;
  text-align: center;
}

ul {
  padding-left: 0;
  margin-top: 0.5rem;
  list-style: none;
}

ul li {
  margin-bottom: 0.25rem;
}

footer {
  text-align: center;
  font-size: 0.875rem;
  color: #666;
  margin-top: 4rem;
  border-top: 1px solid #ccc;
  padding-top: 1rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}


#indice-clases .clases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.clase {
  background-color: #f3eef7;
  border: 2px solid #d2bde5;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clase:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(90, 44, 130, 0.2);
}

.clase h3 {
  margin-bottom: 0.5rem;
}

.clase p {
  margin-bottom: 1rem;
}

.button {
  display: inline-block;
  background-color: #5a2c82;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background-color: #7e4bb1;
  transform: scale(1.05);
}


@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
  }
  
  header img {
    margin-bottom: 1rem;
  }
  
  .header-text {
    align-items: center;
    text-align: center;
  }
  
  .header-text h1, .institucion, .header-text .carrera {
    text-align: center;
  }
}