@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap");

:root {
  --color-bg: #eef5fa;
  --color-surface: #ffffff;
  --color-text: #0d1f30;
  --color-muted: #5c7488;
  --color-border: #e1eaf1;

  --color-primary: #0e7a8c;
  --color-primary-dark: #0b2b3c;
  --color-primary-light: #3fc1c9;
  --color-accent: #f4b740;
  --color-accent-dark: #d99a1f;

  --gradient-ocean: linear-gradient(135deg, #0b2b3c 0%, #0e7a8c 55%, #3fc1c9 100%);
  --gradient-accent: linear-gradient(135deg, #f4b740, #f2925a);

  --score-great: #16a34a;
  --score-good: #7cc142;
  --score-ok: #eab624;
  --score-poor: #f0812f;
  --score-bad: #e14b3a;
  --score-unknown: #9aa9b3;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 8px rgba(9, 34, 53, 0.06);
  --shadow: 0 10px 30px rgba(9, 34, 53, 0.09);
  --shadow-lg: 0 18px 50px rgba(9, 34, 53, 0.16);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

.icon {
  vertical-align: -3px;
  flex-shrink: 0;
}

.sport-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e5f4f9, #dcecf5);
  box-shadow: inset 0 0 0 1px rgba(11, 126, 168, 0.12);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Poppins", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--gradient-ocean);
  color: #fff;
  padding: 18px 0;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.brand-name {
  font-family: "Poppins", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-tag {
  font-size: 0.85rem;
  opacity: 0.8;
}

.back-link {
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
  white-space: nowrap;
}

/* Abaixo do ponto em que marca + etiqueta + 5 links não cabem mais numa
   linha só, o menu quebrava em 2-3 fileiras de pílulas, o que empurra o
   cabeçalho pra quase metade da tela num celular. Em vez disso, o menu
   continua numa fileira só e rola de lado — cabeçalho compacto e previsível
   em qualquer largura. */
@media (max-width: 900px) {
  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 0 -24px;
    padding: 0 24px;
  }

  .site-nav a {
    flex-shrink: 0;
  }
}

/* A etiqueta é reforço de marca, não informação essencial — a home já
   repete a mesma mensagem no título logo abaixo do cabeçalho. Some no
   celular pra não brigar por espaço com a logo. */
@media (max-width: 600px) {
  .brand-tag {
    display: none;
  }
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.site-nav a.active {
  background: rgba(255, 255, 255, 0.22);
}

/* Disclaimer bar */
.disclaimer-bar {
  background: #fff2e2;
  color: #7a4a10;
  border-bottom: 1px solid #f6dcae;
  font-size: 0.83rem;
  padding: 10px 0;
}

.disclaimer-bar .container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero on home page */
.hero {
  position: relative;
  padding: 48px 0 20px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(47, 192, 214, 0.25), transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--color-primary-dark);
}

.hero p {
  color: var(--color-muted);
  margin: 0;
  max-width: 620px;
  font-size: 1.02rem;
}

.hero-photo {
  position: relative;
  margin-top: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 260px;
  background: var(--gradient-ocean);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 43, 60, 0.55), transparent 55%);
}

.hero-photo .photo-credit {
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  z-index: 2;
  text-decoration: none;
}

.hero-photo .photo-credit:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .hero-photo {
    height: 170px;
  }
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
}

.filter-chip {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
  border-color: var(--color-primary-light);
}

.filter-chip.active {
  background: var(--gradient-ocean);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 126, 168, 0.35);
}

.search-wrap {
  position: relative;
  flex: 1 1 220px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--color-muted);
  pointer-events: none;
}

.search-box {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.search-box:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

/* Beach card grid */
.beach-grid-wrapper {
  display: flex;
  flex-direction: column;
}

.region-heading {
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 20px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.region-heading:first-child {
  margin-top: 6px;
}

.beach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 6px 0 48px;
}

.beach-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.beach-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.beach-card-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--gradient-ocean);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.beach-card-photo .card-wave-icon {
  position: absolute;
  bottom: -22%;
  width: 78%;
  height: auto;
  color: rgba(255, 255, 255, 0.32);
  transition: transform 0.3s ease, color 0.3s ease;
  z-index: 0;
}

.beach-card:hover .beach-card-photo .card-wave-icon {
  transform: translateY(-6%) scale(1.04);
  color: rgba(255, 255, 255, 0.45);
}

.beach-card-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.beach-card:hover .beach-card-photo img {
  transform: scale(1.06);
}

.beach-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.beach-card .location {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  font-weight: 600;
}

.beach-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.beach-card .sports {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.beach-card .state-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  color: var(--color-primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
}

.region-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border-left: 5px solid var(--score-unknown);
}

.region-card.risk {
  border-left-color: var(--score-bad);
}

.region-card.safe {
  border-left-color: var(--score-great);
}

.region-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.region-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.region-card .status-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.region-card.risk .status-tag {
  background: #fdeceb;
  color: var(--score-bad);
}

.region-card.safe .status-tag {
  background: #e9f7ee;
  color: var(--score-great);
}

.empty-state {
  color: var(--color-muted);
  padding: 48px 0;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0 48px;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.site-footer .sources {
  margin-top: 8px;
  font-size: 0.8rem;
}

.site-footer .credit-line {
  margin-top: 4px;
  font-size: 0.78rem;
  opacity: 0.75;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.5rem;
  }
}

/* ---------- Assistente de chat (Guia do Mar) ---------- */

.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
}

.chat-launcher {
  position: relative;
  height: 56px;
  border-radius: 999px;
  border: none;
  padding: 0 22px 0 18px;
  background: var(--gradient-ocean);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(11, 122, 140, 0.45);
  transition: transform 0.15s ease;
}

.chat-launcher-label {
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.chat-widget.open .chat-launcher-label {
  display: none;
}

.chat-launcher:hover {
  transform: scale(1.06);
}

.chat-launcher-icon-close {
  display: none;
}

.chat-widget.open .chat-launcher-icon-open {
  display: none;
}

.chat-widget.open .chat-launcher-icon-close {
  display: block;
}

.chat-launcher-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid var(--color-accent);
  opacity: 0;
  animation: chat-pulse 3.2s ease-out infinite;
}

.chat-widget.open .chat-launcher-pulse {
  animation: none;
  opacity: 0;
}

@keyframes chat-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  80% {
    opacity: 0;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(380px, calc(100vw - 40px));
  max-height: min(600px, 75vh);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-widget.open .chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel-header {
  background: var(--gradient-ocean);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chat-panel-titles {
  flex: 1;
  min-width: 0;
}

.chat-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
}

.chat-subtitle {
  font-size: 0.76rem;
  opacity: 0.88;
}

/* Seletor de voz de leitura — deixa a pessoa escolher/testar, no próprio
   aparelho, qual voz em português soa melhor (a qualidade da voz depende
   do sistema, não tem como a gente garantir isso por código). */
.chat-voice-select {
  flex-shrink: 0;
  max-width: 110px;
  font-size: 0.72rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 5px 6px;
  cursor: pointer;
}

.chat-voice-select option {
  color: var(--color-text);
  background: #fff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--color-bg);
}

.chat-bubble {
  max-width: 88%;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 4px;
  position: relative;
  padding-right: 42px;
}

/* Botão "ouvir" (acessibilidade — leitura em voz alta via Web Speech API).
   Canto superior direito da bolha, fora do fluxo do texto — por isso a
   bolha de assistente ganha um respiro extra à direita (padding-right
   acima) pra não sobrepor a primeira linha. */
.chat-speak-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-speak-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.chat-speak-btn.speaking {
  background: var(--color-primary);
  color: #fff;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--gradient-ocean);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.safety {
  border: 1px solid #f3b3ac;
  background: #fdeceb;
}

.chat-bubble.celebrate {
  border: 1px solid #bfe6c9;
  background: #eefaf1;
}

.chat-bubble p {
  margin: 0 0 14px;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-fact-inline {
  color: var(--color-muted);
  font-size: 0.82rem;
}

.chat-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
}

.chat-facts-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 8px 2px;
}

.chat-bubble .chat-facts {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}

/* Grupo de avisos (alerta oficial/variabilidade) — separado visualmente do
   grupo informativo (maré/nível/formação da onda), pra não competir pela
   mesma atenção numa lista só. */
.chat-bubble .chat-facts.chat-facts-warning {
  background: #fdf3f2;
  border-color: #f3b3ac;
}

.chat-bubble .chat-facts.chat-facts-warning .chat-fact {
  color: #9a2f26;
}

.chat-bubble .chat-facts.chat-facts-warning .icon {
  color: #c0392b;
}

.chat-bubble .chat-fact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--color-text);
  font-size: 0.83rem;
  line-height: 1.5;
}

.chat-bubble .chat-fact .icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}

.chat-bubble .chat-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-family: "Poppins", sans-serif;
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
}

.chat-bubble .chat-cta {
  display: block;
  width: fit-content;
  margin: 6px 0 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--color-bg);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: background 0.15s ease;
}

.chat-bubble .chat-cta:hover {
  background: var(--color-border);
}

.chat-bubble .chat-disclaimer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border);
  font-size: 0.72rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--color-surface);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-muted);
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-quickstart {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
  background: var(--color-bg);
  flex-shrink: 0;
}

.chat-quickstart button,
.chat-bubble .chat-chip {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.chat-quickstart button:hover,
.chat-bubble .chat-chip:hover {
  border-color: var(--color-primary-light);
}

.chat-bubble .chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-ocean);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(11, 126, 168, 0.35);
}

.chat-send:hover {
  transform: scale(1.05);
}

/* Guia do Mar: o campo de digitação é o caminho principal (as sugestões em
   botão confundiam) — então ele ganha destaque: dica logo acima, campo
   maior e com contorno/halo na cor da marca, botões maiores. 16px de fonte
   evita o zoom automático do iPhone ao tocar no campo. */
.chat-input-hint {
  display: block;
  padding: 8px 16px 6px;
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-input-hint[hidden] {
  display: none;
}

.chat-input-row.prominent {
  padding: 12px 14px 14px;
  border-top: 2px solid var(--color-primary-light);
}

.chat-input-row.prominent input {
  padding: 13px 18px;
  font-size: 1rem;
  border: 2px solid var(--color-primary-light);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(63, 193, 201, 0.18);
}

.chat-input-row.prominent input::placeholder {
  color: var(--color-muted);
}

.chat-input-row.prominent input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(14, 122, 140, 0.22);
}

.chat-input-row.prominent .chat-send,
.chat-input-row.prominent .chat-mic-btn {
  width: 46px;
  height: 46px;
}

/* Botão de microfone — entrada por voz (acessibilidade). Some se o
   navegador não suportar (fica hidden até o JS confirmar suporte). */
.chat-mic-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-mic-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.chat-mic-btn.listening {
  background: #e14b3a;
  color: #fff;
  animation: mic-pulse 1.4s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 75, 58, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(225, 75, 58, 0); }
}

@media (max-width: 480px) {
  .chat-widget {
    right: 12px;
    bottom: 12px;
  }
  .chat-panel {
    width: calc(100vw - 24px);
    max-height: 80vh;
    bottom: 72px;
  }
}

/* ---------- Botão de emergência "Preciso de ajuda no mar" ---------- */

.sos-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  /* Acima de qualquer popup/overlay do site (o do Almir usa 300): numa
     emergência o botão SOS nunca pode ficar atrás de um aviso. */
  z-index: 400;
}

.sos-launcher {
  position: relative;
  height: 56px;
  border-radius: 999px;
  border: none;
  padding: 0 22px 0 18px;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(185, 28, 28, 0.5);
  transition: transform 0.15s ease;
  animation: sos-breathe 2.4s ease-in-out infinite;
}

.sos-launcher-label {
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.sos-widget.open .sos-launcher-label {
  display: none;
}

.sos-launcher:hover {
  transform: scale(1.06);
}

@keyframes sos-breathe {
  0%,
  100% {
    box-shadow: 0 10px 26px rgba(185, 28, 28, 0.5);
  }
  50% {
    box-shadow: 0 10px 30px rgba(185, 28, 28, 0.8);
  }
}

.sos-launcher-icon-close {
  display: none;
}

.sos-widget.open .sos-launcher-icon-open {
  display: none;
}

.sos-widget.open .sos-launcher-icon-close {
  display: block;
}

.sos-widget.open .sos-launcher {
  animation: none;
}

.sos-panel {
  position: absolute;
  left: 0;
  bottom: 74px;
  width: min(360px, calc(100vw - 40px));
  max-height: min(620px, 78vh);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sos-widget.open .sos-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sos-panel-header {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
}

.sos-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sos-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
}

.sos-subtitle {
  font-size: 0.76rem;
  opacity: 0.9;
}

.sos-panel-body {
  padding: 16px;
}

.sos-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fdeceb;
  border: 1px solid #f3b3ac;
  color: #8a241a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.sos-call-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease;
}

.sos-call-btn:hover {
  transform: translateY(-1px);
}

.sos-call-btn.primary {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
}

.sos-call-btn:not(.primary) {
  background: var(--color-bg);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
}

.sos-call-btn span {
  display: flex;
  flex-direction: column;
  font-size: 1.05rem;
  line-height: 1.25;
}

.sos-call-btn small {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
  text-transform: none;
}

.sos-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0 0 16px;
}

.sos-secondary {
  font-size: 0.76rem;
  color: var(--color-muted);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 0 0 16px;
}

.sos-secondary a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.sos-secondary a:hover {
  text-decoration: underline;
}

.sos-location {
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  margin-bottom: 14px;
}

.sos-location-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-primary-dark);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.sos-location-btn:hover {
  border-color: var(--color-primary-light);
}

.sos-coords {
  margin-top: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  text-align: center;
}

.sos-location-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.sos-share-btn {
  background: var(--gradient-ocean);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.sos-maps-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  align-self: center;
  text-decoration: none;
}

.sos-maps-link:hover {
  text-decoration: underline;
}

.sos-location-error {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.sos-guide {
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  margin-bottom: 14px;
}

.sos-guide summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-primary-dark);
}

.sos-guide ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--color-text);
}

.sos-guide li {
  margin-bottom: 6px;
}

.sos-footer-note,
.sos-sources {
  font-size: 0.74rem;
  color: var(--color-muted);
  margin: 0 0 6px;
}

.sos-sources a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .sos-widget {
    left: 12px;
    bottom: 12px;
  }
  .sos-panel {
    width: calc(100vw - 24px);
    max-height: 82vh;
    bottom: 72px;
  }
}

/* ---------- Popup "Uma onda de força pelo Almir Salazar" ---------- */

.almir-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 60, 0.6);
  backdrop-filter: blur(2px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.almir-popup-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 350px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: almir-popup-in 0.28s ease-out;
}

@keyframes almir-popup-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .almir-popup-card {
    animation: none;
  }
}

.almir-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.almir-popup-photo {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius) var(--radius) 0 0;
}

.almir-popup-body {
  padding: 14px 18px 16px;
}

.almir-popup-eyebrow {
  display: inline-block;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.almir-popup-lede {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 8px;
}

.almir-popup-body p {
  font-size: 0.83rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.almir-popup-cta {
  display: block;
  text-align: center;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.almir-popup-pix {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.almir-popup-note {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--color-muted);
  margin: 8px 0 0;
}

.almir-popup-body p.almir-popup-note {
  font-size: 0.7rem;
  line-height: 1.35;
  margin: 8px 0 0;
}

.almir-popup-pix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  margin-bottom: 5px;
}

.almir-popup-copy {
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-primary-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}
