/* ── Index Page Styles ─────────────────────────────────────── */

/* ── Nav dropdown ───────────────────────────────────────────── */
#nav-user { position: relative; }
.nav-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-md);
  position: relative;
  transition: background .2s;
}
.nav-user-menu:hover { background: var(--bg-surface); }

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-user-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.nav-chevron { font-size: 12px; color: var(--text-muted); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  padding: 6px;
  z-index: 1100;
  animation: dropdown-in .2s ease;
}
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-dd-item:hover { background: var(--bg-surface); text-decoration: none; color: var(--text-primary); }
.nav-dd-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-dd-logout { color: var(--error); }
.nav-dd-logout:hover { background: var(--error-light); }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

#hero-map {
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11,18,32,.82) 0%,
    rgba(11,18,32,.55) 50%,
    rgba(26,86,219,.25) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-2xl);
  padding-top: var(--nav-height);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(26,86,219,.2);
  border: 1px solid rgba(26,86,219,.35);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  margin-bottom: var(--sp-xl);
}
.hero-badge-icon {
  height: 18px;
  width: auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: var(--sp-xl);
  max-width: 700px;
}

.hero-subtitle {
  font-size: clamp(16px, 1.5vw, 19px);
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: var(--sp-3xl);
}

/* Search box */
.hero-search {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
  padding: 6px 6px 6px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  gap: 10px;
}

.search-icon { font-size: 18px; flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  padding: 8px 0;
}
.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  border-radius: var(--r-lg);
  padding: 10px 24px;
  flex-shrink: 0;
  font-size: 15px;
}

.hero-filters {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  backdrop-filter: blur(6px);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Stats bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-2xl);
  margin-top: var(--sp-3xl);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
}
.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.2);
}

@media (max-width: 768px) {
  .hero { max-height: none; height: auto; padding: 120px 0 60px; }
  .hero-subtitle { font-size: 15px; }
  .hero-stats { gap: var(--sp-xl); }
  .hero-stat-num { font-size: 22px; }
  .search-box { padding: 5px 5px 5px 14px; }
  .search-input { font-size: 15px; }
}

/* ── MAP SECTION ─────────────────────────────────────────────── */
.map-section {
  height: calc(100vh - var(--nav-height));
  min-height: 600px;
}

.map-layout {
  display: flex;
  height: 100%;
}

/* Sidebar */
.map-sidebar {
  width: 380px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: var(--sp-lg) var(--sp-xl);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.sidebar-search {
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-search .form-input { font-size: 14px; }

.filter-section {
  padding: var(--sp-sm) var(--sp-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.filter-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 6px;
}

.range-input {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}
.rating-filter {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.rating-filter-val {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: right;
}
.form-select-sm { padding: 7px 10px; font-size: 13px; }

/* Bases list */
.bases-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-sm);
}
.bases-list::-webkit-scrollbar { width: 4px; }
.bases-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.base-list-item {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-md);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s;
  border: 1px solid transparent;
}
.base-list-item:hover { background: var(--bg-surface); border-color: var(--border); }
.base-list-item.active { background: var(--primary-light); border-color: rgba(26,86,219,.2); }

.base-list-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}
.base-list-thumb img { width: 100%; height: 100%; object-fit: cover; }

.base-list-info { flex: 1; min-width: 0; }
.base-list-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.base-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.base-list-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}
.base-rating-num {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Map container */
.map-container {
  flex: 1;
  position: relative;
}
#main-map {
  width: 100%;
  height: 100%;
}

.map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.map-ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.map-ctrl-btn:hover { background: var(--bg-surface); }

.yandex-terms-link {
  position: absolute;
  bottom: 4px;
  right: 8px;
  z-index: 10;
}
.yandex-terms-link a {
  font-size: 10px;
  color: rgba(0,0,0,.45);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .map-section { height: auto; }
  .map-layout { flex-direction: column; height: auto; }
  .map-sidebar { width: 100%; max-height: 400px; border-right: none; border-bottom: 1px solid var(--border); }
  .map-container { height: 400px; }
}

/* ── ABOUT / FEATURES ────────────────────────────────────────── */
.about-section {
  padding: var(--sp-5xl) 0;
  background: var(--bg);
}

.about-header-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: var(--sp-4xl);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-card);
  overflow: hidden;
}
.about-header-left {
  padding: 40px;
  border-right: 1px solid var(--border);
}
.about-header-right {
  padding: 40px;
  display: flex;
  align-items: center;
}
.about-header-desc {
  font-size: 18px;
  color: var(--primary);
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xl);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  transition: box-shadow .25s, transform .25s;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.feature-card-premium {
  background: linear-gradient(135deg, #fffdf0 0%, #fff8e1 100%);
  border-color: rgba(212,160,23,.25);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xl);
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  transition: box-shadow .25s, transform .25s;
}
.step-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--text-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-lg);
}
.step-title {
  font-family: var(--font-heading);
  font-size: 17px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-sm);
}
.step-text { font-size: 14px; color: var(--primary); line-height: 1.6; }

/* ── PREMIUM BANNER ────────────────────────────── */
.premium-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2xl);
  margin-top: var(--sp-xl);
  padding: var(--sp-2xl) var(--sp-2xl);
  background: var(--premium-light);
  border: 1px solid rgba(212,160,23,.25);
  border-radius: var(--r-xl);
}
.premium-banner-title {
  font-family: var(--font-heading);
  font-size: 17px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-xs);
}
.premium-banner-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
@media (max-width: 600px) {
  .premium-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  .about-header-split { grid-template-columns: 1fr; }
  .about-header-left { border-right: none; border-bottom: 1px solid var(--border); }
  .steps-grid { grid-template-columns: 1fr; }
}

/* ── TOP BASES ───────────────────────────────────────────────── */
.top-section {
  padding: var(--sp-4xl) 0;
  background: var(--bg-surface);
}
.top-header { margin-bottom: var(--sp-2xl); }
.top-bases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xl);
}

.base-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .25s, transform .25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.base-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.base-card-img {
  height: 160px;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.base-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.base-card:hover .base-card-img img { transform: scale(1.05); }

.base-card-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  backdrop-filter: blur(4px);
}

.base-card-body { padding: var(--sp-lg); }
.base-card-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.base-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.base-card-rating-num {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.base-card-reviews {
  font-size: 12px;
  color: var(--text-muted);
}
.base-card-coords {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 960px) { .top-bases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .top-bases-grid { grid-template-columns: 1fr; } }

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section {
  padding: var(--sp-4xl) 0;
}

.cta-card {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d1f4a 100%);
  border-radius: 24px;
  padding: var(--sp-4xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,86,219,.3) 0%, transparent 70%);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: var(--sp-md);
}
.cta-text { font-size: 16px; color: rgba(255,255,255,.65); line-height: 1.6; max-width: 480px; }
.cta-fish { flex-shrink: 0; opacity: .8; animation: bob 3s ease-in-out infinite; }
.cta-fish-img { height: 192px; width: auto; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 768px) {
  .cta-card { flex-direction: column; padding: var(--sp-3xl); }
  .cta-fish { display: none; }
  .cta-title { font-size: 24px; }
}
