/* === Reset y configuración base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-display: swap;
  font-family: 'times-new-roman';
  src: url('/proyectos_ejemplos/proyecto_avanzado/pages/font/times.ttf') format('truetype');
}

html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #f6f6fa;
  z-index: -1;
  font-family: 'Times New Roman', Times, serif;
}

/* === Tipografía === */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: #4a3c8c;
}

p {
  margin-bottom: 1em;
}

/* === Navegación principal (navbar reutilizable) === */
.nav {
  position: sticky;
  margin: 20px auto;
  max-width: 700px;
  padding: 10px 20px;
  background: rgb(0, 0, 0);
  display: flex;
  justify-content: center;
  border-radius: 45px;
  position: sticky;
  top: 0;
  z-index: 10;
}


.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
}


.nav-link {
  color: #fff;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
  font-weight: 600;
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px black;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: #ffcc00;
  animation: pulse 1s infinite alternate;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: #ffcc00;
  transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

@keyframes pulse {
  0% {
    text-shadow: 0 0 4px #ffcc00;
  }
  100% {
    text-shadow: 0 0 12px #ffcc00;
  }
}

/* Fila para título y burger */
.title-burger-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 5px;
}

/* Menú hamburguesa */

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 4px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #4a3c8c;
  border-radius: 2px;
  transition: all 0.3s;
}


/* Barra superior para logo y redes */
.header-bar {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  padding: 0 40px;
  pointer-events: none; /* Permite que los enlaces debajo sigan funcionando */
}
.logo-izq img {
  height: 156px;
  width: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(74,60,140,0.13);
  background: rgba(255,255,255,0.85);
  padding: 4px 10px;
  transition: box-shadow 0.3s, transform 0.2s, background 0.3s;
}

.logo-izq img:hover {
  box-shadow: 0 6px 24px #7c3aed44;
  background: #fff;
  transform: scale(1.04) rotate(-2deg);
}


.logo-izq {
  pointer-events: auto;
}

.logo-izq {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 8px 18px;
  transition: background 0.3s;
}

.logo-izq:hover {
  background: rgba(255,255,255,0.55);
}

.redes-der {
  display: flex;
  gap: 22px;
  pointer-events: auto;
}
.redes-der a {
  color: #fff;
  font-size: 2.2rem;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.redes-der a:hover {
  background: #ffcc00;
  color: #4a3c8c;
}

/* === Footer === */
.footer {
  background-color: #4a3c8c;
  color: #faf9f7;
  text-align: center;
  padding: 60px 10px 48px 10px; /* Más alto y espacioso */
  font-size: 1.5rem;            /* Texto más grande */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
  user-select: none;
  margin-top: auto;             /* Siempre al fondo */
  letter-spacing: 1px;
  font-weight: 700;
}

.footer p {
  margin: 0;
  opacity: 0.95;
}

/* === Títulos animados === */
.animated-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin: 30px auto 20px;
  padding: 10px 15px;
  border-radius: 8px;
  max-width: 35%;
  display: block;           /* Cambia de inline-block a block */
  box-shadow: 0 2px 5px rgb(0, 0, 0);
  animation: colorCycle 6s ease-in-out infinite;
  transition: transform 0.3s ease;
  margin-left: auto;        /* Centra horizontalmente */
  margin-right: auto;
}

/* Efecto al pasar el ratón por encima */
.animated-title:hover {
  background: black;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #f0c929;
  color: #f0c929;
}

/* === Animaciones === */
@keyframes colorCycle {
  0%, 75% {
    color: #151313;
  }
  50%, 100% {
    color: #6810d3;
  }
}

/* === Utilidades === */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Redes sociales ocultas por defecto */
.redes-movil {
  display: none; /* Ocultar en pantallas grandes */
}


/* === Estilos generales para dispositivos móviles === */

/* === MÓVIL EXTRA PEQUEÑO (hasta 320px) === */
@media (max-width: 320px) {
  .header-bar {
    padding: 0 2px;
    top: 4px;
  }
  .logo-izq img {
    height: 20px;
    padding: 1px 1px;
  }
  .logo-izq {
    padding: 1px 3px;
    border-radius: 8px;
  }
  .redes-der,
  .footer-redes {
    display: none !important;
  }
  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100vw;
    background: #2a225a;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 0 0 12px 12px;
    padding: 12px 0;
  }

    .nav.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 18px;
  }

    .burger {
    display: flex;
  }

    .title-burger-row {
    justify-content: space-between;
    padding: 0 6px;
  }

  .animated-title {
    font-size: 0.9rem;
    max-width: 99%;
    margin: 6px auto 4px;
    padding: 2px 1px;
  }

  .footer {
    font-size: 0.8rem;
    padding: 8px 1px 6px 1px;
  }
}

/* === MÓVIL PEQUEÑO (hasta 480px) === */
@media (min-width: 321px) and (max-width: 480px) {
  .header-bar {
    padding: 0 6px;
    top: 8px;
  }
  .logo-izq img {
    display: none !important;
  }
  .logo-izq {
    padding: 2px 6px;
    border-radius: 10px;
  }
  .redes-der,
  .footer-redes {
    display: none !important;
  }
  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100vw;
    background: #2a225a;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 0 0 12px 12px;
    padding: 12px 0;
  }

    .nav.open {
    display: flex;
  }

    .burger {
    display: flex;
  }

    .title-burger-row {
    justify-content: space-between;
    padding: 0 6px;
  }

  .nav-list {
    flex-direction: column;
    gap: 18px;
  }
  .animated-title {
    font-size: 1.2rem;
    max-width: 98%;
    margin: 12px auto 8px;
    padding: 4px 2px;
  }
  
  .footer {
    font-size: 1rem;
    padding: 18px 2px 14px 2px;
  }

.redes-movil {
    display: flex; /* Mostrar en pantallas pequeñas */
    justify-content: center; /* Centrar los iconos */
    gap: 15px; /* Espaciado entre iconos */
    margin: 10px;
  }

  .redes-movil a {
    font-size: 1.3rem; /* Tamaño de los iconos */
    color: #fdfdfd; /* Color de los iconos */
    transition: color 0.3s ease;
  }

}

/* === MÓVIL MEDIANO (481px a 575px) === */
@media (min-width: 481px) and (max-width: 575px) {
  .header-bar {
    padding: 0 10px;
    top: 10px;
  }
  .logo-izq img {
    display: none !important;
    }
  .logo-izq {
    padding: 4px 10px;
    border-radius: 12px;
  }

  .redes-der,
.footer-redes {
  display: none !important;
}

  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100vw;
    background: #2a225a;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 0 0 12px 12px;
    padding: 12px 0;
  }
  .nav.open {
    display: flex;
  }

    .nav-list {
    flex-direction: column;
    gap: 18px;
  }

    .title-burger-row {
    justify-content: space-between;
    padding: 0 6px;
  }

      .burger {
    display: flex;
  }
  .animated-title {
    font-size: 1.5rem;
    max-width: 95%;
    margin: 16px auto 10px;
    padding: 6px 4px;
  }
  .footer {
    font-size: 1.1rem;
    padding: 22px 4px 18px 4px;
  }

  .redes-movil {
    display: flex; /* Mostrar en pantallas pequeñas */
    justify-content: center; /* Centrar los iconos */
    gap: 15px; /* Espaciado entre iconos */
    margin: 10px;
  }

  .redes-movil a {
    font-size: 1.5rem; /* Tamaño de los iconos */
    color: #fdfdfd; /* Color de los iconos */
    transition: color 0.3s ease;
  }
}

/* === MÓVIL GRANDE (576px a 767px) === */
@media (min-width: 576px) and (max-width: 767px) {
  .header-bar {
    padding: 0 16px;
    top: 12px;
  }
  .logo-izq {
    justify-content: flex-end; /* Pega el logo a la derecha */
    padding: 6px 14px;
    border-radius: 14px;
    backdrop-filter: none;
  }
  .logo-izq img {
    height: 52px;
  }
.redes-der,
.footer-redes {
  display: none !important;
}
    .burger {
    display: flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100vw;
    background: #2a225a;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 0 0 12px 12px;
    padding: 12px 0;
  }
  .nav.open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    gap: 18px;
  }
  .title-burger-row {
    justify-content: space-between;
    padding: 0 6px;
  }
  .animated-title {
    font-size: 1.8rem;
    max-width: 90%;
    margin: 20px auto 12px;
    padding: 8px 6px;
  }
  .footer {
    font-size: 1.2rem;
    padding: 28px 6px 22px 6px;
  }
.redes-movil {
    display: flex; /* Mostrar en pantallas pequeñas */
    justify-content: center; /* Centrar los iconos */
    gap: 15px; /* Espaciado entre iconos */
    margin: 10px;
  }

  .redes-movil a {
    font-size: 1.7rem; /* Tamaño de los iconos */
    color: #fdfdfd; /* Color de los iconos */
    transition: color 0.3s ease;
  }

}

/* === TABLET (768px a 1023px) === */
@media (min-width: 768px) and (max-width: 1023px) {
  .header-bar {
    padding: 0 32px;
    top: 18px;
  }
  .logo-izq img {
    height: 46px;
  }
  .logo-izq {
    padding: 10px 24px;
    border-radius: 16px;
    backdrop-filter: none;
    margin: 10px 0px 0px -20px;
  }
.redes-der,
.footer-redes {
  display: none !important;
}
  .nav {
    max-width: 100%;
    width: 100%;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 28px;
    font-size: 1.3rem;
  }
  .nav-list {
    gap: 20px;
  }
  .animated-title {
    font-size: 2.2rem;
    max-width: 80%;
    margin: 32px auto 18px;
    padding: 12px 8px;
  }
  .footer {
    font-size: 1.3rem;
    padding: 36px 10px 28px 10px;
  }

  .redes-movil {
    display: flex; /* Mostrar en pantallas pequeñas */
    justify-content: center; /* Centrar los iconos */
    gap: 15px; /* Espaciado entre iconos */
    margin: 10px;
  }

  .redes-movil a {
    font-size: 1.9rem; /* Tamaño de los iconos */
    color: #fdfdfd; /* Color de los iconos */
    transition: color 0.3s ease;
  }
}
