:root {
  --ink: #24342f;
  --muted: #6e7a75;
  --line: #d7ddd8;
  --paper: #f4f5f1;
  --white: #ffffff;
  --green: #1e85c8;
  --green-dark: #17699d;
  --gold: #c39b2e;
  --blue: #164a96;
  --soft: #edf6fc;
  --warning: #9d6a08;
  --done: #1e85c8;
  --shadow: 0 12px 28px rgba(36, 52, 47, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.municipal-strip {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 28px;
  color: #fff;
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 24px;
  background: #fff;
}

.brand {
  width: min(100%, 760px);
}

.brand img {
  width: min(100%, 760px);
  height: auto;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 28px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav a {
  display: block;
  padding: 13px 22px;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .2);
}

.nav a:hover {
  background: rgba(0, 0, 0, .12);
}

.hero {
  position: relative;
  min-height: calc(100vh - 190px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(36, 52, 47, .84), rgba(36, 52, 47, .36) 52%, rgba(36, 52, 47, .22)),
    url("imagenes/DJI_0264.JPG") center/cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  z-index: -1;
  background: linear-gradient(0deg, var(--paper), transparent);
}

.hero-content {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 12vh;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .98;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .72);
}

.summary-band,
.actions-section,
.contact-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.quick-links {
  width: min(1180px, calc(100% - 40px));
  margin: -48px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-links a {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 22px;
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.quick-links a:last-child {
  border-right: 0;
}

.quick-links span {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-links strong {
  font-size: 23px;
  line-height: 1.1;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.with-tools {
  align-items: flex-start;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.kpi {
  min-height: 112px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 8px 18px rgba(36, 52, 47, .06);
  border-top: 4px solid var(--green);
}

.kpi strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.kpi span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.subacts-summary {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.subacts-summary-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.subacts-summary-head h3 {
  margin: 0;
  font-size: 28px;
}

.subacts-summary-list {
  display: grid;
  border: 1px solid var(--line);
  background: var(--white);
}

.subacts-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.subacts-summary-row:last-child {
  border-bottom: 0;
}

.subacts-summary-row span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.subacts-summary-row strong {
  display: block;
}

.subacts-summary-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.subacts-summary-row > div:last-child {
  min-width: 130px;
  text-align: right;
}

.tools {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
}

.filter.is-active {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

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

.card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 52, 47, .08);
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--soft) center/cover;
}

.status {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 0;
  color: #fff;
  background: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.status.done {
  background: var(--done);
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.card h3 {
  min-height: 58px;
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.meta div {
  min-height: 58px;
  padding: 10px;
  background: var(--soft);
}

.meta span,
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta strong,
.detail-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.progress {
  display: grid;
  gap: 7px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe8;
}

.bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.subcount {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.details-button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.contact-band {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 40px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-band h2 {
  margin: 0 0 12px;
  font-size: 34px;
}

.contact-band p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.contact-data {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-left: 5px solid var(--green);
  background: #fff;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 23, 20, .64);
}

.modal-panel {
  position: relative;
  width: min(960px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 12px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--green-dark);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-hero {
  min-height: 280px;
  display: flex;
  align-items: end;
  padding: 28px;
  color: #fff;
  background-position: center;
  background-size: cover;
}

.modal-hero h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
}

.modal-body {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.detail-grid div,
.subitem {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.summary-text {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.technical-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-left: 5px solid var(--green);
  background: var(--soft);
}

.technical-summary h3 {
  margin: 0;
  font-size: 22px;
}

.technical-summary p {
  margin: 0;
  color: var(--ink);
}

.technical-summary ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.technical-summary li + li {
  margin-top: 6px;
}

.technical-summary small {
  color: var(--muted);
  font-weight: 700;
}

.plan-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.plan-preview h3 {
  margin: 0;
  font-size: 22px;
}

.plan-preview p {
  margin: 4px 0 0;
  color: var(--muted);
}

.plan-preview img {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--soft);
}

.plan-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  color: #fff;
  background: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.image-viewer {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.image-viewer img {
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  background: #fff;
}

.image-viewer p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.subacts {
  display: grid;
  gap: 10px;
}

.subacts h3 {
  margin: 0 0 4px;
}

.scope-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.scope-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.scope-head h4 {
  margin: 0;
  font-size: 18px;
}

.scope-head p,
.scope-meta span {
  margin: 4px 0 0;
  color: var(--muted);
}

.scope-meta {
  min-width: 170px;
  text-align: right;
}

.scope-items {
  display: grid;
  gap: 8px;
}

.subitem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.subitem h4 {
  margin: 0;
  font-size: 16px;
}

.subitem p {
  margin: 4px 0 0;
  color: var(--muted);
}

@media (max-width: 1040px) {
  .municipal-strip {
    display: grid;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .cards-grid,
  .kpis,
  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .contact-band {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 680px) {
  .municipal-strip {
    padding: 8px 16px;
    font-size: 11px;
  }

  .topbar {
    padding: 10px 16px;
    gap: 12px;
  }

  .nav {
    padding: 0 16px;
  }

  .nav a {
    padding: 12px 14px;
  }

  .hero {
    min-height: calc(100vh - 120px);
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-bottom: 70px;
  }

  .summary-band,
  .actions-section,
  .contact-band {
    width: calc(100% - 32px);
    padding: 46px 0;
  }

  .cards-grid,
  .kpis,
  .quick-links,
  .detail-grid,
  .meta {
    grid-template-columns: 1fr;
  }

  .quick-links a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card h3 {
    min-height: auto;
  }

  .subitem {
    grid-template-columns: 1fr;
  }

  .scope-head {
    grid-template-columns: 1fr;
  }

  .scope-meta {
    text-align: left;
  }

  .plan-preview {
    grid-template-columns: 1fr;
  }
}
