.explore-page {
  padding: 24px 0 64px;
}

/* ============================================================
   LANDING — bigger editorial hero + featured strips
   (used only on /app/explore.php, not the list pages)
   ============================================================ */
.explore-page--landing {
  padding-top: 28px;
  padding-bottom: 96px;
}

.explore-hero {
  position: relative;
  margin: 0 auto 56px;
  text-align: left;
  max-width: 860px;
  padding-top: 8px;
}
.explore-hero-pretitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--unique) 10%, transparent);
  color: var(--unique);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.explore-hero-pretitle i { font-size: 11px; }
.explore-hero-title {
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--text);
}
.explore-hero-subtitle {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 28px;
}

.explore-hero-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px 0 50px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.explore-hero-search:focus-within {
  border-color: var(--unique);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--unique) 16%, transparent), var(--shadow-md);
}
.explore-hero-search .explore-search-icon {
  left: 20px;
  font-size: 17px;
  color: var(--text-muted);
}
.explore-hero-search .explore-search-input {
  border: 0;
  background: transparent;
  height: 100%;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
}
.explore-hero-search .explore-search-input:focus {
  outline: none;
  box-shadow: none;
}
.explore-hero-search .explore-search-kbd {
  position: static;
  transform: none;
  margin-left: auto;
}

/* Section heading */
.explore-section {
  margin: 0 0 52px;
}
.explore-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.explore-section-header h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.explore-section-meta {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.explore-section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--unique);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.explore-section-link i { font-size: 11px; transition: transform 0.15s var(--ease); }
.explore-section-link:hover i { transform: translateX(3px); }

/* ---------- Category tile grid (asymmetric) ----------
   Row 1: big featured tile (airports, spans 2 cols on >=720px)
   Row 2: airlines (2 cols on >=720px)
   Row 3+: 3-up grid for remaining tiles
   On mobile it just stacks 1 column. */
.explore-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .explore-cat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .explore-cat-tile { grid-column: span 2; }
  .explore-cat-tile--featured { grid-column: span 6; }
  .explore-cat-tile[data-tile="airlines"] { grid-column: span 3; }
  .explore-cat-tile[data-tile="manufacturers"] { grid-column: span 3; }
  /* airplanes + registrations naturally fill span 2 each (= 4), so add an
     "airplanes" override to share the last row evenly. */
  .explore-cat-tile[data-tile="airplanes"] { grid-column: span 3; }
  .explore-cat-tile[data-tile="registrations"] { grid-column: span 3; }
}

.explore-cat-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 22px 22px 22px;
  min-height: 140px;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  isolation: isolate;
}
.explore-cat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.explore-cat-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--unique) 50%, var(--border));
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.explore-cat-tile:hover::before { opacity: 1; }
.explore-cat-tile:hover .explore-cat-tile-cta i { transform: translateX(4px); }

.explore-cat-tile-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 26px;
  background: color-mix(in srgb, var(--unique) 14%, transparent);
  color: var(--unique);
}
.explore-cat-tile-body {
  flex: 1;
  min-width: 0;
}
.explore-cat-tile-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}
.explore-cat-tile-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.explore-cat-tile-count {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--unique);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--unique) 12%, transparent);
}
.explore-cat-tile-cta {
  position: absolute;
  bottom: 18px;
  right: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s var(--ease);
}
.explore-cat-tile-cta i { font-size: 10px; transition: transform 0.18s var(--ease); }
.explore-cat-tile:hover .explore-cat-tile-cta { color: var(--unique); }

/* Featured airport tile — bigger, gradient background tied to the brand */
.explore-cat-tile--featured {
  min-height: 200px;
  padding: 28px 28px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--unique) 14%, var(--surface-raised)) 0%,
    var(--surface-raised) 60%);
  border-color: color-mix(in srgb, var(--unique) 25%, var(--border));
}
.explore-cat-tile--featured .explore-cat-tile-icon {
  width: 76px;
  height: 76px;
  font-size: 32px;
  background: color-mix(in srgb, var(--unique) 22%, transparent);
}
.explore-cat-tile--featured .explore-cat-tile-title {
  font-size: 26px;
}
.explore-cat-tile--featured .explore-cat-tile-desc {
  font-size: 15px;
  max-width: 540px;
}

/* Tonal accents per category — subtle hue shifts for the icon backplates */
.explore-cat-tile--sky  .explore-cat-tile-icon { background: color-mix(in srgb, #2E7BE6 14%, transparent); color: #2E7BE6; }
.explore-cat-tile--navy .explore-cat-tile-icon { background: color-mix(in srgb, #0B2545 12%, transparent); color: var(--text); }
.explore-cat-tile--teal .explore-cat-tile-icon { background: color-mix(in srgb, #14B8A6 16%, transparent); color: #14B8A6; }
.explore-cat-tile--amber .explore-cat-tile-icon { background: color-mix(in srgb, #F5B544 22%, transparent); color: #c98800; }
.explore-cat-tile--plum .explore-cat-tile-icon { background: color-mix(in srgb, #9C5CCC 16%, transparent); color: #9C5CCC; }
@media (prefers-color-scheme: dark) {
  .explore-cat-tile--navy .explore-cat-tile-icon { background: color-mix(in srgb, #C7D7EE 12%, transparent); color: var(--text); }
  .explore-cat-tile--amber .explore-cat-tile-icon { color: #f5b544; }
}

/* ---------- Featured airports grid ---------- */
.explore-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) { .explore-featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .explore-featured-grid { grid-template-columns: repeat(3, 1fr); } }

.explore-feature-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.explore-feature-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--unique) 35%, var(--border));
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.explore-feature-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, color-mix(in srgb, var(--unique) 18%, var(--surface)), var(--surface));
  display: grid; place-items: center;
  overflow: hidden;
}
.explore-feature-card-media img { width: 100%; height: 100%; object-fit: cover; }
.explore-feature-card-emoji { font-size: 44px; opacity: 0.85; }
.explore-feature-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  background: rgba(11,37,69,0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}
.explore-feature-card-body { padding: 14px 16px 16px; }
.explore-feature-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-feature-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-feature-card-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--unique);
}
.explore-feature-card-count i { font-size: 11px; }

/* ---------- Airline list ---------- */
.explore-airline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) { .explore-airline-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px){ .explore-airline-grid { grid-template-columns: repeat(3, 1fr); } }

.explore-airline-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.explore-airline-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--unique) 40%, var(--border));
  color: var(--text);
}
.explore-airline-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--unique) 14%, transparent);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.explore-airline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.explore-airline-initials {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--unique);
  letter-spacing: 0.03em;
}
.explore-airline-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.explore-airline-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-airline-codes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.explore-airline-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--unique);
  flex-shrink: 0;
}

/* ============================================================
   LIST PAGES — header + back button shared with the category list view
   ============================================================ */
.explore-title {
  font-size: 24px;
  margin-bottom: 18px;
}
.explore-title--center {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
}

.explore-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.explore-header-row .explore-title { margin-bottom: 0; }
.explore-back {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.explore-back:hover { background: var(--surface-raised); color: var(--text); }

/* Search bar — input and pill button share a base look */
.explore-search-row {
  position: relative;
  margin-bottom: 18px;
}
.explore-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--input-field);
  color: var(--text);
  font-size: 15px;
}
.explore-search-input:focus {
  outline: none;
  border-color: var(--unique);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--unique) 18%, transparent);
}
.explore-search-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.explore-search-kbd {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Pill search button (landing view) */
.explore-search-row--button {
  display: flex;
  align-items: center;
  height: 48px;
  padding-left: 44px;
  padding-right: 16px;
  border-radius: var(--radius-pill);
  background: var(--input-field);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}
.explore-search-row--button:hover {
  color: var(--text);
  border-color: var(--unique);
}
.explore-search-row--button .explore-search-placeholder { flex: 1; }

.explore-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 30;
  max-height: 60vh;
  overflow-y: auto;
  display: none;
}
.explore-search-results.is-open { display: block; }
.search-group {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.search-group:last-child { border-bottom: 0; }
.search-group h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.search-row:hover { background: var(--surface); }
.search-row .author-avatar { width: 32px; height: 32px; font-size: 15px; }
.search-row-main { flex: 1; min-width: 0; font-size: 15px; }
.search-row-sub { font-size: 13px; color: var(--text-muted); margin-top: 1px; }

/* "See all results" footer in the dropdown */
.search-group--cta {
  background: color-mix(in srgb, var(--unique) 6%, var(--background));
  border-top: 1px solid var(--border);
  padding: 0;
}
.search-row--cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--unique);
  font-weight: 600;
}
.search-row--cta:hover { background: color-mix(in srgb, var(--unique) 12%, var(--background)); color: var(--unique); }
.search-row--cta i { margin-left: auto; font-size: 12px; }

/* Tile grid (landing view) — mirrors iOS Explore */
.explore-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 720px) {
  .explore-tile-grid { grid-template-columns: repeat(3, 1fr); }
}
.explore-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 140px;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  background: var(--background);
  border: 2px solid color-mix(in srgb, var(--surface) 60%, var(--border));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s var(--ease), border-color 0.15s var(--ease);
}
.explore-tile:hover {
  transform: translateY(-1px);
  border-color: var(--unique);
  color: var(--text);
}
.explore-tile-icon {
  font-size: 30px;
  color: var(--text);
  line-height: 1;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.explore-tile-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
}
/* Category list view (preserved for back-compat with existing JS/action) */
.explore-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  overflow-x: auto;
}
.explore-tab {
  flex: 1;
  min-width: max-content;
  padding: 8px 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
}
.explore-tab.is-active { background: var(--background); color: var(--text); box-shadow: var(--shadow-sm); }
.explore-tab:hover:not(.is-active) { color: var(--text); }

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.explore-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease;
}
.explore-card:hover { transform: translateY(-1px); }
.explore-card-media {
  aspect-ratio: 4 / 3;
  background: var(--background);
  display: grid; place-items: center;
  font-size: 36px;
  overflow: hidden;
}
.explore-card-media img { width: 100%; height: 100%; object-fit: cover; }
.explore-card-body { padding: 12px 14px; }
.explore-card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
}

.explore-empty {
  padding: 48px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
