/* ============================================
   Mallorcalas — Shared Styles
   css/styles.css
   ============================================ */

/* ─── Google Fonts preconnect hint (handled in HTML) ─── */

/* ─── Material Symbols ────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* ─── Skip link (accessibility) ───────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--color-primary, #0284c7);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 1rem 1rem;
  font-weight: 800;
  font-size: 0.875rem;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid white;
  outline-offset: -4px;
}

/* ─── Design tokens ───────────────────────── */
:root {
  --color-primary: #005e97;
  --color-primary-hover: #0077be;
  --color-secondary: #006a62;
  --color-surface: #f8f9fa;
  --color-surface-low: #f3f4f5;
  --color-surface-container: #edeeef;
  --color-surface-high: #e7e8e9;
  --color-surface-highest: #e1e3e4;
  --color-surface-lowest: #fcf8f0;
  --color-on-surface: #191c1d;
  --color-on-surface-variant: #404751;
  --color-outline: #707882;
  --color-outline-variant: #c0c7d2;
  --color-error: #ba1a1a;
  --color-secondary-fixed: #61f9e9;
  --color-background: #dff3ff;
  --nav-bg: rgba(255,255,255,0.85);
  --nav-shadow: 0 8px 32px rgba(0,29,52,0.06);
  --modal-bg: #f8f9fa;
  --card-bg: #fcf8f0;
  --card-low-bg: #f8f1e4;
  --footer-bg: #f8f9fa;
  --footer-text: #64748b;
  --scrollbar-color: rgba(0, 94, 151, 0.32);
  --color-selection-bg: rgba(0, 94, 151, 0.2);
}

/* ─── Dark mode tokens ────────────────────── */
[data-theme="dark"] {
  --color-primary: #9acbff;
  --color-primary-hover: #b8d9ff;
  --color-secondary: #3adccc;
  --color-surface: #191c1d;
  --color-surface-low: #1f2324;
  --color-surface-container: #252a2b;
  --color-surface-high: #2e3132;
  --color-surface-highest: #383d3e;
  --color-surface-lowest: #141718;
  --color-on-surface: #e2e3e4;
  --color-on-surface-variant: #b9c2cc;
  --color-outline: #8a9299;
  --color-outline-variant: #3c4349;
  --color-error: #ffb4ab;
  --color-secondary-fixed: #3adccc;
  --color-background: #0d1117;
  --nav-bg: rgba(20, 23, 24, 0.92);
  --nav-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --modal-bg: #1a1f20;
  --card-bg: #1e2324;
  --card-low-bg: #252a2b;
  --footer-bg: #111516;
  --footer-text: #8a9299;
  --scrollbar-color: rgba(154, 203, 255, 0.28);
  --color-selection-bg: rgba(0, 94, 151, 0.45);
}

/* ─── Apply dark mode to HTML elements ───── */
[data-theme="dark"] body { background: var(--color-background); color: var(--color-on-surface); }
[data-theme="dark"] nav:not(footer nav) { background: var(--nav-bg) !important; box-shadow: var(--nav-shadow) !important; }
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-white\/80 { background-color: var(--nav-bg) !important; }
[data-theme="dark"] .bg-white\/90 { background-color: rgba(30,35,36,0.9) !important; }
[data-theme="dark"] .bg-surface-container-lowest { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-surface-container-low { background-color: var(--card-low-bg) !important; }
[data-theme="dark"] .bg-surface-container { background-color: var(--color-surface-container) !important; }
[data-theme="dark"] .bg-slate-50 { background-color: var(--footer-bg) !important; }
[data-theme="dark"] .text-slate-500 { color: var(--footer-text) !important; }
[data-theme="dark"] .text-slate-900 { color: var(--color-on-surface) !important; }
[data-theme="dark"] .text-on-surface { color: var(--color-on-surface) !important; }
[data-theme="dark"] .text-on-surface-variant { color: var(--color-on-surface-variant) !important; }
[data-theme="dark"] .border-slate-200\/50 { border-color: var(--color-outline-variant) !important; }
[data-theme="dark"] .border-sky-100 { border-color: var(--color-outline-variant) !important; }
[data-theme="dark"] .border-surface-container-low { border-color: var(--color-outline-variant) !important; }
[data-theme="dark"] .beach-modal-panel { background: var(--modal-bg) !important; }
[data-theme="dark"] footer { background: var(--footer-bg) !important; }
[data-theme="dark"] .mob-nav-btn { color: var(--color-outline) !important; }
[data-theme="dark"] .mob-nav-btn.active { color: var(--color-primary) !important; }
[data-theme="dark"] .nav-link { color: var(--color-on-surface-variant) !important; }
[data-theme="dark"] .nav-link.active { color: var(--color-primary) !important; }
[data-theme="dark"] .md\:hidden { background: var(--nav-bg) !important; border-color: var(--color-outline-variant) !important; }
[data-theme="dark"] .auth-modal-content { background: var(--modal-bg) !important; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: var(--color-surface-container) !important;
  color: var(--color-on-surface) !important;
  border-color: var(--color-outline-variant) !important;
}
[data-theme="dark"] .fishing-spot-card { background: var(--color-surface-container) !important; }
[data-theme="dark"] .weather-stat { background: var(--color-surface-container) !important; }

/* ─── Custom Properties Override ─────────── */
.bg-surface-container-lowest { background-color: #fcf8f0 !important; }
.bg-surface-container-low { background-color: #f8f1e4 !important; }

/* ─── Global ──────────────────────────────── */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color) transparent;
}

body { background: var(--color-background); transition: background 0.3s, color 0.3s; }

::selection {
  background: var(--color-selection-bg);
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(0, 94, 151, 0.42); border: 2px solid transparent; background-clip: padding-box; }

/* ─── Focus visible (keyboard nav) ───────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #005e97;
  outline-offset: 2px;
}

/* ─── Utilities ───────────────────────────── */
.editorial-shadow { box-shadow: 0 8px 32px rgba(0, 29, 52, 0.06); }
.sea-gradient { background: linear-gradient(135deg, #005e97 0%, #0077be 100%); }
.editorial-gradient { background: linear-gradient(135deg, #005e97 0%, #0077be 100%); }
.glass-nav { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ─── Page sections ───────────────────────── */
.page-section { scroll-margin-top: 6rem; }
.soft-band, .soft-band-blue, .soft-band-white { background: transparent; position: static; }
#home > main > section + section { position: static; }

/* ─── Section reveal animation ───────────── */
.section-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.section-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .section-reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Beach detail overlay ────────────────── */
#view-beach { display: none; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
#view-beach.active { display: flex; pointer-events: auto; }
body.beach-open #view-beach { display: flex; pointer-events: auto; }
body.beach-open { overflow: hidden; }

.beach-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 15, 24, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.beach-modal-panel {
  position: fixed;
  inset: 5.25rem 1rem 1rem;
  width: min(1320px, calc(100vw - 2rem));
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f8f9fa;
  border-radius: 1rem;
  box-shadow: 0 30px 70px rgba(0, 29, 52, 0.28);
  z-index: 60;
}

@media (max-width: 767px) {
  .beach-modal-panel { inset: 5rem 0.5rem 4.5rem; width: calc(100vw - 1rem); border-radius: 0.875rem; }
}

body.beach-open #view-beach { animation: fadeInView 0.22s ease-out both; }
@keyframes fadeInView {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Nav states ──────────────────────────── */
.nav-link { color: #475569; transition: color 0.15s; font-weight: 500; position: relative; padding-bottom: 4px; }
.nav-link:hover { color: #0284c7; }
.nav-link.active { color: #0369a1; font-weight: 700; }

.nav-indicator {
  position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  border-radius: 9999px; background: #0284c7;
  opacity: 0;
  transition: transform 0.26s ease, width 0.26s ease, opacity 0.2s ease;
}

.mob-nav-btn {
  color: #94a3b8; display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 10px; font-weight: 500;
  background: none; border: none; cursor: pointer; transition: color 0.15s;
}
.mob-nav-btn.active { color: #005e97; font-weight: 700; }

/* ─── Clickable elements ──────────────────── */
[data-page], [data-scroll-target] { cursor: pointer; }

/* ─── Home carousel ───────────────────────── */
.home-carousel-slide {
  position: absolute; inset: 0; opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s ease, transform 1.2s ease;
  pointer-events: none;
}
.home-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-carousel-slide.is-active { opacity: 1; transform: scale(1); }

.home-carousel-dot {
  width: 9px; height: 9px; border-radius: 9999px; border: none;
  background: rgba(255,255,255,0.45); transition: all 0.2s ease; cursor: pointer;
}
.home-carousel-dot:hover { background: rgba(255,255,255,0.7); }
.home-carousel-dot.is-active { width: 28px; background: #ffffff; }

/* ─── Toast notifications ─────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 0.75rem;
  max-width: calc(100vw - 3rem);
}

.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; border-radius: 0.75rem;
  background: #fff; color: #191c1d;
  box-shadow: 0 8px 32px rgba(0,29,52,0.18);
  font-size: 0.875rem; font-weight: 500;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  max-width: 360px; min-width: 220px;
}
.toast.is-visible { transform: translateX(0); opacity: 1; }

.toast-success { border-left: 4px solid #10b981; }
.toast-error   { border-left: 4px solid #ef4444; }
.toast-warning { border-left: 4px solid #f59e0b; }
.toast-info    { border-left: 4px solid #3b82f6; }

.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-success .toast-icon { color: #10b981; }
.toast-error   .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info    .toast-icon { color: #3b82f6; }

.toast-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: #94a3b8; flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0.25rem;
  border-radius: 4px;
}
.toast-close:hover { color: #475569; }

[data-theme="dark"] .toast {
  background: #1e2324;
  color: var(--color-on-surface);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

@media (max-width: 767px) {
  #toast-container { bottom: 5rem; right: 1rem; left: 1rem; max-width: 100%; }
  .toast { max-width: 100%; }
}

/* ─── Auth modal ──────────────────────────── */
#auth-modal, #privacy-modal, #project-info-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,15,24,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
#auth-modal.hidden, #privacy-modal.hidden, #project-info-modal.hidden { display: none; }

.auth-modal-content {
  background: #fff; border-radius: 1.5rem;
  padding: 2rem; width: 100%; max-width: 440px;
  box-shadow: 0 30px 70px rgba(0,29,52,0.25);
  animation: modalSlideIn 0.25s ease-out;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-modal-content input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #c0c7d2;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
  background: #f8f9fa;
}
.auth-modal-content input:focus { border-color: #005e97; box-shadow: 0 0 0 3px rgba(0,94,151,0.12); }

.auth-error {
  color: #ba1a1a; font-size: 0.8rem; margin-top: 0.25rem;
  display: block;
}
.auth-error.hidden { display: none; }

.auth-submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #005e97, #0077be);
  color: #fff;
  border: none; border-radius: 0.875rem;
  font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: opacity 0.2s, transform 0.2s;
}
.auth-submit-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.auth-submit-btn:active { transform: scale(0.98); }

/* ─── Weather stats ───────────────────────── */
.weather-stat {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--color-surface-low, #f3f4f5);
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  min-width: 120px;
}

/* ─── Fishing spots ───────────────────────── */
.fishing-spot-card {
  background: var(--color-surface-low, #f3f4f5);
  border-radius: 0.875rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-outline-variant, #c0c7d2);
}

/* ─── Feature chips ───────────────────────── */
.feature-chip {
  display: flex; align-items: center; gap: 0.375rem;
  background: rgba(251,251,226,0.4);
  border: 1px solid rgba(71,72,54,0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem; font-weight: 700;
}

/* Classification chip color variants */
.feature-chip--entorno {
  background: rgba(219, 234, 254, 0.7);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}
.feature-chip--sustrato {
  background: rgba(254, 243, 199, 0.7);
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}
.feature-chip--dinamica {
  background: rgba(207, 250, 254, 0.7);
  border-color: rgba(6, 182, 212, 0.2);
  color: #0e7490;
}
[data-theme='dark'] .feature-chip--entorno {
  background: rgba(29, 78, 216, 0.15);
  border-color: rgba(96, 165, 250, 0.25);
  color: #93c5fd;
}
[data-theme='dark'] .feature-chip--sustrato {
  background: rgba(180, 83, 9, 0.15);
  border-color: rgba(251, 191, 36, 0.25);
  color: #fcd34d;
}
[data-theme='dark'] .feature-chip--dinamica {
  background: rgba(14, 116, 144, 0.15);
  border-color: rgba(34, 211, 238, 0.25);
  color: #67e8f9;
}


/* ─── Loading skeletons ───────────────────── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

/* ─── PWA update banner ───────────────────── */
#pwa-update-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(135deg, #005e97, #0077be);
  color: white; padding: 1rem; text-align: center;
  font-weight: 600; font-size: 0.9rem;
}
#pwa-update-banner.hidden { display: none; }

/* ─── PWA install button ──────────────────── */
#pwa-install-btn.hidden { display: none; }

/* ─── Review form stars ───────────────────── */
.review-star {
  cursor: pointer; font-size: 2rem;
  color: #fbbf24;
  transition: transform 0.15s ease;
}
.review-star:hover { transform: scale(1.2); }

/* ─── Map section ─────────────────────────── */
.mallorca-map-mock {
  position: relative; height: 520px; border-radius: 1rem;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,0.75) 0 60px, transparent 65px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.65) 0 70px, transparent 75px),
    linear-gradient(180deg, #dff3ff 0%, #b9e6ff 100%);
  border: 1px solid #cde5f5; overflow: hidden;
}

.map-pin {
  position: absolute; transform: translate(-50%, -100%);
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: none; border-radius: 9999px;
  background: #005e97; color: #ffffff;
  padding: 0.25rem 0.55rem; font-size: 11px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,94,151,0.25);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.map-pin .material-symbols-outlined { font-size: 15px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }
.map-pin:hover { background: #0077be; transform: translate(-50%, -105%); }
.map-pin-label { white-space: nowrap; }

@media (max-width: 767px) {
  .mallorca-map-mock { height: 420px; }
  .map-pin-label { display: none; }
}

/* ─── Responsive helpers ──────────────────── */
@media (max-width: 640px) {
  .beach-modal-panel { inset: 4.5rem 0.25rem 4rem; }
  #toast-container { bottom: 5.5rem; }
}

/* ─── Print styles ────────────────────────── */
@media print {
  nav, .mob-nav-btn, #toast-container, #auth-modal, .beach-modal-backdrop, #pwa-install-btn { display: none !important; }
  body { background: white !important; color: black !important; }
  .beach-modal-panel { position: static !important; box-shadow: none !important; }
}

/* ─── Interactive Map (Leaflet) ───────────── */

/* Filter buttons */
.map-filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  border: 1.5px solid #c0c7d2;
  background: #fff;
  color: #191c1d;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.map-filter-btn:hover {
  border-color: #005e97;
  color: #005e97;
  background: rgba(0, 94, 151, 0.06);
}
.map-filter-btn.active {
  background: #005e97;
  border-color: #005e97;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 94, 151, 0.28);
}
[data-theme="dark"] .map-filter-btn {
  background: var(--color-surface-container);
  border-color: var(--color-outline-variant);
  color: var(--color-on-surface);
}
[data-theme="dark"] .map-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #001d34;
}

/* Custom marker pin */
.beach-map-marker { background: none !important; border: none !important; }
.marker-pin {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,29,52,0.38);
  border: 2.5px solid rgba(255,255,255,0.9);
  transition: box-shadow 0.2s;
}
.marker-icon { transform: rotate(45deg); font-size: 15px; line-height: 1; display: block; }

/* Popup */
.leaflet-beach-popup .leaflet-popup-content-wrapper {
  padding: 0; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,29,52,0.22); border: none;
}
.leaflet-beach-popup .leaflet-popup-content { margin: 0; width: 262px !important; }
.leaflet-beach-popup .leaflet-popup-tip-container { display: none; }

.map-popup { font-family: "Manrope", sans-serif; }
.map-popup-img { position: relative; height: 136px; overflow: hidden; }
.map-popup-img img { width: 100%; height: 100%; object-fit: cover; }
.map-popup-badge {
  position: absolute; top: 8px; right: 8px;
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 9px; border-radius: 9999px;
  text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.map-popup-body { padding: 0.875rem 1rem; background: #fff; }
.map-popup-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 1rem; color: #191c1d; margin: 0 0 2px; }
.map-popup-region { font-size: 0.72rem; color: #707882; margin: 0 0 6px; }
.map-popup-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.map-popup-stars { color: #f59e0b; font-size: 0.85rem; letter-spacing: -1px; }
.map-popup-score { font-weight: 800; font-size: 0.8rem; color: #005e97; }
.map-popup-reviews { font-size: 0.7rem; color: #707882; }
.map-popup-type { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.map-popup-chip { background: #dff3ff; color: #005e97; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 9999px; }
.map-popup-features { font-size: 0.88rem; }
.map-popup-desc { font-size: 0.75rem; color: #404751; line-height: 1.55; margin-bottom: 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.map-popup-btn {
  width: 100%; background: linear-gradient(135deg, #005e97, #0077be);
  color: #fff; border: none; border-radius: 0.6rem; padding: 0.55rem;
  font-weight: 700; font-size: 0.8rem; cursor: pointer;
  transition: opacity 0.2s; font-family: "Manrope", sans-serif;
}
.map-popup-btn:hover { opacity: 0.88; }

/* Legend */
.map-legend { pointer-events: none; }
.map-legend-inner {
  background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
  border-radius: 0.75rem; padding: 0.7rem 0.9rem;
  box-shadow: 0 4px 16px rgba(0,29,52,0.14);
  font-family: "Manrope", sans-serif; min-width: 130px;
  border: 1px solid rgba(0,94,151,0.1);
}
.map-legend-title { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #707882; margin: 0 0 5px; }
.map-legend-item { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: #191c1d; margin-bottom: 4px; }
.map-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
[data-theme="dark"] .map-legend-inner { background: rgba(30,35,36,0.96); border-color: rgba(154,203,255,0.12); }
[data-theme="dark"] .map-legend-item { color: #e2e3e4; }
[data-theme="dark"] .map-legend-title { color: #8a9299; }

/* Locate button */
.map-locate-btn {
  width: 34px; height: 34px; border-radius: 6px; border: none;
  background: #fff; box-shadow: 0 2px 8px rgba(0,29,52,0.18);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.map-locate-btn:hover { background: #f0f4ff; }

/* Leaflet overrides */
.leaflet-control-attribution { font-size: 10px !important; background: rgba(255,255,255,0.85) !important; }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(20,23,24,0.85) !important; color: #8a9299 !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: #9acbff !important; }
[data-theme="dark"] .leaflet-control-zoom a { background: var(--color-surface-container) !important; color: var(--color-on-surface) !important; border-color: var(--color-outline-variant) !important; }
[data-theme="dark"] .leaflet-tile-pane { filter: brightness(0.7) invert(1) hue-rotate(200deg) brightness(0.7) saturate(0.5); }

/* ─── Beach Cards (Explore grid) ─────────── */
.beach-card-img-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  flex-shrink: 0;
}
.beach-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}
#explore-cards-grid article:hover .beach-card-img-wrap img {
  transform: scale(1.05);
}
#explore-cards-grid article {
  background: #fcf8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.4s ease, transform 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,29,52,0.06);
}
#explore-cards-grid article:hover {
  box-shadow: 0 20px 40px rgba(0,29,52,0.13);
  transform: translateY(-4px);
}
[data-theme="dark"] #explore-cards-grid article {
  background: var(--color-surface-container);
}

/* ─── Pagination ──────────────────────────── */
#explore-pagination {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 0.6rem;
  border: 1.5px solid #c0c7d2;
  background: #fff;
  color: #191c1d;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.pagination-btn:hover:not([disabled]) {
  border-color: #005e97;
  color: #005e97;
  background: rgba(0,94,151,0.06);
}
.pagination-btn.active {
  background: #005e97;
  border-color: #005e97;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,94,151,0.28);
}
.pagination-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.pagination-arrow {
  font-size: 1.1rem;
}
.pagination-arrow .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}
.pagination-ellipsis {
  color: #707882;
  font-size: 0.9rem;
  padding: 0 0.2rem;
  display: flex;
  align-items: center;
  height: 40px;
}
.pagination-info {
  font-size: 0.78rem;
  color: #707882;
  font-family: "Manrope", sans-serif;
}
[data-theme="dark"] .pagination-btn {
  background: var(--color-surface-container);
  border-color: var(--color-outline-variant);
  color: var(--color-on-surface);
}
[data-theme="dark"] .pagination-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #001d34;
}
[data-theme="dark"] .pagination-ellipsis { color: #8a9299; }
[data-theme="dark"] .pagination-info { color: #8a9299; }

/* ─── Pagination (pg-*) ───────────────────── */
#explore-pagination { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.pg-nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: center; }
.pg-btn {
  min-width: 40px; height: 40px; padding: 0 0.5rem;
  border-radius: 0.55rem; border: 1.5px solid #c0c7d2;
  background: #fff; color: #191c1d;
  font-size: 0.875rem; font-weight: 600; font-family: "Manrope", sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.18s ease; line-height: 1;
}
.pg-btn:hover:not([disabled]) { border-color: #005e97; color: #005e97; background: rgba(0,94,151,0.07); }
.pg-btn.pg-active { background: #005e97; border-color: #005e97; color: #fff; box-shadow: 0 4px 12px rgba(0,94,151,0.28); }
.pg-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.pg-arrow .material-symbols-outlined { font-size: 1.2rem; }
.pg-dots { color: #707882; font-size: 0.9rem; padding: 0 0.15rem; height: 40px; display: inline-flex; align-items: center; }
.pg-info { font-size: 0.775rem; color: #707882; font-family: "Manrope", sans-serif; }
[data-theme="dark"] .pg-btn { background: var(--color-surface-container); border-color: var(--color-outline-variant); color: var(--color-on-surface); }
[data-theme="dark"] .pg-btn.pg-active { background: var(--color-primary); border-color: var(--color-primary); color: #001d34; }
[data-theme="dark"] .pg-dots, [data-theme="dark"] .pg-info { color: #8a9299; }

/* Custom Checkbox (Filters) */
input[type="checkbox"]:checked + .custom-checkbox {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
input[type="checkbox"]:checked + .custom-checkbox > span {
  display: block !important;
}

/* Dark Mode Native Checkboxes */
[data-theme="dark"] input[type="checkbox"]:not(.sr-only) {
  background-color: transparent;
  border-color: var(--color-outline);
}
[data-theme="dark"] input[type="checkbox"]:not(.sr-only):checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Dark Mode Feature Chips (ARENA, etc) */
[data-theme="dark"] .bg-surface-container-highest {
  background-color: #32383a !important;
  color: #e2e3e4 !important;
}
[data-theme="dark"] .text-on-surface-variant {
  color: #e2e3e4 !important;
}
