/* RESET BÁSICO */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top left, #1f2933 0, #050816 40%, #050816 100%);
  color: #f9fafb;
  line-height: 1.6;
}

/* ELEMENTOS GENÉRICOS */
img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* BOTONES PILL */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.6);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.95);
}

.btn-full {
  width: 100%;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(3, 7, 18, 0.75);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

/* LOGO */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.logo span {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e5e7eb;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: #fff;
  border-color: rgba(236, 72, 153, 0.7);
}

.nav-cta a {
  margin-left: 8px;
}

/* Botón CTA del header con más aire */
.nav-cta .btn-pill {
  padding: 10px 20px;
  font-size: 0.9rem;
  line-height: 1;
}

/* BOTÓN MENÚ MOBILE */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

/* HERO */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
}

/* Fondo slider */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at top left, rgba(76, 29, 149, 0.55), transparent 45%),
              linear-gradient(to bottom right, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.95));
}

/* Contenido hero */
.hero-content {
  padding: 80px 0 64px;
  max-width: 640px;
}

.hero-kicker {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: #a5b4fc;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #e5e7eb;
  max-width: 540px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* SECCIONES GENERALES */
.section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 0.98rem;
  color: #cbd5f5;
}

/* GRIDS */
.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* CARDS GENERALES */
.card {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 18px;
  padding: 20px 20px 22px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
  border-color: rgba(236, 72, 153, 0.5);
  background: rgba(15, 23, 42, 0.98);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.92rem;
  color: #d1d5db;
}

/* CARDS SERVICIOS */
.service-card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.85), rgba(236, 72, 153, 0.45));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

/* CARDS JUEGOS */
.section-games {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%),
              linear-gradient(to bottom, rgba(15, 23, 42, 0.95), #020617);
}

.game-card {
  background: rgba(15, 23, 42, 0.95);
}

/* GAME CARD BIG – ocupa todo el ancho del grid y es clickeable */
.game-card-big {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  grid-column: 1 / -1; /* si está dentro de un grid, ocupa todas las columnas */
  padding: 20px 24px;
}

.game-card-big h3 {
  margin-bottom: 4px;
}

.game-card-big p {
  margin: 0;
}

/* Contenedor de texto para controlar el ancho */
.game-card-big-text {
  flex: 1 1 auto;
}

/* Etiqueta / flecha lateral */
.game-card-big-tag {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 500;
  color: #a5b4fc;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

/* Hover un poco más marcado en el tag cuando se pasa por arriba de toda la card */
.game-card-big:hover .game-card-big-tag {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(191, 219, 254, 0.9);
}

/* En mobile se apila el contenido */
@media (max-width: 540px) {
  .game-card-big {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-card-big-tag {
    margin-top: 4px;
  }
}

/* Variante de game-card-big para lista de juegos */
.game-card-links {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Contenedor de links dentro de la card */
.game-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Estilo de cada link de juego */
.game-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.game-link-pill:hover {
  background: rgba(37, 99, 235, 0.9);
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateY(-1px);
}

/* GALERÍA */
.section-gallery {
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.12), transparent 55%),
              linear-gradient(to bottom, #020617, #020617);
}

.gallery-group {
  margin-bottom: 32px;
}

.gallery-group h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #e5e7eb;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gallery-item::after {
  content: "Ver";
  position: absolute;
  inset: auto 8px 8px auto;
  padding: 4px 8px;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.lightbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CÓMO FUNCIONA */
.section-steps {
  background: radial-gradient(circle at top, rgba(129, 140, 248, 0.18), transparent 55%),
              linear-gradient(to bottom, #020617, #020617);
}

.step-card {
  position: relative;
  padding-top: 32px;
}

.step-number {
  position: absolute;
  top: -18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

/* TESTIMONIOS */
.section-testimonials {
  background: linear-gradient(to bottom, #020617, #020617);
}

.testimonial-card {
  position: relative;
}

.testimonial-quote {
  font-size: 0.94rem;
  color: #e5e7eb;
  margin-bottom: 10px;
}

.testimonial-author {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* CONTACTO */
.section-contact {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.15), transparent 55%),
              linear-gradient(to bottom, #020617, #020617);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

.contact-form {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 18px;
  padding: 20px 20px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.form-group input,
.form-group select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 10px 12px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.5);
}

.contact-aside {
  padding-top: 10px;
}

.contact-aside h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.contact-aside p {
  font-size: 0.92rem;
  color: #cbd5f5;
  margin-bottom: 16px;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: #020617;
  padding: 20px 0;
}

/* Siempre en 3 filas centradas:
   1) Logo   2) Texto   3) Redes + copy */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

/* Logo arriba + texto debajo */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 0.85rem;
  color: #9ca3af;
  max-width: 360px;
}

/* Bloque redes + copy como tercera "fila" */
.footer-links {
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.footer-social a {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
  background: rgba(17, 24, 39, 1);
  transform: translateY(-2px);
}

.footer-social img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-copy {
  font-size: 0.8rem;
  color: #6b7280;
}

/* BOTONES FLOTANTES */
.floating-btn {
  position: fixed;
  z-index: 55;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.floating-whatsapp {
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at top left, #22c55e, #16a34a);
  color: #fff;
  font-size: 1.6rem;
}

.floating-whatsapp img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.floating-top {
  left: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c3aed, #ec4899); /* más contraste */
  color: #ffffff;
  font-size: 1.1rem;
  border: 1px solid rgba(248, 250, 252, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-top.is-visible:hover {
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
  transform: translateY(-1px);
}


.floating-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Ocultar botón "ir arriba" en desktop: solo mobile lo usa */
/* @media (min-width: 769px) {
  .floating-top {
    display: none;
  }
} */

/* RESPONSIVE */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  /* Header deja de ser sticky para no ocupar tanto alto en mobile */
  .site-header {
    position: relative;
    background: rgba(3, 7, 18, 0.96);
  }

  .header-inner {
    padding: 8px 0;
  }

  .nav-links {
    position: absolute;
    right: 16px;
    top: 100%;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 18px;
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .main-nav.nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 8px 4px;
    border-bottom: none;
  }

  .nav-cta {
    margin-top: 4px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-aside {
    padding-top: 0;
  }
}

@media (max-width: 540px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-content {
    padding-bottom: 48px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
