/* --- CONFIGURACIÓN BASE Y BODY --- */
* {
  box-sizing: border-box;
}

:root {
  --bg-dark-blue: #0b111e;
  --panel-gray: #1a2233;
  --border-gray: #2d3748;
  --accent-red: #0066ff;
  --accent-red-glow: rgba(0, 60, 255, 0.6);
  --text-white: #0883ff;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-image: url("../imagenes/fondo2.png");    
  background-size: cover;        
  background-position: center;   
  background-repeat: no-repeat;  
  background-attachment: fixed;  
  color: #ffffff;
}

/* --- ESTILOS ENCABEZADO PRINCIPAL --- */
.site-header {
  width: 100%;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-bar {
  border-bottom: 1px solid #eaeaea;
  padding: 6px 0;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar-content {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #222222;
}

.phone-info strong {
  font-weight: 780;
  letter-spacing: 0.5px;
  color: #2c2c2c;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #2c2c2c;
  transition: color 0.3s ease;
}

.social-label {
  font-weight: 780;
  letter-spacing: 0.5px;
  color: #2c2c2c;
}

.social-links a {
  color: #222222;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.social-links a:hover {
  color: #00bacf;
}

.main-header {
  padding: 15px 0;
  border-bottom: 1px solid #eaeaea;
}

.main-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 85px;
  width: auto;
  display: block;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  color: #2c2c2c;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.7px;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #00bacf;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.icon-btn:hover {
  color: #00bacf;
}

.main-content {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* --- SECCIÓN DE MÓDULOS / GALERÍA SCRATCH --- */
.features-section {
  padding: 70px 20px;
  background: rgba(11, 17, 30, 0.88);
  min-height: calc(100vh - 200px);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

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

/* TARJETAS DE SCRATCH */
.scratch-card {
  background: var(--panel-gray);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.scratch-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 102, 255, 0.3);
}

.scratch-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.badge-curso {
  background: rgba(0, 102, 255, 0.2);
  border: 1px solid var(--accent-red);
  color: #539eff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
}

.badge-software {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a0aec0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

.scratch-image-box {
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.scratch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.scratch-card:hover .scratch-img {
  transform: scale(1.04);
}

.scratch-card-body {
  flex-grow: 1;
}

.game-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 10px 0;
}

.game-authors {
  color: #a0aec0;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0 0 20px 0;
}

.game-authors strong {
  color: #cbd5e0;
}

.scratch-card-footer {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-play {
  flex-grow: 1;
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-red-glow);
  transition: all 0.3s ease;
}

.btn-play:hover {
  background: #0052cc;
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--accent-red);
}

.btn-external {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid var(--border-gray);
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  transition: all 0.3s ease;
}

.btn-external:hover {
  border-color: var(--accent-red);
  color: var(--text-white);
  background: rgba(0, 102, 255, 0.1);
}

/* --- PANEL MODAL FLOTANTE --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}



.modal-header {
  padding: 15px 20px;
  background: rgba(11, 17, 30, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gray);
  flex-shrink: 0; /* Asegura que el header no se reduzca de tamaño */
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #ff4d4d;
}






.modal-content {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100dvh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body {
  padding: 0;
  display: block;
  flex-grow: 0;
  background: #000;
}

.game-wrap {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.game-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 600px;
  max-width: none;
  border: none;
  border-radius: 0;
  transform-origin: top left;
}

.game-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: #0b111e;
}

.btn-bar {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 25px;
  background: var(--bg-dark-blue);
  border-top: 1px solid var(--border-gray);
  color: #718096;
  font-size: 0.9rem;
}

/* --- ADAPTABILIDAD RESPONSIVE --- */
@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  

  .nav-menu {
    display: none; /* Se oculta para móviles o requiere menú hamburguesa */
  }
}

