.municipality-detail-section {
  padding: 46px 0 72px;
  background: #f4f6f2;
}

.municipality-detail {
  background: #fff;
  border: 1px solid var(--linha, #dbe6d7);
  border-radius: var(--radius, 18px);
  box-shadow: var(--sombra, 0 14px 35px rgba(21, 48, 30, .10));
  color: var(--texto, #203126);
  font-size: 16px;
  line-height: 1.7;
  overflow: hidden;
}

.municipality-photo-banner {
  position: relative;
  margin: 0;
  height: 300px;
  background: #dfe8dc;
  border-bottom: 1px solid var(--linha, #dbe6d7);
  overflow: hidden;
}

.municipality-photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.municipality-photo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(15,35,21,.28));
  pointer-events: none;
}

.municipality-detail-head {
  background: #eef4ea;
  border-bottom: 1px solid var(--linha, #dbe6d7);
  padding: 24px 32px;
}

.municipality-detail-head h1 {
  margin: 0;
  color: var(--verde-escuro, #1f4d2e);
  font-size: 34px;
  line-height: 1.2;
}

.municipality-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  padding: 32px;
  border-bottom: 1px solid var(--linha, #dbe6d7);
  background: #fff;
}

.municipality-info-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.municipality-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 86px;
  padding: 16px;
  background: #f8fbf5;
  border: 1px solid #dfe9db;
  border-radius: 12px;
}

.municipality-info-item span {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e9f2e5;
  color: var(--verde-escuro, #1f4d2e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.municipality-info-item svg {
  width: 18px;
  height: 18px;
}

.municipality-mayor-item.has-photo {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  grid-row: span 2;
  min-height: 254px;
  padding: 18px;
}

.municipality-mayor-photo {
  width: 210px;
  height: 218px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe6d7;
  box-shadow: 0 10px 22px rgba(21, 48, 30, .10);
}

.municipality-mayor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.municipality-info-copy {
  min-width: 0;
}

.municipality-info-copy strong {
  display: block;
  margin: 0 0 4px;
  color: var(--muted, #6f8174);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.municipality-info-copy p {
  margin: 0;
  color: #314537;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  min-width: 0;
}

.municipality-info-copy a {
  color: var(--verde-escuro, #1f4d2e);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.municipality-info-copy a:hover {
  color: var(--verde-medio, #4b8b45);
}

.municipality-crest-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-self: stretch;
  padding: 18px 18px 16px;
  background: #f8fbf5;
  border: 1px solid #dfe9db;
  border-radius: 14px;
}

.municipality-crest-card h2 {
  margin: 0;
  color: var(--verde-escuro, #1f4d2e);
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}

.municipality-crest {
  width: 190px;
  height: 190px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dbe6d7;
  box-shadow: 0 10px 24px rgba(21, 48, 30, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.municipality-crest img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.municipality-rating {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--verde-escuro, #1f4d2e);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(31, 77, 46, .16);
  padding-right: 16px;
}

.municipality-rating span {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  margin-right: 14px;
  background: rgba(0, 0, 0, .12);
  font-size: 17px;
}

.municipality-rating:hover {
  background: var(--verde-escuro-2, #275c37);
}

.municipality-text {
  max-width: 1060px;
  margin: 34px auto 42px;
  padding: 34px 42px 38px;
  background: #fff;
  border: 1px solid var(--linha, #dbe6d7);
  border-radius: 16px;
  color: #3d4d42;
  font-size: 16px;
  line-height: 1.85;
}

.municipality-text-title {
  margin: 0 0 22px;
  color: var(--verde-escuro, #1f4d2e);
  font-size: 28px;
  line-height: 1.2;
}

.municipality-text p {
  margin: 0 0 20px;
}

.municipality-summary {
  padding-bottom: 22px;
  margin-bottom: 28px !important;
  border-bottom: 1px solid var(--linha, #dbe6d7);
  color: #2d3f33;
  font-size: 16px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.municipality-text h2:not(.municipality-text-title),
.municipality-text h3 {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  margin: 0 0 20px;
}

.municipality-text ul {
  margin: 0 0 24px 24px;
  padding: 0;
}

.municipality-text li {
  margin-bottom: 12px;
}

.municipality-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 32px 34px;
}

.municipality-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #eef4ea;
  border: 1px solid #dbe6d7;
  color: var(--verde-escuro, #1f4d2e);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.municipality-actions a:hover {
  background: var(--verde-escuro, #1f4d2e);
  color: #fff;
  border-color: var(--verde-escuro, #1f4d2e);
}

@media (max-width: 980px) {
  .municipality-detail-top {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .municipality-info-panel {
    grid-template-columns: 1fr;
    order: 2;
  }

  .municipality-crest-card {
    order: 1;
    justify-items: center;
  }

  .municipality-crest-card h2 {
    text-align: center;
  }

  .municipality-text {
    margin: 24px;
    padding: 28px;
  }
}

@media (max-width: 620px) {
  .municipality-photo-banner {
    height: 210px;
  }

  .municipality-detail-head {
    padding: 18px;
  }

  .municipality-detail-head h1 {
    font-size: 26px;
  }

  .municipality-info-item {
    min-height: 0;
  }

  .municipality-mayor-item.has-photo {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 14px;
  }

  .municipality-mayor-photo {
    width: 100%;
    height: 240px;
  }

  .municipality-info-item span {
    width: 36px;
    height: 36px;
  }

  .municipality-info-item svg {
    width: 17px;
    height: 17px;
  }

  .municipality-text {
    margin: 18px;
    padding: 24px 20px;
    font-size: 16px;
  }

  .municipality-actions {
    padding: 0 18px 26px;
  }

  .municipality-actions a {
    width: 100%;
  }
}
