:root {
  --brand: #00677f;
  --brand-dark: #00536a;
  --brand-light: #2e97ae;
  --gold: #d4a843;
  --gold-light: #faf3e0;
  --surface: #ffffff;
  --surface-alt: #f7fafa;
  --surface-warm: #eef5f6;
  --border: #d4e4e7;
  --border-light: #e8f0f2;
  --text: #1a2b30;
  --text-secondary: #4d6269;
  --text-muted: #5e7580;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0, 50, 65, 0.06);
  --shadow-elevated: 0 16px 48px rgba(0, 50, 65, 0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  margin: 0;
  padding-top: 88px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open-no-scroll {
  overflow: hidden;
  height: 100vh;
}

[ng-cloak],
.ng-cloak {
  display: none !important;
}

.site-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #f6fbfc 0%, #eef6f8 55%, #e7f1f4 100%);
}

.site-loading-card {
  width: min(92vw, 460px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 78, 96, 0.16);
  text-align: center;
  padding: 28px 24px;
}

.site-loading-logo {
  width: min(280px, 72%);
  height: auto;
  margin-bottom: 10px;
}

.site-loading-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #004d62;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.site-loading-subtitle {
  font-size: 0.9rem;
  color: #476570;
  margin-bottom: 18px;
}

.site-loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(0, 103, 127, 0.2);
  border-top-color: #00677f;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

.site-ready--hidden {
  visibility: hidden;
}

.participar-route-page {
  padding-top: 4px;
}

/* ── Participar: Hero institucional ── */

.participar-hero {
  text-align: center;
  padding: 28px 16px 24px;
  margin-bottom: 20px;
}

.participar-hero-badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.participar-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.participar-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 14px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.participar-hero-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.participar-hero-status {
  color: #2e7d32;
  font-weight: 600;
}

.participar-hero-period {
  color: var(--text-muted);
}

/* ── Wizard: Review step ── */

.wizard-review {
  padding: 4px 0;
}

.wizard-review-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

.wizard-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 575px) {
  .wizard-review-grid {
    grid-template-columns: 1fr;
  }
}

.wizard-review-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wizard-review-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.wizard-review-text {
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.wizard-review-text p {
  margin: 6px 0 0;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wizard-review .pdf-preview-section {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
}

.wizard-review .pdf-preview-section h4 {
  margin-bottom: 8px;
}

.wizard-review .pdf-preview-section .info-row-value,
.wizard-review .pdf-preview-section td,
.wizard-review .pdf-preview-section th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.choice-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.choice-chip input[type="radio"] {
  margin: 0;
  accent-color: var(--brand);
}

.choice-chip:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.08);
}

.participation-type-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.location-method-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.participation-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 170px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.location-method-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 150px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.participation-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.location-method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.participation-type-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12), rgba(46, 151, 174, 0.2));
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 103, 127, 0.15);
}

.location-method-icon {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12), rgba(46, 151, 174, 0.2));
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 103, 127, 0.15);
}

.participation-type-icon i {
  font-size: 1.5rem;
  line-height: 1;
}

.location-method-icon i {
  font-size: 1.45rem;
  line-height: 1;
}

.participation-type-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.location-method-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.participation-type-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.location-method-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.participation-type-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.location-method-desc {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.participation-type-card:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 103, 127, 0.12);
}

.location-method-card:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 103, 127, 0.12);
}

@media (max-width: 991px) {
  .participation-type-list {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .participation-type-card {
    min-height: 0;
    flex-direction: row;
    text-align: left;
  }

  .participation-type-content {
    align-items: flex-start;
  }

  .location-method-list {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .location-method-card {
    min-height: 0;
    flex-direction: row;
    text-align: left;
  }

  .location-method-content {
    align-items: flex-start;
  }
}

/* ── Wizard: stepper ── */

.wizard-stepper--4 {
  width: 100%;
}

.wizard-step-label {
  display: block;
}

@media (max-width: 575px) {
  .wizard-step-label {
    display: block;
  }
}

/* ── Wizard: Formal confirmation ── */

.wizard-confirm-formal {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.wizard-confirm-icon {
  font-size: 2.8rem;
  color: #2e7d32;
  margin-bottom: 10px;
}

.wizard-confirm-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}

.wizard-confirm-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.wizard-confirm-id {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-warm);
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  margin-bottom: 16px;
}

.wizard-confirm-id-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.wizard-confirm-id-value {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.08em;
}

.wizard-confirm-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ── Map panel modes ── */

.participar-map-panel--draw .participar-map-viewport {
  height: 72vh;
  min-height: 520px;
}

.participar-map-panel--draw {
  border-color: var(--gold);
}

.participar-split {
  display: block;
}

.participar-map-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}

.participar-map-viewport {
  height: 72vh;
  min-height: 520px;
  border-radius: 12px;
  overflow: hidden;
  touch-action: pan-y;
}

.participar-route-page .participar-map-viewport #map,
.participar-route-page .participar-map-viewport #map .ol-viewport {
  touch-action: pan-y pinch-zoom !important;
}

.participar-route-page .participar-map-viewport.participar-map-viewport--gesture-active #map,
.participar-route-page .participar-map-viewport.participar-map-viewport--gesture-active #map .ol-viewport {
  touch-action: none !important;
}

.participar-map-viewport--review {
  height: 42vh;
  min-height: 280px;
  pointer-events: none;
}

@media (max-width: 991px) {
  .participar-map-panel {
    position: static;
  }
  .participar-map-viewport {
    height: 58vh;
    min-height: 380px;
  }
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Topbar (estilo cm-barcelos.pt) ─── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Main bar: brand + primary nav */
.topbar-main {
  background: var(--brand);
  height: 56px;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}

.topbar-crest {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.topbar-brand-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 12px;
  flex-shrink: 0;
}

.topbar-brand-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.topbar-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  letter-spacing: 0.06em;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.topbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.topbar-link:hover::after {
  transform: scaleX(1);
}

/* Secondary bar: utilities */
.topbar-secondary {
  background: #003d4d;
  height: 32px;
}

.topbar-secondary .topbar-inner {
  justify-content: space-between;
}

.topbar-util-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-util-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.73rem;
  font-weight: 400;
  padding: 4px 10px;
  transition: color var(--transition);
}

.topbar-util-link:hover {
  color: #fff;
}

.topbar-util-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-a11y-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all var(--transition);
}

.topbar-a11y-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Language notice */
.lang-notice {
  background: #fff3cd;
  color: #856404;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  text-align: center;
  border: 1px solid #ffeeba;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 6px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Mode toggle */
.mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mode-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.mode-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--gold);
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

/* Hamburger (mobile) */
.topbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.topbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ─── Buttons (Global) ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.2;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
  min-height: 36px;
  border-radius: 8px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 103, 127, 0.22);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: #d5cbb5;
  color: var(--text);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-success {
  background: #1a7a3a;
  color: #fff;
  border-color: #1a7a3a;
}

.btn-success:hover {
  background: #156832;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Section Layout ─── */

.section {
  padding: 72px 0;
}

/* Override da página /participar para evitar scroll inicial */
.section.participar-route-page {
  padding-top: 4px;
}

.section--alt {
  background: var(--surface-alt);
}

.section--warm {
  background: var(--surface-warm);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header--left {
  text-align: left;
  margin: 0 0 36px;
  max-width: none;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #1f1a1a;
  margin: 0 0 12px;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.section-subtitle--extra {
  margin-top: 14px;
}

/* ─── Feature Cards ─── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card:hover {
  border-color: #d8c89a;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f2525;
  margin: 0;
  line-height: 1.35;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.feature-card a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: color var(--transition);
}

.feature-card a:hover {
  color: var(--brand-dark);
}

/* ─── Map Section ─── */

.map-controls-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

#map {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f0ede6;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

#map .ol-attribution,
#map .ol-rotate {
  display: none !important;
}

#map .ol-zoom {
  top: 10px;
  left: 10px;
}

#map .ol-zoom button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.map-sidebar-card.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-elevated);
}

.map-sidebar-card .card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 0.88rem;
  color: #3b2e2e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.map-sidebar-card .card-inner {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.map-popup {
  min-width: 220px;
  max-width: 300px;
  pointer-events: none;
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 16px;
}

.map-popup-title {
  color: #3b2c2c;
  font-weight: 700;
  font-size: 0.92rem;
}

.map-popup-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.map-popup-feedback {
  color: var(--brand);
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
}

/* ─── Wizard / Participation ─── */

.wizard-stepper {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.wizard-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.wizard-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--border);
  margin-bottom: 6px;
  transition: color var(--transition);
}

.wizard-step-label {
  display: block;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.wizard-step.active {
  border-color: var(--gold);
  background: var(--gold-light);
  color: #4b3b22;
}

.wizard-step.active .wizard-step-number {
  color: var(--brand);
  border-color: rgba(0, 103, 127, 0.35);
  background: rgba(0, 103, 127, 0.08);
}

.wizard-step.done {
  border-color: #b8dfc5;
  background: #f0faf3;
  color: #2d6a40;
}

.wizard-step.done .wizard-step-number {
  color: #2d6a40;
  border-color: #b8dfc5;
  background: #ffffff;
}

.wizard-step--clickable {
  cursor: pointer;
}

.wizard-step--clickable:hover {
  border-color: rgba(0, 103, 127, 0.5);
  background: rgba(0, 103, 127, 0.05);
}

.progress-track {
  height: 6px;
  border-radius: 100px;
  background: var(--border-light);
  margin-bottom: 24px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--gold) 100%);
  transition: width 0.4s ease;
}

.wizard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 103, 127, .25);
  background: rgba(0, 103, 127, .08);
  color: #00536a;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.cmd-soon-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: .86rem;
  text-decoration: underline;
  padding: 0;
  margin-top: .25rem;
}

.cmd-soon-link:hover {
  color: #00536a;
}

.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible,
.choice-chip:focus-within,
.topbar-link:focus-visible,
.cmd-soon-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.cmd-info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 36, 0.4);
  z-index: 1200;
}

.cmd-info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(16, 45, 54, 0.28);
  padding: 20px;
  z-index: 1201;
}

.cmd-info-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.cmd-info-text {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wizard-confirm {
  background: #f0faf3;
  border: 1px solid #bfe0ca;
  color: #1e5a30;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.wizard-confirm strong {
  color: #155724;
  font-size: 1.1rem;
}

/* ─── Form Controls ─── */

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3a3535;
  margin-bottom: 5px;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 103, 127, 0.15);
  outline: none;
}

/* ─── FAQ ─── */

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-list details[open] {
  border-color: var(--gold);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 18px;
  color: #2f2525;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-list details[open] summary::after {
  content: '\2212';
  color: var(--brand);
}

.faq-list .faq-answer {
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ─── Timeline / Sessions ─── */

.timeline-grid {
  display: grid;
  gap: 12px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-left-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.timeline-card strong {
  font-size: 0.95rem;
  color: #2f2525;
}

.timeline-card .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── Document Tag ─── */

.doc-tag {
  display: inline-block;
  text-transform: capitalize;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--gold-light);
  color: var(--brand-dark);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

/* ─── Footer ─── */

.site-footer {
  background: #0b2e38;
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 32px;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-brand img {
  height: 32px;
  opacity: 0.9;
}

.footer-brand span {
  font-weight: 600;
  color: #fff;
}

.footer-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 24px 0;
}

.footer-bottom {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── Dev Banner ─── */

.dev-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #003d4d;
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ─── Guide Modal ─── */

.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 14, 0.5);
  display: grid;
  place-items: center;
  z-index: 3000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.guide-dialog {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  padding: 28px;
  animation: slideUp 0.25s ease-out;
}

.guide-dialog h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.guide-dialog ol {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ─── Inline Spinner ─── */

.inline-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.inline-spinner.dark {
  border-color: rgba(60, 45, 25, 0.3);
  border-right-color: transparent;
}

/* ─── Empty State ─── */

.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Animations ─── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Accessibility ─── */

body.a11y-high-contrast {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-high-contrast .hero-section,
body.a11y-high-contrast .feature-card,
body.a11y-high-contrast .map-sidebar-card,
body.a11y-high-contrast .timeline-card,
body.a11y-high-contrast .wizard-panel {
  background: #fff !important;
  border-color: #000 !important;
  box-shadow: none !important;
}

body.a11y-high-contrast .municipio-strip,
body.a11y-high-contrast .service-ribbon,
body.a11y-high-contrast .site-footer {
  background: #000 !important;
}

body.a11y-high-contrast a,
body.a11y-high-contrast .hero-eyebrow,
body.a11y-high-contrast .section-eyebrow,
body.a11y-high-contrast .feature-icon {
  color: #0000ee !important;
}

body.a11y-large-text {
  font-size: 18px;
}

/* ─── P3: Welcome Panel ─── */

.welcome-backdrop {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: rgba(0, 20, 30, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}

.welcome-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  padding: 28px 32px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  position: relative;
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.welcome-close:hover {
  background: #fdf0f0;
  color: #b22;
}

.welcome-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.25;
  padding-right: 24px;
}

.welcome-lead {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  line-height: 1.55;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.welcome-actions .btn {
  font-size: 0.78rem;
  padding: 6px 12px;
  min-height: 32px;
}

/* ─── P1: Map Hint ─── */

.map-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(0, 40, 50, 0.75);
  color: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  animation: fadeIn 0.5s ease-out;
}

/* ─── P3: CTA Flutuante ─── */

.cta-float {
  position: absolute;
  bottom: 100px;
  right: 16px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 103, 127, 0.35);
  transition: all var(--transition);
}

.cta-float:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 103, 127, 0.45);
}

.cta-float-icon {
  font-size: 1rem;
}

/* ─── P5: Steps Row ─── */

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 24px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.text-center {
  text-align: center;
}

/* ─── Responsive ─── */

@media (max-width: 991px) {
  .section {
    padding: 52px 0;
  }
}

@media (max-width: 767px) {
  .btn, .btn-sm, .btn-action, button[type="submit"],
  .wizard-nav-btn, .step-indicator-item,
  .map-tool-btn, .layer-toggle-btn, .map-expand-toggle {
    min-height: 44px;
    min-width: 44px;
  }

  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .wizard-stepper {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .wizard-step {
    flex: 0 0 130px;
  }

  .map-controls-panel {
    padding: 14px;
  }

  .wizard-panel {
    padding: 20px 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .timeline-grid {
    gap: 16px;
  }

  /* Topbar responsive */
  .topbar-secondary {
    display: none;
  }

  .topbar-main {
    height: 48px;
  }

  body {
    padding-top: 48px;
  }

  .viewer-layout {
    height: clamp(360px, 50vh, 560px);
    min-height: 360px;
  }

  .topbar-brand-text {
    display: none;
  }

  .topbar-brand-sep {
    display: none;
  }

  .topbar-crest {
    height: 28px;
  }

  .topbar-nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--brand);
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .topbar-nav.open {
    display: flex;
  }

  .topbar-link {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .topbar-hamburger {
    display: flex;
  }

  .welcome-backdrop {
    align-items: flex-end;
  }

  .welcome-panel {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    text-align: left;
  }

  .map-search-float {
    top: 10px;
    width: calc(100% - 84px);
    max-width: none;
    left: 42px;
    transform: none;
    z-index: 22;
  }

  .map-search-input {
    padding: 8px 12px 8px 34px;
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .map-search-icon {
    left: 10px;
    font-size: 0.85rem;
  }

  .map-toolbar {
    right: 10px;
    bottom: 12px;
    z-index: 30;
  }

  .extract-actions-float {
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 31;
  }

  .extract-actions-float .btn {
    width: 100%;
  }

  .cta-float {
    bottom: 14px;
    left: 12px;
    right: auto;
    padding: 8px 14px;
    font-size: 0.8rem;
    z-index: 35;
  }

  /* P7: Map hint */
  .map-hint {
    bottom: 64px;
    left: 12px;
    right: 12px;
    transform: none;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
  }

  /* P5: Steps stack on mobile */
  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .step-connector {
    width: 2px;
    height: 24px;
    margin: 0;
  }
}

/* ═══════════════════════════════════════════
   GIS VIEWER — Map Section
   ═══════════════════════════════════════════ */

.viewer-section {
  position: relative;
  background: #edf2f4;
}

.map-intro-cta {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #edf2f4;
  border-bottom: 1px solid rgba(0, 103, 127, 0.16);
}

.map-intro-cta__content {
  min-width: 0;
}

.map-intro-cta__eyebrow {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.map-intro-cta__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.map-intro-cta__subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.map-intro-cta__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-hero-cta {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  box-shadow: none;
}

.map-intro-cta__soft-btn {
  min-height: 38px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 103, 127, 0.24);
  color: var(--brand-dark);
}

.map-intro-cta__soft-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
  border-color: rgba(0, 103, 127, 0.34);
}

.viewer-layout {
  display: flex;
  height: clamp(420px, calc(100vh - 180px), 640px);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.map-expand-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 24;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.map-expand-toggle:hover {
  background: #fff;
  border-color: var(--brand);
}

/* ── Layer Sidebar ── */

.layer-panel {
  width: 300px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: margin-left 0.3s ease;
}

.layer-panel.collapsed {
  margin-left: -300px;
}

.layer-panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.layer-panel-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2f2525;
}

.layer-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.layer-toggle-btn:hover {
  background: var(--surface-alt);
}

.layer-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.layer-group {
  border-bottom: 1px solid var(--border-light);
}

.layer-group:last-child {
  border-bottom: none;
}

.layer-group-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  color: #3b3535;
  transition: background var(--transition);
  user-select: none;
}

.layer-group-header:hover {
  background: var(--surface-alt);
}

.layer-group-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 103, 127, 0.07);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.layer-group-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.layer-group.open .layer-group-chevron {
  transform: rotate(90deg);
}

.layer-group-body {
  padding: 0 16px 8px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  min-height: 40px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.layer-item:hover {
  color: var(--text);
}

.layer-item-locked {
  opacity: 0.95;
}

.layer-item-locked .layer-check {
  cursor: not-allowed;
}

.layer-check {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.layer-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.layer-panel-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.layer-panel-controls label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}

/* ── Map Viewport ── */

.map-viewport {
  flex: 1;
  position: relative;
  min-width: 0;
}

.map-viewport #map {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ── Floating Search ── */

.map-search-float {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 90%;
  max-width: 480px;
}

.map-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.map-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(0, 103, 127, 0.15);
}

.map-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  max-height: 260px;
  overflow-y: auto;
  z-index: 21;
}

.search-result-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-no-results {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #6b7d91;
  text-align: center;
}

.search-result-item:hover {
  background: var(--surface-alt);
}

.search-result-item small {
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

/* ── Map Toolbar ── */

.map-toolbar {
  position: absolute;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 15;
}

.extract-actions-float {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 28;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(0, 103, 127, 0.14);
}

.map-draw-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 18;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-draw-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.map-draw-btn:hover {
  background: #fff;
  border-color: var(--brand);
}

.map-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: all var(--transition);
}

.map-tool-btn:hover {
  background: var(--surface-alt);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.map-tool-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.layer-panel-toggle {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
}

.layer-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08);
  z-index: 9;
}

.info-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(2px);
  z-index: 10;
}

/* ── Info Panel (right) ── */

.info-panel {
  width: 360px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: margin-right 0.3s ease;
  overflow: hidden;
}

.info-panel.hidden {
  margin-right: -360px;
}

.info-panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.info-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2f2525;
  line-height: 1.3;
}

.info-panel-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.info-panel-close:hover {
  background: #fdf0f0;
  color: #b22;
}

.info-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.info-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.info-tab:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.info-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.info-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  gap: 10px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row-label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 100px;
}

.info-row-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.info-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand);
}

.info-row-hero {
  padding: 12px 0 10px;
  border-bottom: 2px solid var(--brand);
}

.info-classif-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.info-interpretacao {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(0, 103, 127, 0.04);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
}

.info-interpretacao-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 6px;
}

.info-interpretacao-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.mode-indicator-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 103, 127, 0.1);
  color: var(--brand);
  border-radius: 4px;
}

.info-panel-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* ── Info-panel: Pergunta Direta ── */

.info-question-block {
  background: linear-gradient(135deg, #f0faf8 0%, #e8f5f2 100%);
  border: 1px solid rgba(0, 103, 127, 0.18);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.info-question-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 4px;
}

.info-question-answer {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.info-question-block--yes {
  background: linear-gradient(135deg, #e7f9f4 0%, #d8f3ea 100%);
  border-color: rgba(0, 204, 153, 0.45);
}

.info-question-block--yes .info-question-label {
  color: #009b75;
}

.info-question-block--yes .info-question-answer {
  color: #006b55;
}

.info-question-block--no {
  background: linear-gradient(135deg, #fff1f1 0%, #ffe3e3 100%);
  border-color: rgba(198, 40, 40, 0.35);
}

.info-question-block--no .info-question-label {
  color: #b42318;
}

.info-question-block--no .info-question-answer {
  color: #8f1d18;
}

.info-question-block--consult {
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12) 0%, rgba(46, 151, 174, 0.18) 100%);
  border-color: rgba(0, 103, 127, 0.28);
}

.info-question-block--consult .info-question-label {
  color: var(--brand);
}

/* ── Participar CTA Button ── */

.btn-participar {
  background: var(--brand);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-participar:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 103, 127, 0.3);
}

.btn-share {
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ── Docs: Icons & Badges ── */

.docs-count {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.doc-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge-new {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.docs-group {
  margin-top: 10px;
}

.docs-group-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.doc-meta-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.doc-open-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* ── Sessions: Badges ── */

.badge-next {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.timeline-card--past {
  opacity: 0.65;
}

.timeline-card--next {
  border-left: 3px solid var(--brand);
}

.session-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.session-date-badge {
  background: rgba(0, 103, 127, 0.08);
  border: 1px solid rgba(0, 103, 127, 0.2);
  border-radius: 10px;
  padding: 6px 10px;
}

.session-date-main {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
}

.session-time-main {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
}

.session-type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 103, 127, 0.1);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 4px 10px;
}

.session-type-badge--online {
  background: rgba(0, 103, 127, 0.14);
  color: #005d73;
}

.session-type-badge--presencial {
  background: rgba(212, 168, 67, 0.2);
  color: #6a4a00;
}

.session-location-line {
  margin-top: 6px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.session-address-line {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.session-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── FAQ: Contact link ── */

.faq-contact {
  text-align: center;
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-warm);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.faq-contact a {
  color: var(--brand);
  font-weight: 600;
}

/* ── PDF Preview Modal ── */

.pdf-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 14, 0.55);
  display: grid;
  place-items: center;
  z-index: 4000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.pdf-preview-dialog {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.25s ease-out;
}

.pdf-preview-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-preview-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.pdf-preview-body {
  padding: 24px;
}

.pdf-preview-section {
  margin-bottom: 16px;
}

.pdf-preview-section h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.pdf-preview-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.attachment-preview-dialog {
  max-width: 860px;
}

.attachment-preview-body {
  padding-top: 14px;
}

.attachment-preview-image {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
}

.attachment-preview-frame {
  display: block;
  width: 100%;
  height: 68vh;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
}

/* ── Loading overlay for map ── */

.map-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  place-items: center;
  z-index: 25;
  animation: fadeIn 0.15s ease-out;
}

.map-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Viewer Responsive ── */

@media (max-width: 1100px) {
  .layer-panel {
    width: 260px;
  }
  .layer-panel.collapsed {
    margin-left: -260px;
  }
  .info-panel {
    width: 300px;
  }
  .info-panel.hidden {
    margin-right: -300px;
  }
}

@media (max-width: 767px) {
  .map-intro-cta {
    padding: 8px 12px;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
  }

  .map-intro-cta__title {
    font-size: 0.96rem;
  }

  .map-intro-cta__subtitle {
    font-size: 0.8rem;
  }

  .map-intro-cta__actions {
    width: auto;
    align-items: center;
    gap: 0;
  }

  .map-intro-cta__actions .btn {
    flex: 0 0 auto;
  }

  .btn-hero-cta {
    width: auto;
    padding: 11px 16px;
  }

  .map-intro-cta__soft-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .viewer-layout {
    height: clamp(360px, 50vh, 560px);
    min-height: 360px;
    margin-top: 6px;
  }

  .viewer-layout.viewer-layout--mobile-expanded {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    height: auto;
    min-height: 0;
    margin-top: 0;
  }

  .viewer-layout {
    height: clamp(360px, 50vh, 560px);
    min-height: 360px;
  }
  .layer-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: auto;
    width: auto;
    max-height: calc(100% - 20px);
    border-radius: 18px;
    border: 1px solid rgba(0, 103, 127, 0.18);
    box-shadow: 0 20px 44px rgba(0, 21, 32, 0.24);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 12;
    margin-left: 0;
    transform: translateY(8px) scale(0.985);
    opacity: 0;
    pointer-events: none;
  }
  .layer-panel.mobile-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .layer-panel.collapsed {
    margin-left: 0;
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    pointer-events: none;
  }
  .info-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 62px;
    bottom: 10px;
    width: auto;
    max-width: none;
    border-radius: 18px;
    border: 1px solid rgba(0, 103, 127, 0.16);
    box-shadow: 0 20px 44px rgba(0, 21, 32, 0.26);
    z-index: 13;
  }
  .info-panel.hidden {
    margin-right: 0;
  }
  .map-search-float {
    width: calc(100% - 84px);
    max-width: none;
    left: 42px;
    transform: none;
  }
  .layer-panel-backdrop {
    background: rgba(5, 26, 35, 0.26);
    backdrop-filter: blur(2px);
    z-index: 11;
  }
  .layer-group-body {
    padding: 0 16px 12px;
  }
  .layer-panel-head h3 {
    font-size: 0.98rem;
  }

  .viewer-section--mobile-expanded .map-intro-cta {
    display: none;
  }

  .viewer-layout--mobile-expanded .layer-panel {
    left: 4px;
    right: 4px;
    top: 4px;
    max-height: calc(100% - 8px);
    border-radius: 14px;
  }

  .viewer-layout--mobile-expanded .info-panel {
    left: 4px;
    right: 4px;
    top: 4px;
    bottom: 4px;
    border-radius: 14px;
  }

  .viewer-layout--mobile-expanded .map-search-float {
    top: 8px;
    left: 8px;
    width: calc(100% - 96px);
  }

  .viewer-layout--mobile-expanded .map-expand-toggle {
    top: 8px;
    right: 8px;
  }
}

body.panel-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
}

.map-touch-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.map-touch-overlay span {
  background: rgba(255, 255, 255, 0.92);
  color: #1a2b30;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.map-error-banner {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 36px 10px 14px;
  font-size: 0.88rem;
  max-width: min(480px, calc(100% - 32px));
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  animation: cardIn 0.24s ease-out;
}

.map-error-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #991b1b;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
