/* =========================
   ESTILOS BASE
   ========================= */

/* Estilos generales */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
}

/* Banner superior */
header {
  background-color: #1e1e1e;
  color: #ffffff;
  padding: 60px 20px;
  text-align: center;
  border-bottom: 2px solid #333;
  position: relative; /* necesario para el canvas p5.js */
  overflow: hidden;
}

header h1 {
  margin: 0;
  font-size: 36px;
  font-family: 'Fredericka the Great', cursive;
  position: relative;
  z-index: 1;
}

header p {
  margin: 10px 0 0;
  font-size: 16px;
  color: #aaa;
  position: relative;
  z-index: 1;
}

header canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Layout principal */
.container {
  display: flex;
}

/* Barra lateral */
nav {
  width: 250px;
  background-color: #181818;
  padding: 20px;
  min-height: calc(100vh - 160px);
  border-right: 2px solid #333;
}

nav a {
  display: block;
  color: #e0e0e0;
  text-decoration: none;
  margin: 10px 0;
  padding: 12px;
  background-color: #242424;
  border-radius: 5px;
  text-align: center;
  font-family: 'Londrina Shadow', cursive;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: #5a2d82;
  transform: scale(1.1);
  color: #fff;
}

/* Contenido oculto */
.contenido-oculto {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background-color: #1e1e1e;
  margin: 0;
  padding: 0 10px;
  border-left: 3px solid #5a2d82;
  border-radius: 5px;
  font-size: 14px;
  color: #ccc;
  transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.3s ease;
}

.contenido-oculto.activo {
  max-height: 500px;
  opacity: 1;
  padding: 10px;
  margin-bottom: 15px;
}

/* Sección principal */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #1a1a1a;
  padding: 40px;
}

.btn-proyectos {
  display: inline-block;
  padding: 50px 100px;
  font-size: 32px;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(90deg, #333, #5a2d82);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Monoton', cursive;
  text-decoration: none;
  text-align: center;
}

.btn-proyectos:hover {
  transform: scale(1.1);
}

.btn-proyectos.activo-btn {
  background: linear-gradient(90deg, #5a2d82, #8a4dcc);
  box-shadow: 0 0 20px #5a2d82;
}

/* Grid 2x2 de rectángulos */
.grid-circulos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 🔹 más flexible */
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 900px; /* 🔹 limita el ancho total */
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  margin-top: 20px;
}


.grid-circulos.activo {
  opacity: 1;
  pointer-events: auto;
}

.circulo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  padding-top: 75%;
  border-radius: 12px;
  background: linear-gradient(90deg, #333, #5a2d82);
  color: white;
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s ease, box-shadow 0.3s ease;
}

.circulo img {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 60%;
  object-fit: cover;
  border-radius: 8px;
  pointer-events: none;
}

.circulo p {
  position: absolute;
  bottom: 5%;
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: #fff;
}

.circulo:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.6), 0 0 20px #5a2d82, 0 0 40px #5a2d82;
}

/* banner inferior */
footer {
  background-color: #1e1e1e;
  padding: 40px 20px;
  border-top: 2px solid #333;
  text-align: center;
}

footer h2 {
  margin: 0 0 15px 0;
  font-family: 'Fredericka the Great', cursive;
  font-size: 24px;
  color: #fff;
}

/* Logo centrado debajo del h2 */
.footer-logo {
  display: block;
  margin: 0 auto 15px auto;
  width: 30px;
  height: auto;
  transition: transform 0.3s ease;
}

@keyframes pulso {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.footer-logo:hover {
  animation: pulso 2s infinite ease-in-out;
}

footer p {
  margin-top: 0;
  font-size: 14px;
  color: #aaa;
}

/* =========================
   RESPONSIVE FORZADO
   ========================= */

/* Tablets (pantallas medianas) */
@media (max-width: 1024px) {
  nav {
    width: 200px !important;
    padding: 15px !important;
  }

  .btn-proyectos {
    padding: 40px 80px !important;
    font-size: 28px !important;
  }

  .grid-circulos {
    gap: 15px !important;
  }
}

/* Móviles */
@media (max-width: 768px) {
  /* Layout en columna */
  .container {
    flex-direction: column !important;
  }

  /* Menú superior en vez de lateral */
  nav {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 2px solid #333 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 15px !important;
  }

  nav a {
    width: 100% !important;
    max-width: 300px !important;
  }

  /* Sección principal más compacta */
  main {
    padding: 20px !important;
  }

  .btn-proyectos {
    padding: 30px 60px !important;
    font-size: 24px !important;
  }

  /* Grid pasa a 1 columna */
  .grid-circulos {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 350px !important;
    margin: 20px auto !important;
  }

  .circulo {
    padding-top: 100% !important; /* más cuadrado en móvil */
  }

  /* Textos más legibles */
  .contenido-oculto p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  footer {
    padding: 20px 10px !important;
  }

  .footer-logo {
    width: 25px !important;
  }
}

/* Muy pequeños (teléfonos < 480px) */
@media (max-width: 480px) {
  header h1 {
    font-size: 26px !important;
  }

  .btn-proyectos {
    padding: 20px 40px !important;
    font-size: 20px !important;
  }

  nav a {
    font-size: 14px !important;
    padding: 10px !important;
  }
}

/* Botón hamburguesa (oculto en desktop) */
.hamburger {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
}

/* Vista móvil */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    z-index: 1001;
    cursor: pointer;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: #181818;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    z-index: 1000;
  }

  nav.activo {
    transform: translateX(0);
  }

  .container {
    flex-direction: column;
  }

  main {
    margin-left: 0;
    padding: 20px;
  }
}






































