/* Mapa oficial de playas Bandera Azul y calidad del agua - Fijate Tools */
:root,
[data-theme="dark"] {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-page: #0b0f17;
  --bg-surface: #131b2e;
  --bg-surface-2: #192338;
  --bg-input: #0f1626;
  --border-color: #26334d;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-soft: rgba(2, 132, 199, 0.1);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.1);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .app-header { background: #131b2e !important; border-bottom: 1px solid #1e293b !important; }
[data-theme="dark"] .brand-title { color: #f8fafc !important; }
[data-theme="light"] .app-header { background: #ffffff !important; border-bottom: 1px solid #cbd5e1 !important; }
[data-theme="light"] .brand-title { color: #0f172a !important; }

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4, h5, h6, .brand-title, .section-title { font-family: var(--font-heading); }
.mono, code { font-family: var(--font-mono); }

.tool-layout { max-width: 1200px; width: 100%; margin: 1.5rem auto 3rem; padding: 0 1rem; box-sizing: border-box; flex: 1 0 auto; }
.tool-with-sidebar { display: flex; gap: 2rem; align-items: flex-start; width: 100%; }
.tool-main-content { flex: 1 1 0%; min-width: 0; width: 100%; }

.beach-card {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px;
  padding: 1.4rem; box-shadow: var(--shadow-card); margin-bottom: 1.5rem;
}

.hero-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.hero-pill {
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(56, 189, 248, 0.25);
}
.hero-title { margin: 0 0 0.5rem; font-size: 1.45rem; font-weight: 700; }
.hero-desc { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--text-muted); }

.filters-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 0.75rem; margin-top: 1.1rem; align-items: end; }
.field-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.field-group input, .field-group select {
  width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 0.6rem 0.85rem;
  border-radius: 10px; border: 1px solid var(--border-color); background-color: var(--bg-input); color: var(--text-main);
  font-size: 0.92rem; box-sizing: border-box; font-family: var(--font-main);
}
.field-group select {
  padding-right: 40px; color-scheme: dark light; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center;
}
.field-group select option { background-color: var(--bg-surface); color: var(--text-main); }

.btn-primary, .btn-secondary {
  min-height: 44px; padding: 0.65rem 1.15rem; border-radius: 10px; font-weight: 600;
  font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 0.45rem; border: none; text-decoration: none;
}
.btn-primary { background: var(--accent-strong); color: #ffffff; }
.btn-secondary { background: var(--bg-surface-2); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.toggles-bar { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.9rem; align-items: center; }
.check-pill {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem;
  border-radius: 10px; background: var(--bg-surface-2); border: 1px solid var(--border-color);
  cursor: pointer; font-size: 0.85rem; min-height: 40px; box-sizing: border-box;
}
.check-pill input { accent-color: var(--accent-strong); width: 16px; height: 16px; }

.map-split { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 1rem; align-items: stretch; }
#playas-map { width: 100%; height: 500px; border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; background: #0f172a; }

.beach-list-panel {
  border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface-2);
  height: 500px; overflow-y: auto; display: flex; flex-direction: column;
}
.beach-list-item {
  padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border-color); cursor: pointer;
  background: transparent; border-left: none; border-right: none; border-top: none; text-align: left;
  color: var(--text-main); width: 100%; transition: background 0.12s;
}
.beach-list-item:hover { background: var(--accent-soft); }
.beach-badge-ba {
  display: inline-block; padding: 0.15rem 0.45rem; border-radius: 5px; font-size: 0.72rem;
  font-weight: 700; background: #0284c7; color: #ffffff;
}
.beach-badge-type {
  display: inline-block; padding: 0.15rem 0.45rem; border-radius: 5px; font-size: 0.72rem;
  font-weight: 600; background: var(--ok-soft); color: var(--ok);
}

.legend-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; font-size: 0.82rem; color: var(--text-muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.35rem; }

.detail-panel {
  margin-top: 1.15rem; padding: 1.2rem; border-radius: 12px; background: var(--bg-surface-2);
  border: 1px solid var(--accent-strong);
}
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; margin: 0.85rem 0; }
.srv-pill {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px;
  padding: 0.55rem 0.7rem; font-size: 0.8rem; color: var(--text-main);
}

.faq-list { display: flex; flex-direction: column; gap: 0.65rem; }
.faq-item { border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-surface-2); overflow: hidden; }
.faq-item summary { padding: 0.85rem 1rem; font-weight: 600; cursor: pointer; list-style: none; color: var(--text-main); }
.faq-item p { margin: 0; padding: 0 1rem 0.95rem; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.72); z-index: 9999;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-box { background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 14px; max-width: 460px; width: 100%; padding: 1.25rem; }

@media (max-width: 900px) {
  .filters-grid { grid-template-columns: 1fr; }
  .map-split { grid-template-columns: 1fr; }
  #playas-map { height: 400px; }
  .beach-list-panel { height: 320px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
