/* =========================================================
   THEME
========================================================= */

:root {
  --bg: #f4f7f9;
  --card: #ffffff;
  --text: #222;

  --primary: #0f3d2e;
  --accent: #d9a441;

  --radius: 14px;
  --radius-lg: 18px;

  --shadow: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);

  --space: 16px;
}

/* =========================================================
   BASE (MOBILE FIRST)
========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  margin: 0 0 10px;
  color: var(--primary);
  line-height: 1.2;
}

h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }

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

/* =========================================================
   APP CONTAINER
========================================================= */

#flysub-app,
#flysub-detail,
#view-destination {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space);
}

/* =========================================================
   LAYOUT SYSTEM (MOBILE FIRST)
========================================================= */

.flysub-grid,
.flysub-gallery,
.flysub-grid-2,
.info-grid,
.gallery-grid,
.quick-stats {
  display: grid;
  gap: 12px;
}

.flysub-grid {
  grid-template-columns: 1fr;
}

.flysub-gallery,
.flysub-grid-2 {
  grid-template-columns: 1fr;
}

.quick-stats {
  grid-template-columns: 1fr;
}

.info-grid {
  grid-template-columns: 1fr;
}

.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Desktop upgrade */
@media (min-width: 900px) {

  .flysub-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .flysub-gallery,
  .flysub-grid-2 {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   CARD SYSTEM
========================================================= */

.flysub-card,
.flysub-section,
.flysub-view,
.flysub-accordion,
.flysub-login-box,
.info-card,
.quick-stat,
.dest-section {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: var(--space);
}

/* Hover only for devices that support hover */
@media (hover:hover) {
  .flysub-card:hover {
    transform: translateY(-4px);
  }
}

/* =========================================================
   CARDS
========================================================= */

.flysub-card {
  overflow: hidden;
  cursor: pointer;
  transition: .2s;
}

.card-body {
  padding: 10px 0 0;
}

/* =========================================================
   IMAGES
========================================================= */

.flysub-card-image {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
}

.carousel-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* Desktop hero image */
@media (min-width: 900px) {
  .carousel-img {
    height: 460px;
  }
}

/* =========================================================
   DESTINATION LAYOUT
========================================================= */

.destination {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================================================
   HERO
========================================================= */

.dest-title {
  font-size: 28px;
  font-weight: 800;
}

.dest-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
}

.dest-subtitle {
  font-size: 15px;
  color: #4b5563;
}

/* =========================================================
   CAROUSEL
========================================================= */

.hero-carousel {
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.left { left: 10px; }
.carousel-btn.right { right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
}

.carousel-dot.active {
  width: 22px;
  background: var(--primary);
}

/* =========================================================
   QUICK STATS (MOBILE STACK)
========================================================= */

.quick-stat {
  text-align: left;
}

.quick-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* =========================================================
   INFO BLOCKS
========================================================= */

.info-item {
  background: #f8fafb;
  border-radius: var(--radius);
  padding: 12px;
}

.info-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.info-value {
  font-size: 14px;
  color: #374151;
}

/* =========================================================
   SECTIONS
========================================================= */

.dest-section h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

/* =========================================================
   SCALE BARS
========================================================= */

.scale {
  margin-bottom: 14px;
}

.scale-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.scale-bar {
  display: flex;
  gap: 4px;
}

.block {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
}

.block.active {
  background: linear-gradient(90deg,#d9534f,#f0ad4e,#5cb85c);
}

/* =========================================================
   BUTTONS (TOUCH-FIRST)
========================================================= */

button {
  font: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  min-height: 44px;
}

button.primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
}

button.secondary {
  background: #e5e7eb;
  color: #111;
}

/* =========================================================
   CHIPS / FILTERS
========================================================= */

.filter-bar,
.meta-line,
.scale-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
}

/* =========================================================
   BACK BUTTON
========================================================= */

.back-btn {
  width: fit-content;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
}

/* =========================================================
   UTILITIES
========================================================= */

.hidden {
  display: none;
}

.big-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

/* =========================================================
   HOME PAGE
========================================================= */

.home {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* HERO */

.home-hero {
  text-align: center;
  padding: 30px 0 10px;
}

.home-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.home-subtitle {
  font-size: 16px;
  color: #4b5563;
  max-width: 720px;
  margin: 10px auto 0;
  line-height: 1.6;
}

/* QUICK ACTIONS */

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-action {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: .2s;
}

.home-action:hover {
  transform: translateY(-3px);
}

.home-action h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.home-action p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* FEATURED SECTION */

.home-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* MOBILE */
@media (max-width: 700px) {

  .home-title {
    font-size: 30px;
  }

  .home-actions,
  .home-featured {
    grid-template-columns: 1fr;
  }
}

.flysub-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.flysub-home h1 {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
}

.flysub-home p {
  max-width: 600px;
  text-align: center;
  color: #6b7280;
  line-height: 1.6;
}

.flysub-home button {
  padding: 14px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
}

/* =========================================================
   EXPLORE PAGE FIX PATCH
========================================================= */

.flysub-explore {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* HEADER */
.flysub-explore h1 {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

/* SEARCH */
.flysub-explore input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
}

/* FILTER BAR */
.filter-bar {
  background: #fff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* FILTER PANEL IMPROVEMENT */
.filter-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
}

/* ACTIVE FILTER AREA */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* RESULTS GRID SPACING */
#live-results {
  margin-top: 10px;
}

/* =========================================================
   MAP FILTER MODAL
========================================================= */

.map-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 5000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.map-modal {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;

  overflow-y: auto;

  background: #fff;
  border-radius: 22px;

  padding: 24px;

  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.map-filter-group {
  margin-top: 24px;
}

.map-filter-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.map-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-filter-chip {
  background: #eef2f4;
  padding: 10px 14px;
  border-radius: 999px;
  color: #222;
}

.map-filter-chip.active {
  background: var(--primary);
  color: #fff;
}

.map-modal-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

/* MOBILE */

@media (max-width: 768px) {

  .map-modal {
    border-radius: 22px 22px 0 0;

    max-width: 100%;
    width: 100%;

    position: absolute;
    bottom: 0;

    max-height: 85vh;
  }
}

/* =========================================================
   MAP DESTINATION CARDS
========================================================= */

#map-cards {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4500;
}

.map-destination-card {
  pointer-events: auto;

  width: 320px;

  background: #fff;

  border-radius: 18px;

  box-shadow: 0 20px 50px rgba(0,0,0,.2);

  padding: 18px;

  position: relative;

  margin: 20px;
}

.map-card-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 32px;
  height: 32px;

  border-radius: 999px;

  background: #f1f5f9;
}

.map-card-line {
  margin-top: 10px;
  font-size: 14px;
  color: #374151;
}

.map-learn-more {
  width: 100%;
  margin-top: 18px;
}

/* DESKTOP */

@media (min-width: 769px) {

  #map-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

/* MOBILE */

@media (max-width: 768px) {

  #map-cards {
    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 0;
  }

  .map-destination-card {
    width: 100%;
    margin: 0;

    border-radius: 22px 22px 0 0;

    max-height: 75vh;
    overflow-y: auto;
  }
}

.flysub-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: 4 / 6;

    background: #fff;
    border-radius: 22px;
    overflow: hidden;

    box-shadow: 0 6px 22px rgba(0,0,0,0.08);

    cursor: pointer;
}

.card-image-wrapper {
    flex: 3;
    min-height: 0; /* critical fix for flex collapsing issues */

    padding: 10px;
    box-sizing: border-box;
}

.card-image {
    width: 100%;
    height: 100%;

    border-radius: 16px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-body {
    flex: 3;

    padding: 16px 18px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 0;
}

.flysub-explore-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 30px;
}

@media (min-width: 980px) {
    .flysub-explore-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

#map-active-filters {
    margin: 10px 0 8px;
}

.active-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* =========================================================
   CHIPS (ACTIVE FILTERS)
========================================================= */

.active-chip {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 500;

    /* dark forest base */
    background: #0f1f17;
    color: #cbd5e1;

    border: 1px solid rgba(34, 197, 94, 0.12);

    white-space: nowrap;

    cursor: pointer;

    transition: all 0.15s ease;
}

/* hover → green glow tint */
.active-chip:hover {
    background: rgba(34, 197, 94, 0.12);
    color: #0f3d2e;
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

/* active press */
.active-chip:active {
    transform: translateY(0px);
}

/* optional "selected filter removal feel" */
.active-chip:hover::after {
    color: #0f3d2e;
}

/* =========================================================
   FILTER BUTTON (SIGNATURE PRIMARY)
========================================================= */

#open-filter-modal {
    margin-top: 8px;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 12px;

    font-size: 13px;
    font-weight: 700;

    border-radius: 10px;

    /* signature green */
    background: var(--primary);
    color: #fff;

    border: 1px solid rgba(34, 197, 94, 0.35);

    cursor: pointer;

    transition: all 0.2s ease;
}

/* hover */
#open-filter-modal:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* active press */
#open-filter-modal:active {
    transform: translateY(0px);
}

/* =========================================================
   TOOLBAR WRAPPER
========================================================= */

.flysub-map-toolbar {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-bottom: 10px;
}

.report-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.report-name {
  color: var(--primary);
}

.report-date {
  font-size: 12px;
  color: #6b7280;
}

.report-meta {
  font-size: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #4b5563;
}

.report-form {
  display: grid;
  gap: 10px;
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.report-form input,
.report-form select,
.report-form textarea {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.report-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.rating-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-title {
  font-weight: 600;
  color: var(--primary);
}

.rating-value {
  font-weight: bold;
  font-size: 14px;
  color: #374151;
}

.rating-desc {
  font-size: 12px;
  color: #6b7280;
}

.fish-intel {
  margin-top: 10px;
}

.fish-intel-grid {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.fish-col {
  flex: 1;
  min-width: 180px;
  background: #f9fafb;
  padding: 10px;
  border-radius: 10px;
}

.fish-col h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--primary);
}

.report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}

.chip-success {
  background: #dcfce7;
  color: #166534;
}

.chip-muted {
  background: #f3f4f6;
  color: #6b7280;
}

.chip-bait {
  background: #fff7ed;
  color: #9a3412;
}

.report-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.species-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.species-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #374151;
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-rating {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  align-items: center;
  font-size: 11px;
  gap: 6px;
}

.bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #22c55e);
}

.rating-scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 6px 0 4px;
}

.rating-min {
    justify-self: start;
    font-size: 12px;
    font-weight: 600;
    color: #999;
}

.rating-current {
    justify-self: center;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

.rating-max {
    justify-self: end;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
}

