/* ==========================================
   ACTIVITY.CSS - PÁGINA DE DETALLE DE ACTIVIDAD
   (activity-old.css era una copia vieja sin usar,
   se eliminó. La regla base de
   .material-symbols-outlined se movió a
   components/icons.css - acá sólo queda el ajuste
   de tamaño específico de esta página)
   ========================================== */

.activity-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ---------- HERO ---------- */
.activity-hero {
  background-size: cover;
  background-position: center;
  width: 100%;
  margin: 0;
  padding: 4rem 2rem;
  position: relative;
}

.activity-hero-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.hero-left {
  max-width: 100%;
}

.hero-category {
  display: inline-block;
  background: #2e6b3d;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

a.hero-category {
  text-decoration: none;
}

a.hero-category:hover,
a.hero-category:focus-visible {
  background: #3d8a50;
  color: white;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin: 0.5rem 0;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 1.5rem;
  max-width: 700px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-metrics {
  display: flex;
  gap: 1.5rem;
  color: white;
  font-weight: 500;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Ajuste de tamaño de ícono SOLO en el hero (el
   tamaño base vive en components/icons.css) */
.hero-metrics .material-symbols-outlined {
  font-size: 1rem;
  margin-right: 0.2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tag {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: white;
}

.hero-tag.green  { background: rgba(46,107,61,0.85); }
.hero-tag.orange { background: rgba(233,138,21,0.85); }
.hero-tag.blue   { background: rgba(61,127,196,0.85); }
.hero-tag.purple { background: rgba(139,92,246,0.85); }

/* ---------- TOOLBAR ---------- */
.activity-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: #6b7280;
}

.breadcrumbs a {
  color: #4b5563;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #2e6b3d;
}

.toolbar-actions,
.activity-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.toolbar-btn:hover {
  background: #f3f4f6;
}

/* ---------- TRES COLUMNAS ---------- */
.three-columns {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 24px;
}

/* ---------- CARDS LATERALES ---------- */
.info-card {
  background: white;
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.85rem;
}

.info-list li span:first-child {
  font-weight: 600;
  color: #4b5563;
}

.info-list.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
}

.info-list.two-columns li {
  border-bottom: none;
  padding: 0.3rem 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: #f3f4f6;
  padding: 0.2rem 0.6rem;
  border-radius: 30px;
  font-size: 0.7rem;
  color: #374151;
}

.icon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.icon-badge {
  background: #eef2ff;
  padding: 0.2rem 0.6rem;
  border-radius: 30px;
  font-size: 0.7rem;
  color: #1e40af;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* .sidebar-sdgs y .sidebar-card no tenían estilo
   propio: se agregan acá para que dejen de depender
   sólo de .large-ods / .badge-sidebar-card */
.sidebar-sdgs,
.large-ods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center; /* Centers horizontally */
  align-items: center;     
}

.sidebar-card {
  background: white;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

.ods-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ods-mini-card {
  background: #e6f7e6;
  padding: 0.2rem 0.6rem;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2e6b3d;
  text-decoration: none;
}

.badges-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center; /* Centers horizontally */
  align-items: center;

}

.badge-mini-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.badge-large-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.credits-card p {
  margin: 0.45rem 0;
}

.credits-card strong {
  display: inline-block;
  min-width: 90px;
  color: #34525a;
}

/* ---------- COLUMNA CENTRAL ---------- */
.content-card {
  background: #fff;
  border: 1px solid #e6e8e2;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 18px;
  overflow: hidden;
}

.content-card:hover {
  border-color: #dfe5dd;
}

.content-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-card .markdown-content {
  padding: 0px 10px 12px 0px;
  font-size: large;
}

.content-card .markdown-content p:last-child {
  margin-bottom: 0;
}

.content-card .markdown-content h2 {
  display: none;
}

.content-card .markdown-content p,
.content-card .markdown-content ul,
.content-card .markdown-content ol {
  margin-bottom: 0.75rem;
}

/* ---------- COLUMNA DERECHA ---------- */
.competence-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.competence-list li {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid #f0f0f0;
}

.ods-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ods-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ods-icon-small {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ods-icon-large {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: #2e6b3d;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.download-item:hover {
  color: #e98a15;
}

/* ---------- FILA INFERIOR ---------- */
.info-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 40px;
  margin-bottom: 40px;
}

@media (max-width: 1200px) {
  .info-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .info-row {
    grid-template-columns: 1fr;
  }
}

.info-row .info-card {
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}

.info-row .info-card h3 {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eef2f6;
}

.info-row ul {
  margin: 0;
  padding-left: 18px;
}

.info-row li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.info-row p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.info-row .info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.translation-card {
  background: #eef2ff;
  border-color: #3d7fc4;
  border-top: 6px solid #3d7fc4;
}
.translation-card h3 {
  border-bottom: 1px solid #3d7fc4;
}

.references-card {
  background: #fefaf3;
  border-color: #f3e3c0;
  border-top: 6px solid #f3e3c0;
}
.references-card h3 {
  border-bottom: 1px solid #f3e3c0;
}
.references-card ul {
  margin: 0;
  padding-left: 1.2rem;
}
.references-card li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}
.references-card a {
  color: inherit;
  text-decoration: none;
}
.references-card strong {
  display: block;
}
.references-card a:hover {
  text-decoration: underline;
}

.requirements-card {
  background: #eef7ef;
  border-color: #a9d4ae;
  border-top: 6px solid #a9d4ae;
}
.requirements-card h3 {
  border-bottom: 1px solid #a9d4ae;
}

.credits-card {
  background: #c0dddf85;
  border-color: #8ccdd9;
  border-top: 6px solid #8ccdd9;
}
.credits-card h3 {
  border-bottom: 1px solid #8ccdd9;
}

/* ---------- ACTIVIDADES RELACIONADAS ---------- */
.related-section {
  margin-top: 4rem;
}

.related-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .three-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .activity-hero {
    padding: 3rem 1.5rem;
  }
  .info-list.two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .activity-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .hero-metrics {
    gap: 0.75rem;
  }
  .hero-metrics span {
    font-size: 0.8rem;
  }
  .related-carousel {
    grid-template-columns: 1fr;
  }
}

.activity-content-wrapper {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 768px) {
  .activity-content-wrapper {
    width: 95%;
  }
}

/* ---------- TIMELINE CENTRAL ---------- */
.timeline-summary     { border-left: 6px solid #f2a100; }
.timeline-preparation { border-left: 6px solid #d98d0f; }
.timeline-development { border-left: 6px solid #256027; }
.timeline-closing      { border-left: 6px solid #3477bc; }

.timeline-summary h2,
.timeline-preparation h2 { color: #d98d0f; }
.timeline-development h2 { color: #256027; }
.timeline-closing h2     { color: #3477bc; }

.timeline-summary ul,
.timeline-preparation ul,
.timeline-development ul,
.timeline-closing ul {
  padding-left: 1.4rem;
}

.timeline-summary li,
.timeline-preparation li,
.timeline-development li,
.timeline-closing li {
  margin-bottom: .5rem;
}

.timeline-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  padding: 0;
  overflow: hidden;
}

.timeline-column {
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 2px;
}

.timeline-circle {
  position: absolute;
  top: 18px;
  left: 8px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.timeline-content {
  padding: 24px 15px 0px 0px;
}

.timeline-content h2 {
  text-transform: uppercase;
}

.timeline-preparation .timeline-line   { background: #f2e7ca; }
.timeline-preparation .timeline-circle { background: #f2a100; }
.timeline-development .timeline-line   { background: #e3efe4; }
.timeline-development .timeline-circle { background: #256027; }
.timeline-closing .timeline-line       { background: #dce8f6; }
.timeline-closing .timeline-circle     { background: #3477bc; }

/* ---------- LICENCIAS ---------- */
.license-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,.08);
}

.license-image {
  margin-top: .5rem;
  display: block;
  max-width: 88px;
  height: auto;
  border: none !important;
  padding: 0 !important;
}

.license-block h3 {
  border-bottom: 1px solid #eef2f6;
}

/* ---------- COMPETENCIAS / RASTROS ---------- */
.competencias-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.competencia-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: white;
  cursor: help;
}

.competencia-pill.lobatos    { background: #b2a400; }
.competencia-pill.scouts     { background: #3b82f6; }
.competencia-pill.caminantes { background: #22c55e; }
.competencia-pill.rovers     { background: #ef4444; }
.competencia-pill.castores   { background: #f59e0b; }

.rastros-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.rastro-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  cursor: help;
}

/* ---------- VERSIÓN / BORRADOR ---------- */
.hero-version {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.version-draft {
  background: #fff3cd;
  color: #8a6d00;
  border: 1px solid #f0d98a;
}

/* ---------- NAVEGACIÓN ENTRE ACTIVIDADES ---------- */
.activity-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.activity-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
  width: 320px;
  max-width: 100%;
}

.activity-nav-card.previous { text-align: left; }
.activity-nav-card.next     { text-align: right; }

.activity-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.nav-label {
  font-size: .8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- ESPACIO DE LAS CAJAS CENTRALES ----------
   Menos padding y el texto más cerca de la línea de tiempo. */
.content-card {
  padding: 20px;
}

.content-card.timeline-card {
  padding: 0;
}

.timeline-card {
  grid-template-columns: 58px 1fr;
}

.timeline-line {
  left: 28px;
}

.timeline-circle {
  top: 16px;
  left: 6px;
  width: 46px;
  height: 46px;
}

.timeline-content {
  padding: 20px 16px 4px 0;
}

.content-card .markdown-content {
  padding: 0 0 8px 0;
}

.timeline-content ol,
.timeline-content ul {
  padding-left: 1.3rem;
}

@media (max-width: 768px) {
  .content-card {
    padding: 16px;
  }

  .content-card.timeline-card {
    padding: 0;
  }

  .timeline-card {
    grid-template-columns: 44px 1fr;
  }

  .timeline-line {
    left: 21px;
  }

  .timeline-circle {
    left: 4px;
    width: 36px;
    height: 36px;
  }
}

/* ---------- MÓVIL / TABLET (una sola columna) ----------
   Antes, en una columna se apilaban 5 cards laterales (info
   rápida, perfil, materiales, ODS, insignias) ANTES del
   contenido: había que bajar ~1600px para leer la actividad.
   Ahora: info rápida, perfil y materiales compactos arriba,
   después el contenido, después la columna derecha y al final
   ODS e insignias (.sidebar-late). */
@media (max-width: 1000px) {
  .three-columns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .col-left {
    display: contents;
  }
  .col-center { order: 1; }
  .col-right  { order: 2; }
  .col-left .sidebar-late { order: 3; }

  .three-columns .info-card,
  .three-columns .content-card {
    margin-bottom: 0;
  }
  .col-center,
  .col-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Info rápida en dos columnas */
  .quick-info .panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
  }
  .quick-info .panel h3 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  .quick-info .info-item {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
  }

  /* Perfil: etiqueta y puntos en el mismo renglón */
  .metric-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 1rem;
  }
  .metric-group hr {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0.25rem 0;
    border: none;
    border-top: 1px solid #f0f0f0;
  }
  .metric-dots {
    margin-top: 0;
    align-items: center;
  }
  .metric-dots > span:last-child {
    margin-left: 0.25rem;
    font-size: 0.85rem;
  }

  .info-row {
    margin-top: 1rem;
    margin-bottom: 1rem;
    gap: 1rem;
  }
  .info-row .info-card {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .activity-content-wrapper {
    width: auto;
    margin: 0 0.75rem;
  }
  .activity-hero {
    padding: 1.5rem 1rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-description {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .hero-category {
    margin-bottom: 0.5rem;
  }
  .activity-toolbar {
    margin: 0.75rem 0 1rem;
  }
  .info-card {
    padding: 1rem;
    border-radius: 16px;
  }
  .content-card .markdown-content {
    font-size: 1.05rem;
  }
  .timeline-content {
    padding: 16px 12px 4px 0;
  }
  .related-section {
    margin-top: 2rem;
  }
  .activity-navigation {
    flex-direction: column;
    align-items: stretch;
  }
  .activity-nav-card {
    width: auto;
  }
}
