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

.logo-menu {
  width: 150px;
  height: auto;
  display: inline-block;
}


/*====================
    Variables CSS (PALETA ROSA)
====================*/
:root {
    --primary-color: #bf286b;           /* rosa fuerte */
    --secondary-color: #a02055;         /* rosa más oscuro */
    --accent-color: #e0528e;            /* rosa intermedio/acento */
    --text-color: #2a2a2a;              /* gris oscuro legible */
    --bg-color: #ffffff;                /* fondo tarjetas/secciones */
    --gradient: linear-gradient(135deg, #fdf1f6, #ffffff); /* fondo suave rosado */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --border-radius: 12px;
    --box-shadow: 0 8px 24px rgba(191, 40, 107, 0.18); /* sombra rosa */
}

/*====================
    Estilos Base
====================*/
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient);
    padding: clamp(var(--spacing-xs), 2vw, var(--spacing-md));
    min-height: 100vh;
}

h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.8;
}

img {
    max-width: 100%;
    height: auto;
}

.avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    margin: 2rem auto;
    display: block;
    box-shadow: var(--box-shadow);
    border: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
}

/*====================
    Navegación
====================*/
.menu ul {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    list-style: none;
    margin: 10;
    padding: 10;
}

.menu a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1.5px;
    position: relative;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.menu a:hover {
    background: var(--gradient);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/*====================
    Encabezado
====================*/
header {
    background: var(--gradient);
    color: var(--primary-color);
    padding: var(--spacing-lg) var(--spacing-lg);
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

h1 {
    font-size: 5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text; /* Chrome/Safari */
    background-clip: text;         /* estándar */
    -webkit-text-fill-color: transparent;
    color: transparent;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 900;
}

h1::after {
    content: '✨';
    position: absolute;
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 2rem;
}

header h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--accent-color);
    letter-spacing: 0;
    max-width: 4000px;
    line-height: 1.4;
}

/*====================
    Secciones
====================*/
section {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    margin: var(--spacing-md);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

section h2 {
    font-size: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text; 
    background-clip: text;         
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '✨';
    position: absolute;
    right: -2rem;
    top: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
}

/*====================
    Navegación inferior
====================*/
nav {
    margin-top: 20px;
    font-family: 'Segoe UI', sans-serif;
}

nav p {
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

nav p span {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
    padding: 0 0.3rem;
}

nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent-color);
}

/*====================
    Footer
====================*/
footer {
    background: var(--gradient);
    color: var(--text-color);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

footer p {
    margin: 0;
    line-height: 1.8;
    font-size: 1.1rem;
    opacity: 0.9;
}

footer p span {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
    padding: 0 0.3rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

footer a:hover {
    color: var(--primary-color);
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/*====================
    Sección Niveles
====================*/
.niveles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(var(--spacing-md), 3vw, var(--spacing-lg));
    margin-bottom: var(--spacing-lg);
}

.nivel {
    background: var(--bg-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nivel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: height 0.3s ease;
}

.nivel:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(191, 40, 107, 0.20);
}

.nivel:hover::before {
    height: 6px;
}

.nivel h2 {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 1.6rem;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    position: relative;
}

.nivel h2::after {
    content: '✨';
    position: absolute;
    right: -2rem;
    top: 0;
    color: var(--accent-color);
}

/* Aquí achicamos los textos de las materias */
.nivel ul {
    margin-top: var(--spacing-md);
    list-style: none;
    padding: 0;
}

.nivel ul li {
    padding: 0.6rem 1rem;   /* menos aire */
    margin-bottom: 0.6rem;
    font-size: 1rem;        /* más chico que antes */
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: var(--gradient);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.nivel ul li::before {
    content: '→';
    color: var(--primary-color);
    position: absolute;
    left: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nivel ul li:hover {
    color: var(--primary-color);
    padding-left: 2.5rem;
    background: linear-gradient(to right, var(--gradient), transparent);
    box-shadow: var(--box-shadow);
}

.nivel ul li:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/*====================
    Integrantes
====================*/
.integrantes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.integrantes div {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.integrantes div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: height 0.3s ease;
}

.integrantes div:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(191, 40, 107, 0.20);
}

.integrantes div:hover::before {
    height: 6px;
}

.integrantes a {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: var(--spacing-sm);
}

.integrantes a:hover {
    transform: scale(1.05);
}

/*====================
    Media Queries
====================*/
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 15px;
    }

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

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

@media screen and (max-width: 480px) {
    .nivel {
        padding: 15px;
    }

    .integrantes div {
        padding: 0.5rem;
    }
}
/* ===== INDEX PERSONAL (sin cambiar HTML) ===== */

/* Centrar y emparejar la foto del estudiante (detecta por el alt) */
img[alt^="Foto del estudiante"]{
  display: block;
  margin: 0 auto .75rem;     /* centrada + aire abajo */
  max-width: 180px;          /* tope en desktop */
  width: 100%;
  aspect-ratio: 1 / 1;       /* cuadrada aunque el archivo no lo sea */
  object-fit: cover;         /* recorta sin deformar */
  border-radius: 16px;       /* esquinas suaves */
}

/* Centrar títulos SOLO en páginas con la barra personal (.topbar) */
.topbar ~ h1,
.topbar ~ h2{
  text-align: center;
}

/* Opcional: centrar la barra superior personal */
nav.topbar{
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Responsive: foto un toque más chica en mobile */
@media (max-width: 768px){
  img[alt^="Foto del estudiante"]{ max-width: 150px; border-radius: 14px; }
}
@media (max-width: 480px){
  img[alt^="Foto del estudiante"]{ max-width: 120px; border-radius: 12px; }
}
/* ====== HOTFIX EXTRA SMALL (≤ 420px, ej. 400×632) ====== */
@media (max-width: 420px){

  /* Evitar scroll lateral y recortes raros */
  html, body { overflow-x: hidden; }
  body{ margin: .75rem 1rem; }

  /* Header / nav */
  .logo img{ max-height: 28px; max-width: 120px; height:auto; }
  nav{ flex-direction: column; align-items: flex-start; gap: .5rem; }
  .menu{ gap: .5rem; flex-wrap: wrap; }
  .menu a{ font-size: .95rem; line-height: 1.2; }

  /* Banner */
  .inicio{ padding: 2rem 1rem; border-radius: 24px; }
  h1{ font-size: 2.2rem; line-height: 1.1; }
  h2{ font-size: 1.25rem; }
  h3{ font-size: .95rem; }

  /* Integrantes (tarjetas 1 por fila, sin min-width oculto) */
  .integrantes{ gap: .75rem; padding: 1.5rem 0; }
  [class^="columna-"]{
    width: 100% !important;
    padding: .9rem;
    border-radius: 14px;
    min-width: 0;
  }
  .integrantes img{
    max-width: 110px; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px;
  }

  /* Datos institucionales más compactos */
  .datos{ padding: .75rem; gap: .75rem; font-size: .9rem; }

  /* Cajas del plan / mapa / app (angostas y centradas) */
  .page-plan [class^="plan-"],
  .page-mapa .mapa-embed,
  .page-app  .app-embed{
    max-width: 94%;
    margin: .75rem auto;
    padding: .9rem;
    border-radius: 24px;
  }

  /* Texto adentro de las cajas: respiración + cortes de línea */
  .page-plan [class^="plan-"] p,
  .page-plan [class^="plan-"] li,
  .page-mapa .mapa-embed p,
  .page-app  .app-embed p{
    line-height: 1.6;
    word-break: break-word;
  }

  /* User Persona en una columna */
  .page-plan .user{ display: grid; grid-template-columns: 1fr; gap: .9rem; }
  .page-plan .user .col{ min-width: 0; }

  /* Iframes Figma más bajitos para que entren */
  .page-mapa .figma-embed,
  .page-app  .figma-app{ height: 60vh; }

  /* Línea degradada y footers */
  .linea-degradado{ border-radius: 18px; margin-top: 1rem; }
  footer,
  .page-plan footer,
  .page-mapa footer,
  .page-app  footer{
    max-width: 94%;
    padding: .85rem 1rem;
    border-radius: 24px;
    gap: .75rem;
    margin-left: auto; margin-right: auto;
  }
  .footer-text{ max-width: 100%; }

  /* Topbar del personal y avatar */
  nav.topbar{ justify-content: center; gap: .5rem; flex-wrap: wrap; }
  img[alt^="Foto del estudiante"]{ max-width: 110px; border-radius: 12px; }
}
