/* ==========================================
   BADGES.CSS - PÁGINA DE INSIGNIAS
   (sin cambios de contenido, sólo de ubicación:
   antes se cargaba globalmente vía main.css,
   ahora sólo la carga badge-page.njk vía
   front-matter `styles:`)
   ========================================= */

.badge-hero {
  position: relative;
  min-height: 320px;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.badge-hero-image {
  position: absolute;
  inset: 0;
}
.badge-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--badge-hero-gradient, linear-gradient(
    to right,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.35) 35%,
    rgba(0,0,0,.10) 70%,
    rgba(0,0,0,0) 100%
  ));
}
.badge-hero-content {
  position: relative;
  z-index: 2;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  padding: 3rem 3rem 2.5rem 3rem;
  max-width: 650px;
}
.badge-hero-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.badge-hero-header h1 {
  margin: 0;
}
.badge-hero-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.5));
}
.badge-hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  color: forestgreen;
  text-shadow:
    0 2px 4px rgba(0,0,0,.8),
    0 4px 12px rgba(0,0,0,.7),
    0 0 24px rgba(0,0,0,.6);
  margin: 0;
}
.badge-tagline {
  font-size: 1.15rem;
  opacity: 0.95;
  max-width: 65ch;
}
.badge-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.badge-hero-stats span {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
  color: white;
  font-weight: 700;
  padding: 0.6rem 0.9rem;
}

.badge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}
.badge-main {
  min-width: 0;
}
.badge-main > section,
.badge-main > .info-box {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  margin-bottom: 1.5rem;
}

.badge-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}
.badge-sidebar-card {
  background: white;
  border-radius: 28px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.04);
}
.sidebar-section {
  padding: 0;
  margin-bottom: 1.25rem;
}
.sidebar-title {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #355b38;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sidebar-links a {
  color: #355b38;
  font-weight: 600;
}
.sidebar-section ul {
  margin: 0;
  padding-left: 1.2rem;
}
.sidebar-section li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.sidebar-section a {
  color: #355b38;
  font-weight: 500;
}
.sidebar-section a:hover {
  text-decoration: underline;
}
.sidebar-section p {
  margin: 0.5rem 0;
  line-height: 1.7;
  color: #4c554d;
}
.sidebar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef5ea;
  color: #355b38;
}

.badge-resource {
  display: block;
  text-align: center;
}
.badge-resource img {
  width: 100%;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  max-width: 140px;
  transition: transform .2s ease;
}
.badge-resource:hover img {
  transform: scale(1.02);
}
.resources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.resource-card {
  width: 180px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
}
.resource-card img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.resource-card span {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-weight: 600;
}

.badge-section {
  background: white;
  border-radius: 28px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.badge-section + .badge-section {
  margin-top: 2rem;
}

.badge-section-A { border-left: 6px solid #7777ff; background: linear-gradient(to right, #8b8be699, white 120px); }
.badge-section-B { border-left: 6px solid #77ff77; background: linear-gradient(to right, #8be68b99, white 120px); }
.badge-section-C { border-left: 6px solid #22efee; background: linear-gradient(to right, #61d4d499, white 120px); }
.badge-section-D { border-left: 6px solid #ff7777; background: linear-gradient(to right, #e68b8b99, white 120px); }
.badge-section-E { border-left: 6px solid #e065f8; background: linear-gradient(to right, #b66ac599, white 120px); }
.badge-section-F { border-left: 6px solid #794949; background: linear-gradient(to right, #41272775, white 120px); }
.badge-section-warning { border-left: 6px solid #d97706; background: linear-gradient(to right, #fff7ed, white 120px); }
.badge-section-warning .section-header h2 { color: #b45309; }

.badge-section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.badge-section-letter {
  width: 72px;
  height: 72px;
  border: 3px solid rgba(255,255,255,.25);
  flex-shrink: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #355b38, #4d7a50);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(53,91,56,.25);
}
.badge-section-info h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #243526;
}
.badge-section-info p {
  margin-top: 0.35rem;
  color: #667067;
  max-width: 70ch;
}
.badge-section-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-transform: uppercase;
}
.badge-section-description-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: small;
  flex-wrap: wrap;
}
.badge-section-count {
  color: #355b38;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  min-width: 90px;
}

.activities-intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 3rem;
  background: white;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.activities-intro-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #355b38, #4d7a50);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.activities-intro-content {
  flex: 1;
}
.activities-intro-content h2 {
  margin: 0;
  font-size: 2rem;
}
.activities-intro-content p {
  margin-top: 0.5rem;
  color: #667067;
  max-width: 65ch;
}
.activities-intro-count {
  text-align: center;
  min-width: 90px;
}
.activities-intro-count span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #355b38;
  line-height: 1;
}
.activities-intro-count small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #7a8578;
}

.activities-sections-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}
.activity-section-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #f4f8f3;
  border: 1px solid #e2ebe0;
  transition: .2s ease;
}
.activity-section-chip .count {
  margin-left: auto;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #355b38;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
}
.activity-section-chip:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.activity-section-chip .letter {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #355b38;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
}
.activity-section-chip .title {
  font-size: .85rem;
  font-weight: 600;
  color: #355b38;
}

.badge-intro-card {
  background: white;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.badge-sections-block {
  margin-bottom: 2rem;
}
.badge-sections-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8578;
  margin-bottom: 0.8rem;
}
.badge-summary-block {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.badge-summary-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #eef5ea;
  font-size: 1.7rem;
  flex-shrink: 0;
}
.badge-summary-content h3 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #243526;
  margin-bottom: .75rem;
  margin-top: 0;
}
.badge-summary-content p {
  margin: 0;
  line-height: 1.75;
  color: #4c554d;
  font-size: 1.1rem;
}
.badge-intro-divider {
  border: none;
  height: 1px;
  background: #e8ede7;
  margin: 2rem 0;
}
.badge-requirements-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.badge-requirements-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff6d8;
  font-size: 1.2rem;
}
.badge-requirements-header h2 {
  margin: 0;
}
.badge-sections-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.badge-sections-nav .chip {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.badge-requirements {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.badge-rules {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}
.badge-rule {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  background: #f7faf6;
  border: 1px solid #e6eee3;
}
.badge-rule-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #355b38;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.license-item {
  margin-bottom: 1rem;
}
.license-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}
.license-value {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.badge-navigation {
  display: flex;
  gap: 1rem;
  margin: 4rem 0;
}
.badge-nav-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  transition: .2s ease;
}
.badge-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.badge-nav-card small {
  display: block;
  color: #7a8578;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .08em;
}
.badge-nav-card strong {
  display: block;
  margin-top: .35rem;
  font-size: 1.2rem;
}

.badge-hero-nav {
  position: absolute;
  top: 25%;
  transform: translateY(-50%);
  z-index: 5;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  color: white;
  transition: .2s ease;
}
.badge-hero-nav:hover {
  background: rgba(255,255,255,.30);
  transform: translateY(-50%) scale(1.08);
}
.badge-hero-prev { left: 1rem; }
.badge-hero-next { right: 1rem; }
.badge-hero-nav .material-symbols-outlined {
  font-size: 42px;
}

/* ---------- MÓVIL / TABLET ----------
   La regla equivalente en components/responsive.css no
   aplicaba: este archivo se carga después y la pisaba. Con
   240px fijos de sidebar el texto quedaba en ~80px y la
   sidebar sticky se superponía al contenido. */
@media (max-width: 1000px) {
  .badge-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .badge-sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .badge-main > section,
  .badge-main > .info-box {
    padding: 1.25rem 1rem;
    border-radius: 16px;
  }

  /* Hero: logo centrado entre las flechas y título abajo
     (antes las flechas tapaban el logo y el título). */
  .badge-hero-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
  .badge-hero-logo {
    width: 88px;
    height: 88px;
    margin-bottom: 0;
  }
  .badge-hero-nav {
    top: 3.75rem;
  }

  /* Ícono chico al lado del título y texto a todo el ancho */
  .badge-summary-block {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
  }
  .badge-summary-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    border-radius: 12px;
  }
  .badge-summary-content {
    display: contents;
  }
  .badge-summary-content h3 {
    font-size: 1.5rem;
    margin: 0;
  }
  .badge-summary-content > :not(h3) {
    grid-column: 1 / -1;
  }
  .badge-summary-content p {
    font-size: 1rem;
    line-height: 1.6;
  }
  .badge-section-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .badge-section-letter {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    border-radius: 12px;
  }
  .badge-section-info h2 {
    font-size: 1.4rem;
  }
}
