/* =====================================================
   GALERÍA DE PROYECTOS - RONNY FELIZ
   Versión refinada con animaciones y efectos de color
   ===================================================== */

:root {
  --azul-oscuro: #2b4cb8;
  --azul-claro: #4d94ff;
  --verde-resalte: #00ff99;
  --fondo-principal: #0e1421;
  --texto-claro: #ffffff;
  --gris-suave: #b3b3b3;
  --sombra-suave: 0 4px 20px rgba(0, 0, 0, 0.4);
  --transicion: 0.3s ease;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Base ---------- */
body {
  font-family: 'Poppins', sans-serif;
  color: var(--texto-claro);
  background: radial-gradient(circle at top, #1a1a1c, #101016);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: 18px;
}

/* ---------- HEADER ---------- */
header {
  background: linear-gradient(90deg, var(--azul-oscuro), var(--azul-claro));
  color: white;
  text-align: center;
  padding: 15px 0;
  position: relative;
  box-shadow: var(--sombra-suave);
  z-index: 10;
  transition: all 0.4s ease;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, text-shadow 0.4s ease, color 0.4s ease;
}

/* Agrandamiento hacia arriba del título principal */
header h1:hover {
  transform: scale(1.15) translateY(-5px);
  text-shadow: 0 0 25px var(--verde-resalte);
  color: var(--verde-resalte);
}

/* ---------- NAVEGACIÓN ---------- */
nav {
  margin-top: 15px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: all var(--transicion);
}

nav ul li a {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Efecto hover: fondo verde, texto azul */
nav ul li a:hover,
nav ul li a.active {
  background: var(--verde-resalte);
  color: var(--azul-oscuro);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 255, 160, 0.5);
}

/* ---------- MAIN ---------- */
main {
  flex: 1;
  background: radial-gradient(circle at 20% 20%, #11131a, #0c0e13);
  position: relative;
}

/* Luz suave flotante */
main::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 255, 200, 0.15), transparent 70%);
  animation: moverLuz 10s infinite alternate;
  z-index: 0;
}

@keyframes moverLuz {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60vw, 40vh); }
}

/* ---------- SECCIONES ---------- */
.galeria-intro,
.call-to-action,
.fade-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeIn 1.2s ease forwards;
}

/* ---------- TÍTULOS DE SECCIÓN ---------- */
.galeria-intro h2,
.call-to-action h3,
.animate-text {
  color: var(--verde-resalte);
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}

/* Agrandamiento hacia arriba en títulos de sección */
.galeria-intro h2:hover,
.call-to-action h3:hover,
.animate-text:hover {
  transform: scale(1.15) translateY(-5px);
  text-shadow: 0 0 20px var(--verde-resalte);
}

/* ---------- PÁRRAFOS ---------- */
.galeria-intro p,
.call-to-action p,
.highlight-hover {
  color: var(--gris-suave);
  font-size: 1.2rem;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 20px;
  border: 2px solid transparent;
  transition: all 0.4s ease;
  max-width: 800px;
}

/* Cambia a verde al pasar el mouse con borde verde */
.galeria-intro p:hover,
.call-to-action p:hover,
.highlight-hover:hover {
  color: var(--verde-resalte);
  transform: translateY(-3px);
  border-color: var(--verde-resalte);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 160, 0.3);
}

/* ---------- GRID DE IMÁGENES ---------- */
.galeria-contenedor {
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  width: 100%;
  perspective: 1200px;
}

.galeria-item {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 255, 180, 0.05);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  transition: all 0.5s ease;
}

.galeria-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}

/* Efecto de borde verde al pasar */
.galeria-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--verde-resalte);
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(0, 255, 160, 0.3);
}

.galeria-item:hover img {
  transform: scale(1.1) rotate(2deg);
  filter: brightness(1.1);
}

.galeria-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 255, 160, 0.95);
  color: #0e1421;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
}

.galeria-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- BOTÓN CONTACTO ---------- */
.btn-contact {
  display: inline-block;
  background: var(--verde-resalte);
  color: var(--azul-oscuro);
  text-decoration: none;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(0, 255, 160, 0.3);
  transition: all 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.btn-contact:hover,
.btn-contact:active {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 25px rgba(0, 255, 180, 0.5);
  color: #fff;
}

/* ---------- FOOTER ---------- */
footer {
  background: linear-gradient(90deg, var(--azul-oscuro), var(--azul-claro));
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  box-shadow: var(--sombra-suave);
}

footer p {
  margin-bottom: 10px;
  font-size: 1rem;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

footer ul li a {
  color: white;
  text-decoration: none;
  transition: color var(--transicion);
  font-size: 1rem;
}

footer ul li a:hover {
  color: var(--verde-resalte);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- MENÚ HAMBURGUESA ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.hamburger {
  display: none;
  position: absolute;
  top: 18px;
  right: 20px;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 20;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#menu-toggle {
  display: none;
}

/* Animación de la X */
#menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
#menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mostrar menú al marcar */
#menu-toggle:checked ~ nav ul {
  display: flex;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  }

  nav ul li {
    margin: 10px 0;
  }

  nav ul li a {
    width: 80%;
    margin: auto;
    text-align: center;
    font-size: 1rem;
  }

  .galeria-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  header h1 {
    font-size: 1.8rem;
  }

  .galeria-intro h2,
  .call-to-action h3 {
    font-size: 1.8rem;
  }
}

/* ---------- ANIMACIONES ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}