/* ── Tokens inline (por si tokens.css no está cargado globalmente) ── */

/* ── HERO ────────────────────────────────────────────────── */
.nem-hero {
  background: linear-gradient(135deg, #3d0b20 0%, #611232 30%, #9b2247 70%, #1e5b4f 100%);
  color: #fff;
  overflow: hidden;
}

.nem-hero-topbar {
  height: 4px;
  background: linear-gradient(90deg, #a57f2c 0%, #e6d194 50%, #a57f2c 100%);
}

.nem-hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 3.5rem 0;
}

.nem-hero-content {
  flex: 1;
  min-width: 0;
}

.nem-hero-logo {
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.nem-hero-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.nem-hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
  max-width: 480px;
}

.nem-hero-cta {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #9b2247;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.75rem;
  border-radius: 50rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.nem-hero-cta:hover {
  background: #f2d4dd;
  color: #611232;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.nem-hero-image {
  flex: 0 0 380px;
  max-width: 380px;
}

.nem-hero-image img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

@media (max-width: 767.98px) {
  .nem-hero-inner { flex-direction: column; padding: 2rem 0; gap: 1.5rem; text-align: center; }
  .nem-hero-title { font-size: 1.6rem; }
  .nem-hero-desc { margin-left: auto; margin-right: auto; }
  .nem-hero-image { flex: none; max-width: 280px; }
}

/* ── Títulos de sección compartidos ────────────────────── */
.nem-section-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #161a1d;
  margin-bottom: 0.25rem !important;
  text-transform: none !important;
  position: relative;
}

/* Anular el underline dorado de .sec-title h3::after en style.css */
.nem-section-title::after {
  display: none !important;
}

.nem-section-subtitle {
  font-size: 0.9rem;
  color: #98989a;
  margin-bottom: 0;
}

/* ── BUSCADOR ────────────────────────────────────────────── */
.nem-buscar-section {
  padding: 3rem 0 2.5rem;
  background: #f5f5f5;
  border-top: 1px solid #e8e8e9;
}

.nem-buscar-header { margin-bottom: 1.5rem; }

.nem-buscar-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3em 0.75em;
  border-radius: 50rem;
  background: #f2d4dd;
  color: #9b2247;
  margin-bottom: 0.75rem;
}

.nem-buscar-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #161a1d;
  margin-bottom: 0.25rem;
}

.nem-buscar-subtitle {
  font-size: 0.9rem;
  color: #98989a;
  margin-bottom: 0;
}

.nem-buscar-bar { max-width: 640px; }

.nem-buscar-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e8e8e9;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(22,26,29,0.08);
}

.nem-buscar-input-wrap:focus-within {
  border-color: #9b2247;
  box-shadow: 0 0 0 3px rgba(155,34,71,0.12);
}

.nem-buscar-icon {
  padding-left: 0.875rem;
  color: #c4c4c5;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nem-buscar-input-wrap:focus-within .nem-buscar-icon {
  color: #9b2247;
}

.nem-buscar-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 0.75rem;
  color: #161a1d;
  min-width: 0;
}

.nem-buscar-input::placeholder { color: #c4c4c5; }

.nem-buscar-btn {
  background: linear-gradient(135deg, #9b2247 0%, #611232 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.7rem 1.25rem;
  white-space: nowrap;
  transition: background 0.2s;
  border-radius: 0;
}

.nem-buscar-btn:hover {
  background: linear-gradient(135deg, #611232 0%, #3d0b20 100%);
  color: #fff;
}

.nem-buscar-hint {
  font-size: 0.78rem;
  color: #98989a;
  margin-top: 0.4rem;
  margin-left: 0.25rem;
}

.nem-buscar-status { color: #5c6166; font-size: 0.875rem; }

.nem-buscar-error {
  background: #fff3e0;
  border-left: 4px solid #a57f2c;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #5c6166;
}

.nem-buscar-results-info {
  font-size: 0.8rem;
  color: #98989a;
  font-weight: 500;
}

/* Grid de resultados (misma lógica, tokens NEM) */
.nem-buscar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-top: .5rem;
}

.nem-rec-card {
  background: #fff;
  border: 1px solid #e8e8e9;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.nem-rec-card:hover {
  box-shadow: 0 4px 16px rgba(155,34,71,.12);
  transform: translateY(-3px);
  text-decoration: none;
}
.nem-rec-card__cover {
  width: 100%; height: 120px; object-fit: cover; background: #f5f5f5;
}
.nem-rec-card__cover-ph {
  width: 100%; height: 120px;
  background: linear-gradient(135deg, #f2d4dd, #f5ecd0);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
}
.nem-rec-card__body {
  padding: .65rem .8rem; flex: 1;
  display: flex; flex-direction: column; gap: .25rem;
}
.nem-rec-card__badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: .15rem .45rem;
  border-radius: 4px; display: inline-block; width: fit-content;
}
.nem-rec-card__badge.coleccion { background: #f2d4dd; color: #9b2247; }
.nem-rec-card__badge.recurso   { background: #d4ece7; color: #1e5b4f; }
.nem-rec-card__nombre {
  font-size: .88rem; font-weight: 600; color: #161a1d; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.nem-rec-card__tipo { font-size: .75rem; color: #98989a; }
.nem-rec-card__actions {
  padding: .5rem .8rem; border-top: 1px solid #e8e8e9;
  display: flex; gap: .4rem; align-items: center;
}
.nem-rec-card__actions .btn { font-size: .78rem; padding: .25rem .6rem; }

/* Paginación NEM */
#nem-search-pagination .btn-primary {
  background: #9b2247; border-color: #9b2247;
}
#nem-search-pagination .btn-outline-primary {
  color: #9b2247; border-color: #9b2247;
}
#nem-search-pagination .btn-outline-primary:hover {
  background: #9b2247; color: #fff;
}

/* ── INTERESES ───────────────────────────────────────────── */
.nem-intereses-section {
  padding: 3rem 0;
  background: #fff;
}

.nem-interes-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e8e8e9;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.nem-interes-card:hover {
  box-shadow: 0 4px 16px rgba(22,26,29,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.nem-interes-cover {
  height: 180px;
  overflow: hidden;
}

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

.nem-interes-card:hover .nem-interes-cover img {
  transform: scale(1.04);
}

.nem-interes-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d4ece7, #f2d4dd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #98989a;
}

.nem-interes-body {
  padding: 1rem;
}

.nem-interes-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #161a1d;
  margin-bottom: 0.2rem;
}

.nem-interes-meta {
  font-size: 0.78rem;
  color: #98989a;
}

/* ── EXPLORA POR NIVEL ───────────────────────────────────── */
.nem-explore-section {
  padding: 3rem 0;
  background: #faf5e4;
}

/* Reset: anular estilos legacy de .explore-section en style.css */
.nem-explore-section .nem-nivel-card {
  display: block;
  text-decoration: none !important;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  border: none !important;
  background: transparent !important;
  box-shadow: none;
}

.nem-explore-section .nem-nivel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(22,26,29,0.18);
  text-decoration: none !important;
}

.nem-explore-section .nem-nivel-cover {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #c4c4c5;
  display: flex;
  align-items: flex-end;
  border-radius: 0.75rem;
  overflow: hidden;
}

.nem-explore-section .nem-nivel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(61,11,32,0.75) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.nem-explore-section .nem-nivel-name {
  position: relative;
  z-index: 1;
  color: #fff !important;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 1rem;
  margin: 0 !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  text-transform: none !important;
  text-align: center;
  width: 100%;
  text-decoration: none !important;
  border: none !important;
}

/* Anular el ::after underline de .sec-title h3 legacy */
.nem-explore-section .nem-section-title {
  position: relative;
  margin-bottom: 0.25rem !important;
}
.nem-explore-section .nem-section-title::after {
  display: none !important;
}

/* ── SITIOS DE INTERÉS ───────────────────────────────────── */
.nem-sitios-section {
  padding: 3rem 0;
  background: #fff;
  border-top: 1px solid #e8e8e9;
}

.nem-sitios-swiper .swiper-slide {
  width: auto;
}

.nem-sitio-card {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.2s;
}

.nem-sitio-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
}

.nem-sitio-img-wrap {
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(22,26,29,0.12);
  margin-bottom: 0.75rem;
}

.nem-sitio-img-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.3s;
}

.nem-sitio-card:hover .nem-sitio-img-wrap img {
  transform: scale(1.03);
}

.nem-sitio-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #161a1d;
  padding: 0 0.5rem;
  line-height: 1.3;
}

/* ── QUIZ CTA ────────────────────────────────────────────── */
.nem-quiz-cta-section {
  padding: 2rem 0;
  background: #0e0e12;
}

.nem-quiz-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 2.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(232,168,124,0.06) 0%, rgba(126,184,212,0.06) 100%);
  border: 1px solid rgba(255,255,255,0.07);
}

.nem-quiz-cta-content { flex: 1; }

.nem-quiz-cta-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #f0ede8;
  margin-bottom: 0.35rem !important;
}

.nem-quiz-cta-title::after { display: none !important; }

.nem-quiz-cta-desc {
  font-size: 0.85rem;
  color: #7a7888;
  margin-bottom: 1rem;
}

.nem-quiz-cta-btn {
  display: inline-flex;
  align-items: center;
  background: #e8a87c;
  color: #1a0f06;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 50rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nem-quiz-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,168,124,0.25);
  color: #1a0f06;
  text-decoration: none;
}

.nem-quiz-cta-chips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nem-quiz-chip {
  padding: 0.3rem 0.8rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .nem-quiz-cta { flex-direction: column; text-align: center; padding: 1.5rem; }
  .nem-quiz-cta-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* ── CIFRAS ──────────────────────────────────────────────── */
.nem-stats-section {
  background: #fff;
  padding: 2rem 0;
  border-top: 1px solid #e8e8e9;
}

.nem-stats-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nem-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
}

.nem-stat-number {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #9b2247;
  line-height: 1.2;
}

.nem-stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #98989a;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nem-stat-divider {
  width: 1px;
  height: 40px;
  background: #e8e8e9;
}

@media (max-width: 575.98px) {
  .nem-stats-grid { gap: 1rem; }
  .nem-stat-number { font-size: 1.35rem; }
  .nem-stat { min-width: 80px; }
  .nem-stat-divider { display: none; }
}

/* ── HERRAMIENTAS ────────────────────────────────────────── */
.nem-tools-section {
  padding: 3rem 0;
  background: #f5f5f5;
}

.nem-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #e8e8e9;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nem-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(22,26,29,0.12);
  text-decoration: none !important;
  color: inherit;
}

.nem-tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.nem-tool-name {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #161a1d;
  margin-bottom: 0.35rem !important;
}

.nem-tool-desc {
  font-size: 0.78rem;
  color: #98989a;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ── ACCESO RÁPIDO ───────────────────────────────────────── */
.nem-quick-section {
  padding: 2rem 0;
  background: #fff;
  border-bottom: 1px solid #e8e8e9;
}

.nem-quick-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nem-quick-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f5f5f5;
  border: 1.5px solid #e8e8e9;
  border-radius: 50rem;
  padding: 0.5rem 1.25rem;
  text-decoration: none !important;
  color: #161a1d;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.nem-quick-item i {
  color: #9b2247;
  font-size: 0.85rem;
}

.nem-quick-item:hover {
  background: #f2d4dd;
  border-color: #d9899f;
  color: #9b2247;
  text-decoration: none !important;
  transform: translateY(-1px);
}
