/* BarkParks.dog — handcrafted for dog people, by dog people */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Nunito:wght@400;600;700;800&display=swap');

/* Skip link for screen readers */
.skip-link { position:absolute; top:-40px; left:0; background:#2d6a4f; color:#fff; padding:8px 16px; z-index:9999; transition:top 0.2s; }
.skip-link:focus { top:0; }

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --brand: #2d6a4f;
  --brand-light: #52b788;
  --brand-deep: #1b4332;
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --gold: #c8a951;
  --dark: #111827;
  --text: #374151;
  --text-light: #6b7280;
  --muted: #9ca3af;
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === FOCUS STYLES (a11y) === */
:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
}

/* === LANGUAGE TOGGLE === */
.lang-toggle-item { display: flex; align-items: center; }
.lang-toggle-btn {
  display: inline-flex; align-items: center; gap: 2px;
  background: transparent; border: 1.5px solid var(--brand-light);
  border-radius: 20px; padding: 4px 10px; cursor: pointer;
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.5px; transition: all 0.2s;
}
.lang-toggle-btn:hover { background: var(--brand); }
.lang-toggle-btn:hover span { color: white; }
.lang-toggle-btn .lang-en,
.lang-toggle-btn .lang-es { color: #999; transition: color 0.2s; }
.lang-toggle-btn .lang-en.active,
.lang-toggle-btn .lang-es.active { color: var(--brand-deep); font-weight: 800; }
.lang-toggle-btn:hover .lang-en.active,
.lang-toggle-btn:hover .lang-es.active { color: white; }
.lang-toggle-btn .lang-divider { color: #ccc; margin: 0 2px; }

/* === HEADER / NAV === */
header {
  background: #ffffff;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-brand span { color: var(--brand-light); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--transition);
  padding: 8px 0;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--brand); }
.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: rgba(45,106,79,0.08);
  border: 1px solid rgba(45,106,79,0.12);
  border-radius: 999px;
  color: var(--brand);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}
.nav-toggle .nav-toggle-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-size: 200% 200%;
  animation: heroGradient 8s ease infinite;
  color: white;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(45,106,79,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(82,183,136,0.05) 0%, transparent 50%);
  pointer-events: none;
}
@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.hero h1 span { color: var(--brand-light); }
.hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(45,106,79,0.2);
}
.btn-secondary {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
}

/* === SECTIONS === */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.75px;
}
.section-subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 560px;
}

/* === MAP === */
.map-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.filter-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.filter-more-btn {
  display: none;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg-subtle);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-more-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.mobile-hidden {
  display: inline-flex;
}
.search-box {
  position: relative;
  margin-left: auto;
  flex: 1 1 240px;
  max-width: 280px;
  min-width: 220px;
}
.search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}
.search-box input::placeholder {
  color: var(--muted);
}
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: white;
}
#park-map { height: 500px; width: 100%; }

/* === PRODUCT CARDS === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.product-card .card-body {
  padding: 1.5rem;
}
.product-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--dark);
}
.product-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.product-card .price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand);
}
.product-card .btn {
  display: block;
  text-align: center;
  margin-top: 1rem;
}

/* === FEATURES === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1.25rem;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}
.feature-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
  letter-spacing: -0.3px;
}
.feature-card p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

.newsletter-section input[type="email"] {
  padding: 13px 18px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
}
.newsletter-section input[type="email"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.06);
  outline: none;
}

/* === AFFILIATE BADGE === */
.affiliate-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2rem;
  text-align: center;
  letter-spacing: 0.01em;
}

/* === FOOTER === */
footer {
  background: #0f172a;
  color: rgba(255,255,255,0.7);
  padding: 4rem 2rem 2rem;
  text-align: center;
  margin-top: 3rem;
}
footer .brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
footer .brand span { color: var(--brand-light); }
footer p {
  font-size: 0.85rem;
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}
footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}
footer a:hover { color: white; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    padding: 1rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-hover);
  }
  .nav-links.active { display: flex; }
  .hero {
    padding: 2.5rem 1rem;
  }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .map-filters {
    gap: 0.5rem;
  }
  .filter-more-btn {
    display: inline-flex;
  }
  .mobile-hidden {
    display: none;
  }
  .mobile-hidden.mobile-shown {
    display: inline-flex;
  }
  .search-box {
    order: 99;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
  #park-map { height: 350px; }
  .product-grid { grid-template-columns: 1fr; }
  .bp-popup { flex-direction: column; }
  .bp-popup-img { min-width: unset; height: 140px; }
  .bp-flip-card { width: 260px; height: 240px; }
}

/* === ENHANCED MAP POPUPS === */
.bp-popup-container .leaflet-popup-content {
  margin: 0;
  padding: 0;
  width: auto !important;
}
.bp-popup-container .leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
/* Flip Card Popup */
.bp-flip-popup .leaflet-popup-content { overflow: visible; }
.bp-flip-card {
  width: 300px;
  height: 260px;
  perspective: 800px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}
.bp-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}
.bp-flip-card.flipped .bp-flip-inner {
  transform: rotateY(180deg);
}
.bp-flip-front, .bp-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}
.bp-flip-front {
  background: #1a202c;
}
.bp-flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}
.bp-flip-front-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: white;
}
.bp-flip-front-overlay h3 {
  font-size: 1rem;
  margin: 0 0 2px;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.bp-flip-dist {
  font-size: 0.72rem;
  opacity: 0.85;
  display: block;
  margin-bottom: 4px;
}
.bp-flip-hint {
  font-size: 0.65rem;
  opacity: 0.6;
  display: block;
  margin-top: 6px;
  text-align: right;
}
.bp-flip-back {
  transform: rotateY(180deg);
  background: white;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}
.bp-flip-back h3 {
  font-size: 0.95rem;
  color: #2d6a4f;
  margin: 0;
  line-height: 1.2;
}
.bp-flip-back .bp-flip-hint {
  color: #718096;
  text-align: left;
}
/* Legacy two-panel layout (kept for backwards compat) */
.bp-popup {
  display: flex;
  font-family: 'Nunito', sans-serif;
  max-width: 420px;
  min-width: 320px;
}
.bp-popup-img {
  min-width: 140px;
  max-width: 160px;
  position: relative;
  overflow: hidden;
}
.bp-popup-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-popup-badges {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  color: white;
}
.bp-badge-nps { background: #2d6a4f; }
.bp-badge-offleash { background: #e2a84b; color: #1a202c; }
.bp-popup-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-popup-info h3 {
  font-size: 0.95rem;
  color: #2d6a4f;
  margin: 0;
  line-height: 1.2;
}
.bp-popup-location {
  font-size: 0.75rem;
  color: #718096;
  margin: 0;
}
.bp-popup-rules {
  font-size: 0.75rem;
  color: #4a5568;
  margin: 2px 0;
}
.bp-popup-desc {
  font-size: 0.78rem;
  color: #4a5568;
  margin: 4px 0;
  line-height: 1.4;
}
.bp-popup-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.bp-action-btn {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.1s;
}
.bp-action-btn:hover { transform: scale(1.05); }
.bp-action-directions { background: #2d6a4f; color: white; }
.bp-action-gear { background: #e2a84b; color: #1a202c; }
.bp-action-link {
  font-size: 0.7rem;
  color: #2d6a4f;
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  background: #f0f7f4;
  transition: background 0.2s;
}
.bp-action-link:hover { background: #d4edda; }
.bp-itinerary-btn {
  margin-top: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}
.bp-itinerary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(45,106,79,0.3);
}

/* ─── Photo Upload Button (flip-card back) ─────────────────────────────── */
.bp-photo-upload-btn {
  margin-top: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.1s, box-shadow 0.2s;
}
.bp-photo-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(99,102,241,0.3);
}

.bp-report-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: 4px;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef2f2, #fff);
  color: #dc2626;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.bp-report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(239,68,68,0.2);
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
}

.bp-report-modal .bp-report-reason-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
  font-size: 14px;
}
.bp-report-modal select.bp-photo-input {
  appearance: auto;
  padding: 10px;
}
.bp-report-submit-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}
.bp-report-submit-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

/* ─── Photo Upload Modal ───────────────────────────────────────────────── */
.bp-photo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.bp-photo-modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.bp-photo-modal h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}
.bp-photo-modal-sub {
  margin: 0 0 16px;
  color: #555;
  font-size: 0.85rem;
}
.bp-photo-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}
.bp-photo-file-label {
  display: block;
  margin-bottom: 12px;
}
.bp-photo-file-label input[type="file"] {
  display: none;
}
.bp-photo-file-btn {
  display: block;
  padding: 12px;
  text-align: center;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #6366f1;
  transition: background 0.2s;
}
.bp-photo-file-btn:hover {
  background: #ede9fe;
  border-color: #8b5cf6;
}
.bp-photo-preview {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.bp-photo-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}
.bp-photo-input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.bp-photo-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.bp-photo-note {
  font-size: 0.75rem;
  color: #888;
  margin: 8px 0 12px;
}
.bp-photo-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}
.bp-photo-submit-btn:hover {
  transform: translateY(-1px);
}
.bp-photo-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.bp-photo-success {
  text-align: center;
  padding: 20px 0;
  font-size: 1rem;
  color: #2d6a4f;
}
