﻿/**
 * =============================================================================
 * CONTENT/OLABORAL_JOVENES/JUEGOS_JOVENES.CSS - Estilos de Juegos para Jóvenes
 * =============================================================================
 * 
 * Este archivo CSS define la apariencia visual de la página de juegos para jóvenes.
 * Es utilizado por: content/olaboral_jovenes/juegos_jovenes.html
 * 
 * Página con juegos y actividades para jóvenes.
 * 
 * =============================================================================
 * ESTRUCTURA DEL ARCHIVO:
 * =============================================================================
 * 1. IMPORTS     - Importar estilos base del index
 * 2. HERO      - Sección principal
 * 3. INTRODUCCIÓN - Texto introductorio
 * 4. VALUES GRID - Grid de valores/beneficios
 * 5. JUEGOS GRID - Grid de juegos
 * 6. TARJETA JUEGO - Tarjetas de juegos
 * 7. ICONO JUEGO - Iconos coloridos
 * 8. ANIMACIONES - Keyframes
 * 9. RESPONSIVE - Ajustes para móviles
 * 10. PREFERENCES - Soporte prefers-reduced-motion
 * 
 * =============================================================================
 */

/* =============================================================================
SECCIÓN 1: IMPORTS
================================================================================
Importamos los estilos base del index.
*/

@import url('../../index/index.css');

/* =============================================================================
SECCIÓN 2: HERO SECTION
================================================================================
Sección principal con título y fondo decorativo.
*/

/* Hero para jóvenes */
.jovenes-hero {
  position: relative;
  background: var(--bg-gradient);
  color: white;
  padding: 6rem 0 8rem;
  overflow: hidden;
  margin-bottom: 0;
}

/* Fondo decorativo */
.jovenes-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(42, 157, 143, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(233, 196, 106, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(38, 70, 83, 0.3) 0%,
      transparent 70%
    );
  animation: float3D 8s ease-in-out infinite;
}

/* Contenido del hero */
.jovenes-hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

/* Badge decorativo */
.jovenes-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInDown 0.6s ease;
}

/* Título */
.jovenes-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.jovenes-hero h1 .highlight {
  color: var(--accent);
}

/* Subtítulo */
.jovenes-hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 0;
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* Onda decorativa */
.jovenes-hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.jovenes-hero-wave svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* =============================================================================
SECCIÓN 3: INTRODUCCIÓN
================================================================================
Sección de texto introductorio.
*/

/* Introducción */
.jovenes-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.jovenes-intro h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.jovenes-intro p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =============================================================================
SECCIÓN 4: VALUES GRID
================================================================================
Grid de valores/beneficios.
*/

/* Grid de valores - 4 columnas */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Responsive para values grid */
@media (max-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
SECCIÓN 5: JUEGOS GRID
================================================================================
Grid de tarjetas de juegos.
*/

/* Grid de juegos - 4 columnas */
.juegos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Wrapper del juego */
.juego-card-wrapper {
  display: flex;
  flex-direction: column;
}

/* =============================================================================
SECCIÓN 6: TARJETA DE JUEGO
================================================================================
Estilos para cada tarjeta de juego.
*/

/* Tarjeta de juego */
.juego-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  display: block;
  /* Animación de entrada */
  opacity: 0;
  transform: translateY(30px);
  animation: slideUpFade 0.5s ease-out forwards;
}

/* Contenido del juego */
.juego-card .juego-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.juego-card .juego-content p {
  flex: 1;
}

/* Delays escalonados */
.juego-card:nth-child(1) { animation-delay: 0.05s; }
.juego-card:nth-child(2) { animation-delay: 0.1s; }
.juego-card:nth-child(3) { animation-delay: 0.15s; }
.juego-card:nth-child(4) { animation-delay: 0.2s; }
.juego-card:nth-child(5) { animation-delay: 0.25s; }
.juego-card:nth-child(6) { animation-delay: 0.3s; }
.juego-card:nth-child(7) { animation-delay: 0.35s; }
.juego-card:nth-child(8) { animation-delay: 0.4s; }

/* Barra decorativa */
.juego-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: 1;
}

/* Hover */
.juego-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.juego-card:hover::before {
  transform: scaleX(1);
}

/* Efecto shimmer */
.juego-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.juego-card:hover::after {
  left: 100%;
}

/* Imagen del juego */
.juego-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--bg-alt);
}

.juego-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.juego-card:hover .juego-image img {
  transform: scale(1.05);
}

/* Contenido */
.juego-content {
  padding: 1.5rem;
}

.juego-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  transition: color var(--transition-fast);
}

.juego-card:hover .juego-content h3 {
  color: var(--primary);
}

.juego-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* =============================================================================
SECCIÓN 7: ICONO DE JUEGO
================================================================================
Iconos grandes para juegos sin imagen.
*/

/* Icono del juego */
.juego-icono {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

/* Colores variados para cada tarjeta */
.juego-card-wrapper:nth-child(8n + 1) .juego-icono {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.juego-card-wrapper:nth-child(8n + 2) .juego-icono {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.juego-card-wrapper:nth-child(8n + 3) .juego-icono {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.juego-card-wrapper:nth-child(8n + 4) .juego-icono {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.juego-card-wrapper:nth-child(8n + 5) .juego-icono {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.juego-card-wrapper:nth-child(8n + 6) .juego-icono {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}
.juego-card-wrapper:nth-child(8n + 7) .juego-icono {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}
.juego-card-wrapper:nth-child(8n + 8) .juego-icono {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* Wrapper para botón de favorito */
.juego-card-wrapper {
  position: relative;
}

/* Focus visible */
.juego-card:focus {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* =============================================================================
SECCIÓN 8: ANIMACIONES
================================================================================
Keyframes.
*/

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float3D {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
  }
  50% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
  }
  75% {
    transform: translateY(-4px) rotateX(-2deg) rotateY(-2deg);
  }
}

/* =============================================================================
SECCIÓN 9: RESPONSIVE
================================================================================
Ajustes para móviles.
*/

@media (max-width: 1024px) {
  .juegos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .jovenes-hero {
    padding: 4rem 0 6rem;
  }

  .jovenes-hero h1 {
    font-size: 2rem;
  }

  .jovenes-hero-subtitle {
    font-size: 1rem;
  }

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

  .juego-icono {
    height: 120px;
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .juegos-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
SECCIÓN 10: PREFERENCIAS DE USUARIO
================================================================================
Soporte prefers-reduced-motion.
*/

@media (prefers-reduced-motion: reduce) {
  .juego-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .jovenes-hero-bg {
    animation: none;
  }
  .juego-card::after {
    display: none;
  }
}

