﻿@charset "UTF-8";
/* styles.css - BlueSignal dise�o actualizado con estad�sticas enriquecidas y mejor alineaci�n */

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

:root {
  --color-primary: #1976d2;
  --color-primary-dark: #0d47a1;
  --color-secondary: #e3f2fd;
  --color-accent: #fdd835;
  --color-text: #263238;
  --color-light: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --font-main: 'Inter', sans-serif;
  --icon-seal: url("/static/main/icons/seal.d3ea91333fdf.svg");
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --brand: #2563eb;
  --accent: #16a34a;
  --chip: #ffffff;
  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius: var(--radius-md);
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 3px 6px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  /* Typography scale */
  --font-size-sm: 0.9rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --line-height-tight: 1.35;
  --line-height-normal: 1.5;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--color-secondary);
  margin: 0;
  padding: 0;
  color: var(--color-text);
  overflow-x: hidden;
}
/* Ensure padding doesn't add overflow on mobile */
*, *::before, *::after { box-sizing: border-box; }

/* Probabilidad diaria widget (estilo clima) */
.prob-widget {
  position: relative;
  display: block;
  padding: 1.2rem 1.6rem 1.25rem;
  border-radius: 18px;
  color: #fff;
  background: var(--prob-bg, linear-gradient(135deg, #1976d2, #64b5f6));
  box-shadow: 0 10px 28px rgba(37,99,235,.28);
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease;
}
.prob-widget::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: var(--prob-ghost, 0%);
  width: max(6%, var(--prob-ghost, 0%));
  background: #fff;
  opacity: .18;
  border-radius: 0 999px 999px 0;
  pointer-events: none;
  transition: width .6s ease-out;
}
.prob-widget:active { transform: scale(.99); box-shadow: 0 8px 18px rgba(37,99,235,.25); }
.prob-stack { display: grid; gap: 10px; position: relative; z-index: 1; }
.prob-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; width: 100%; }
.prob-row--main { justify-content: space-between; align-items: center; }
.prob-row--metrics { justify-content: flex-end; gap: 16px; }
.prob-row--meta { justify-content: flex-end; }
.prob-caption { font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.prob-main-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.prob-sep { opacity: .7; }
.prob-phrase { font-size: .85rem; opacity: .85; text-align: right; max-width: 360px; }
.prob-value { font-size: clamp(2.2rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.prob-level { font-weight: 700; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.prob-mini { display: inline-flex; align-items: center; gap: 8px; }
.prob-mini__label { font-weight: 600; opacity: .92; white-space: nowrap; }
.prob-mini__value { font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.prob-mini__bar {
  flex: 1 1 140px;
  min-width: 120px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.prob-mini__bar .fill {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: #fff;
  transition: width .6s ease-out;
}
.prob-updated { font-size: .8rem; opacity: .65; text-align: right; margin-top: 4px; }


.prob-widget.is-hot .prob-value { animation: probPulse 8s ease-in-out infinite; }
.prob-widget.is-fresh .prob-updated { animation: probFade 0.45s ease-out 0.1s both; }

@keyframes probPulse {
  0%, 80%, 100% { transform: translateY(0); text-shadow: 0 6px 18px rgba(0,0,0,.16); }
  45% { transform: translateY(-1px) scale(1.01); text-shadow: 0 10px 24px rgba(0,0,0,.2); }
}

@keyframes probFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: .82; transform: translateY(0); }
}

@media (max-width: 640px) {
  .prob-widget { padding: 1rem; border-radius: 16px; }
  .prob-row--metrics { justify-content: flex-end; }
  .prob-mini { flex: 1 1 100%; }
  .prob-row--main { align-items: flex-start; }
  .prob-phrase { flex: 1 1 100%; text-align: left; font-size: .8rem; max-width: 260px; }
  .prob-value { font-size: clamp(2rem, 8vw, 2.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .prob-widget,
  .prob-mini__bar .fill,
  .prob-widget.is-hot .prob-value,
  .prob-widget.is-fresh .prob-updated { animation: none !important; transition: none !important; }
}

/* Popup card for map markers */
.popup-card { font-size: .85rem; min-width: 230px; max-width: 260px; line-height: 1.4; }
.popup-header { display:flex; align-items:center; gap:.45rem; margin-bottom:.25rem; }
.popup-emoji { width:24px; height:24px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:rgba(25,118,210,.08); }
.popup-emoji span{font-size:1.1rem;}
.popup-emoji.ep--seal,
.nearby-emoji.ep--seal,
.report-detail__emoji.ep--seal,
.report-detail__emoji[data-especie*="lobo marino"],
.report-detail__emoji[data-especie*="elefante marino"],
.report-detail__emoji[data-especie*="foca"],
.emoji-pin.ep--seal .ep {
  background-image: var(--icon-seal);
  background-repeat: no-repeat;
  background-position: center;
}
.popup-emoji.ep--seal { background-size: 16px 16px; }
.emoji-pin.ep--seal .ep { background-size: 22px 22px; }
.nearby-emoji.ep--seal {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background-size: 18px 18px;
}
.report-detail__emoji.ep--seal,
.report-detail__emoji[data-especie*="lobo marino"],
.report-detail__emoji[data-especie*="elefante marino"],
.report-detail__emoji[data-especie*="foca"] {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  background-size: 18px 18px;
  background-color: rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  font-size: 0;
  vertical-align: -0.1em;
}
[data-theme="dark"] .report-detail__emoji.ep--seal,
[data-theme="dark"] .report-detail__emoji[data-especie*="lobo marino"],
[data-theme="dark"] .report-detail__emoji[data-especie*="elefante marino"],
[data-theme="dark"] .report-detail__emoji[data-especie*="foca"] {
  background-color: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.32);
}
.popup-emoji.ep--seal span,
.nearby-emoji.ep--seal span,
.emoji-pin.ep--seal .ep span { display: none; }
.popup-title-wrap { display:flex; flex-direction:column; }
.popup-title, .popup-title-link { font-weight: 700; }
.popup-title-link { color: inherit; text-decoration:none; }
.popup-title-link:hover, .popup-title-link:focus { text-decoration:underline; }
.popup-sub { opacity: .85; font-size: .8rem; }
.popup-body { padding-top:.35rem; margin-top:.15rem; border-top:1px solid rgba(0,0,0,.06); }
.popup-meta { opacity: .75; font-size: .78rem; }
.popup-meta + .popup-meta { margin-top: .1rem; }
.popup-actions { margin-top: .5rem; display: flex; justify-content: flex-end; }
.popup-share {
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff !important;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.popup-share:hover,
.popup-share:focus {
  background: #1ebe5b;
}

/* Report form (reportar_avistaje) */
.report-page { max-width: 860px; margin: 0 auto; padding: 1rem; }
.report-header { margin: .25rem 0 1rem; }
.report-header h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
.report-header p { margin: 0; opacity: .8; }

.card { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.05);
        margin: 1rem 0; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card:hover, .card:focus-within { border-color: rgba(25,118,210,.25); box-shadow: 0 8px 26px rgba(25,118,210,.12); transform: translateY(-2px); }
.card h2{position:relative}
.card:hover h2::after, .card:focus-within h2::after{content:""; position:absolute; left:1rem; bottom:.5rem; height:2px; width:44px; background: var(--color-primary, #1976d2); border-radius:2px; opacity:.85}
.card h2 { font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; margin: 0; padding: .9rem 1rem; opacity: .8; }
.card .body { padding: 1rem; }

/* Report detail (avistaje_detalle) */
.report-detail { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem; }
.report-detail__header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap: wrap;
  gap:.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.report-detail__title { margin:0; font-size:1.6rem; font-weight:700; min-width: 0; line-height:1.2; display:flex; align-items:center; gap:.5rem; }
.report-detail__emoji { margin-right:0; flex:0 0 auto; align-self:center; }
.report-detail__meta { margin:0; opacity:.8; font-size:.9rem; text-align:right; }
.report-detail__body { display:flex; flex-direction:column; gap:1rem; }
.report-detail__media {
  border-radius:10px;
  overflow:hidden;
  background:#000;
  aspect-ratio: 16 / 9;
}
.report-detail__media img,
.report-detail__media video {
  display:block;
  width:100%;
  height:100%;
}
.report-detail__media img {
  object-fit:cover;
}
.report-detail__media video {
  object-fit:contain;
}
.report-detail__media--empty {
  background:rgba(0,0,0,.02);
  border:1px dashed rgba(0,0,0,.12);
  padding:.75rem 1rem;
  color:rgba(0,0,0,.6);
  font-size:.9rem;
}
.report-detail__info {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:.5rem 1.5rem;
  margin:0;
}
.report-detail__info dt {
  font-weight:600;
  font-size:.85rem;
  opacity:.8;
}
.report-detail__info dd {
  margin:0;
  font-size:.95rem;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .report-detail__media--empty {
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.2);
  color:rgba(255,255,255,.8);
}
.report-detail__coords {
  margin:0;
  font-size:.85rem;
  opacity:.85;
}
.report-detail__comment {
  margin:0;
  font-size:.95rem;
  line-height:1.5;
}
.report-detail__comment-box {
  margin-top:.75rem;
  padding:.75rem 1rem;
  border-radius:10px;
  background:rgba(0,0,0,.02);
  border:1px solid rgba(0,0,0,.06);
}
[data-theme="dark"] .report-detail__comment-box {
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.15);
}
.report-detail__comment-title {
  font-weight:600;
  font-size:.9rem;
  margin-bottom:.25rem;
}
.report-detail__actions {
  display:flex;
  justify-content:flex-end;
}
.report-detail__footer {
  margin-top:.75rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
@media (max-width: 900px){
  .report-detail__info { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .report-detail__header { flex-direction: column; align-items:flex-start; }
  .report-detail__meta { text-align: left; }
}
@media (max-width: 520px){
  .report-detail__info { grid-template-columns: 1fr; }
}
[data-theme="dark"] .report-detail__coords a {
  color:#64b5f6;
}
.report-detail__coords a {
  color: var(--color-primary-dark);
  text-decoration: underline;
}
[data-theme="dark"] .report-detail__media--empty {
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.2);
  color:rgba(255,255,255,.8);
}

.grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.grid .field { min-width: 0; }

.field label { display: block; font-weight: 600; margin: .25rem 0 .35rem; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  border: 1px solid rgba(0,0,0,.15); background: transparent; color: inherit;
  border-radius: 10px; padding: .65rem .75rem; font: inherit; outline: none;
}
.help, .error { font-size: .85rem; margin-top: .35rem; }
.help { opacity: .7; }
.error { color: #c62828; }

/* Emoji helpers for labels (scoped) */
.report-page label[for="id_especie"]::before { content: "🐋 "; }
.report-page label[for="id_cantidad_individuos"]::before { content: "🔢 "; }
.report-page label[for="id_comportamiento"]::before { content: "🎬 "; }
.report-page label[for="id_distancia_estimada"]::before { content: "📏 "; }
.report-page label[for="id_estado_mar"]::before { content: "🌊 "; }
.report-page label[for="id_condicion_cielo"]::before { content: "☁️ "; }
.report-page label[for="id_direccion_movimiento"]::before { content: "🧭 "; }
.report-page label[for="id_comentario"]::before { content: "📝 "; }
.report-page label[for="id_foto"]::before { content: "📎 "; }
.report-page label::before { opacity: .9; }

.radio-cards { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 520px) { .radio-cards { grid-template-columns: 1fr 1fr; } }
.radio-card { display: flex; gap: .75rem; align-items: center; cursor: pointer;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: .75rem .85rem; transition: .15s ease; }
.radio-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.radio-card input[type="radio"] { accent-color: var(--color-primary, #1976d2); }

.actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }
.btn { appearance: none; border: 1px solid transparent; padding: .7rem 1rem; border-radius: 10px; cursor: pointer; font: inherit; text-decoration: none; }
.btn.primary { background: var(--color-primary, #1976d2); color: #fff; }
.btn.secondary { background: transparent; border-color: rgba(0,0,0,.2); color: inherit; }

.gps-status { min-height: 1.25rem; }

/* Upload tile */
.upload-tile { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:.25rem;
  border: 2px dashed rgba(0,0,0,.2); border-radius: 12px; padding: 1rem; cursor: pointer; text-align:center; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.upload-tile .icon { font-size: 1.6rem; }
.upload-tile .sub { font-size: .85rem; opacity: .7; }
.upload-tile:hover, .upload-tile.is-drag { background: rgba(25,118,210,.06); border-color: rgba(25,118,210,.5); transform: translateY(-1px); }
.upload-preview { margin-top: .5rem; display: none; }
.upload-preview img, .upload-preview video { max-width: 100%; border-radius: 10px; display: block; }
/* Remove duplicated emoji/paperclip on upload label tile */
#upload-tile::before { content: none !important; }

/* Hide native file input but keep accessible via label */
.field input[type="file"]{ position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* Dark mode for report */
[data-theme="dark"] .card { background: #121417; border-color: rgba(255,255,255,.09); box-shadow: none; }
[data-theme="dark"] .btn.secondary { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .error { color: #ef5350; }
[data-theme="dark"] .upload-tile { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .upload-tile:hover, [data-theme="dark"] .upload-tile.is-drag { background: rgba(255,255,255,.06); border-color: rgba(100,181,246,.6); }
/* Footer (site-wide) */
.site-footer{margin-top:3rem;padding:2rem 1rem;background:#f7f9fc;border-top:1px solid rgba(0,0,0,.06)}
.site-footer .footer-content{max-width:1400px;margin:0 auto;display:grid;row-gap:1rem;column-gap:1rem;grid-template-columns:1fr;align-items:center;justify-items:center;text-align:center;width:100%;box-sizing:border-box}
.site-footer .footer-brand{text-align:center;display:flex;flex-direction:column;align-items:center;gap:.15rem}
.site-footer .footer-logo{width:128px;height:128px;object-fit:contain}
.site-footer .footer-title{font-weight:600;color:var(--color-primary);font-size:1rem;letter-spacing:.1px;line-height:1.2;white-space:nowrap}
.site-footer .footer-sub{opacity:.72;font-size:.85rem}
.site-footer .footer-actions{display:flex;gap:1rem;align-items:center;justify-content:center;flex-wrap:wrap}
.site-footer .footer-contact{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center;margin:0}
.site-footer .contact-item{color:inherit;text-decoration:none;border-bottom:1px dotted transparent}
.site-footer .contact-item:hover{border-bottom-color:currentColor}
.site-footer .footer-contact .contact-item + .contact-item::before{content:'·';margin:0 .5rem;opacity:.5}
.site-footer .footer-social{display:flex;gap:.6rem;justify-content:center;margin:0}
.site-footer .social-link{color:#6b7785;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:transparent;border:1px solid rgba(0,0,0,.15);transition:all .18s ease}
.site-footer .social-link svg{width:20px;height:20px}
.site-footer .social-link:hover{color:var(--color-primary);border-color:rgba(25,118,210,.5);background:rgba(25,118,210,.06);transform:translateY(-1px)}
.site-footer .footer-bottom{display:none}
@media(max-width:640px){.site-footer .footer-logo{width:104px;height:104px}}
@media(max-width:640px){.site-footer .footer-title{font-size:.95rem;line-height:1.25;letter-spacing:0}}
@media(max-width:640px){.site-footer .footer-sub{font-size:.8rem}}
@media(max-width:640px){.site-footer{overflow:hidden}.site-footer .footer-content{width:100%;max-width:100%;padding:0 1rem;box-sizing:border-box}}
@media(min-width:760px){.site-footer .footer-content{grid-template-columns:1fr}.site-footer .footer-brand{text-align:center}.site-footer .footer-social{justify-content:center}}
[data-theme="dark"] .site-footer{background:#0c1116;border-color:rgba(255,255,255,.06)}
[data-theme="dark"] .site-footer .social-link{background:transparent;color:#c2c8ce;border-color:rgba(255,255,255,.18)}
[data-theme="dark"] .site-footer .social-link:hover{background:rgba(255,255,255,.06);color:#64b5f6;border-color:rgba(100,181,246,.6)}
[data-theme="dark"] .site-footer .footer-bottom{border-color:rgba(255,255,255,.06)}

main {
  padding: 2rem 1rem;
  /* Ampl?a el ancho usable del contenido principal para que los gr?ficos aprovechen m?s el espacio */
  max-width: 1400px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  text-align: center;
}

.hero h2 {
  font-size: 2.2rem;
  color: var(--color-primary-dark);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.hero .actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.button,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.button:hover {
  background: var(--color-primary-dark);
}

.button-outline {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.button-outline:hover {
  background: var(--bg);
  box-shadow: var(--shadow-md);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stats .card {
  background: var(--color-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.stats h3 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.4rem;
}

.stats .icon {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary-dark);
}

.stats .label {
  font-size: 0.95rem;
  color: #666;
}

.map-container {
  height: 400px;
  width: 100%;
  background: var(--color-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}


@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(25, 118, 210, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
  }
}

.avistajes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.avistaje-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 6px var(--color-shadow);
}

.avistaje-card h4 {
  margin: 0 0 0.5rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.avistaje-card p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

footer {
  background-color: var(--color-primary-dark);
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  header h1 {
    font-size: 2.2rem;
  }
  .hero h2 {
    font-size: 2.4rem;
  }
}

h3 {
  color: #1976d2;       /* azul primario */
  text-align: center;   /* centrado horizontal */
  font-weight: 700;     /* negrita para mejor presencia */
  font-size: 2.2rem;    /* tama�o adecuado para un encabezado */
  margin-bottom: 1rem;  /* espacio debajo */
  font-family: 'Inter', sans-serif; /* para mantener la tipograf�a general */
}

.leaflet-control-fullscreen .leaflet-control-fullscreen-button,
.leaflet-control-zoom-fullscreen {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.fullscreen-icon {
  background-image: none !important;
  position: relative;
}
.fullscreen-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://unpkg.com/leaflet.fullscreen@1.6.0/icon-fullscreen.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  pointer-events: none;
}
.leaflet-retina .fullscreen-icon::before {
  background-image: url("https://unpkg.com/leaflet.fullscreen@1.6.0/icon-fullscreen-2x.png");
  background-size: 22px 22px;
}
[data-theme="dark"] .fullscreen-icon::before {
  filter: invert(1) brightness(1.15);
}






/* --- Estilos para el nuevo formulario --- */

/* --- Material Design Mobile-First Adaptado --- */
.report-page {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    --radius: 8px;
}
/* Header */
.report-page .form-header h1 {
    color: var(--color-primary-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.report-page .form-header p {
    font-size: 0.95rem;
    color: #616161;
}

/* Tarjetas */
.report-page .form-card {
    background-color: var(--color-light);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px var(--color-shadow);
    margin-bottom: 1rem;
    padding: 1rem;
}
.report-page .card-header {
    background-color: #E3F2FD;
    color: var(--color-primary-dark);
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #BBDEFB;
}
.report-page .card-body {
    padding: 1rem;
}

/* Radio buttons */
.report-page .radio-option {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #E0E0E0;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    background-color: white;
    transition: all 0.2s ease;
}
.report-page .radio-option:hover {
    background-color: #F5F9FF;
    border-color: var(--color-primary);
}
.report-page .radio-option input[type="radio"] {
    accent-color: var(--color-primary);
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

/* Labels fijos */
.report-page .field-group label,
.report-page .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #616161;
    margin-bottom: 0.25rem;
}

/* Inputs */
.report-page input[type="text"],
.report-page input[type="number"],
.report-page input[type="email"],
.report-page input[type="tel"],
.report-page input[type="url"],
.report-page select,
.report-page textarea {
    width: 100%;
    padding: 0.65rem 0.5rem;
    border: none;
    border-bottom: 2px solid #BDBDBD;
    font-size: 1rem;
    background-color: transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.report-page input:focus,
.report-page select:focus,
.report-page textarea:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
    background-color: #FAFAFA;
}
.report-page input:disabled,
.report-page select:disabled,
.report-page textarea:disabled {
    background-color: #F5F5F5;
    border-bottom-color: #E0E0E0;
    cursor: not-allowed;
}

/* Select flecha */
.report-page select {
    appearance: none;
    background: transparent url("data:image/svg+xml;utf8,<svg fill='%23757575' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 0.75rem center;
    background-size: 1rem;
    padding-right: 2rem;
}
[data-theme="dark"] .report-page select {
    color-scheme: dark;
    color: var(--fg);
    border-bottom-color: var(--border);
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23cbd5f5' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}
[data-theme="dark"] .report-page select option,
[data-theme="dark"] .report-page select optgroup {
    background-color: #0f172a;
    color: #e5e7eb;
}
[data-theme="dark"] .report-page select option:checked {
    background-color: #1f2937;
    color: #e5e7eb;
}
[data-theme="dark"] .report-page input:focus,
[data-theme="dark"] .report-page select:focus,
[data-theme="dark"] .report-page textarea:focus {
    background-color: rgba(255,255,255,.04);
}

/* Textareas */
.report-page textarea {
    min-height: 80px;
    resize: vertical;
}

/* Botones principales */
.report-page .btn-primary,
.report-page .btn-secondary {
    min-height: 44px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}
.report-page .btn-primary {
    background-color: var(--color-primary) !important;
    border: none !important;
    color: white !important;
}
.report-page .btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
}
/* Bot�n cancelar outline azul */
.report-page .btn-secondary {
    background-color: #fff !important;
    border: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    text-decoration: none !important;
    font-weight: 500;
}
.report-page .btn-secondary:hover {
    background-color: #f5f9ff !important;
}

/* Ripple effect */
.report-page .btn-primary::after, .report-page .btn-secondary::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.4);
    transition: transform 0.5s, opacity 1s;
    pointer-events: none;
}
.report-page .btn-primary:active::after, .report-page .btn-secondary:active::after {
    transform: scale(4);
    opacity: 0;
    transition: 0s;
}

/* Bot�n GPS */
.report-page .btn-gps {
    background-color: var(--color-primary);
    border: none;
    color: white;
    padding: 0.65rem 1.2rem;
    font-size: 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 0.5rem;
}
.report-page .btn-gps:hover {
    background-color: var(--color-primary-dark);
}

.report-page .gps-status:empty {
    display: none;
}

/* Input file oculto + bot�n custom */
.report-page input[type="file"] {
    display: none;
}
.report-page .file-upload-label {
    display: inline-block;
    background-color: var(--color-primary);
    color: #ffffff !important; ; /* Texto blanco */
    padding: 0.65rem 1.2rem;
    font-size: 1rem !important;
    border-radius: var(--radius);
    font-weight: 500 !important;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}
.report-page .file-upload-label:hover {
    background-color: var(--color-primary-dark);
}

/* GPS info */
.report-page .gps-status, .report-page #coordenadas-section {
    border-radius: var(--radius);
    background-color: #FAFAFA;
    border: 1px solid #E0E0E0;
    padding: 0.75rem;
}

/* Mapa */
.report-page #map {
    border-radius: var(--radius);
    border: 1px solid #E0E0E0;
    height: clamp(320px, 60vh, 520px);
}

/* Breakpoints */
@media (min-width: 768px) {
    .report-page .form-card {
        padding: 1.25rem;
    }
    .report-page .card-header {
        font-size: 1.1rem;
    }
}
@media (min-width: 1024px) {
    .report-page .form-card {
        padding: 1.5rem;
    }
    .report-page .form-header h1 {
        font-size: 1.5rem;
    }
}






/* Dashboard additions */
.dashboard { display: grid; gap: 16px; padding: 8px 16px; box-sizing: border-box; overflow-x: hidden; }
.hero-compact { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; }
.filters--inline { display:flex; gap:8px; align-items:center; }
.hero-info-wrapper { display:flex; justify-content:center; width:100%; margin: 8px 0 12px; }
.hero-info-card { width: 100%; max-width: 100%; background: #f4f9ff; border: 1px solid #e1e8f0; border-radius: 10px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04); padding: 16px; color: #334455; line-height: 1.5; box-sizing: border-box; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.hero-info-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06); border-color: #d5e2f0; }
.hero-info-card__title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; color: #1e2a38; letter-spacing: 0.01em; text-align: left; }
.hero-info-card__body { margin: 0; font-size: 0.95rem; text-align: left; }
@media (min-width: 640px) {
  .hero-info-card { padding: 20px; }
  .hero-info-card__body { font-size: 1rem; }
}
[data-theme="dark"] .hero-info-card { background: rgba(18, 26, 36, 0.92); border-color: rgba(255, 255, 255, 0.08); color: #dce6f5; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
[data-theme="dark"] .hero-info-card__title { color: #bcd7ff; }
.kpis { display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; }
.kpi-card { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:12px; }
.kpi-label { font-size:0.9rem; color:#64748b; }
.kpi-value { font-size:1.4rem; font-weight:700; }
@media (max-width: 640px) {
  .kpis[data-active-range] .kpi-card { display: none; }
  .kpis[data-active-range="all"] .kpi-card[data-range="all"],
  .kpis[data-active-range="today"] .kpi-card[data-range="today"],
  .kpis[data-active-range="7d"] .kpi-card[data-range="7d"],
  .kpis[data-active-range="30d"] .kpi-card[data-range="30d"] { display: block; }
}
.chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; width: 100%; grid-auto-columns: 1fr; box-sizing: border-box; }
.chart-card { background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:12px; display:flex; flex-direction:column; box-sizing: border-box; width: 100%; max-width: 100%; }
.chart-card.full { grid-column: 1 / -1; }
.chart-card canvas { display:block; max-width:100%; height:auto; background:transparent; }

@media (min-width: 768px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; width: 100%; grid-auto-columns: 1fr; }
}
/* Legend styles */
.legend { background: rgba(255,255,255,.95); padding:8px; border:1px solid #e2e8f0; border-radius:6px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.legend-title { font-weight:600; margin-bottom:6px; font-size:.9rem; }
.legend-item { display:flex; align-items:center; gap:8px; margin:4px 0; }
.legend-icon { width:20px; height:20px; }
.legend-swatch { width:12px; height:12px; border-radius:2px; display:inline-block; border:1px solid #0001; }
.legend-label { font-size:.9rem; }
/* Nearby list */
.nearby { display:grid; gap:8px; margin-top:8px; }
.nearby-item { padding:10px; border:1px solid #e2e8f0; border-radius:6px; background:#fff; }
.nearby-title { font-weight:600; margin-bottom:2px; }
.nearby-meta { color:#64748b; font-size:.9rem; }
.hide-mobile { display:none; }
@media (min-width: 768px) { .hide-mobile { display:inline-block; } }
/* Theme variables */
[data-theme="dark"] {
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #94a3b8;
  --card: #0f172a;
  --border: #1f2937;
  --brand: #3b82f6;
  --accent: #22c55e;
  --chip: #111827;
}

html, body { background: var(--bg); color: var(--fg); }
header, footer { background: var(--card); color: var(--fg); border-bottom: 1px solid var(--border); }

/* Utility helpers */
.u-flex { display:flex; }
.u-flex-center { display:flex; align-items:center; justify-content:center; }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-pad-2 { padding: var(--space-2); }
.u-pad-3 { padding: var(--space-3); }
.u-radius-sm { border-radius: var(--radius-sm); }
.u-radius-md { border-radius: var(--radius-md); }
.u-shadow-sm { box-shadow: var(--shadow-sm); }
.u-text-sm { font-size: var(--font-size-sm); line-height: var(--line-height-normal); }
.u-text-muted { color: var(--muted); }

/* Enhance KPIs and cards */
.kpi-card { background: var(--card); border:1px solid var(--border); border-radius:12px; padding:12px; transition: transform .12s ease, box-shadow .12s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.kpi-label { color: var(--muted); }
.kpi-value { color: var(--fg); }
.kpi-icon { width:28px; height:28px; display:flex; align-items:center; justify-content:center; margin-bottom:6px; color: var(--brand); }

/* Chips */
.chip {
  background: var(--chip);
  color: var(--fg);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  min-height: 36px;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease, border-color .12s ease, color .12s ease;
  text-decoration: none;
}
.chip:hover { transform: translateY(-1px); }
.chip.is-active { background: var(--brand); color:#fff; border-color: var(--brand); }

/* Legend */
.legend { background: var(--card); border:1px solid var(--border); color: var(--fg); }
.legend-swatch { border-color: var(--border); }

/* Nearby */
.nearby { display: grid; gap: 10px; margin-top: 10px; }
.nearby-item { background: var(--card); border:1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: pointer; }
.nearby-item:hover { box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.nearby-row { display:flex; align-items:center; gap:10px; }
.nearby-emoji { font-size: 1.25rem; line-height: 1; }
.nearby-info { flex: 1 1 auto; min-width: 0; }
.nearby-title { font-weight: 600; }
.nearby-meta { color: var(--muted); font-size: .9rem; }
.nearby-go { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; }
}
/* Header/nav polish */
header { display:flex; align-items:center; justify-content:space-between; padding: 6px 12px; }
header .logo { height: 42px; width: auto; display: block; }
.site-nav { display:flex; align-items:center; gap: var(--space-2); }
.nav-links { display:flex; align-items:center; gap: 1.25rem; }
.nav-quick-report {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}
.nav-quick-report.is-active {
  background: var(--border);
  color: var(--fg);
}
.nav-quick-report:hover { filter: brightness(1.05); }
.nav-quick-report:focus { outline: 2px solid rgba(37,99,235,.5); outline-offset: 2px; }
.nav-toggle {
  display:none;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(25,118,210,.08); }
.nav-toggle:focus { outline: 2px solid rgba(25,118,210,.5); outline-offset: 2px; }
.nav-toggle__icon { font-size: 1.5rem; line-height: 1; }
[data-theme="dark"] .nav-toggle { color: var(--brand); }
header nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
header nav a:hover { opacity:.8; }
header nav a.button { color:#fff !important; }
.nav-links a:not(.button):not(.button-outline) {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
}
.site-nav .button,
.site-nav .button-outline {
  min-height: 34px;
  padding: 0.45rem 0.9rem;
  box-shadow: var(--shadow-sm);
}
.nav-links a:not(.button):not(.button-outline):hover {
  background: rgba(37,99,235,.08);
}
[data-theme="dark"] .nav-links a:not(.button):not(.button-outline):hover {
  background: rgba(59,130,246,.18);
}
.filters--inline { display:flex; gap:8px; align-items:center; }

/* Responsive refinements */
@media (max-width: 768px) {
  .dashboard { padding: 8px 16px; gap: 12px; }
  .hero-compact { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filters--inline { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap:4px; }
  .filters--inline .chip { padding: 6px 9px; min-height: 32px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; width: 100%; grid-auto-columns: 1fr; }
  .chart-card { padding: 10px; }
  .map { height: 320px; }
  .map-toolbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .map-tools { display: flex; flex-wrap: wrap; gap: 8px; }
  .nearby { gap: 6px; }
}

@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .filters--inline { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; gap:4px; }
  .filters--inline .chip { display: inline-block; margin-right: 6px; padding: 4px 8px; min-height: 28px; font-size:.9rem; }
  .map { height: 260px; }
  header nav a { font-size: 0.95rem; }
}
@media (max-width: 640px){
  .dashboard { display:flex; flex-direction: column; gap: 12px; }
  .kpis { grid-template-columns: 1fr; }
  .map-section { order: 3; }
  .charts-wrap { order: 4; }
  /* Extra breathing room between logo and nav on mobile */
  header { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  header .brand { margin: 0; }
  header .logo { height: 36px; }
  .site-nav { width: auto; flex-direction: row; align-items: center; gap: var(--space-2); position: relative; }
  .nav-quick-report { display: flex; }
.nav-toggle { display:flex; align-self: center; }
  .nav-links {
    display:flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    width: min(240px, 92vw);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 600;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  .nav-links a, .nav-links .button, .nav-links .button-outline { width: 100%; justify-content: center; }
  .nav-links a:not(.button):not(.button-outline) {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    box-shadow: var(--shadow-sm);
  }
  .nav-links .button,
  .nav-links .button-outline {
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    box-shadow: var(--shadow-sm);
  }
}

/* Override chart cards to follow theme */
.chart-card { background: var(--card) !important; border: 1px solid var(--border) !important; }
.chart-card canvas { display:block; max-width:100%; height:auto; background:transparent; }

.chart-grid--primary .chart-card { min-height: 340px; }
.chart-grid--trends .chart-card { min-height: unset; }
@media (max-width: 768px){ .chart-card h3{ font-size:1rem; } }

.chart-grid.chart-grid--trends {
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .chart-grid.chart-grid--trends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .chart-grid.chart-grid--trends > .chart-card.full { grid-column: 1 / -1; }
}

.chart-grid .chart-card { width: 100%; }/* las tarjetas ocupan su columna completa */
.container-7xl { max-width: 100%; margin-left:auto; margin-right:auto; padding-left:1rem; padding-right:1rem; }
@media (min-width: 640px){ .container-7xl { padding-left:1.5rem; padding-right:1.5rem; } }
@media (min-width: 1024px){ .container-7xl { padding-left:2rem; padding-right:2rem; } }
.charts-section { margin-top: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px){ .charts-section { margin-top: 2.5rem; margin-bottom: 2.5rem; } }
.charts-section.container-7xl { padding-left: 0; padding-right: 0; }
.charts-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px){ .charts-grid { gap: 2rem; } }
.charts-row { display: grid; gap: 1.5rem; }
.charts-row.one-col { grid-template-columns: 1fr; }
.charts-row.two-cols { grid-template-columns: 1fr; }
@media (min-width: 768px){ .charts-row.two-cols { grid-template-columns: 1fr 1fr; } }
.chart-card-pro { background: var(--card); border:1px solid var(--border); border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
@media (min-width: 640px){ .chart-card-pro { padding: 1.25rem; } }
.chart-aspect { position: relative; width: 100%; }
.chart-aspect.aspect-16-10 { padding-top: 62.5%; }
.chart-aspect.aspect-1-1 { padding-top: 100%; }
.chart-aspect.aspect-21-9 { padding-top: 42.857%; }
.chart-card--donut .chart-aspect { padding-top: 62.5% !important; position: relative; }
.donut-fit { position:absolute; top:0; bottom:0; left:50%; transform: translateX(-50%); height:100%; aspect-ratio: 1 / 1; width: auto; }
.donut-fit .chart-canvas { position:absolute; inset:0; width: 100% !important; height: 100% !important; }
.chart-canvas { position:absolute; inset:0; width:100% !important; height:100% !important; }
.chart-card-pro h3 { margin: 0 0 .5rem 0; font-size: 1.1rem; }
@media (min-width: 640px){ .chart-card-pro h3 { font-size: 1.25rem; } }
@media (max-width: 640px){
  .chart-card--donut .chart-aspect { padding-top: 78% !important; }
}

/* charts-wrap: padding sim?trico consistente con el resto del layout */
.charts-wrap { width: 100%; margin: 0; padding: 0 !important; box-sizing: border-box; }
@media (min-width: 640px){ .charts-wrap { padding: 0 !important; } }
@media (min-width: 1024px){ .charts-wrap { padding: 0 !important; } }

/* Map usability quick wins (scoped) */
.map-section { display:grid; gap:8px; }
.map-section .map-wrap { position: relative; padding: 8px; box-sizing: border-box; }
@media (min-width: 768px){ .map-section .map-wrap { padding: 12px; } }
.map-stage { position: relative; }
.map-section .map { width: 100%; border-radius: 10px; overflow: hidden; height: 420px; }
/* Taller map variant for better vertical space */
.map-section .map.map--tall { height: 630px; }
@media (min-width: 1280px){ .map-section .map.map--tall { height: 720px; } }
@media (max-width: 768px){ .map-section .map.map--tall { height: 432px; } }
@media (max-width: 640px){
  .map-section .map { height: 520px; }
  .map-section .map.map--tall { height: 544px; }
}
.map-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap: wrap; }
.map-toolbar--overlay { position:absolute; top:10px; left:10px; right:10px; z-index: 405; background: var(--card); border:1px solid var(--border); border-radius: 10px; padding: 8px 10px; box-shadow: 0 4px 16px rgba(0,0,0,.10); backdrop-filter: blur(6px); } .map-stage { padding-top: 64px; } @media (max-width: 768px){ .map-stage { padding-top: 160px; } } @media (max-width: 420px){ .map-stage { padding-top: 190px; } }
.map-toolbar h3 { margin: 0; font-size: 1.25rem; }
.map-tools { display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.segmented { display:inline-flex; border:1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--chip); }
.segmented .seg-btn { appearance:none; background: transparent; border: none; padding: 6px 12px; color: var(--fg); cursor:pointer; font-size: .95rem; display:flex; align-items:center; gap:6px; }
.segmented .seg-btn.is-active { background: var(--brand); color:#fff; }
.segmented .seg-btn:focus { outline: 2px solid rgba(37,99,235,.5); outline-offset: -2px; }
.segmented .seg-btn[disabled] { opacity:.5; cursor:not-allowed; }

/* Iconos de segmento */
.map-tools .select { height: 36px; padding: 4px 8px; border:1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--fg); width:auto; min-width: 88px; display:inline-block; }
.map-tools .map-row { display:flex; align-items:center; gap:8px; }
.map-tools .map-row--nearby .chip { flex: 0 0 auto; }
.map-tools .map-row--nearby .select { flex: 0 0 auto; min-width: 120px; }
.map-tools .map-row--center .chip { width: auto; justify-content: center; }
.map-tools .chip { height: 36px; padding: 4px 10px; display:inline-flex; align-items:center; gap:6px; }
.map-tools .seg-icon,
.map-tools .btn-ico { font-size: 1rem; line-height: 1; }
@media (max-width: 768px){
  .map-tools { flex-direction: column; align-items: stretch; }
  .map-tools .map-row { width: 100%; }
  .map-tools .map-row--segment .segmented { width: 100%; }
  .map-tools .map-row--segment .seg-btn { flex: 1 1 0; justify-content: center; }
  .map-tools .map-row--nearby { flex-wrap: nowrap; }
  .map-tools .map-row--nearby .chip { flex: 1 1 auto; }
  .map-tools .map-row--center .chip { width: 100%; }
}
@media (max-width: 420px){
  .map-tools .map-row--nearby { flex-wrap: wrap; }
  .map-tools .map-row--nearby .select { width: 100%; min-width: 0; }
}
/* Empuja los controles nativos por debajo de la barra */
.map-section .leaflet-top .leaflet-control { margin-top: 130px; }
.map-section .leaflet-control,
.report-page .leaflet-control {
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.map-section .leaflet-control a,
.report-page .leaflet-control a {
  background-color: var(--card);
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.map-section .leaflet-control a:hover,
.map-section .leaflet-control a:focus,
.report-page .leaflet-control a:hover,
.report-page .leaflet-control a:focus {
  background-color: rgba(59,130,246,.12);
  color: var(--fg);
}
.map-section .leaflet-control a.leaflet-disabled,
.report-page .leaflet-control a.leaflet-disabled {
  background-color: var(--card);
  color: var(--muted);
}

/* Emoji marker pin */
.emoji-pin .ep { width: 28px; height: 28px; border-radius: 50%; background: #fff; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin .ep span { font-size: 16px; line-height: 1; }
/* Species color accents */
.emoji-pin.ep--whale .ep { border-color:#0ea5e9; box-shadow: 0 0 0 2px rgba(14,165,233,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--orca .ep { border-color:#111827; box-shadow: 0 0 0 2px rgba(17,24,39,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--dolphin .ep { border-color:#06b6d4; box-shadow: 0 0 0 2px rgba(6,182,212,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--seal .ep { border-color:#64748b; box-shadow: 0 0 0 2px rgba(100,116,139,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--penguin .ep { border-color:#f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--turtle .ep { border-color:#22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--unknown .ep { border-color:#9ca3af; box-shadow: 0 0 0 2px rgba(156,163,175,.16), 0 2px 6px rgba(0,0,0,.12); }

/* Floating chips: view + range */
.map-stage .map-chip { position: absolute; z-index: 400; background: var(--chip); color: var(--fg); border:1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: .85rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.map-stage .map-chip--view { top: 12px; right: 16px; }
/* .map-stage .map-chip--range was moved to the infobar; rule removed */

/* Empty-state overlay */
.map-stage .map-empty { position: absolute; inset: 8px; display: grid; place-items: center; z-index: 402; pointer-events: none; }
.map-stage .map-empty__card { background: var(--card); color: var(--fg); border:1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.12); text-align: center; pointer-events: auto; }
.map-empty__title { margin-bottom: 8px; font-weight: 600; }
.map-empty[hidden] { display: none !important; }

/* Estado de ubicaci?n en esquina inferior derecha */
/* .map-stage .loc-status no longer used (status lives in infobar) */

/* Map info bar under the map for mobile-friendly status */
.map-infobar { display:flex; align-items:center; gap:12px; padding: 8px 10px; background: var(--card); border:1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; box-shadow: 0 2px 6px rgba(0,0,0,.04) inset; }
.map-infobar .infobar-spacer { flex:1 1 auto; }
.map-infobar .map-chip { position: static; border-radius: 999px; padding: 6px 10px; }
.map-infobar .infobar-status { color: var(--muted); font-size: .9rem; }
/* Range chips inside infobar */
.map-infobar .infobar-label { color: var(--muted); font-size: .9rem; margin-right: 6px; }
.map-infobar .range-chips { display: inline-flex; gap: 6px; }
.map-infobar .range-chips .chip { padding: 4px 10px; height: 32px; }
@media (max-width: 768px){ .map-infobar { flex-wrap: wrap; gap:8px; } .map-infobar .infobar-spacer { display:none; } }
@media (max-width: 640px){ .map-infobar .infobar-label { display: none; } }

/* Fullscreen map controls (floating layout) */
.leaflet-container.leaflet-fullscreen-on .leaflet-top .leaflet-control,
.leaflet-container.leaflet-pseudo-fullscreen .leaflet-top .leaflet-control,
.leaflet-fullscreen-on .leaflet-top .leaflet-control,
.leaflet-pseudo-fullscreen .leaflet-top .leaflet-control,
.map-fullscreen-ui .leaflet-top .leaflet-control { margin-top: 12px; }
.leaflet-fullscreen-on .map-toolbar--overlay,
.leaflet-pseudo-fullscreen .map-toolbar--overlay,
.map-fullscreen-ui .map-toolbar--overlay {
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: 240px;
  padding: 10px;
  z-index: 1005;
}
.leaflet-fullscreen-on .map-toolbar--overlay h3,
.leaflet-pseudo-fullscreen .map-toolbar--overlay h3,
.map-fullscreen-ui .map-toolbar--overlay h3 { display: none; }
.leaflet-fullscreen-on .map-tools,
.leaflet-pseudo-fullscreen .map-tools,
.map-fullscreen-ui .map-tools {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.leaflet-fullscreen-on .map-tools .segmented,
.leaflet-pseudo-fullscreen .map-tools .segmented,
.map-fullscreen-ui .map-tools .segmented { width: 100%; justify-content: space-between; }
.leaflet-fullscreen-on .map-tools .seg-btn,
.leaflet-pseudo-fullscreen .map-tools .seg-btn,
.map-fullscreen-ui .map-tools .seg-btn { justify-content: center; flex: 1 1 auto; }
.leaflet-fullscreen-on .map-tools .map-row,
.leaflet-fullscreen-on .map-tools .select,
.leaflet-fullscreen-on .map-tools .chip,
.leaflet-pseudo-fullscreen .map-tools .map-row,
.leaflet-pseudo-fullscreen .map-tools .select,
.leaflet-pseudo-fullscreen .map-tools .chip,
.map-fullscreen-ui .map-tools .map-row,
.map-fullscreen-ui .map-tools .select,
.map-fullscreen-ui .map-tools .chip { width: 100%; }
.leaflet-fullscreen-on .map-tools .map-row,
.leaflet-pseudo-fullscreen .map-tools .map-row,
.map-fullscreen-ui .map-tools .map-row { flex-direction: column; align-items: stretch; }
.leaflet-fullscreen-on .seg-label,
.leaflet-fullscreen-on .btn-label,
.leaflet-pseudo-fullscreen .seg-label,
.leaflet-pseudo-fullscreen .btn-label,
.map-fullscreen-ui .seg-label,
.map-fullscreen-ui .btn-label { display: none; }
.leaflet-fullscreen-on .map-tools .seg-btn,
.leaflet-pseudo-fullscreen .map-tools .seg-btn,
.map-fullscreen-ui .map-tools .seg-btn,
.leaflet-fullscreen-on .map-tools .chip,
.leaflet-pseudo-fullscreen .map-tools .chip,
.map-fullscreen-ui .map-tools .chip { justify-content: center; }
.leaflet-fullscreen-on .map-tools .select,
.leaflet-pseudo-fullscreen .map-tools .select,
.map-fullscreen-ui .map-tools .select { text-align: center; }
.leaflet-fullscreen-on .map-infobar,
.leaflet-pseudo-fullscreen .map-infobar,
.map-fullscreen-ui .map-infobar {
  display: flex;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  transform: none;
  border-top: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  z-index: 1004;
  max-width: none;
  width: auto;
}
.leaflet-fullscreen-on .map-infobar .infobar-spacer,
.leaflet-pseudo-fullscreen .map-infobar .infobar-spacer,
.map-fullscreen-ui .map-infobar .infobar-spacer { display: none; }
.leaflet-fullscreen-on .map-infobar .infobar-label,
.leaflet-pseudo-fullscreen .map-infobar .infobar-label,
.map-fullscreen-ui .map-infobar .infobar-label { display: none; }
.leaflet-fullscreen-on .map-infobar .infobar-range,
.leaflet-pseudo-fullscreen .map-infobar .infobar-range,
.map-fullscreen-ui .map-infobar .infobar-range {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.leaflet-fullscreen-on .map-infobar .range-chips,
.leaflet-pseudo-fullscreen .map-infobar .range-chips,
.map-fullscreen-ui .map-infobar .range-chips {
  flex-wrap: nowrap;
  width: 100%;
  justify-content: space-between;
}
.leaflet-fullscreen-on .map-infobar .range-chips .chip,
.leaflet-pseudo-fullscreen .map-infobar .range-chips .chip,
.map-fullscreen-ui .map-infobar .range-chips .chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
.leaflet-fullscreen-on .map-infobar .infobar-status,
.leaflet-pseudo-fullscreen .map-infobar .infobar-status,
.map-fullscreen-ui .map-infobar .infobar-status {
  text-align: center;
  font-size: .85rem;
  max-width: 100%;
}
.leaflet-fullscreen-on .nearby,
.leaflet-pseudo-fullscreen .nearby,
.map-fullscreen-ui .nearby {
  display: none;
  position: absolute;
  left: 12px;
  bottom: 80px;
  width: 90vw;
  max-width: 320px;
  max-height: 40vh;
  overflow: auto;
  margin: 0;
  z-index: 1003;
}

/* Badges de distancia cercanos */
/* near-badge no longer used */






.site-footer .footer-links{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;margin-top:.5rem}
.site-footer .footer-links{font-size:.95rem;opacity:.9;border-top:1px solid rgba(0,0,0,.08);padding-top:.65rem;margin-top:.75rem}
.site-footer .footer-links a{color:inherit;text-decoration:none;border-bottom:1px dotted transparent;opacity:.9}
.site-footer .footer-links a:hover{border-bottom-color:currentColor;opacity:1;text-decoration:underline;text-underline-offset:2px}
[data-theme="dark"] .site-footer .footer-links{border-top-color:rgba(255,255,255,.08)}

/* Footer focus states */
.site-footer .social-link:focus,
.site-footer .footer-links a:focus,
.site-footer .contact-item:focus { outline:2px solid var(--color-primary); outline-offset:2px }

/* Footer CTA */
.footer-cta{width:100%;}
.footer-cta form{display:flex;flex-direction:column;gap:.6rem;align-items:center;background:rgba(25,118,210,.06);padding:1rem;border-radius:12px;border:1px solid rgba(25,118,210,.15)}
.footer-cta .cta-title{font-weight:600}
.footer-cta .cta-row{display:flex;gap:.5rem;align-items:center;width:100%;max-width:520px}
.footer-cta input[type="email"]{flex:1;border:1px solid rgba(0,0,0,.15);border-radius:999px;padding:.6rem .9rem;background:#fff;color:inherit}
.footer-cta button.btn{border-radius:999px}
.footer-subscribe-msg{margin-top:.6rem;font-size:.85rem;padding:.45rem .8rem;border-radius:999px;border:1px solid transparent;text-align:center}
.footer-subscribe-msg--ok{color:#1d4ed8;background:rgba(29,78,216,.08);border-color:rgba(29,78,216,.2)}
.footer-subscribe-msg--info{color:#334155;background:rgba(148,163,184,.15);border-color:rgba(148,163,184,.35)}
.footer-subscribe-msg--error{color:#b91c1c;background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.25)}
@media(max-width:640px){.footer-cta .cta-row{flex-direction:column;align-items:stretch}.footer-cta .cta-row button.btn{width:100%}}
@media(max-width:640px){.footer-subscribe-msg{font-size:.8rem}}
[data-theme="dark"] .footer-cta form{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12)}
[data-theme="dark"] .footer-cta input[type="email"]{background:#0e141a;border-color:rgba(255,255,255,.18);color:#e6eaef}

/* Footer grid */
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem;width:100%;text-align:center;justify-items:center;max-width:1100px;margin:0 auto;box-sizing:border-box}
.footer-col{min-width:0}
.footer-col .footer-heading{font-weight:700;margin-bottom:.5rem}
.footer-col ul{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.footer-col a{color:inherit;text-decoration:none;opacity:.9;overflow-wrap:anywhere}
.footer-col a:hover{text-decoration:underline;text-underline-offset:2px;opacity:1}
/* Alinear la columna Social a la izquierda (no centrado) */
.footer-grid .footer-social{justify-content:flex-start}
.footer-grid .footer-social .social-link{margin-left:0}
@media(max-width:820px){.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:100%}}
@media(max-width:520px){.footer-grid{grid-template-columns:1fr}}



/* BlueSignal Story card */
.story-wrap { margin: 1.5rem 0; }
.story-card { display: flex; flex-direction: column; gap: 0.5rem; }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

.story-title { margin: 0; font-size: 1.2rem; }

.story-text { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--fg); }
@media (max-width: 640px){
  .story-head { justify-content: flex-start; }
}
@media (max-width: 480px){
  .story-card { align-items: flex-start; }
  .story-title { text-align: left; }
}

/* Pages */
.page-wrap{max-width:1100px;margin:1.5rem auto;padding:0 1rem;display:flex;flex-direction:column;gap:1rem}
.page-hero h2{margin:0;font-size:1.6rem}
.page-hero p{margin:0;color:var(--muted,#64748b)}
.emoji{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji","Twemoji Mozilla",sans-serif;font-size:1.1em;vertical-align:middle}
.page-grid{display:grid;grid-template-columns:1fr;gap:1rem}
@media(min-width:768px){.page-grid{grid-template-columns:repeat(2,1fr)}}
.page-stack{display:flex;flex-direction:column;gap:1.25rem;width:100%}
.section-block{width:100%;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:1.25rem 1.5rem;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.section-block h3{margin:0 0 .35rem 0;font-size:1.3rem;display:flex;align-items:center;gap:.4rem}
.section-block h4{margin:.75rem 0 .35rem;font-size:1.05rem;color:var(--muted,#64748b)}
.section-block p{margin:.35rem 0;line-height:1.6}
.section-block ul,.section-block ol{margin:.35rem 0 .25rem 1.1rem;line-height:1.5;display:grid;gap:.35rem}
.section-block ol{padding-left:1.1rem}
.section-block ul{padding-left:1.05rem}
.section-head{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.35rem}
.section-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:rgba(37,99,235,.08);color:var(--brand,#2563eb);font-size:1.1rem}
[data-theme="dark"] .section-icon{background:rgba(59,130,246,.14);color:var(--brand,#3b82f6)}
.section-eyebrow{margin:0;font-size:.85rem;letter-spacing:.02em;text-transform:uppercase;color:var(--muted,#64748b)}
.section-lead{margin:.2rem 0 .4rem;font-weight:600;line-height:1.55}
.resource-stack .id-grid{display:grid;gap:1rem}
@media(min-width:720px){.resource-stack .id-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.faq-grid{display:grid;gap:.75rem;margin-top:.4rem}
@media(min-width:720px){.faq-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.faq-item{border:1px solid var(--border);border-radius:10px;padding:.85rem .95rem;background:rgba(0,0,0,.02);box-shadow:0 1px 2px rgba(0,0,0,.03)}
[data-theme="dark"] .faq-item{background:rgba(255,255,255,.03)}
.faq-q{margin:0 0 .15rem;font-weight:700}
.faq-a{margin:0;line-height:1.55}
.btn-link{color:var(--color-primary,#2563eb);text-decoration:none;font-weight:600}
.btn-link:hover{text-decoration:underline}
.badge.subtle{display:inline-block;padding:.25rem .5rem;border:1px solid var(--border);border-radius:999px;font-size:.9rem;color:var(--muted,#64748b)}
.method-block{margin:1rem 0;padding:1rem 1.1rem;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.02)}
[data-theme="dark"] .method-block{background:rgba(255,255,255,.03)}
.method-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.35rem}
.method-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:rgba(37,99,235,.1);color:var(--brand,#2563eb);font-size:1.1rem}
[data-theme="dark"] .method-icon{background:rgba(59,130,246,.16);color:var(--brand,#64b5f6)}
.method-sub{margin:.1rem 0;color:var(--muted,#64748b)}
.method-feature-grid{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;margin:.6rem 0 0;padding:0}
.method-feature-grid li{background:var(--chip,rgba(0,0,0,.02));border:1px solid var(--border);border-radius:10px;padding:.55rem .65rem;line-height:1.5}
.method-steps{display:grid;gap:.65rem;margin:.6rem 0}
.method-step{display:flex;gap:.6rem;align-items:flex-start}
.step-number{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--brand,#2563eb);color:#fff;font-weight:700;font-size:.95rem;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.method-prob-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem;margin:.75rem 0}
.method-prob-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:.75rem .85rem;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.method-prob-card h5{margin:0 0 .35rem 0;font-size:1rem}
.method-badges{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}


/* Theme toggle */
.theme-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px;line-height:1;}
