* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

a {
  text-decoration: none;
  color: white;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #004e70;
}

.header .wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}
.header .wrapper h1 {
  font-weight: 500;
  margin-bottom: 7px;
  color: #002536;
}

.wrapper {
  max-width: 100%;
  width: 1440px;
  margin: 0 auto;
  display: block;
  padding: 2rem 2rem;
}

.nav {
  background: #24506b;
  color: white;
}
.nav .wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}
.nav .wrapper a {
  border-bottom: 2px solid transparent;
}
.nav .wrapper a:hover {
  border-bottom: 2px solid white;
}
.nav.active-section-resultados #results-link {
  border-bottom: 2px solid white;
}
.nav.active-section-impactos #impactos-link {
  border-bottom: 2px solid white;
}

#table1,
#table2 {
  width: 100%;
  min-height: 200px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.cards {
  display: flex;
}
.cards .wrapper {
  display: flex;
  flex-direction: column;
}
.cards .wrapper h2 {
  width: 100%;
  margin-bottom: 1rem;
}
.cards .cards-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.cards .card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 50%;
  gap: 2rem;
  padding: 15px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-radius: 5px;
}
.cards .card .card-graphic {
  width: 350px;
  height: 350px;
}
.cards .card .card-text {
  font-size: 16px;
  text-align: left;
}
.cards .card .card-text h3 {
  text-transform: uppercase;
  font-size: 14px;
  color: #111;
}
.cards .card .card-text h2 {
  font-size: 30px;
}

.sectors .wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}

#sector-buttons .sector-btn {
  padding: 5px 10px;
  margin: 5px;
  border: 1px solid #24506b;
  overflow: hidden;
  background-color: #000;
  color: #24506b;
  border-radius: 5px;
  position: relative;
  width: 150px;
  height: 150px;
  cursor: pointer;
}
#sector-buttons .sector-btn .sector-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  opacity: 0.75;
}
#sector-buttons .sector-btn .sector-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  color: white;
}
#sector-buttons .sector-btn:hover .sector-icon {
  opacity: 0.5;
}
#sector-buttons .sector-btn.active .sector-icon {
  opacity: 0.15;
}
#page-size-selector {
  margin: 10px 0;
}

.results.sector-transporte .results-header h2 {
  color: #24506b;
}
.results.sector-transporte #results-list span strong {
  color: #24506b;
}
.results.sector-gesti-n-fiscal-vivienda .results-header h2 {
  color: #599a69;
}
.results.sector-gesti-n-fiscal-vivienda #results-list span strong {
  color: #599a69;
}
.results.sector-integraci-n-comercio .results-header h2 {
  color: #8ec64f;
}
.results.sector-integraci-n-comercio #results-list span strong {
  color: #8ec64f;
}
.results.sector-apys-r .results-header h2 {
  color: #09abe4;
}
.results.sector-apys-r #results-list span strong {
  color: #09abe4;
}
.results.sector-energ-a .results-header h2 {
  color: #ddc018;
}
.results.sector-energ-a #results-list span strong {
  color: #ddc018;
}
.results.sector-conectividad-y-mercados-financieros .results-header h2 {
  color: #a5843c;
}
.results.sector-conectividad-y-mercados-financieros #results-list span strong {
  color: #a5843c;
}
.results.sector-salud-y-protecci-n-social .results-header h2 {
  color: #35749b;
}
.results.sector-salud-y-protecci-n-social #results-list span strong {
  color: #35749b;
}
.results .wrapper .results-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.results .wrapper .results-header h2 {
  color: #111 !important;
}
.results .wrapper .results-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.results .wrapper .results-body .result-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  margin-right: 10px;
  border-radius: 100%;
  background-color: #eee;
  overflow: hidden;
  object-fit: cover;
}
.results .wrapper .results-body #results-list span {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: 16px;
}
.results .wrapper .results-body #results-list span strong {
  font-size: 20px;
  line-height: 100%;
  display: block;
  max-width: 200px;
  flex-shrink: 0;
  width: fit-content;
  max-width: 100% !important;
}

#results-section {
  padding: 2rem 0;
  border: 1px solid #ddd;
  border-radius: 15px;
  background-color: #fff;
}
#results-section .results-header {
  padding: 0 2rem;
}
#results-section h3 {
  margin-top: 0;
}
#results-section #group-filter .group-btn {
  padding: 5px 10px;
  margin: 0 5px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  border-radius: 5px;
  cursor: pointer;
}
#results-section #group-filter .group-btn.active {
  background-color: #009ade;
  color: white;
  border-color: #009ade;
}
#results-section #group-filter .group-btn.disabled {
  background-color: #e0e0e0;
  color: #888;
  border-color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}
#results-section #results-list {
  list-style-type: none;
  padding: 0 2rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 550px;
  overflow-y: auto;
}
#results-section #results-list li {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  border-bottom: 1px solid #ccc;
}
#results-section #results-list li.last {
  border-bottom: none;
}
#results-section #results-list li:nth-child(odd) {
  border-right: 1px solid #ccc;
}
#results-section #results-list li:hover {
  background-color: #eee;
}
#results-section #results-list li:hover .result-icon {
  background-color: #fff;
  border-radius: 100%;
}
#results-section #results-list li.active {
  background-color: #ddd;
}
#results-section #results-list li .pseudo-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid #666;
  margin: 5px 10px 0 0;
  flex-shrink: 0;
}
#results-section #marco-regulatorio-list {
  max-height: 550px;
  overflow-y: auto;
  padding: 0 2rem;
}
#results-section #marco-regulatorio-list li {
  font-size: 16px;
  margin-bottom: 0.5rem;
  list-style-position: inside;
}
#results-section #results-infographics {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 50%;
  height: 600px;
}
#results-section #results-infographics .infographic-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keeps aspect ratio, fits within container */
  object-position: top right;
}

#map-area {
  position: relative;
  width: 100%;
}
#map-area #map {
  height: 500px;
  width: 100%;
}

#territorial-map-area,
#territorial-map-area-nuevo {
  position: relative;
  width: 100%;
  padding: 1rem 0;
}
#territorial-map-area #territorial-map,
#territorial-map-area-nuevo #territorial-map-nuevo {
  height: 500px;
  width: 100%;
  border: 1px solid #ddd;
}
#territorial-map-area #territorial-map-sector-filter-container,
#territorial-map-area-nuevo #territorial-map-sector-filter-container-nuevo {
  position: absolute;
  top: 25px;
  right: 10px;
  width: 220px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.9);
  max-height: 480px;
  overflow-y: auto;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  z-index: 1000;
}
#territorial-map-area #territorial-map-sector-filter-container h3,
#territorial-map-area-nuevo #territorial-map-sector-filter-container-nuevo h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  color: #004e70;
}
#territorial-map-area
  #territorial-map-sector-filter-container
  #territorial-sector-checklist
  > div,
#territorial-map-area-nuevo
  #territorial-map-sector-filter-container-nuevo
  #territorial-sector-checklist2
  > div {
  display: flex;
  align-items: flex-start;
  margin-bottom: 4px; /* Spacing between items */
}
#territorial-map-area
  #territorial-map-sector-filter-container
  #territorial-sector-checklist
  label,
#territorial-map-area-nuevo
  #territorial-map-sector-filter-container-nuevo
  #territorial-sector-checklist2
  label {
  font-size: 0.85em;
  margin-left: 4px; /* Space after checkbox */
}
#territorial-map-area
  #territorial-map-sector-filter-container
  #territorial-sector-checklist
  input[type="checkbox"],
#territorial-map-area-nuevo
  #territorial-map-sector-filter-container-nuevo
  #territorial-sector-checklist2
  input[type="checkbox"] {
  margin-top: 4px;
}
#territorial-map-area
  #territorial-map-sector-filter-container
  .territorial-sector-color-indicator,
#territorial-map-area-nuevo
  #territorial-map-sector-filter-container-nuevo
  .territorial-sector-color-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 1px solid #555;
  flex-shrink: 0;
  margin-top: 4px;
}

.tables .wrapper {
  padding-left: 0;
  padding-right: 0;
}

#product-map-header-summary,
#product-map-header-summary-nuevo {
  margin-top: 20px; /* Add space above the summary block */
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #f9f9f9;
}

#product-map-header-summary #summary-sector-breakdown ul.sector-breakdown-list,
#product-map-header-summary-nuevo
  #summary-sector-breakdown-nuevo
  ul.sector-breakdown-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 20px;
}

#product-map-header-summary
  #summary-sector-breakdown
  ul.sector-breakdown-list
  li,
#product-map-header-summary-nuevo
  #summary-sector-breakdown-nuevo
  ul.sector-breakdown-list
  li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  break-inside: avoid;
}

#product-map-header-summary #summary-sector-breakdown .breakdown-item-text,
#product-map-header-summary-nuevo
  #summary-sector-breakdown-nuevo
  .breakdown-item-text {
  flex-grow: 1;
}

#product-map-header-summary h3,
#product-map-header-summary-nuevo h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em; /* Slightly larger than the label for municipio select */
  color: #333;
}

#product-map-header-summary #summary-sector-breakdown h4,
#product-map-header-summary-nuevo #summary-sector-breakdown-nuevo h4 {
  margin-bottom: 1rem;
}

#summary-total-investment p,
#summary-sector-breakdown p,
#summary-total-investment-nuevo p,
#summary-sector-breakdown-nuevo p {
  margin: 5px 0;
  font-size: 0.95em;
}

#summary-total-investment strong,
#summary-sector-breakdown strong {
  font-weight: 600; /* Open Sans semi-bold */
}

/* Nueva Vista Heatmap Tab Styles (CLONED & RENAMED) */
#nueva-vista-map-area,
#nueva-vista-map-area-nuevo {
  position: relative;
  width: 100%;
  padding: 1rem 0;
}

#nueva-vista-map {
  height: 600px;
  width: 100%;
  border: 1px solid #ddd;
}

.nueva-vista-filters {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.nueva-vista-sector-boxes {
  display: flex;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

#nueva-vista-legend-container,
#nueva-vista-legend-container-nuevo {
  position: absolute;
  bottom: 45px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 12px;
  min-width: 200px;
}

#nueva-vista-legend-container h4,
#nueva-vista-legend-container-nuevo h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em;
  color: #333;
}

.common-legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.common-legend-items .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

.common-legend-items .legend-color-box {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #ccc;
  margin-right: 8px;
}

.common-legend-items .legend-label {
  font-weight: 500;
  color: #333;
}

/* Fix for original heatmap legend for clarity and consistency */
.common-legend-container {
  position: absolute;
  bottom: 45px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 12px;
  min-width: 200px;
  white-space: nowrap;
}
.toggle-in-map {
  position: absolute;
  z-index: 999;
  top: 25px;
  right: 10px;
}

/* Small map-level toggle buttons (e.g. Departamento / Municipio) */
.toggle-in-map .inline-flex {
  display: inline-flex;
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.toggle-in-map button {
  border: 1px solid #24506b;
  background-color: #ffffff;
  color: #24506b;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.toggle-in-map button + button {
  margin-left: -1px; /* visually join borders between buttons */
}

.toggle-in-map button.rounded-l-lg {
  border-radius: 4px 0 0 4px;
}

.toggle-in-map button.rounded-r-lg {
  border-radius: 0 4px 4px 0;
}

/* Active / inactive states driven by JS via class toggles */
.toggle-in-map button.bg-blue-600 {
  background-color: #24506b;
  color: #ffffff;
  border-color: #24506b;
}

.toggle-in-map button.bg-gray-200 {
  background-color: #e8f4f8;
  color: #24506b;
  border-color: #cbd5e1;
}

.toggle-in-map button:hover {
  background-color: #f0f6fb;
}

.toggle-in-map button.bg-blue-600:hover {
  background-color: #1b3b4f;
}

.lists-container-nuevo {
  position: absolute;
  top: 125px;
  left: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 12px;
  min-width: 200px;
}
.lists-container-nuevo ul {
  list-style-type: none;
}

.common-tab-wrapper {
  padding-left: 0;
  padding-right: 0;
}

.common-legend-container h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em;
  color: #333;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
}

.nueva-vista-sector-box {
  background: #fff;
  border: 1px solid #eee;
  color: #222;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(36, 80, 107, 0.04);
  transition: background 0.18s, border 0.18s, color 0.18s;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  min-width: 120px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 8px;
}

.nueva-vista-sector-box:hover {
  background: #fff;
  border-color: #24506b;
  color: #24506b;
}

.nueva-vista-sector-box.active {
  background: #e3ecf7;
  color: #24506b !important;
  border-color: #24506b;
}

.nueva-vista-sector-box.active img,
.nueva-vista-sector-box.active span {
  filter: none;
}

.nueva-vista-sector-box.disabled-sector {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f0f0f0;
  border-color: #ddd;
  color: #999;
}

.nueva-vista-sector-box.disabled-sector:hover {
  background-color: #f0f0f0;
  border-color: #ddd;
  color: #999;
}

.results.wrapper .wrapper {
  padding-left: 0;
  padding-right: 0;
}

#territorial-view-content #territorial-view-content .tables .wrapper,
#territorial-view-content-nuevo
  #territorial-view-content-nuevo
  .tables
  .wrapper {
  padding-left: 0;
  padding-right: 0;
}

#territorial-view-content .map .wrapper,
#territorial-view-content-nuevo .map .wrapper {
  padding-left: 0;
  padding-right: 0;
}

#municipal-investment-view-content .map .wrapper {
  padding-left: 0;
  padding-right: 0;
}

.common-map-area {
  position: relative;
  width: 100%;
  padding: 1rem 0;
}

#territorial-table.tabulator .tabulator-tableholder {
  overflow-x: hidden !important;
}

.tables .wrapper > h2 {
  margin-bottom: 1rem;
}

.tabulator-header-filter input {
  width: 100%;
  padding: 2px;
  box-sizing: border-box;
}

.custom-div-icon {
  background: none;
  border: none;
}

.marker-background {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.marker-icon {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
}

#municipality-container {
  position: absolute;
  top: 100px;
  right: 10px;
  width: 180px; /* Fixed the typo here: was 180-px */
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: white;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  z-index: 9999;
}

#municipality-list h3 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #004e70;
}

.municipality-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 14px;
}

.municipality-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 8px 0 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.municipality-item.select-all {
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-weight: bold;
}

.municipality-item input[type="checkbox"] {
  margin-right: 0;
  cursor: pointer;
}

.municipality-item label {
  cursor: pointer;
  flex: 1;
  display: flex;
  justify-content: space-between;
}

.municipality-count {
  display: none;
}

/* Make the scrollbar more visible */
#municipality-container::-webkit-scrollbar {
  width: 8px;
}

#municipality-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#municipality-container::-webkit-scrollbar-thumb {
  background: #24506b;
  border-radius: 4px;
}

#municipality-container::-webkit-scrollbar-thumb:hover {
  background: #1a3d54;
}

.leaflet-tooltip {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  width: 200px;
  white-space: normal;
}

.tabulator-row.highlight {
  background-color: #b7dbf2 !important; /* Light yellow background */
  font-weight: bold; /* Optional: make text bold */
  transition: background-color 0.3s ease; /* Smooth transition */
}

.tabulator-row:hover {
  background-color: #dbedf8 !important;
}

.tabulator-row.no-geo-data:hover {
  background-color: #fee !important; /* Faint red */
  cursor: default;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid #888;
  width: 100%;
  max-width: 1200px;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

#modal-chart-container {
  width: 60%;
  height: 600px; /* Adjust as needed */
}

#modal-chart {
  width: 100% !important;
  height: 100% !important;
}

.modal-charts {
  height: 800px;
  width: calc(65% - 2rem);
}

#modal-desc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 35%;
  padding-left: 20px;
  text-align: left;
}

#modal-text h3 {
  margin: 0 0 10px;
}

#modal-text h2 {
  margin: 0 0 5px;
  font-size: 2em;
}

#modal-text small {
  color: #666;
  margin: 0.3rem 0;
  display: block;
  font-size: 16px;
}

#modal-toggle-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-btn {
  padding: 10px 20px;
  margin: 0 5px;
  border: 1px solid #195974;
  background-color: #fff;
  color: #195974;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.toggle-btn.active {
  background-color: #195974;
  color: #fff;
}

.toggle-btn:hover {
  background-color: #7a9ab2;
  color: #fff;
}

#modal-chart-container {
  width: 60%;
  height: 600px;
}

.chart-toggle button {
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid #ccc;
  background-color: #f5f5f5;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.chart-toggle button:hover {
  background-color: #e0e0e0;
}

.chart-toggle button.active {
  background-color: #004e70; /* Dark blue background for active state */
  color: #fff; /* White text for active state */
  border-color: #004e70;
  font-weight: bold;
}

#modal-chart {
  width: 100% !important;
  height: 100% !important;
}

.modal-text h3 {
  margin: 0 0 10px;
}

.modal-text h2 {
  margin: 0 0 5px;
  font-size: 2em;
}

.modal-text small {
  color: #666;
}

.tabulator {
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.tabulator-tableholder {
  max-height: 375px !important;
  overflow-y: auto !important;
}

.tabulator-header {
  background-color: #b7dbf2;
  border-bottom: 2px solid #ccc;
}

.tabulator-header .tabulator-col {
  padding: 10px;
  font-weight: bold;
  color: #333;
  background-color: #dbedf8 !important;
}

.tabulator-footer {
  background-color: #dbedf8 !important;
}

.tabulator .tabulator-footer .tabulator-page.active {
  color: #4ba6de !important;
}

.tabulator-row {
  border-bottom: 1px solid #eee;
}

.tabulator-row:nth-child(even) {
  background-color: #fafafa;
}

.tabulator-row:hover {
  background-color: #dbedf8 !important;
}

.sector-stats-box:hover {
  cursor: pointer;
}
.sector-stats-box .wrapper .statContents {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  background-color: #f5f5f5;
  padding: 2rem 2rem;
  border-radius: 0.5rem;
  margin: 1rem auto;
  text-align: center;
}
.sector-stats-box .wrapper .statContents .productosUnicos {
  display: none;
}

.sector-stats-box h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sector-stats-box p {
  font-size: 1.25rem;
  color: #333;
}

.debug-list {
  text-align: center;
  display: none;
}

.tabulator-cell {
  padding: 8px 10px;
  color: #555;
}

.tabulator-footer {
  background-color: #f5f5f5;
  padding: 5px;
}

.tabulator-paginator {
  font-size: 12px;
}

.hidden {
  display: none;
}

.noUi-connect {
  background: #009ade !important;
}

.noUi-tooltip {
  bottom: unset !important;
  top: 100%;
  font-size: 10px;
  font-weight: 500;
  padding: 0 !important;
}

.sectorAmount {
  background: #eee;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
  font-size: 18px;
  color: #666;
  font-weight: 600;
  font-size: 16px;
}

::-webkit-scrollbar {
  width: 12px; /* Width of the vertical scrollbar */
  height: 12px; /* Height of the horizontal scrollbar */
}

/* Scrollbar track (the background area) */
::-webkit-scrollbar-track {
  background: #f9f9f9; /* Light gray track */
}

/* Scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
  background: #94b4c4; /* Gray thumb */
  border-radius: 6px; /* Rounded edges */
  border: none; /* Adds a border around the thumb matching the track */
}

/* Scrollbar thumb on hover */
::-webkit-scrollbar-thumb:hover {
  background: #5e90a8; /* Darker gray on hover */
}

/* Scrollbar corner (where vertical and horizontal meet) */
::-webkit-scrollbar-corner {
  background: #f9f9f9; /* Match the track */
}

/* Territorial View Specific Styles */
/* Styles for the container of the main heading and tabs */
.section-header-with-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header-with-tabs h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Override inline styles and layout for the category tabs */
.section-header-with-tabs .category-tab-switcher {
  margin: 0 !important;
  flex-shrink: 1;
  flex-grow: 0;
  width: auto !important;
  justify-content: flex-start !important;
}

/* Override inline styles and layout for the map selector */
.section-header-with-tabs .map-selector-container {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  flex-shrink: 0;
  align-self: center;
}

.section-header-with-tabs .map-selector-container label {
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 11px;
}

.section-header-with-tabs .map-selector-container select {
  width: auto;
  min-width: 250px;
}

/* Restoring tab styling based on user-provided CSS from live site */
#view-mode-tabs,
#view-mode-tabs-nuevo {
  /* This is the div with class="tab-switcher" */
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px; /* Optional: space below tabs */
}

.tab-btn {
  padding: 10px 20px;
  background-color: white;
  color: #24506b; /* Primary blue from user's example */
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn:not(:last-child) {
  border-right: 1px solid #24506b; /* Primary blue border between tabs */
}

.tab-btn.active {
  background-color: #24506b; /* Primary blue background for active tab */
  color: white;
}

/* Category Tab Styling - UGLY VERSION WITH BACKGROUND IMAGES (TEST) */
.category-tab-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border: none;
  border-radius: 0;
  overflow: visible;
  width: auto;
  margin-bottom: 20px;
  justify-content: flex-start;
}

.category-tab-btn {
  padding: 5px 8px;
  margin: 3px;
  border: 1px solid #24506b;
  overflow: hidden;
  background-color: #000;
  color: #24506b;
  border-radius: 4px;
  position: relative;
  width: 100px;
  height: 100px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: normal;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Background images per category */
.category-tab-btn[data-category="salud"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_salud_bg.jpg');
}
.category-tab-btn[data-category="transporte"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_transporte_bg.jpg');
}
.category-tab-btn[data-category="energia"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_energia_bg.jpg');
}
.category-tab-btn[data-category="agua"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_agua_bg.jpg');
}
.category-tab-btn[data-category="educacion"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_conectividad_bg.jpg');
}
.category-tab-btn[data-category="telecom"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_integracion_bg.jpg');
}
.category-tab-btn[data-category="poblacion"] {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/sector_vivienda_bg.jpg');
}

.category-tab-btn:not(:last-child) {
  border-right: 1px solid #24506b;
}

.category-tab-btn.active {
  background-color: transparent;
  color: white;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.category-tab-btn.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: -1;
}

.category-tab-btn:hover:not(.active) {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Map Selector Dropdown Styling */
.map-selector-container {
  display: block;
}

.map-selector-container label {
  color: #24506b;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

#map-selector-nuevo {
  background-color: white;
  border: 2px solid #ced4da;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

#map-selector-nuevo:hover {
  border-color: #24506b;
}

#map-selector-nuevo:focus {
  border-color: #24506b;
  box-shadow: 0 0 0 3px rgba(36, 80, 107, 0.1);
  outline: none;
}

/* End of restored tab styling */
#territorial-map-sector-filter-container {
  position: absolute;
  top: 25px;
  right: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
  z-index: 1000; /* Ensure it's above the map tiles */
  max-height: 200px; /* Or any appropriate height */
  overflow-y: auto; /* Allows scrolling for many sectors */
}

#territorial-map-sector-filter-container h3 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 0.9em;
}

#territorial-sector-checklist label {
  display: block;
  font-size: 0.85em;
}

/* Re-introducing .territorial-header-column for spacing */
.territorial-header-column {
  margin-top: 20px;
}

#product-map-header-summary {
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #f9f9f9;
}

#product-map-header-summary h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em; /* Slightly larger than the label for municipio select */
  color: #333;
}

#product-map-header-summary #summary-sector-breakdown h4 {
  margin-bottom: 1rem;
}

#summary-total-investment p,
#summary-sector-breakdown p {
  margin: 5px 0;
  font-size: 0.95em;
}

#summary-total-investment strong,
#summary-sector-breakdown strong {
  font-weight: 600; /* Open Sans semi-bold */
}

/* Nueva Vista Heatmap Tab Styles (CLONED & RENAMED) */
#nueva-vista-map-area,
#nueva-vista-map-area-nuevo {
  position: relative;
  width: 100%;
  padding: 1rem 0;
}

#nueva-vista-map {
  height: 600px;
  width: 100%;
  border: 1px solid #ddd;
}

.nueva-vista-filters {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.nueva-vista-sector-boxes {
  display: flex;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

#nueva-vista-legend-container,
#nueva-vista-legend-container-nuevo {
  position: absolute;
  bottom: 45px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 12px;
  min-width: 200px;
}

#nueva-vista-legend-container h4,
#nueva-vista-legend-container-nuevo h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em;
  color: #333;
}

/* Generic Floating Lists Container */
.map-floating-lists {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  max-width: 300px;
}

.map-floating-lists .bg-white {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.map-floating-lists h3 {
  font-size: 0.9rem;
  margin-bottom: 5px;
  padding-bottom: 5px;
}

.map-floating-lists ul {
  font-size: 0.8rem;
}

.map-floating-lists li {
  padding: 2px 0;
}

.nueva-vista-sector-box {
  background: #fff;
  border: 1px solid #eee;
  color: #222;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(36, 80, 107, 0.04);
  transition: background 0.18s, border 0.18s, color 0.18s;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  min-width: 120px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 8px;
}

.nueva-vista-sector-box:hover {
  background: #fff;
  border-color: #24506b;
  color: #24506b;
}

.nueva-vista-sector-box.active {
  background: #e3ecf7;
  color: #24506b !important;
  border-color: #24506b;
}

.nueva-vista-sector-box.active img,
.nueva-vista-sector-box.active span {
  filter: none;
}

/* ========================================
   PRINT MAP FUNCTIONALITY
   ======================================== */

/* Map title header with print button */
.map-title-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}

.map-title-header h2 {
  margin: 0;
  flex: 1;
  text-align: center;
}

.print-map-btn {
  display: none !important; /* Hidden site-wide */
}

.print-map-btn:hover {
  /* Button hidden */
}

.print-map-btn svg {
  /* Button hidden */
}

/* Save as Image button - positioned next to print button */
/* Info tooltip button for methodology */
.info-tooltip-btn {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: #555;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.info-tooltip-btn:hover {
  background: #f0f0f0;
  border-color: #24506b;
  color: #24506b;
}

.info-tooltip-btn svg {
  width: 18px;
  height: 18px;
}

/* Info tooltip container */
.info-tooltip-container {
  position: relative;
  display: inline-block;
}

/* Info tooltip content - click to show */
.info-tooltip-content {
  display: none;
  position: absolute;
  right: 49px;
  top: calc(100% + 19px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  width: 350px;
  max-width: 90vw;
  text-align: left;
}

.info-tooltip-content.show {
  display: block;
}

.info-tooltip-content::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 12px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ddd;
}

.info-tooltip-content::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 13px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
}

.info-tooltip-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #24506b;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-tooltip-content h4 svg {
  width: 16px;
  height: 16px;
}

.info-tooltip-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #555;
  margin: 0 0 8px 0;
}

.info-tooltip-content p:last-child {
  margin-bottom: 0;
}

.info-tooltip-content .info-source {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.save-image-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: #555;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.save-image-btn:hover {
  background: #f0f0f0;
  border-color: #24506b;
  color: #24506b;
}

.save-image-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.save-image-btn svg {
  width: 18px;
  height: 18px;
}

.save-image-btn svg.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   PRINT MEDIA QUERIES
   ======================================== */
@media print {
  /* Hide everything by default */
  body * {
    visibility: hidden;
  }

  /* Show only the printing-active tab content and its children */
  .tab-content.printing-active,
  .tab-content.printing-active * {
    visibility: visible;
  }

  /* Position the printable content centered horizontally and vertically */
  .tab-content.printing-active {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 100%;
  }

  /* Hide elements we don't want in print */
  .tab-content.printing-active .print-map-btn,
  .tab-content.printing-active .save-image-btn,
  .tab-content.printing-active .toggle-in-map {
    display: none !important;
  }

  /* Hide Leaflet attribution */
  .leaflet-control-attribution {
    display: none !important;
  }

  /* Hide zoom controls */
  .leaflet-control-zoom {
    display: none !important;
  }

  /* Hide map tile/layer selector */
  .leaflet-control-layers {
    display: none !important;
  }

  /* Ensure map area is the positioning context for the legend */
  .tab-content.printing-active .common-map-area {
    box-shadow: none !important;
    border: none !important;
    position: relative !important;
  }

  /* Ensure the map div is also a positioning context and sized to fit page */
  .tab-content.printing-active [id$="-map-nuevo"] {
    position: relative !important;
    height: 580px !important;
  }

  /* Keep legend inside the map - balanced spacing from right and bottom */
  .tab-content.printing-active .common-legend-container {
    position: absolute !important;
    right: 25px !important;
    bottom: 25px !important;
    box-shadow: none;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.95) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 1000 !important;
  }

  /* Force legend color boxes to print with their background colors */
  .tab-content.printing-active .legend-color-box {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    visibility: visible !important;
  }

  /* Ensure legend items display properly */
  .tab-content.printing-active .legend-item {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
  }

  .tab-content.printing-active .legend-label {
    visibility: visible !important;
  }

  /* Center the content */
  .tab-content.printing-active .wrapper {
    padding: 0;
    margin: 0 auto;
  }

  .tab-content.printing-active .sectors {
    margin-bottom: 10px;
  }

  /* Hide helper text below map */
  .tab-content.printing-active .text-sm.text-gray-600 {
    display: none !important;
  }

  /* Page setup */
  @page {
    size: landscape;
    margin: 1cm;
  }

  /* ========================================
     RESULTADOS SECTION PRINT STYLES
     ======================================== */

  /* Show Resultados printable area when active */
  #resultados-printable-area.printing-active-resultados,
  #resultados-printable-area.printing-active-resultados * {
    visibility: visible;
  }

  /* Position the Resultados printable content */
  #resultados-printable-area.printing-active-resultados {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 100%;
  }

  /* Hide elements we don't want in Resultados print */
  #resultados-printable-area.printing-active-resultados .print-map-btn,
  #resultados-printable-area.printing-active-resultados .save-image-btn {
    display: none !important;
  }

  /* Style the municipality legend for print */
  #resultados-printable-area.printing-active-resultados
    #municipality-container {
    position: absolute !important;
    top: auto !important;
    bottom: 25px !important;
    right: 25px !important;
    max-height: 250px !important;
    width: 160px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    z-index: 1000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ensure municipality color boxes print correctly */
  #resultados-printable-area.printing-active-resultados .municipality-color {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Style the Resultados map area */
  #resultados-printable-area.printing-active-resultados #map-area {
    box-shadow: none !important;
    border: none !important;
    position: relative !important;
  }

  /* Size the Resultados map */
  #resultados-printable-area.printing-active-resultados #map {
    position: relative !important;
    height: 580px !important;
    width: 100% !important;
  }

  /* Style the legend for Resultados */
  #resultados-printable-area.printing-active-resultados .legend {
    position: absolute !important;
    right: 25px !important;
    bottom: 25px !important;
    box-shadow: none;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.95) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 1000 !important;
  }

  /* Force legend color boxes to print */
  #resultados-printable-area.printing-active-resultados .legend-color-box,
  #resultados-printable-area.printing-active-resultados
    .legend
    span[style*="background"] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    visibility: visible !important;
  }

  /* ========================================
     TERRITORIAL MAPS PRINT STYLES (Inversión BID por Municipio)
     ======================================== */

  /* Show territorial printable area when active */
  .tab-content.printing-active-territorial,
  .tab-content.printing-active-territorial * {
    visibility: visible;
  }

  /* Position the territorial printable content */
  .tab-content.printing-active-territorial {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 100%;
  }

  /* Hide elements we don't want in territorial print */
  .tab-content.printing-active-territorial .print-map-btn,
  .tab-content.printing-active-territorial .save-image-btn,
  .tab-content.printing-active-territorial .text-sm.text-gray-600,
  .tab-content.printing-active-territorial #territorial-header-controls {
    display: none !important;
  }

  /* Style the territorial map areas */
  .tab-content.printing-active-territorial .common-map-area,
  .tab-content.printing-active-territorial #territorial-map-area {
    box-shadow: none !important;
    border: none !important;
    position: relative !important;
  }

  /* Size the territorial maps */
  .tab-content.printing-active-territorial #territorial-map,
  .tab-content.printing-active-territorial #municipal-investment-map,
  .tab-content.printing-active-territorial #nueva-vista-map {
    position: relative !important;
    height: 580px !important;
    width: 100% !important;
  }

  /* Style the sector filter for print (productos map) */
  .tab-content.printing-active-territorial
    #territorial-map-sector-filter-container {
    position: absolute !important;
    top: auto !important;
    bottom: 25px !important;
    right: 25px !important;
    max-height: 250px !important;
    width: auto !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    z-index: 1000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Style the legend for territorial maps */
  .tab-content.printing-active-territorial .common-legend-container {
    position: absolute !important;
    right: 25px !important;
    bottom: 25px !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: rgba(255, 255, 255, 0.95) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 1000 !important;
  }

  /* Force legend color boxes to print */
  .tab-content.printing-active-territorial .legend-color-box {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    visibility: visible !important;
  }

  /* Ensure legend items display properly */
  .tab-content.printing-active-territorial .legend-item {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
  }

  .tab-content.printing-active-territorial .legend-label {
    visibility: visible !important;
  }

  /* Center the content */
  .tab-content.printing-active-territorial .wrapper {
    padding: 0;
    margin: 0 auto;
  }

  .tab-content.printing-active-territorial .sectors {
    margin-bottom: 10px;
  }

  /* Hide nueva-vista filters in print */
  .tab-content.printing-active-territorial .nueva-vista-filters {
    display: none !important;
  }

  /* Hide sliders but keep year labels visible */
  .tab-content.printing-active-territorial input[type="range"] {
    display: none !important;
  }
}

/* ========================================
   IMPACTOS SECTION STYLES
   ======================================== */

#impactos-view-content {
  padding: 2rem 0;
}

.impactos-section {
  max-width: 1200px;
  margin: 0 auto;
}

.impactos-main-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: #004e70;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.impactos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.impacto-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

.impacto-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.impacto-sector-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.impacto-sector-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Sector-specific colors - matching resultados */
.impacto-salud .impacto-header {
  background: linear-gradient(135deg, rgba(53, 116, 155, 0.1) 0%, rgba(53, 116, 155, 0.2) 100%);
  border-left: 4px solid #35749b;
}
.impacto-salud .impacto-sector-title {
  color: #35749b;
}
.impacto-salud .impacto-sector-icon {
  filter: invert(38%) sepia(35%) saturate(700%) hue-rotate(165deg) brightness(90%);
}

.impacto-energia .impacto-header {
  background: linear-gradient(135deg, rgba(221, 192, 24, 0.1) 0%, rgba(221, 192, 24, 0.2) 100%);
  border-left: 4px solid #ddc018;
}
.impacto-energia .impacto-sector-title {
  color: #ddc018;
}
.impacto-energia .impacto-sector-icon {
  filter: invert(75%) sepia(50%) saturate(700%) hue-rotate(10deg) brightness(95%);
}

.impacto-agua .impacto-header {
  background: linear-gradient(135deg, rgba(9, 171, 228, 0.1) 0%, rgba(9, 171, 228, 0.2) 100%);
  border-left: 4px solid #09abe4;
}
.impacto-agua .impacto-sector-title {
  color: #09abe4;
}
.impacto-agua .impacto-sector-icon {
  filter: invert(55%) sepia(90%) saturate(500%) hue-rotate(165deg) brightness(95%);
}

.impacto-alcantarillado .impacto-header {
  background: linear-gradient(135deg, rgba(9, 171, 228, 0.1) 0%, rgba(9, 171, 228, 0.2) 100%);
  border-left: 4px solid #09abe4;
}
.impacto-alcantarillado .impacto-sector-title {
  color: #09abe4;
}
.impacto-alcantarillado .impacto-sector-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(9, 171, 228, 0.15);
  padding: 4px;
}

.impacto-items {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.impacto-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.impacto-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f5f5f5;
  object-fit: cover;
  padding: 8px;
}

.impacto-content {
  flex: 1;
}

.impacto-stat {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

/* Sector-specific stat colors */
.impacto-salud .impacto-stat {
  color: #35749b;
}

.impacto-energia .impacto-stat {
  color: #ddc018;
}

.impacto-agua .impacto-stat {
  color: #09abe4;
}

.impacto-alcantarillado .impacto-stat {
  color: #09abe4;
}

.impacto-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.impacto-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* Metodología Section */
.impacto-metodologia {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  border: 1px solid #dee2e6;
  margin-top: 1rem;
}

.metodologia-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metodologia-icon {
  width: 28px;
  height: 28px;
  color: #495057;
}

.metodologia-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #343a40;
  margin: 0;
}

.metodologia-intro {
  font-size: 0.95rem;
  color: #495057;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.metodologia-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metodologia-list li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #495057;
  padding-left: 1.5rem;
  position: relative;
}

.metodologia-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #004e70;
  font-weight: bold;
  font-size: 1.2em;
}

.metodologia-list li strong {
  color: #004e70;
  font-weight: 600;
}

.metodologia-note {
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #ced4da;
}

/*# sourceMappingURL=styles.css.map */
