/* ==========================================
   overrides_encuesta.css
   Selección de encuestas (fusionado con estilo Codex)
   Compatible con layout.css y estructura actual
   Proyecto: SIMPINNA Tecate
   ========================================== */

/* === Paleta local y sombras (solo para esta vista) === */
:root {
  --cream: #FDFCF7;
  --burgundy: #7A1E2C;
  --gold: #D4B056;
  --text-dark: #3A2A25;
  --card-shadow: 0 12px 28px rgba(122, 30, 44, 0.12);
}

/* === Estructura base / altura completa === */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Montserrat', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  background: white;
  color: var(--text-dark);
}

footer { flex-shrink: 0; }

/* =================================================================
   Compatibilidad con tu estructura previa (.container.escolaridad)
   y con la nueva (.survey-selection / __wrapper)
   ================================================================= */

/* Contenedor principal (versión nueva) */
.survey-selection {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column; /* AGREGADO: Para apilar texto y caja verticalmente */
  align-items: center;    /* Centra todo horizontalmente */
  justify-content: center; /* Centra todo verticalmente si hay espacio */
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
  gap: 2rem; /* AGREGADO: Espacio entre el texto y la tarjeta */
  
}

/* Contenedor principal (versión previa) */
.container.escolaridad {
  flex: 1 0 auto;
  padding: 2rem 5rem 10vh !important;

}

/* Wrapper visual (tarjeta grande) */
.survey-selection__wrapper {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  background: #fbf8eb; /* Color crema */
  border-radius: 28px;
  box-shadow: 0 20px 48px rgba(58, 42, 37, 0.1);
  padding: clamp(2rem, 4vw, 3rem);
  backdrop-filter: blur(2px);
 border-top: 0.5rem solid var(--burgundy); 
 
}

/* Encabezados locales de la vista */
.survey-selection__header {
  text-align: center;
  max-width: 800px; /* Limitamos el ancho para lectura cómoda */
  margin-bottom: 0; /* Quitamos margen extra porque usamos 'gap' arriba */
  padding: 0 1rem;
}

.survey-selection__header .title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--burgundy);
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.survey-selection__header .subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dark);
  margin: 0.75rem 0 0;
  opacity: 0.85;
}

/* =================================================================
   Tipografía y bloques heredados (scoped para no afectar otras vistas)
   ================================================================= */

.container.escolaridad h3,
.survey-selection h3 {
  color: var(--burgundy);
  text-align: center;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.container.escolaridad h6,
.survey-selection h6 {
  color: var(--text-dark);
  text-align: center;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

.subtitle { padding-bottom: 3.5rem; }

.strip {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  min-height: auto !important;
  color: var(--burgundy);
  text-align: center;
  border-radius: 0.6rem;
}

/* =================================================================
   Cuadrícula y tarjetas (fusionado con estilo Codex)
   ================================================================= */

.grade-grid {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  justify-content: center;
  align-items: start;
  justify-items: center;
  padding-bottom: 5vh;
}

.grade-item {
  background: white;
  border-radius: 24px;
  border: 3px solid;
  box-shadow: var(--card-shadow);
  width: 20rem;
  padding: 2.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Halo dorado decorativo (Codex) */
.grade-item::before {
  content: "";
  position: absolute;
  inset: -60% auto auto -60%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at center, rgba(212, 176, 86, 0.4), transparent 70%);
  transform: rotate(12deg);
  z-index: 0;
}

.grade-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(122, 30, 44, 0.18);
}

/* Bordes específicos por nivel educativo */
.grade-item.preescolar {
  border-color: #7acb55;
}

.grade-item.primaria {
  border-color: #4385f4;
}

.grade-item.secundaria {
  border-color: #e04e4e;
}

.grade-item.preparatoria {
  border-color: #c7479c;
}

/* Imágenes y títulos dentro de tarjeta */
.grade-item img {
  width: 110px;
  height: auto;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
}

.grade-item h3 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--burgundy);
  position: relative;
  z-index: 1;
}

/* =================================================================
   Botones con colores originales por nivel + efecto shimmer
   ================================================================= */

.btn-nivel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 10rem;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Efecto shimmer unificado */
.btn-nivel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn-nivel:hover::before {
  left: 100%;
}

.btn-nivel::after {
  content: '\2192';
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-nivel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.btn-nivel:focus { 
  text-decoration: none;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.btn-nivel:hover::after { 
  transform: translateX(6px); 
}

/* Colores específicos por nivel educativo */
.nivel--green {
  background: #7acb55;
}

.nivel--green:hover {
  background: #fff;
  color: #7acb55;
  box-shadow: 0 12px 24px rgba(122, 203, 85, 0.3);
  border: 2px solid #7acb55;
}

.nivel--blue {
  background: #4385f4;
}

.nivel--blue:hover {
  background: #fff;
  color: #4385f4;
  box-shadow: 0 12px 24px rgba(67, 133, 244, 0.3);
  border: 2px solid #4385f4;
}

.nivel--red {
  background: #e04e4e;
}

.nivel--red:hover {
  background: #fff;
  color: #e04e4e;
  box-shadow: 0 12px 24px rgba(224, 78, 78, 0.3);
  border: 2px solid #e04e4e;
}

.nivel--magenta {
  background: #c7479c;
}

.nivel--magenta:hover {
  background: #fff;
  color: #c7479c;
  box-shadow: 0 12px 24px rgba(199, 71, 156, 0.3);
  border: 2px solid #c7479c;
}
/* =======================================================
   AÑADIR AL FINAL DE: overrides_encuesta.css
   Estilos para los nuevos íconos SVG (reemplazo de img)
   ======================================================= */

/* 1. Ocultamos img por seguridad si quedara alguna, 
      aunque ya las quitamos del HTML */
.grade-item img {
    display: none;
}

/* 2. Configuración del SVG */
.level-icon {
    width: 100px;            /* Tamaño similar al de las imágenes anteriores */
    height: 100px;
    margin: 0 auto 1.5rem;   /* Espaciado inferior hacia el título */
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Esto permite que el SVG herede el color definido abajo */
    fill: currentColor; 
}

/* 3. Asignar colores de tu paleta a los íconos
   Usamos los mismos códigos HEX que tus botones y bordes */

.grade-item.preescolar .level-icon {
    color: #7acb55; /* Verde */
}

.grade-item.primaria .level-icon {
    color: #4385f4; /* Azul */
}

.grade-item.secundaria .level-icon {
    color: #e04e4e; /* Rojo */
}

.grade-item.preparatoria .level-icon {
    color: #c7479c; /* Magenta */
}


/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 768px) {
  .survey-selection { 
    padding: 2rem 1rem; 
  }

  .survey-selection__wrapper {
    padding: 2rem 1.5rem;
  }

  .container.escolaridad {
    padding: 2rem 2rem 8vh !important;
  }

  .grade-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
  }

  .grade-item {
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .grade-item img { 
    width: 90px; 
  }
  
  .grade-item h3 { 
    font-size: 1.5rem; 
  }

  .btn-nivel {
    width: 100%;
    font-size: 1.05rem;
    min-width: 8rem;
  }
}

@media (max-width: 480px) {
  .survey-selection__wrapper { 
    background: rgba(255, 255, 255, 0.82); 
  }

  .grade-item {
    padding: 1.75rem 1.25rem;
  }

  .btn-nivel {
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
  }
}