/* OInsulano — Shared Stylesheet v1.0 */
/* Brand: Manguezal · Logo: Bússola Insulana · Typography: Inter */

:root {
  --primary: #0F766E;
  --primary-hover: #14B8A6;
  --accent: #EA580C;
  --text: #1F2937;
  --text-muted: #6B7280;
  --bg: #FAFAF9;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --denunciar: #DC2626;
  --denunciar-hover: #B91C1C;
  --success: #16A34A;
  --warning: #CA8A04;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.15);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: white; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.22); }

/* Sidebar / Menu */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: white;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.15); }
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 39, 0.55);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar-header {
  background: var(--primary);
  color: white;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.sidebar-close {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 20px 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: var(--bg); }
.sidebar-link.active {
  background: rgba(15, 118, 110, 0.08);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.sidebar-link-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar-footer a { color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 48px 20px 40px;
  text-align: center;
}
.hero h1 { font-size: 32px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 12px; line-height: 1.1; }
.hero p { font-size: 16px; opacity: 0.95; max-width: 480px; margin: 0 auto 24px; line-height: 1.5; }
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 768px) { .hero { padding: 80px 20px 64px; } .hero h1 { font-size: 48px; } .hero p { font-size: 18px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 56px; } }

/* Page header (smaller than hero) */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 32px 0;
}
/* Alinha o texto do titulo com a MESMA coluna do conteudo (.container):
   faixa ocupa a largura toda, mas o texto nao encosta na borda da tela. */
.page-header > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.page-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.page-header p { font-size: 14px; opacity: 0.9; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  font-family: inherit;
}
.btn-primary { background: white; color: var(--primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }
.btn-secondary { background: rgba(255, 255, 255, 0.15); color: white; backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.35); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.25); }
.btn-solid { background: var(--primary); color: white; }
.btn-solid:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-danger { background: var(--denunciar); color: white; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
.btn-danger:hover { background: var(--denunciar-hover); transform: translateY(-2px); }

/* Sections */
main { padding: 0 0 24px; }
.section { padding: 32px 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.section-link { font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
@media (min-width: 768px) { .section { padding: 48px 0; } .section-title { font-size: 24px; } }

/* Pilares */
/* minmax(0,1fr): 1fr = minmax(auto,1fr) e o minimo auto impede a coluna de encolher abaixo do conteudo -> em ecrans de 320px o 3.o pilar empurrava a pagina 31px para fora (documento 351px vs viewport 320px). Com minmax(0,1fr) a coluna encolhe e o texto quebra dentro dela. */
.pilares-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pilar {
  aspect-ratio: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.pilar:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15); }
.pilar-icon { font-size: 32px; line-height: 1; }
.pilar-label { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
@media (min-width: 768px) { .pilares-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-image { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.card-content { padding: 14px 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.card-meta { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.cards-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .card-image { height: 200px; } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 800; white-space: nowrap; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-progress { background: #FEF3C7; color: var(--accent); }
.badge-open { background: #FEE2E2; color: var(--denunciar); }
.badge-done { background: #DCFCE7; color: var(--success); }
.badge-neutral { background: var(--bg); color: var(--text-muted); }

/* Map */
.map-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #e5e7eb 25%, #d1d5db 25%, #d1d5db 50%, #e5e7eb 50%, #e5e7eb 75%, #d1d5db 75%);
  background-size: 20px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Categories scroll */
.categories-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.categories-scroll::-webkit-scrollbar { height: 4px; }
.categories-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.category-chip {
  flex-shrink: 0;
  width: 96px;
  padding: 16px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.category-chip:hover { border-color: var(--primary); transform: translateY(-2px); }
.category-chip-icon { font-size: 28px; margin-bottom: 6px; }
.category-chip-label { font-size: 11px; font-weight: 600; }

/* Lists */
.list { background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.list-item {
  display: flex; gap: 12px; padding: 14px 16px; align-items: center;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: background 0.2s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg); }
.list-thumb {
  width: 48px; height: 48px; background: var(--bg);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.list-content { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.list-meta { font-size: 12px; color: var(--text-muted); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.form-textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.form-required { color: var(--denunciar); }
.form-actions {
  position: sticky; bottom: 0; background: white;
  border-top: 1px solid var(--border); padding: 16px;
  margin: 0 -16px -16px; border-radius: 0 0 12px 12px;
}
.form-step { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.progress-bar { background: var(--bg); height: 4px; border-radius: 2px; overflow: hidden; margin-bottom: 20px; }
.progress-bar-fill { height: 100%; background: var(--primary); }
.form-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }

/* Cover */
.cover-image { height: 200px; position: relative; display: flex; align-items: center; justify-content: center; color: white; font-size: 64px; }
.cover-overlay { position: absolute; top: 12px; left: 12px; }

/* Quick actions */
.quick-actions { display: flex; gap: 8px; padding: 12px 16px; }
.quick-action {
  flex: 1; padding: 12px; border-radius: 10px; font-size: 12px; font-weight: 700;
  text-align: center; border: 1px solid var(--border); background: white;
  text-decoration: none; color: var(--text); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.quick-action:hover { border-color: var(--primary); background: var(--bg); }

/* Tabs */
.tabs {
  background: white; border-bottom: 1px solid var(--border);
  padding: 12px 16px; display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-size: 12px; color: var(--text-muted); white-space: nowrap;
  padding: 4px 0; border: none; background: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-weight: 600;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* Search + filters */
/* Barra de busca: fica na MESMA coluna do conteudo (.container),
   em vez de encostar nas bordas da tela. */
.search-bar {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 16px 0;
}
.search-input {
  width: 100%; background: white; border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; font-size: 14px;
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
.filter-chips { display: flex; gap: 8px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: white; border: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; text-decoration: none; color: var(--text);
}
.filter-chip.active { background: #FEF3C7; color: var(--accent); border-color: var(--accent); }

/* Quick fact */
.quick-fact {
  background: #E0F2F1; border-left: 4px solid var(--primary); color: var(--primary);
  padding: 12px 16px; margin: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5;
}

/* Footer */
.site-footer { background: white; border-top: 1px solid var(--border); padding: 32px 16px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.footer-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding-top: 24px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--text-muted); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr minmax(0, 1fr) minmax(0, 1fr); } }

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; background: white;
  border-top: 1px solid var(--border); display: flex; justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom)); z-index: 40;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; font-size: 10px;
  color: var(--text-muted); gap: 2px; text-decoration: none;
  padding: 4px 12px; font-weight: 600;
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-icon { font-size: 20px; }
@media (min-width: 768px) { .bottom-nav { display: none; } }

/* Floating CTA */
.floating-cta {
  position: fixed; bottom: 88px; right: 16px; background: var(--denunciar);
  color: white; padding: 12px 18px; border-radius: 24px; font-size: 13px;
  font-weight: 800; box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
  z-index: 30; text-decoration: none; display: inline-flex; align-items: center;
  gap: 6px; letter-spacing: 0.02em;
}
.floating-cta:hover { background: var(--denunciar-hover); transform: translateY(-2px); }
/* O JS escondia o CTA quando o chat fechava e nunca o trazia de volta. Fica sempre visivel (so no ecrã). */
@media screen { .floating-cta { display: inline-flex !important; } }
@media (min-width: 768px) { .floating-cta { bottom: 24px; } }

/* Chat */
.chat-fab {
  /* fica acima do CTA "Denunciar" (bottom 88 no telemovel / 24 no desktop): sao flutuantes no mesmo canto. */
  position: fixed; bottom: 140px; right: 16px; width: 56px; height: 56px;
  background: var(--primary); color: white; border-radius: 50%;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer; z-index: 35; border: none;
  animation: chatFabPulse 2.8s ease-out infinite;
}
.chat-fab.visible { display: flex; }
/* Chamada "Me pergunte": rotulo com seta a apontar para o balao do chat. */
.chat-fab::before {
  content: "Me pergunte";
  position: absolute; right: 67px; top: 50%;
  transform: translateY(-50%);
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 9px 12px; border-radius: 14px; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
  z-index: 36;
  animation: chatHintIn .45s ease-out both;
}
.chat-fab::after {
  content: "";
  position: absolute; right: 58px; top: 50%;
  margin-top: -6px; width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-left: 9px solid var(--primary);
  z-index: 36;
}
/* Enquanto o painel do chat esta aberto o balao some (o JS poe display:flex no modal). */
body:has(.chat-modal[style*="display: flex"]) .chat-fab { display: none; }
@keyframes chatFabPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4), 0 0 0 0 rgba(15, 118, 110, 0.35); }
  50% { box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4), 0 0 0 14px rgba(15, 118, 110, 0); }
}
@keyframes chatHintIn {
  from { opacity: 0; transform: translateY(-50%) translateX(10px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab, .chat-fab::before { animation: none; }
}
.chat-modal {
  /* vw e nao %: se o documento transbordar, % resolve contra a largura do documento e o modal sai fora do ecra. */
  position: fixed; bottom: 78px; right: 16px; width: min(380px, calc(100vw - 32px));
  max-width: 380px; height: 60vh; max-height: 500px; background: white;
  border-radius: 16px; box-shadow: var(--shadow-lg);
  /* fecha por omissao: o JS abre/fecha com display em linha. */
  display: none; flex-direction: column; z-index: 60; overflow: hidden;
  border: 1px solid var(--border);
}
.chat-header { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); gap: 10px; background: white; }
.chat-info { flex: 1; }
.chat-name { font-size: 14px; font-weight: 700; }
.chat-status { font-size: 11px; color: var(--success); display: flex; align-items: center; gap: 4px; }
.chat-status::before { content: ""; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
.chat-actions { display: flex; gap: 6px; }
.chat-action {
  width: 30px; height: 30px; background: var(--bg); border: none; border-radius: 6px;
  cursor: pointer; font-size: 16px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.chat-action:hover { background: var(--border); }
.chat-messages { flex: 1; padding: 14px; overflow-y: auto; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.message { display: flex; gap: 8px; max-width: 85%; }
.message-bubble { padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.message-bot { background: white; border: 1px solid var(--border); }
.message-user { background: var(--primary); color: white; margin-left: auto; }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: white; }
.chat-input-field { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 9px 14px; font-size: 13px; color: var(--text); }
.chat-input-field:focus { outline: none; border-color: var(--primary); }
.chat-send { width: 34px; height: 34px; background: var(--primary); color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
@media (min-width: 768px) { .chat-fab { bottom: 80px; } .chat-modal { bottom: 24px; } }

/* Prose */
.prose { line-height: 1.7; font-size: 15px; max-width: 720px; }
.prose p { margin-bottom: 16px; }
.prose h2 { font-size: 20px; font-weight: 800; margin: 24px 0 12px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 16px 0 8px; }
.prose ul { margin-left: 20px; margin-bottom: 16px; }
.prose li { margin-bottom: 4px; }
.prose a { color: var(--primary); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose .lead { font-size: 18px; color: var(--text-muted); font-weight: 400; }
.prose-wrap { padding: 24px 16px; }

/* ============================================
   COMÉRCIOS (wireframe dinâmico v1.0)
   ============================================ */

.filter-section { padding: 16px 0 0; }
.filter-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin: 12px 0 6px;
}
.filter-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: white;
  border: 1px solid var(--border); white-space: nowrap;
  cursor: pointer; color: var(--text); font-family: inherit;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.filter-chip-skeleton {
  display: inline-block; width: 80px; height: 28px;
  background: linear-gradient(90deg, var(--border) 25%, #f3f4f6 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 999px; margin-right: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.results-header {
  padding: 20px 0 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted); font-weight: 600;
}
.clear-filters-btn {
  background: none; border: none; color: var(--denunciar);
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; padding: 4px 8px;
}
.clear-filters-btn:hover { text-decoration: underline; }

.state-message {
  padding: 40px 16px; text-align: center;
  color: var(--text-muted); font-size: 14px;
}
.state-message .emoji { font-size: 48px; display: block; margin-bottom: 12px; opacity: 0.4; }

.load-more-wrap { padding: 16px; text-align: center; }
.load-more-wrap .btn { width: 100%; max-width: 320px; justify-content: center; }

/* Detail page enhancements */
.detail-cover-wrap { position: relative; }
.detail-cover-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; opacity: 0.4;
}
.detail-meta { padding: 16px; }
.detail-nome { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; }
.detail-endereco { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.detail-rating { font-size: 13px; color: #f57f17; margin-top: 4px; font-weight: 600; }
.detail-badges { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.tab-content { padding: 24px 16px; max-width: 720px; margin: 0 auto; }
.tab-content[hidden] { display: none; }
.tab-content h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.tab-content p { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 12px; }

.hours-list { background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.hours-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.hours-row:last-child { border-bottom: none; }
.hours-day { font-weight: 600; }
.hours-time { color: var(--success); font-weight: 600; }
.hours-time.closed { color: var(--text-muted); }
.hours-time.now-open {
  display: inline-flex; align-items: center; gap: 4px;
}
.hours-time.now-open::before {
  content: ""; width: 8px; height: 8px; background: var(--success);
  border-radius: 50%; display: inline-block;
}

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; width: 100%; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); text-decoration: none;
  font-size: 13px; font-weight: 600; padding: 8px 0;
}
.back-btn:hover { text-decoration: underline; }

/* ============================================
   Detalhe: tags (características + pagamentos)
   ============================================ */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.redes-list { font-size: 13px; }
.rede-link {
  display: inline-block;
  margin: 4px 4px 4px 0;
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  transition: background 0.15s;
}
.rede-link:hover { background: var(--primary-hover); }

/* ============================================
   Card skeleton (loading state)
   ============================================ */
.card-skeleton {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.skeleton-image {
  height: 140px;
  background: linear-gradient(90deg, var(--border) 25%, #f3f4f6 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
@media (min-width: 768px) { .skeleton-image { height: 200px; } }
.skeleton-content { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, #f3f4f6 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
.skeleton-line.short { width: 50%; }

/* ============================================
   Animações (fade-in em cards e load more)
   ============================================ */
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cards-grid > .card,
.cards-grid > .card-skeleton {
  animation: card-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.cards-grid > *:nth-child(1)  { animation-delay: 0.00s; }
.cards-grid > *:nth-child(2)  { animation-delay: 0.04s; }
.cards-grid > *:nth-child(3)  { animation-delay: 0.08s; }
.cards-grid > *:nth-child(4)  { animation-delay: 0.12s; }
.cards-grid > *:nth-child(5)  { animation-delay: 0.16s; }
.cards-grid > *:nth-child(6)  { animation-delay: 0.20s; }
.cards-grid > *:nth-child(7)  { animation-delay: 0.24s; }
.cards-grid > *:nth-child(8)  { animation-delay: 0.28s; }
.cards-grid > *:nth-child(n+9){ animation-delay: 0.32s; }

/* prefers-reduced-motion: desliga animações pra acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .cards-grid > .card,
  .cards-grid > .card-skeleton {
    animation: none;
  }
  .skeleton-image, .skeleton-line { animation: none; }
}

/* ============================================
   COMERCIO — pagina de detalhe
   ============================================ */
.comercio-back { max-width: 1200px; margin: 0 auto; padding: 12px 16px 0; }
.comercio-cover { position: relative; background: var(--primary); }
.comercio-cover img { display: block; width: 100%; height: 260px; object-fit: cover; }
.comercio-cover--vazio {
  height: 200px; display: flex; align-items: center; justify-content: center;
  font-size: 72px; opacity: 0.85;
}
.page-header .detail-endereco { color: rgba(255, 255, 255, 0.92); }
.page-header .detail-endereco a { color: #fff; }
.page-header .detail-rating { color: #FDE68A; }
.comercio-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.btn-zap { background: #25D366; color: #fff; }
.btn-zap:hover { background: #1eb857; }
.btn-outline {
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.btn-outline:hover { background: var(--bg); transform: translateY(-1px); }
.comercio-h2 { font-size: 20px; font-weight: 800; margin: 28px 0 12px; }
.comercio-nota { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.comercio-nota a { color: var(--primary); font-weight: 600; }
.contato-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.contato-item {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.contato-item__rotulo {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px;
}
.contato-item__valor { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-word; }
.contato-item__valor a { color: var(--primary); text-decoration: none; }
.contato-item__valor a:hover { text-decoration: underline; }

/* === Banner rotativo do hero (banners administráveis pelo painel) === */
.hero-banner {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 26px auto 0;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(15, 118, 110, 0.6));
}
.hero-banner-track { position: relative; height: clamp(200px, 36vw, 290px); }
.hero-banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease;
  background-image: var(--hero-banner-img, none);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.hero-banner-slide.is-active { opacity: 1; visibility: visible; }
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.12) 100%);
}
.hero-banner-body { position: relative; z-index: 1; padding: 18px 18px 30px; max-width: 640px; }
.hero-banner-title { font-size: clamp(18px, 4.4vw, 27px); font-weight: 800; line-height: 1.15; margin: 0 0 6px; color: #fff; letter-spacing: -0.01em; }
.hero-banner-sub { font-size: clamp(13px, 3.3vw, 15px); line-height: 1.45; margin: 0 0 12px; color: rgba(255, 255, 255, 0.93); }
.hero-banner-cta { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #0F766E; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; text-decoration: none; }
.hero-banner-cta:hover { background: #F0FDFA; color: #0F766E; }
.hero-banner-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; }
.hero-banner-nav--prev { left: 10px; }
.hero-banner-nav--next { right: 10px; }
.hero-banner-nav:hover { background: rgba(0, 0, 0, 0.72); }
.hero-banner-dots { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: 12px; display: flex; gap: 6px; }
.hero-banner-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.5); cursor: pointer; }
.hero-banner-dot.is-active { background: #fff; width: 20px; }
@media (min-width: 768px) { .hero-banner-nav { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .hero-banner-slide { transition: none; } }

/* Visualmente escondido, mas no DOM: preserva o h1 unico da pagina (SEO + leitor de ecra) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Hero exclusivo do banner: o banner ocupa toda a seccao, de ponta a ponta === */
.hero--banner { padding: 0; background: none; text-align: left; }
.hero--banner .hero-banner { max-width: none; margin: 0; border-radius: 0; box-shadow: none; }
.hero--banner .hero-banner-track { height: clamp(300px, 46vw, 440px); }
.hero--banner .hero-banner-body { padding: 30px 22px 46px; max-width: 720px; text-align: left; }
.hero--banner .hero-banner-title { font-size: clamp(22px, 5.4vw, 40px); }
.hero--banner .hero-banner-sub { font-size: clamp(14px, 3.6vw, 18px); max-width: 560px; }
.hero--banner .hero-banner-cta { font-size: 15px; padding: 11px 20px; }
.hero--banner p { margin: 0 0 12px; max-width: none; opacity: 1; text-align: left; }
.hero--banner .hero-banner-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.26) 35%, rgba(0,0,0,0.80) 100%); }
@media (min-width: 768px) {
  .hero--banner .hero-banner-overlay { background: linear-gradient(90deg, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.52) 50%, rgba(0,0,0,0.18) 100%); }
}
.hero--banner h1.sr-only { margin: -1px; font-size: 1px; line-height: 1; }
