/* ============================================================================
   INS — estilos complementares ao Tailwind (animações, componentes utilitários
   que não são triviais só com classes utilitárias).
   ============================================================================ */

:root {
  --background: #fbf8f4;
  --foreground: #1c1917;
  --card: #ffffff;
  --muted: #f3ede3;
  --muted-foreground: #6b6259;
  --border: #e7e1d6;
  --ins-red: #a61b1b;
  --ins-red-dark: #7f1414;
  --ins-gold: #c9971c;
  --ins-ink: #1c1917;
  --ins-paper: #fbf8f4;
  --ins-line: #e7e1d6;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

/* ── Faixa de identidade institucional (topo da página) ── */
.ins-identity-bar {
  height: 3px;
  width: 100%;
  background: linear-gradient(to right,
    var(--ins-red) 0%, var(--ins-red) 40%,
    var(--ins-ink) 40%, var(--ins-ink) 70%,
    var(--ins-gold) 70%, var(--ins-gold) 100%);
}

/* ── Motivo de cartão institucional: borda firme + acento, sem sombra flutuante ── */
.ins-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--ins-line);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease;
}
.ins-card:hover {
  border-color: rgba(166, 27, 27, 0.4);
}
.ins-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ins-red);
  border-radius: 0.5rem 0.5rem 0 0;
}

/* ── Line clamp (fallback caso a build do Tailwind não inclua o plugin) ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Hero banner: barra de progresso do slide ── */
@keyframes heroBannerProgress {
  from { width: 0%; }
  to { width: 100%; }
}
.hero-progress-bar {
  animation: heroBannerProgress 6.5s linear forwards;
}

/* ── Ticker de urgência: ping ── */
@keyframes tickerPing {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.ticker-ping {
  animation: tickerPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ── Sheet / painel lateral (menu mobile e detalhes do mapa) ── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sheet-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 100%;
  background: #fff;
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}
.sheet-panel.is-open {
  transform: translateX(0);
}
.sheet-panel.sheet-wide {
  width: 400px;
}
.sheet-sub-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.3s ease-in-out;
  transform: translateX(100%);
}
.sheet-sub-panel.is-open {
  transform: translateX(0);
}
.sheet-main-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.3s ease-in-out;
}
.sheet-main-panel.is-shifted {
  transform: translateX(-100%);
}

/* ── Mapa Leaflet ── */
#mapa-localizacao {
  height: 480px;
  width: 100%;
  z-index: 1;
}
.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

@media (max-width: 1023px) {
  #mapa-localizacao {
    height: 320px;
  }
}
