.temas-page {
  min-height: calc(100vh - 230px);
  background: #fff;
  padding: 1.6rem 0 3.5rem;
}

.temas-page .container {
  max-width: 1240px;
}

.temas-page__crumb {
  margin: 0 0 2rem;
  color: #8a8f98;
  font-size: 0.96rem;
}

.temas-page__crumb a {
  color: #1b58a8;
}

.temas-page__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.2rem 1.35rem;
}

.temas-domain-card {
  --domain-first: #004D9D;
  --domain-second: #13304d;
  --domain-third: #f5f7fb;
  min-width: 0;
}

.temas-domain-card__header {
  margin-bottom: 1.6rem;
}

.temas-domain-card__toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.temas-domain-card__pill {
  min-height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.45rem 1rem 4.65rem;
  background: linear-gradient(90deg, #fffdfa 0%, #fbf6f1 14%, var(--domain-third) 40%, var(--domain-third) 100%);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(19, 48, 77, 0.08), 0 6px 16px rgba(18, 32, 58, 0.1);
  overflow: visible;
}

.temas-domain-card__pill::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 2.55rem;
  height: 2.55rem;
  background: #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(19, 48, 77, 0.03), inset -1px 0 0 rgba(19, 48, 77, 0.06);
}

.temas-domain-card__toggle:hover .temas-domain-card__pill,
.temas-domain-card__toggle:focus-visible .temas-domain-card__pill {
  box-shadow: inset 0 0 0 1px rgba(19, 48, 77, 0.12), 0 10px 24px rgba(18, 32, 58, 0.12);
  transform: translateY(-1px);
}

.temas-domain-card__pill img {
  position: absolute;
  left: -0.55rem;
  top: 50%;
  width: 62px;
  height: 62px;
  transform: translateY(-50%);
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(18, 32, 58, 0.18));
  z-index: 1;
}

.temas-domain-card__title {
  min-width: 0;
  color: var(--domain-first);
}

.temas-domain-card__title small {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--domain-first);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.15;
}

.temas-domain-card__title h2 {
  margin: 0;
  color: var(--domain-first);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.temas-domain-card__chevron {
  display: none;
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-right: 2px solid var(--domain-first);
  border-bottom: 2px solid var(--domain-first);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.temas-domain-card.is-open .temas-domain-card__chevron {
  transform: rotate(225deg);
}

.temas-domain-card__body {
  display: grid;
  gap: 0.4rem;
}

.temas-domain-card__item {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--domain-first);
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
  transition: transform 0.16s ease, color 0.16s ease;
  text-align: left;
  cursor: pointer;
}

.temas-domain-card__item span {
  flex: 1;
}

.temas-domain-card__item strong {
  color: var(--domain-first);
  font-size: 1.2rem;
  line-height: 1;
}

.temas-domain-card__item:hover,
.temas-domain-card__item:focus-visible {
  color: var(--domain-first);
  transform: translateX(3px);
}

.temas-detail-page {
  min-height: calc(100vh - 230px);
  padding: 1.6rem 0 3.5rem;
  background: #fff;
}

.temas-detail-page .container {
  max-width: 1440px;
  width: min(100%, 1440px);
}

.temas-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 380px);
  gap: 1.75rem;
  align-items: start;
}

.temas-detail__layout.is-topics-collapsed {
  grid-template-columns: minmax(0, 1fr) 64px;
}

.temas-detail__main {
  min-width: 0;
}

.temas-detail__topics-mobile {
  display: none;
}

.temas-detail__hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 2rem;
}

.temas-detail__hero-icon-shell {
  position: relative;
  z-index: 2;
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  margin-top: 0;
  margin-right: -30px;
}

.temas-detail__hero-icon-shell::before {
  content: "";
  position: absolute;
  inset: -4px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(18, 32, 58, 0.12);
}

.temas-detail__hero-icon {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--domain-first);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.96);
}

.temas-detail__hero-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.temas-detail__hero-card {
  flex: 1;
  min-height: 0;
  padding: 1.45rem 1.7rem 1.35rem 3rem;
  border-radius: 1rem;
  background: var(--domain-third);
  border: 1px solid rgba(33, 59, 92, 0.12);
  box-shadow: 0 3px 11px rgba(18, 32, 58, 0.1);
  margin-left: 0;
}

.temas-detail__hero-card h1 {
  margin: 0 0 1rem;
  color: var(--domain-first);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.08;
}

.temas-detail__hero-card p,
.temas-detail__panel p,
.temas-detail__methodology-item p {
  margin: 0;
  color: #3f3227;
  font-size: 1.05rem;
  line-height: 1.68;
  text-align: justify;
}

.temas-detail__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0;
  border-bottom: 2px solid #c7d8ee;
}

.temas-detail__tabs a {
  padding: 0.72rem 0.55rem 0.78rem;
  color: #2559a7;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.temas-detail__tabs a.is-active {
  background: #0050a8;
  color: #fff;
  border-radius: 0.45rem 0.45rem 0 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.temas-detail__panel {
  display: grid;
  gap: 1.25rem;
}

.temas-detail__panel h2 {
  margin: 0;
  color: #13304d;
  font-size: 1.4rem;
  font-weight: 700;
}

.temas-detail__panel--info {
  gap: 1.45rem;
}

.temas-detail__info-intro {
  display: grid;
  gap: 0.8rem;
}

.temas-detail__charts {
  display: grid;
  gap: 1.4rem;
}

.temas-detail__chart-card {
  padding: 0.9rem 1rem 1rem;
  background: #fff;
  border: 1px solid rgba(25, 77, 145, 0.14);
  border-radius: 1.1rem;
  box-shadow: 0 10px 24px rgba(18, 32, 58, 0.08);
  overflow: hidden;
}

.temas-detail__chart-header {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.15rem 3.2rem 0.25rem;
  text-align: center;
}

.temas-detail__chart-header h3 {
  margin: 0;
  color: #2d2d2d;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.temas-detail__chart-header p {
  margin: 0;
  color: #6b5c4f;
  font-size: 0.88rem;
  line-height: 1.3;
  text-align: center;
}

.temas-detail__chart-body {
  position: relative;
}

.temas-detail__chart-body > div[id^="container"] {
  width: 100%;
}

.temas-detail__chart-body .highcharts-container,
.temas-detail__chart-body svg {
  width: 100% !important;
  max-width: 100%;
}

.temas-detail__chart-body .highcharts-root {
  font-family: inherit;
}

.temas-detail__chart-body .highcharts-contextbutton {
  transform: translate(-8px, 8px);
}

.temas-detail__chart-body .highcharts-button-box {
  fill: #ffffff;
  stroke: #d4dfef;
  stroke-width: 1;
  filter: drop-shadow(0 3px 6px rgba(18, 32, 58, 0.14));
}

.temas-detail__chart-body .highcharts-contextbutton .highcharts-button-symbol {
  stroke: #0050a8;
  fill: #0050a8;
}

.temas-detail__chart-footer {
  display: grid;
  gap: 0.2rem;
  margin-top: -0.35rem;
  padding: 0 0.7rem 0.25rem;
}

.temas-detail__chart-footer strong {
  color: var(--domain-first);
  font-size: 0.82rem;
  font-weight: 700;
}

.temas-detail__chart-footer p {
  margin: 0;
  color: #6b6f78;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: left;
}

.temas-detail__tables-wrap {
  width: 100%;
  border-top: 2px solid #c7d8ee;
}

.temas-detail__tables-head,
.temas-detail__table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(90px, 0.42fr) minmax(0, 1.12fr) minmax(90px, 0.42fr);
  gap: 0.35rem;
  align-items: start;
}

.temas-detail__tables-head {
  padding: 0.95rem 1.1rem;
  background: #0050a8;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 500;
}

.temas-detail__table-row {
  padding: 0.95rem 0;
  border-bottom: 1px solid #aac4e6;
}

.temas-detail__table-indicator,
.temas-detail__table-period,
.temas-detail__table-downloads,
.temas-detail__table-metadata {
  padding: 0 0.85rem;
}

.temas-detail__table-indicator-btn {
  width: 100%;
  padding: 0;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  text-align: left;
  color: #4b79b8;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.16s ease, opacity 0.18s ease;
}

.temas-detail__table-indicator-btn .bi {
  flex: 0 0 auto;
  margin-top: 0.18rem;
  font-size: 0.9rem;
  color: #4b79b8;
}

.temas-detail__table-indicator-btn span {
  font-size: 0.97rem;
  line-height: 1.35;
}

.temas-detail__table-indicator-btn:hover,
.temas-detail__table-indicator-btn:focus-visible {
  color: #0050a8;
  transform: translateX(3px);
}

.temas-detail__table-indicator-btn:hover .bi,
.temas-detail__table-indicator-btn:focus-visible .bi {
  color: #0050a8;
}

.temas-detail__table-indicator-btn:focus-visible {
  outline: none;
}

.temas-detail__table-indicator-btn:active {
  transform: translateX(1px) scale(0.99);
  opacity: 0.88;
}

.temas-detail__table-period {
  color: #545b66;
  font-size: 1.02rem;
  line-height: 1.5;
  padding-top: 0.2rem;
}

.temas-detail__table-downloads,
.temas-detail__table-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-start;
}

.temas-detail__table-downloads a,
.temas-detail__table-metadata a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 0.42rem 0.72rem;
  border-radius: 0.28rem;
  background: #0050a8;
  color: #fff;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1;
  text-transform: lowercase;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease, opacity 0.18s ease;
}

.temas-detail__table-downloads a:hover,
.temas-detail__table-downloads a:focus-visible,
.temas-detail__table-metadata a:hover,
.temas-detail__table-metadata a:focus-visible {
  background: #0f66c6;
  box-shadow: 0 10px 18px rgba(18, 32, 58, 0.18);
  transform: translateY(-1px);
}

.temas-detail__table-downloads a:focus-visible,
.temas-detail__table-metadata a:focus-visible {
  outline: none;
}

.temas-detail__table-downloads a:active,
.temas-detail__table-metadata a:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.temas-detail__table-empty {
  color: #7b8796;
  font-size: 0.92rem;
  line-height: 1.35;
}

.temas-detail__panel--empty,
.temas-detail__empty-card {
  padding: 1.35rem 1.5rem;
  border-radius: 1rem;
  background: #f6f8fb;
  border: 1px solid #d8e2ef;
}

.temas-detail__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 0;
  max-width: 100%;
}

.temas-detail__search input {
  min-width: 0;
  height: 42px;
  padding: 0 1rem;
  border: 1px solid #d4dce8;
  border-right: 0;
  border-radius: 0.2rem 0 0 0.2rem;
  font-size: 1rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 32, 58, 0.1);
}

.temas-detail__search button {
  height: 42px;
  border: 0;
  border-radius: 0 0.2rem 0.2rem 0;
  background: #0050a8;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(18, 32, 58, 0.1);
}

.temas-detail__search-wrap {
  display: grid;
  gap: 1rem;
}

.temas-detail__filter {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.temas-detail__filter-head {
  min-width: 280px;
  height: 44px;
  padding: 0 0.9rem;
  border: 1px solid #d4dce8;
  border-radius: 0.2rem;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #4a5d73;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(18, 32, 58, 0.1);
}

.temas-detail__filter-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.temas-detail__filter-body {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  border: 1px solid #d4dce8;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(18, 32, 58, 0.08);
}

.temas-detail__filter-body.is-collapsed {
  display: none;
}

.temas-detail__filter-group {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.temas-detail__filter-group:last-child {
  margin-bottom: 0;
}

.temas-detail__filter-group h3 {
  margin: 0;
  color: #34506f;
  font-size: 1rem;
  font-weight: 700;
}

.temas-detail__date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.temas-detail__date-grid label,
.temas-detail__domain-option {
  display: grid;
  gap: 0.35rem;
  color: #506070;
  font-size: 0.92rem;
}

.temas-detail__date-grid input {
  height: 38px;
  border: 1px solid #d4dce8;
  border-radius: 0.2rem;
  padding: 0 0.7rem;
}

.temas-detail__domains-grid {
  display: grid;
  gap: 0.45rem;
}

.temas-detail__domain-option {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.temas-detail__filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.temas-detail__filter-clear {
  color: #4d76b4;
  text-decoration: none;
  font-size: 0.95rem;
}

.temas-detail__filter-apply {
  height: 36px;
  border: 0;
  border-radius: 0.2rem;
  padding: 0 0.9rem;
  background: #0050a8;
  color: #fff;
  font-size: 0.95rem;
}

.temas-detail__results {
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.2rem;
  text-align: right;
  color: #7f848f;
  font-size: 1.05rem;
}

.temas-detail__results strong {
  color: #3d78ab;
  font-weight: 500;
}

.temas-detail__panel--publicaciones {
  gap: 0.85rem;
}

.temas-detail__publication-scroller {
  height: 470px;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  padding-right: 0;
  position: relative;
}

.temas-detail__publication-scroller::-webkit-scrollbar {
  width: 10px;
}

.temas-detail__publication-scroller::-webkit-scrollbar-track {
  background: transparent;
}

.temas-detail__publication-scroller::-webkit-scrollbar-thumb {
  background: var(--domain-first);
  border-radius: 999px;
}

.temas-detail__publication-list,
.temas-detail__methodology-list {
  display: grid;
  gap: 1rem;
}

.temas-detail__publication-list {
  width: 100%;
}

.temas-detail__publication-item,
.temas-detail__methodology-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.95rem 1.8rem 0.85rem 1.2rem;
  border-radius: 0.45rem;
  background: #f2f2f3;
  text-decoration: none;
  border-left: 0;
  position: relative;
}

.temas-detail__publication-item::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  border-radius: 0 0.45rem 0.45rem 0;
  background: var(--domain-first);
}

.temas-detail__publication-item small {
  display: block;
  margin-bottom: 0.55rem;
  color: #8a8f98;
  font-size: 1rem;
}

.temas-detail__publication-item strong {
  color: #31343a;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.35;
}

.temas-detail__publication-item:hover,
.temas-detail__publication-item:focus-visible {
  background: #f2f2f3;
  color: inherit;
}

.temas-detail__methodology-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-left-color: transparent;
}

.temas-detail__methodology-item h3 {
  margin: 0 0 0.5rem;
  color: #243e6b;
  font-size: 1.3rem;
  font-weight: 700;
}

.temas-detail__download-btn {
  flex: 0 0 auto;
  padding: 0.38rem 0.8rem;
  border: 1px solid #6aa3ec;
  border-radius: 0.45rem;
  color: #4d8ddd;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  background: #fff;
}

.temas-detail__download-btn--export {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.42rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--domain-first) 22%, white);
  border-radius: 999px;
  background: #ffffff;
  color: var(--domain-first);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--domain-first) 12%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
  cursor: pointer;
}

.temas-detail__download-btn--export i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--domain-first) 10%, white);
  color: var(--domain-first);
  font-size: 1rem;
  flex: 0 0 auto;
}

.temas-detail__download-btn--export span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
  text-align: left;
}

.temas-detail__download-btn--export strong {
  font-size: 0.92rem;
  line-height: 1;
  color: var(--domain-first);
}

.temas-detail__download-btn--export small {
  font-size: 0.72rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--domain-first) 70%, white);
}

.temas-detail__download-btn--export:hover,
.temas-detail__download-btn--export:focus-visible {
  border-color: color-mix(in srgb, var(--domain-first) 40%, white);
  background: color-mix(in srgb, var(--domain-first) 6%, white);
  color: var(--domain-first);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--domain-first) 16%, transparent);
  transform: translateY(-1px);
}

.temas-detail__download-btn--export:focus-visible {
  outline: 0;
}

.temas-detail__download-btn--export:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--domain-first) 14%, transparent);
}

.temas-detail__download-btn--export.is-exporting {
  opacity: 0.72;
  cursor: progress;
  transform: none;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--domain-first) 10%, transparent);
}

.temas-detail__embed-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.temas-detail__fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border: 1px solid #c9d7ea;
  border-radius: 0.55rem;
  background: #ffffff;
  color: #2456aa;
  font-size: 0.94rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(18, 32, 58, 0.08);
  cursor: pointer;
}

.temas-detail__fullscreen-btn:hover,
.temas-detail__fullscreen-btn:focus-visible {
  background: #edf5ff;
  border-color: #91b4e4;
}

.temas-detail__tami-embed {
  width: 100%;
  min-height: 78vh;
  border: 1px solid #d5e0ee;
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 32, 58, 0.12);
}

.temas-detail__tami-embed iframe {
  width: 100%;
  min-height: 78vh;
  border: 0;
  display: block;
  background: #1a2540;
}

.temas-detail__tami-embed:fullscreen {
  border-radius: 0;
}

.temas-detail__tami-embed:fullscreen iframe {
  min-height: 100vh;
}

.temas-detail__sidebar {
  min-width: 0;
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics {
  overflow: visible;
}

.temas-detail__topics {
  border-radius: 0.95rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5e0ee;
  box-shadow: 0 8px 20px rgba(18, 32, 58, 0.08);
}

.temas-detail__topics-head {
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  color: #0050a8;
  font-size: 1.12rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #dfe7f0;
  text-align: left;
  cursor: pointer;
}

.temas-detail__topics-head-launch {
  width: 40px;
  min-height: 42px;
  border-right: 1px solid #dfe7f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}

.temas-detail__topics-head span:last-of-type {
  flex: 1;
  padding-left: 0.9rem;
}

.temas-detail__topics-head > .bi {
  padding-right: 0.95rem;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.temas-detail__topics-body {
  display: block;
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics-head {
  justify-content: center;
  border-bottom: 0;
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics-head span {
  display: none;
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics-head-launch {
  width: auto;
  min-height: 52px;
  border-right: 0;
  padding-inline: 0.7rem;
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics-head > .bi {
  padding-right: 0.7rem;
  transform: rotate(180deg);
}

.temas-detail__sidebar.is-collapsed .temas-detail__topics-body {
  display: none;
}

.temas-detail__topics-group {
  border-bottom: 1px solid #eef3f9;
}

.temas-detail__topics-group:last-child {
  border-bottom: 0;
}

.temas-detail__topics-group summary {
  list-style: none;
  cursor: pointer;
  background: #0050a8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.95rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.temas-detail__topics-group summary::-webkit-details-marker {
  display: none;
}

.temas-detail__topics-group summary .bi {
  font-size: 0.86rem;
  transition: transform 0.2s ease;
}

.temas-detail__topics-group[open] summary .bi {
  transform: rotate(180deg);
}

.temas-detail__topics-list {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.95rem 0.7rem;
}

.temas-detail__topics-list a {
  color: #2559a7;
  text-decoration: none;
  line-height: 1.42;
  font-size: 0.98rem;
}

.temas-detail__topics-list a.is-active {
  font-weight: 700;
  text-decoration: underline;
}

.temas-domain-card--1 {
  --domain-first: #9E4E16;
  --domain-second: #3E1A00;
  --domain-third: #F7E9DD;
}

.temas-domain-card--2 {
  --domain-first: #238989;
  --domain-second: #045E5E;
  --domain-third: #E9F3F3;
}

.temas-domain-card--3 {
  --domain-first: #3FA22A;
  --domain-second: #0D4D00;
  --domain-third: #EBF6E9;
}

.temas-domain-card--4 {
  --domain-first: #AD3033;
  --domain-second: #5F0002;
  --domain-third: #F7EAEA;
}

.temas-domain-card--5 {
  --domain-first: #753F77;
  --domain-second: #4F1651;
  --domain-third: #F1EBF1;
}

.temas-domain-card--6 {
  --domain-first: #878787;
  --domain-second: #1B1B1A;
  --domain-third: #F3F3F3;
}

.temas-domain-card--7 {
  --domain-first: #C19835;
  --domain-second: #593B00;
  --domain-third: #F9F4EA;
}

@media (max-width: 1199px) {
  .temas-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .temas-detail__layout {
    grid-template-columns: 1fr;
  }

  .temas-detail__chart-card {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .temas-detail__chart-header {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }
}

@media (max-width: 767px) {
  .temas-page {
    padding-top: 1rem;
  }

  .temas-page__crumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .temas-page__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .temas-domain-card__header {
    margin-bottom: 0;
  }

  .temas-domain-card__pill {
    min-height: 74px;
    padding: 0.9rem 1rem 0.9rem 4.05rem;
  }

  .temas-domain-card__pill::before {
    left: 0.92rem;
    width: 2.3rem;
    height: 2.3rem;
  }

  .temas-domain-card__pill img {
    left: -0.45rem;
    width: 58px;
    height: 58px;
  }

  .temas-domain-card__title h2 {
    font-size: 0.95rem;
  }

  .temas-domain-card__title small {
    font-size: 0.88rem;
  }

  .temas-domain-card__chevron {
    display: block;
  }

  .temas-domain-card__body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    transition: max-height 0.28s ease, opacity 0.2s ease, padding-top 0.2s ease;
  }

  .temas-domain-card.is-open .temas-domain-card__body {
    max-height: 1200px;
    opacity: 1;
    padding-top: 0.65rem;
  }

  .temas-domain-card__item {
    font-size: 0.92rem;
    padding-left: 0.05rem;
  }

  .temas-domain-card__item strong {
    font-size: 1rem;
  }

  .temas-detail-page {
    padding-top: 1rem;
  }

  .temas-detail__sidebar {
    display: none;
  }

  .temas-detail__topics-mobile {
    display: block;
    margin: 0 0 1.15rem;
    border: 1px solid #d5dce7;
    border-radius: 0.25rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(18, 32, 58, 0.08);
    overflow: hidden;
  }

  .temas-detail__topics-mobile summary {
    list-style: none;
    min-height: 42px;
    padding: 0.6rem 0.8rem;
    color: #575f6a;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .temas-detail__topics-mobile summary::-webkit-details-marker {
    display: none;
  }

  .temas-detail__topics-mobile-list {
    display: grid;
    gap: 0.15rem;
    padding: 0 0.8rem 0.75rem;
    border-top: 1px solid #e9edf2;
  }

  .temas-detail__topics-mobile-groups {
    display: grid;
    border-top: 1px solid #e9edf2;
  }

  .temas-detail__topics-mobile-group {
    border-top: 1px solid #eef3f9;
  }

  .temas-detail__topics-mobile-group:first-child {
    border-top: 0;
  }

  .temas-detail__topics-mobile-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    background: #0050a8;
    color: #fff;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .temas-detail__topics-mobile-group summary::-webkit-details-marker {
    display: none;
  }

  .temas-detail__topics-mobile-group summary .bi {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
  }

  .temas-detail__topics-mobile-group[open] summary .bi {
    transform: rotate(180deg);
  }

  .temas-detail__topics-mobile-list a {
    color: #2559a7;
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.35;
    padding-top: 0.45rem;
  }

  .temas-detail__topics-mobile-list a.is-active {
    font-weight: 700;
  }

  .temas-detail__hero {
    display: block;
    margin-bottom: 1.45rem;
    padding-top: 1rem;
  }

  .temas-detail__hero-icon-shell {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 62px;
    height: 62px;
    margin-top: 0.15rem;
    margin-right: -18px;
  }

  .temas-detail__hero-icon {
    width: 62px;
    height: 62px;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.96);
  }

  .temas-detail__hero-icon-shell::before {
    inset: -3px;
  }

  .temas-detail__hero-icon img {
    width: 48px;
    height: 48px;
  }

  .temas-detail__hero-card {
    min-height: 0;
    padding: 1rem 0.9rem 0.95rem 1.95rem;
    border-radius: 0.9rem;
  }

  .temas-detail__hero-card h1 {
    margin-bottom: 1.8rem;
    font-size: 1.1rem;
    margin-left: 2.2rem;
  }

  .temas-detail__hero-card p,
  .temas-detail__panel p,
  .temas-detail__methodology-item p {
    font-size: 0.93rem;
    line-height: 1.36;
  }

  .temas-detail__tabs {
    align-items: flex-start;
    gap: 0.35rem 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .temas-detail__tabs a {
    padding: 0.45rem 0.2rem 0.55rem;
    border-radius: 0.7rem;
    font-size: 0.98rem;
    line-height: 1.2;
    border-bottom: 0;
  }

  .temas-detail__tabs a.is-active {
    padding: 0.45rem 1rem 0.55rem;
    box-shadow: 0 8px 18px rgba(11, 79, 160, 0.24);
  }

  .temas-detail__charts {
    gap: 1rem;
  }

  .temas-detail__chart-card {
    padding: 0.65rem 0.55rem 0.8rem;
    border-radius: 1rem;
  }

  .temas-detail__chart-header {
    padding: 0.1rem 0.7rem 0.2rem;
  }

  .temas-detail__chart-header h3 {
    font-size: 0.9rem;
  }

  .temas-detail__chart-header p {
    font-size: 0.76rem;
  }

  .temas-detail__chart-footer {
    margin-top: -0.15rem;
    padding: 0 0.3rem 0.1rem;
  }

  .temas-detail__chart-footer strong {
    font-size: 0.72rem;
  }

  .temas-detail__chart-footer p {
    font-size: 0.74rem;
  }

  .temas-detail__search {
    grid-template-columns: minmax(0, 1fr) 84px;
    max-width: none;
  }

  .temas-detail__tables-wrap {
    border-top-width: 1px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .temas-detail__tables-wrap::-webkit-scrollbar {
    height: 7px;
  }

  .temas-detail__tables-wrap::-webkit-scrollbar-track {
    background: #d8dde6;
    border-radius: 999px;
  }

  .temas-detail__tables-wrap::-webkit-scrollbar-thumb {
    background: #a5a9b0;
    border-radius: 999px;
  }

  .temas-detail__tables-head,
  .temas-detail__table-row {
    min-width: 640px;
    width: 640px;
    grid-template-columns: 230px 92px 188px 70px;
    gap: 0;
  }

  .temas-detail__tables-head {
    display: grid;
    padding: 0;
  }

  .temas-detail__tables-body {
    width: 640px;
    min-width: 640px;
  }

  .temas-detail__tables-head > div {
    padding: 0.8rem 0.75rem;
    font-size: 0.88rem;
    line-height: 1.15;
  }

  .temas-detail__table-row {
    align-items: center;
    gap: 0;
    padding: 0.75rem 0;
  }

  .temas-detail__table-indicator,
  .temas-detail__table-period,
  .temas-detail__table-downloads,
  .temas-detail__table-metadata {
    padding: 0 0.75rem;
  }

  .temas-detail__table-period {
    font-size: 0.84rem;
    line-height: 1.25;
    text-align: center;
    padding-top: 0.05rem;
  }

  .temas-detail__table-indicator-btn {
    gap: 0.45rem;
    align-items: flex-start;
  }

  .temas-detail__table-indicator-btn .bi {
    margin-top: 0.12rem;
    font-size: 0.78rem;
  }

  .temas-detail__table-indicator-btn span {
    font-size: 0.82rem;
    line-height: 1.36;
  }

  .temas-detail__table-downloads,
  .temas-detail__table-metadata {
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
  }

  .temas-detail__table-downloads a,
  .temas-detail__table-metadata a {
    min-width: 50px;
    padding: 0.38rem 0.3rem;
    font-size: 0.82rem;
    border-radius: 0.24rem;
  }

  .temas-detail__table-empty {
    font-size: 0.8rem;
    text-align: center;
  }

  .temas-detail__search input {
    height: 34px;
    padding: 0 0.8rem;
    border-right: 0;
    border-radius: 0.2rem 0 0 0.2rem;
    font-size: 0.9rem;
  }

  .temas-detail__search button {
    height: 34px;
    border-radius: 0 0.2rem 0.2rem 0;
    font-size: 0.9rem;
  }

  .temas-detail__filter-head {
    min-width: 0;
    width: 100%;
    max-width: 250px;
    height: 36px;
    font-size: 0.92rem;
    padding: 0 0.75rem;
  }

  .temas-detail__results {
    max-width: none;
    margin-top: 0.15rem;
    text-align: right;
    font-size: 0.9rem;
  }

  .temas-detail__publication-scroller {
    height: auto;
    overflow: visible;
    padding-right: 0;
    max-width: none;
  }

  .temas-detail__publication-list {
    gap: 0.4rem;
  }

  .temas-detail__publication-item {
    padding: 0.55rem 1rem 0.55rem 0.85rem;
    border-radius: 0.35rem;
  }

  .temas-detail__publication-item::after {
    width: 7px;
    border-radius: 0 0.35rem 0.35rem 0;
  }

  .temas-detail__publication-item small {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
  }

  .temas-detail__publication-item strong {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .temas-detail__methodology-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

.temas-detail__maps-list {
  display: grid;
  gap: 1.5rem;
}

.temas-detail__map-card {
  border: 1px solid rgba(28, 48, 92, 0.12);
  border-radius: 1.35rem;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(19, 40, 82, 0.08);
  overflow: hidden;
}

.temas-detail__map-header {
  padding: 0.55rem 1.25rem 0;
  text-align: center;
}

.temas-detail__map-header h2 {
  margin: 0;
  color: #2b2e35;
  font-size: clamp(0.95rem, 1.45vw, 1.1rem);
  font-weight: 700;
}

.temas-detail__map-header p {
  margin: 0.08rem 0 0;
  color: #666d7f;
  font-size: 0.8rem;
  text-align: center;
}

.temas-detail__map-shell {
  min-width: 0;
  margin: 0;
  padding: 0.05rem 1.1rem 1rem;
  border-radius: 0;
  background: #ffffff;
}

.temas-detail__leaflet-map {
  min-height: 300px;
  border-radius: 0.8rem;
  background: #ffffff;
}

.temas-detail__layout.is-topics-collapsed .temas-detail__leaflet-map {
  min-height: 420px;
}

.temas-detail__leaflet-map .leaflet-container {
  background: transparent;
  border-radius: 0.8rem;
}

.temas-detail__leaflet-map .leaflet-popup-content-wrapper {
  border-radius: 1rem;
  box-shadow: 0 18px 36px rgba(25, 44, 84, 0.18);
}

.temas-detail__leaflet-map .leaflet-popup-content {
  margin: 0.95rem 1rem;
}

.temas-detail__leaflet-map .leaflet-tooltip {
  border: 0;
  border-radius: 999px;
  background: rgba(29, 47, 93, 0.94);
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 42, 86, 0.16);
  font-weight: 600;
}

.temas-detail__leaflet-map .leaflet-tooltip-top::before {
  border-top-color: rgba(29, 47, 93, 0.94);
}

.temas-detail__map-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.8rem 0.1rem 0 0.1rem;
}

.temas-detail__map-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  max-width: 280px;
}

.temas-detail__map-legend strong {
  color: #2b2e35;
  font-size: 0.84rem;
  font-weight: 700;
}

.temas-detail__map-legend ul {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.temas-detail__map-legend li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.temas-detail__map-legend li span {
  display: block;
  width: 22px;
  height: 16px;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.temas-detail__map-legend li b {
  display: block;
  color: #2b2e35;
  font-size: 0.76rem;
  font-weight: 400;
}

.temas-detail__map-legend li small {
  display: block;
  margin-top: 0.06rem;
  color: #7f8aa3;
  font-size: 0.72rem;
  line-height: 1.35;
}

.temas-detail__map-footer {
  padding: 0;
  max-width: 520px;
}

.temas-detail__map-footer strong {
  display: block;
  margin-bottom: 0.22rem;
  color: #9E4E16;
  font-size: 0.78rem;
  font-weight: 700;
}

.temas-detail__map-card.map-color-9e4e16 .temas-detail__map-footer strong {
  color: #9E4E16;
}

.temas-detail__map-card.map-color-c87735 .temas-detail__map-footer strong {
  color: #C87735;
}

.temas-detail__map-card.map-color-e8b58f .temas-detail__map-footer strong {
  color: #E8B58F;
}

.temas-detail__map-card.map-color-f8d9c3 .temas-detail__map-footer strong {
  color: #D9A981;
}

.temas-detail__map-card.map-color-e9c8ae .temas-detail__map-footer strong,
.temas-detail__map-card.map-color-default .temas-detail__map-footer strong {
  color: #C58F64;
}

.temas-detail__map-footer p,
.temas-detail__map-footer small {
  margin: 0;
  color: #5d6476;
  font-size: 0.72rem;
  line-height: 1.4;
}

.temas-detail__map-footer small {
  display: block;
  margin-top: 0.16rem;
}

.temas-detail__map-popup h3 {
  margin: 0 0 0.35rem;
  color: #1d2f5d;
  font-size: 0.94rem;
  font-weight: 700;
}

.temas-detail__map-popup p {
  margin: 0;
  color: #5f6980;
  font-size: 0.84rem;
  line-height: 1.45;
}

.temas-detail__map-popup p + p {
  margin-top: 0.32rem;
}

.temas-detail__map-legend .map-color-c87735 {
  background: #C87735;
}

.temas-detail__map-legend .map-color-e8b58f {
  background: #E8B58F;
}

.temas-detail__map-legend .map-color-f8d9c3 {
  background: #F8D9C3;
}

.temas-detail__map-legend .map-color-e9c8ae,
.temas-detail__map-legend .map-color-default {
  background: #E9C8AE;
}

.temas-detail__map-legend .map-color-9e4e16 {
  background: #9E4E16;
}

@media (min-width: 1100px) {
  .temas-detail__leaflet-map {
    min-height: 440px;
  }

  .temas-detail__layout.is-topics-collapsed .temas-detail__leaflet-map {
    min-height: 560px;
  }
}

@media (min-width: 1400px) {
  .temas-detail__leaflet-map {
    min-height: 500px;
  }

  .temas-detail__layout.is-topics-collapsed .temas-detail__leaflet-map {
    min-height: 620px;
  }
}

@media (max-width: 991px) {
  .temas-detail__leaflet-map {
    min-height: 270px;
  }
}

@media (max-width: 767px) {
  .temas-detail__map-header,
  .temas-detail__map-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .temas-detail__leaflet-map {
    min-height: 300px;
  }

  .temas-detail__map-meta {
    gap: 0.7rem;
    padding-top: 0.7rem;
  }

  .temas-detail__leaflet-map .leaflet-popup-content-wrapper {
    border-radius: 0.75rem;
  }

  .temas-detail__leaflet-map .leaflet-popup-content {
    margin: 0.65rem 0.75rem;
    max-width: min(180px, calc(100vw - 120px));
  }

  .temas-detail__map-popup h3 {
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
  }

  .temas-detail__map-popup p {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .temas-detail__map-popup p + p {
    margin-top: 0.2rem;
  }
}
