/* MAPA Resources - visual styling */
.mapa-resources-page {
  --mapa-red: #b40000;
  --mapa-green: #005b20;
  --mapa-blue: #003b7a;
  --mapa-text: #101010;
  --mapa-muted: #5f5f5f;
  --mapa-border: #e8e8e8;
  width: 100%;
  font-family: inherit;
  color: var(--mapa-text);
}

.mapa-resources-page *,
.mapa-resources-page *::before,
.mapa-resources-page *::after {
  box-sizing: border-box;
}

.mapa-resources-category-heading,
.mapa-resources-section-heading {
  margin: 0 0 20px;
}

.mapa-resources-category-heading h2,
.mapa-resources-section-heading h2 {
  font-size: 25px;
  line-height: 1.25;
  font-weight: 900;
  margin: 0;
}

.mapa-resources-category-heading > span,
.mapa-resources-section-heading > span {
  display: block;
  width: 52px;
  height: 3px;
  background: var(--mapa-red);
  margin-top: 8px;
}

.mapa-resource-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(150px, 0.85fr);
  gap: 12px;
  margin-bottom: 38px;
  background: #fff;
}

.mapa-resource-category,
.mapa-category-help-card {
  min-height: 226px;
  /* border: 1px solid var(--mapa-border); */
  border-radius: 7px;
  background-color: rgb(250, 249, 249);
}

.mapa-resource-category {
  appearance: none;
  padding: 10px 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
  color: #111;
  font-family: inherit;
  background: #fff;
  /* border: 1px solid var(--mapa-border); */
}

.mapa-resource-category:hover,
.mapa-resource-category.is-active {
  border-color: color-mix(in srgb, var(--mapa-accent) 40%, #e8e8e8);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.mapa-category-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--mapa-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  flex: 0 0 auto;
}

.mapa-category-icon svg {
  width: 49px;
  height: 49px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mapa-resource-category strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  color: #001a62;
  min-height: 34px;
}

.mapa-resource-category small {
  display: block;
  color: #000000;
  font-size: 15px;
  font-weight: 100;
  line-height: 1.35;
  max-width: 150px;
  margin: 7px auto 0;
}

.mapa-category-link {
  margin-top: auto;
  padding-top: 10px;
  color: var(--mapa-accent);
  font-size: 12px;
  font-weight: 700;
}

.mapa-category-link b {
  font-size: 15px;
  margin-left: 4px;
}

.mapa-category-help-card {
  padding: 9px 12px 12px;
  text-align: center;
}

.mapa-help-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fde5e5;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapa-help-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: var(--mapa-red);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mapa-category-help-card h3 {
  color: #001a62;
  font-size: 15px;
  line-height: 1.15;
  margin: 0 0 13px;
}

.mapa-category-help-card p {
  color: #000000;
  font-size: 15px;
  font-weight: 100;
  line-height: 1.45;
  margin: 0 0 12px;
}

.mapa-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 13px;
  border-radius: 6px;
  background: var(--mapa-red);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
}

.mapa-resources-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  gap: 22px;
  align-items: start;
}

.mapa-featured-area {
  min-width: 0;
}

.mapa-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mapa-resource-card {
  border: 1px solid var(--mapa-border);
  background: #fff;
  overflow: hidden;
  min-width: 0;
}

.mapa-resource-image {
  display: block;
  width: 100%;
  height: 176px;
  overflow: hidden;
  background: #edf1f4;
}

.mapa-resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.mapa-resource-image:hover img {
  transform: scale(1.025);
}

.mapa-resource-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7edf1;
}

.mapa-resource-placeholder svg {
  width: 70px;
  height: 70px;
  fill: none;
  stroke: #82909a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mapa-resource-card-body {
  padding: 16px 16px 14px;
}

.mapa-resource-card-body h3 {
  color: #001a62;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 5px;
}

.mapa-resource-card-body time {
  color: #777;
  font-size: 12px;
  display: block;
  margin-bottom: 12px;
}

.mapa-resource-card-body p {
  color: #000000;
  font-size: 15px;
  font-weight: 100;
  line-height: 1.55;
  margin: 0 0 14px;
}

.mapa-download-link {
  color: var(--mapa-card-accent, var(--mapa-red)) !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
}

.mapa-download-link span {
  margin-left: 4px;
  font-size: 14px;
}

.mapa-download-link.disabled {
  color: #999 !important;
}

.mapa-resources-sidebar {
  min-width: 0;
}

.mapa-sidebar-card {
  border: 1px solid var(--mapa-border);
  padding: 12px 10px;
  background: #fff;
  margin-bottom: 16px;
}

.mapa-sidebar-card > h3 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 700;
}

.mapa-resource-search {
  display: flex;
  width: 100%;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  overflow: hidden;
  height: 40px;
}

.mapa-resource-search input {
  min-width: 0;
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 0 9px !important;
  font-size: 12px !important;
  background: #fff !important;
}

.mapa-resource-search button {
  width: 40px;
  border: 0;
  background: var(--mapa-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mapa-resource-search button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}

.mapa-resources-section-heading.small {
  margin-bottom: 10px;
}

.mapa-resources-section-heading.small h2 {
  font-size: 15px;
}

.mapa-resources-section-heading.small > span {
  width: 31px;
  height: 2px;
  margin-top: 6px;
}

.mapa-popular-list {
  border-top: 1px solid #ededed;
}

.mapa-popular-item {
  min-height: 84px;
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) 22px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #ededed;
  text-decoration: none !important;
  color: inherit !important;
  padding: 8px 0;
}

.mapa-popular-file-icon {
  width: 55px;
  height: 55px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapa-popular-file-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--mapa-red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mapa-popular-details {
  min-width: 0;
}

.mapa-popular-details strong {
  display: block;
  color: #001a62;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 5px;
}

.mapa-popular-details small {
  color: #777;
  font-size: 12px;
}

.mapa-popular-downloads svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #111;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.mapa-no-resources {
  min-height: 180px;
  border: 1px dashed #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  color: #666;
}

.mapa-no-resources strong {
  color: #222;
}

.mapa-no-resources span {
  font-size: 12px;
}

.mapa-no-popular {
  color: #777;
  font-size: 12px;
  padding: 15px 0;
}

.mapa-resources-loading {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 10px;
}

.mapa-resources-loading.is-visible {
  display: grid;
}

.mapa-resources-loading span {
  height: 260px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f2f2f2, #fafafa, #f2f2f2);
  background-size: 200% 100%;
  animation: mapaShimmer 1.2s infinite;
}

@keyframes mapaShimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1200px) {
  .mapa-resource-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mapa-category-help-card {
    grid-column: span 2;
  }

  .mapa-resources-content-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 900px) {
  .mapa-resources-content-grid {
    grid-template-columns: 1fr;
  }

  .mapa-resources-sidebar {
    order: 2;
  }

  .mapa-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .mapa-resource-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mapa-category-help-card {
    grid-column: span 2;
  }

  .mapa-resource-grid {
    grid-template-columns: 1fr;
  }

  .mapa-resource-image {
    height: 210px;
  }

  .mapa-resources-content-grid {
    gap: 30px;
  }
}
