/* ========================================
   1. ESTILOS GENERALES
======================================== */

body {
  margin: 0;
  background: #f5f5f5;
  font-family: 'Poppins', sans-serif;
}

/* ========================================
   2. TIPOGRAFÍA
======================================== */

/* Títulos principales con más personalidad */
h1,
h2,
.header-center {
  font-family: 'Fredoka', sans-serif;
}

/* Títulos de sección */
h2 {
  margin-top: 35px;
  margin-bottom: 15px;
  text-align: center;
}

/* ========================================
   3. ESTRUCTURA GENERAL
======================================== */

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* ========================================
   4. CABECERA
======================================== */

.header {
  padding: 14px 20px;
  background: linear-gradient(180deg, #f78c8c 0%, #f78c8c 100%);
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.18);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.home-button {
  background: #FFD93D;
  color: #333;
  padding: 8px 14px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  font-family: 'Fredoka', sans-serif;
  box-shadow: 0 4px 0 #e6c12f;
  transition: all 0.15s ease;
}

.back-container {
  margin: 20px auto;
  max-width: 1100px;
}

.back-button {
  text-decoration: none;
  background: #FFD93D;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  color: #333;
  display: inline-block;
  box-shadow: 0 3px 0 #e6c12f;
}

.home-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #e6c12f;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #e6c12f;
}

/* =========================
   IMÁGENES LADO IZQUIERDO Y DERECHO
========================= */

.header-badge,
.header-character {
  height: 90px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.header-badge:hover,
.header-character:hover {
  transform: scale(1.06);
}

/* =========================
   BLOQUE CENTRAL
========================= */

.header-center {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.header-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 50px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.header-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  opacity: 0.95;
}

/* ========================================
   5. SECCIÓN NOVEDADES
======================================== */

/* =========================
   Tarjetas específicas
========================= */

.card.updated {
  background: #AD46FF;
  color: white;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-column: span 1;
  padding: 20px;
  padding-top: 20px;
}

.card.novedades {
  background: #FCCEE8;
  color: white;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 🔥 clave */
  align-items: center;
  padding: 20px;
  gap: 10px; /* 🔥 más compacto */
}

.novedades-title {
  width: 100%;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  color: white;
  margin: 0;          /* 🔥 elimina espacio fantasma */
  margin-bottom: 10px; /* controla separación real */
}

.mini-cards-container {
  display: flex;
  gap: 20px; /* Espacio entre tarjetas */
  justify-content: space-between; /* Alineación de las tarjetas */
  flex-wrap: wrap; /* Para que las tarjetas se acomoden en múltiples filas */
  width: 100%;
}

.mini-card {
  background-color: transparent;
}

.mini-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.mini-card p {
  font-size: 14px;
  color: #555;
}

.mini-card:hover {
  background-color: #FCCEE8;
  transform: scale(1.2);
  cursor: pointer;
}

/* ========================================
   6. TARJETAS GENERALES
======================================== */

.card {
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);

  text-align: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: scale(1.05);
}

/* Variantes de color para tarjetas */
.primary {
  background: #4caf50;
  color: white;
}

.secondary {
  background: #2196f3;
  color: white;
}

.tertiary {
  background: #FE9A37;
  color: black;
}

/* ========================================
   7. TARJETAS DE CURSO
======================================== */

.course-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Imagen principal del curso */
.course-image {
  width: 150px;
  height: auto;
  display: block;
  margin-bottom: 18px;
}


/* ========================================
   IDENTIFICACIÓN VISUAL DEL CURSO
   NUEVO: monstruo + imagen del nivel
======================================== */

/*
  Agrupa horizontalmente la imagen principal del topic
  y la imagen que indica el curso: 1.º, 2.º, 3.º, etc.
  
  Esta clase es nueva y solo afectará a los elementos
  que tengan expresamente class="course-identification".
*/
.course-identification {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

/*
  Elimina únicamente dentro de este nuevo bloque
  el margen inferior que ya tiene .course-image.
  
  No modifica el comportamiento de .course-image
  en ninguna otra página de la plataforma.
*/
.course-identification .course-image {
  margin-bottom: 0;
}

/*
  Imagen específica para indicar el nivel educativo.
  Por ejemplo: Primero, Segundo o Tercero de Primaria.
  
  Su tamaño es independiente del monstruo.
*/
.course-grade-image {
  width: 110px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* Título dentro de la tarjeta de curso */
.course-card h3 {
  margin: 0 0 18px 0;
  font-size: 22px;
  text-align: center;
}

/* ========================================
   8. TARJETAS DE ACCESOS RÁPIDOS
======================================== */

.small-card {
  /* Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* Estética */
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);

  /* Texto */
  text-align: center;
  font-size: 16px;

  /* Interacción */
  cursor: pointer;
  transition: transform 0.2s ease;
}

.small-card:hover {
  transform: scale(1.03);
}

.small-card-updated:hover {
  transform: scale(1.03);
}

/* =========================
   ICONO PRINCIPAL (IMAGEN)
   ========================= */

.access-icon {
  width: 80px;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

/* =========================
   TEXTO DE ACCESO
   ========================= */

.access-text {
  font-weight: bold;
}

/* ========================================
   10. RESPONSIVE
======================================== */

@media (max-width: 768px) {
  /* =========================
     CABECERA @media (max-width: 768px)
  ========================= */

  .header {
    padding: 12px 12px;
  }

  .header-inner {
    max-width: 100%;
    gap: 10px;
  }

  .header-badge {
    height: 44px;
  }

  .header-character {
    height: 46px;
  }

  .header-title {
    font-size: 22px;
  }

  .header-subtitle {
    font-size: 13px;
  }

  /* =========================
     NOVEDADES @media (max-width: 768px)
  ========================= */

}

@media (max-width: 560px) {
  /* =========================
     CABECERA @media (max-width: 560px) 
  ========================= */

  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .header-left,
  .header-right {
    gap: 2px;
  }

  .header-badge {
    height: 40px;
  }

  .header-character {
    height: 42px;
  }

  .header-title {
    font-size: 18px;
  }

  .header-subtitle {
    font-size: 12px;
  }

}

/* ========================================
   11. CURSOR NOT ALLOWED PARA TARJETAS BLOQUEADAS
======================================== */

.opacity-not-allowed{
  opacity:30%; 
  cursor: not-allowed;
}