/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #0d0d0d;
  color: #f0f0f0;
  line-height: 1.6;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.site-header .logo a {
  text-decoration: none;
  font-size: 1.5rem;
  color: #f0f0f0;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  text-decoration: none;
  color: #f0f0f0;
  transition: color 0.3s ease;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a:hover {
  color: #ffd900dc;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffd700;
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ───────── Hero (fondo a todo ancho) ───────── */
.hero-section{
  position: relative;
  /* ‼️ quita el flex: el ancho vuelve a ser 100 % automáticamente */
  /* display:flex;           ←  bórralo o coméntalo */
  min-height: 40vh;

  background: url("assets/fondo.png") center/cover no-repeat;
}

/* Contenedor interno: centrado vertical y horizontal */
.hero-section > .container{
  display:flex;
  flex-direction:column;
  align-items:center;     /* centra en eje X  */
  justify-content:center; /* centra en eje Y  */
  min-height: inherit;    /* ocupa toda la altura del hero */
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #cccccc;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #ffd900d2, #ffed4ec7);
  color: #0d0d0d;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Sección Intro: imagen + texto */
.intro-section{
  background:#1b1b1b;      /* mismo tono que el resto */
  padding:4rem 0;
}

.intro-wrapper{
  display:flex;
  align-items:center;
  gap:3rem;                /* espacio entre imagen y texto */
}

/* ---- Bloque imagen ---- */
.intro-img{
  flex: 0 0 280px;   /* <— 1️⃣ CAMBIA aquí: ancho fijo de la columna   */
}
.intro-img img{
  width: 100%;       /* la foto llena su columna */
  height: auto;
  border-radius: 12px;
}

/* ---- Bloque texto ---- */
.intro-copy{
  flex:1;                  /* toma el espacio restante */
  color:#cccccc;
}
.intro-copy h2{
  color:#ffffff;
  font-size:2.2rem;
  margin-bottom:1rem;
  font-weight:700;
}
.intro-copy p{
  line-height:1.6;
  font-size:1.15rem;
}

/* --- Responsivo: apilar en móvil --- */
@media (max-width:768px){
  .intro-wrapper{
    flex-direction:column; /* imagen arriba, texto abajo */
    text-align:center;
  }
  .intro-img img{
    max-width:100px;       /* ← nuevo límite para móviles */
  }
}


/* Contenedor General */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

/* Secciones de Contenido */
.features-section, .about-section, .contact-section {
  background-color: #1a1a1a;
  padding: 4rem 0;
}

.features-section h2,
.about-section h2,
.contact-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.feature {
  background: #262626;
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid #333;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: #ffd700;
}

.feature h3 {
  margin-bottom: 1rem;
  color: #ffd700;
  font-size: 1.5rem;
}

/* Formulario de Contacto */
.contact-text {
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.1rem;
  color: #cccccc;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #333;
  border-radius: 8px;
  background: #262626;
  color: #f0f0f0;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ffd700;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #0d0d0d;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* Footer */
.site-footer {
  background: #0d0d0d;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Animación de aparición */
.feature, .hero-content, .about-section, .contact-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature.visible, .hero-content.visible, .about-section.visible, .contact-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Serious Games Section */
.serious-games .card-container {
  display: flex;
  gap: 1rem;
  height: 400px;
  margin-top: 2rem;
  overflow: hidden;
}

.serious-games .card {
  flex: 1;
  background: linear-gradient(135deg, #3d4344 0%, #4a5253 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f0f0;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.serious-games .card:hover {
  flex: 3;
  background: linear-gradient(135deg, #0cab33 0%, #0ea5b8 100%);
  transform: scale(1.02);
  text-decoration: none;
  color: #f0f0f0;
}

/* Scroll to Top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #0d0d0d;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

#scrollTopBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icons a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f0f0;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-icons a:hover {
  background: #ffd700;
  color: #0d0d0d;
  transform: translateY(-2px);
}

/* Game Page Styles */
.game-hero {
  min-height: 60vh;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  position: relative;
}

.game-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 13, 0.3);
}

.game-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.game-hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #cccccc;
}

.game-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.play-button, .demo-button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.play-button {
  background: linear-gradient(45deg, #ffd900d2, #ffed4ec7);
  color: #0d0d0d;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.demo-button {
  background: transparent;
  color: #f0f0f0;
  border: 2px solid #f0f0f0;
}

.demo-button:hover {
  background: #f0f0f0;
  color: #0d0d0d;
  transform: translateY(-2px);
}

/* Game Info Section */
.game-info {
  background-color: #1a1a1a;
  padding: 4rem 0;
}

.game-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.game-description h2 {
  margin-bottom: 1.5rem;
  color: #ffd700;
  font-size: 2rem;
}

.game-description p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #cccccc;
}

.game-features h3 {
  margin-bottom: 1rem;
  color: #ffd700;
  font-size: 1.5rem;
}

.game-features ul {
  list-style: none;
  padding: 0;
}

.game-features li {
  padding: 0.5rem 0;
  color: #cccccc;
  position: relative;
  padding-left: 1.5rem;
}

.game-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #ffd700;
  font-weight: bold;
}

/* Game Gallery */
.game-gallery {
  background-color: #0d0d0d;
  padding: 4rem 0;
}

.game-gallery h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #ffd700;
  font-size: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  background: #262626;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.image-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #3d4344 0%, #4a5253 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f0f0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Game Tech Section */
.game-tech {
  background-color: #1a1a1a;
  padding: 4rem 0;
}

.game-tech h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #ffd700;
  font-size: 2.5rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.tech-item {
  background: #262626;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #333;
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: #ffd700;
  transform: translateY(-2px);
}

.tech-item h4 {
  color: #ffd700;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.tech-item p {
  color: #cccccc;
  font-size: 1rem;
}

/* Media Queries for Responsive Design */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-content p {
    font-size: 1.2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .serious-games .card-container {
    height: 350px;
  }

  .game-hero-content h1 {
    font-size: 3rem;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    padding: 1rem;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
  }

  .main-nav li {
    margin: 0;
    border-bottom: 1px solid #333;
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: block;
  }

  /* Hero section adjustments */
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  /* Container adjustments */
  .container {
    width: 95%;
    padding: 2rem 0;
  }
  
  /* Features grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }
  
  .feature {
    padding: 1.5rem;
  }
  
  /* Serious games */
  .serious-games .card-container {
    flex-direction: column;
    height: auto;
    gap: 1rem;
  }
  
  .serious-games .card {
    height: 80px;
    flex: none;
  }
  
  .serious-games .card:hover {
    flex: none;
    height: 120px;
  }
  
  /* Contact form */
  .contact-form {
    padding: 0 1rem;
  }
  
  /* Footer */
  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
  
  /* Scroll to top button */
  #scrollTopBtn {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  /* Game page mobile adjustments */
  .game-hero-content h1 {
    font-size: 2.5rem;
  }

  .game-subtitle {
    font-size: 1.1rem;
  }

  .game-actions {
    flex-direction: column;
    align-items: center;
  }

  .play-button, .demo-button {
    width: 100%;
    max-width: 250px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

/* Small mobile devices */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .features-section h2,
  .about-section h2,
  .contact-section h2 {
    font-size: 2rem;
  }
  
  .container {
    width: 100%;
    padding: 1.5rem 1rem;
  }
  
  .feature {
    padding: 1rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 0.8rem;
  }
  
  .contact-form button {
    padding: 0.8rem 1.5rem;
  }
  
  .site-footer {
    padding: 1.5rem 1rem;
  }
  
  .social-icons a {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  /* Game page small mobile adjustments */
  .game-hero-content h1 {
    font-size: 2rem;
  }

  .game-subtitle {
    font-size: 1rem;
  }

  .game-description h2,
  .game-gallery h2,
  .game-tech h2 {
    font-size: 2rem;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .tech-item {
    padding: 1.5rem;
  }
}