/* ======================================= */
/* 1. VARIABLES GLOBALES Y ESTILOS BASE */
/* ======================================= */

:root {
  /* Paleta de Colores */
  --color-primary: #227C9D;    /* Azul Principal */
  --color-secondary: #FFCB77;  /* Amarillo/Naranja */
  --color-tertiary: #17C3B2;   /* Verde/Cian */
  --color-light: #FEF9EF;      /* Blanco Roto (Fondo) */
  --color-dark: #000000;
  
  /* Sombras */
  --shadow-default: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Importación de fuentes */
@import url('https://fonts.googleapis.com/css2?family=Freckle+Face&family=Sansita+Swashed:wght@300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700&family=Montserrat:wght@700&display=swap');


body {
  background: var(--color-light);
  color: var(--color-dark);
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  padding-top: 0; 
}

html {
  scroll-behavior: smooth;
}

/* ======================================= */
/* 2. BARRA DE NAVEGACIÓN*/
/* ======================================= */

.barra.principal {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  background: rgba(34, 124, 157, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 32px;
  height: 56px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.404); /* sombra */
  animation: fadeInDown 0.6s ease-out;
}

  
  background: rgba(34, 124, 157, 0.9); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  border-radius: 18px;
  display: flex;
  justify-content: center 
  align-items: center;
  padding: 0 32px;
  height: 56px;
  z-index: 1000;
  box-shadow: var(--shadow-default);
  
  /* Animación de entrada */
  animation: fadeInDown 0.6s ease-out; 


@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.barra.principal ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.barra.principal ul li a {
  color: var(--color-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, transform 0.1s;
  padding: 8px 0;
  display: block;
}

.barra.principal a:hover {
  color: var(--color-tertiary);
  transform: translateY(-2px);
}

/* ======================================= */
/* 3. HEADER Y PERFIL */
/* ======================================= */

header {
    padding-top: 60px;
}

header img {
  width: 260px;
  height: 340px;
  border-radius: 48px;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.623);
  margin: auto auto auto auto;
  display: block;
  transition: transform 0.3s, box-shadow 0.3s;
}

header img:hover {
  transform: scale(1.02) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-family: "Sansita Swashed", system-ui;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-primary);
  letter-spacing: 1px;
  text-shadow: #000000;
}
header h2 {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 0;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif;
  font-size: 1.2rem;
  color: var(--color-primary);
}

/* Submenú de alumnos */
.alumnos-nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 24px 0 40px 0; /* Margen inferior para separar el acordeón */
  padding: 0;
  justify-content: center;
}

.alumnos-nav ul li a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 4px 12px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.alumnos-nav ul li a:hover {
  background: var(--color-primary);
  color: var(--color-light);
  transform: translateY(-2px);
}


/* ======================================= */
/* 4. ACORDEÓN DE MATERIAS (DETAILS) */
/* ======================================= */

.acordeon {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px 0;
  flex-wrap: wrap;
}

/* El contenedor de materia es la etiqueta <details> */
.acordeon details { 
  flex: 0 0 260px;
  border-radius: 16px;
  border: 2px solid var(--color-secondary);
  box-shadow: var(--shadow-default);
  overflow: hidden;
  background: var(--color-light);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
  padding: 0;
}

.acordeon details:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* El título <summary> */
.acordeon .titulo {
  list-style: none; /* Oculta el triángulo nativo del navegador */
  font-size: 1.1rem;
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  font-weight: 700;
  padding: 16px 0;
  outline: none;
  position: relative;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  border: none;
}

/* Icono de flecha animado */
.acordeon .titulo::after {
  content: '▶'; 
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  font-size: 0.9em;
}

/* Cuando el <details> está abierto */
.acordeon details[open] .titulo::after {
  transform: translateY(-50%) rotate(90deg);
}
.acordeon details[open] {
    box-shadow: 0 8px 32px rgba(34, 124, 157, 0.5); 
}

/* Colores de las cabeceras por nivel */
.acordeon details:nth-child(1) .titulo { 
  background: var(--color-tertiary);
  color: var(--color-light);
}

.acordeon details:nth-child(2) .titulo { 
  background: #62b6cb; 
  color: var(--color-primary);
}

.acordeon details:nth-child(3) .titulo { 
  background: var(--color-primary);
  color: var(--color-light);
}

.acordeon details:nth-child(4) .titulo { 
  background: var(--color-secondary);
  color: var(--color-primary);
}


/* Estilos para la lista de materias (UL) */
.acordeon ul {
  list-style: none;
  margin: 0;
  padding: 15px 0 25px 0; /* Padding claro para separar del borde */
  text-align: center;
  background: #f8f8f8; /* Color de fondo sutil para el contenido */
  /* La animación de lista solo funciona si se usa JS/max-height, la quitamos aquí */
}

.acordeon ul li {
  margin: 8px 0;
  color: var(--color-primary);
  font-weight: 500;
}


/* ======================================= */
/* 5. INFO UBA GRID */
/* ======================================= */

.info-uba-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; 
  max-width: 950px;
  margin: 40px auto;
  padding: 18px 16px 14px 16px;
  border-radius: 14px;
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: 0.8rem;

  font-weight: 300;
  box-shadow: var(--shadow-default);
}

.info-uba-grid div {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-uba-grid strong {
  color: var(--color-secondary); 
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
}

.info-uba-grid a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s;
}


.info-uba-grid a:hover {
    color: var(--color-tertiary);
    text-decoration: underline;
}

/* ======================================= */
/* 6. FOOTER Y RESPONSIVE */
/* ======================================= */

footer {
    text-align: center; 
    font-size: small; 
    font-family: Arial, Helvetica, sans-serif;
    padding: 20px 10px;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

@media (max-width: 900px) {
  .barra.principal {
    width: 95%;
  }
  
  .info-uba-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    max-width: 98vw;
  }
  
  .info-uba-grid div {
    text-align: center;
    align-items: center;
  }
  
  .acordeon {
    gap: 20px;
  }
  
  .acordeon details {
    flex: 0 0 90%; 
  }
}
.fade-in {
  animation: fadeIn 0.8s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  60% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.acordeon details {
  animation: bounceIn 0.6s ease-out;
}
.info-uba-grid div:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease;
}
