/* ============================================================
   SpotBiker.com — Main Stylesheet
   No Tailwind. Pure CSS with CSS custom properties.
   Design: Dark theme, green/orange accents from logo.
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #5DBB00;
  --green-dark:  #489200;
  --green-light: #7EDD1A;
  --orange:      #F7941D;
  --red:         #E31B23;
  --bg:          #0E0E0E;
  --bg-2:        #181818;
  --bg-3:        #222222;
  --bg-4:        #2C2C2C;
  --border:      #333333;
  --text:        #EBEBEB;
  --text-muted:  #888888;
  --text-faint:  #555555;
  --white:       #FFFFFF;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(0,0,0,.55);
  --shadow-sm:   0 2px 10px rgba(0,0,0,.40);
  --transition:  .22s ease;
  --max-w:       1200px;
  --nav-h:       68px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-light); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

.text-green  { color: var(--green); }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text-muted); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 { margin-bottom: 10px; }
.section-title p  { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.divider {
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--orange));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(93,187,0,.35);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: #000;
  transform: translateY(-2px);
}

.btn-orange {
  background: var(--orange);
  color: #000;
  border-color: var(--orange);
}
.btn-orange:hover {
  background: #ffab42;
  border-color: #ffab42;
  color: #000;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-sm { padding: 7px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--green-dark);
}

.card-body { padding: 22px; }
.card-img  { width: 100%; height: 200px; object-fit: cover; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-green  { background: rgba(93,187,0,.15); color: var(--green); }
.badge-orange { background: rgba(247,148,29,.15); color: var(--orange); }
.badge-red    { background: rgba(227,27,35,.15); color: var(--red); }
.badge-gray   { background: var(--bg-4); color: var(--text-muted); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(14,14,14,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.navbar.scrolled {
  background: rgba(14,14,14,.98);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  background: rgba(93,187,0,.08);
}
.nav-links a i { font-size: .9em; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green);
  cursor: pointer;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text);
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
}
.nav-mobile a:hover,
.nav-mobile a.active { color: var(--green); background: rgba(93,187,0,.08); }
.nav-mobile .nav-mobile-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.nav-mobile .nav-mobile-actions .btn { flex: 1; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.60) 60%, rgba(93,187,0,.08) 100%),
    url('../assets/bg2.jpg') center/cover no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(93,187,0,.12);
  border: 1px solid rgba(93,187,0,.3);
  color: var(--green);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--green); }
.hero p  { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 36px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}
.hero-stat span { font-size: .88rem; color: var(--text-muted); margin-top: 4px; }

/* Floating map pin decoration */
.hero-deco {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .12;
  pointer-events: none;
}
.hero-deco i { font-size: 320px; color: var(--green); }

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--green-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(93,187,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p  { color: var(--text-muted); font-size: .93rem; }

/* ---------- Spots / map section ---------- */
.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 680px;
  position: relative;
}
#map { width: 100%; height: 100%; }

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

.spot-card { position: relative; }
.spot-card .card-img { height: 180px; }
.spot-card .difficulty {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ---------- Events ---------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.event-card .card-img { height: 190px; }
.event-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 800;
  line-height: 1.1;
  min-width: 52px;
  text-align: center;
}
.event-date-badge .day  { font-size: 1.6rem; }
.event-date-badge .mon  { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

.event-info { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.event-info-text h3 { font-size: 1.05rem; margin-bottom: 6px; }
.event-info-text p  { color: var(--text-muted); font-size: .88rem; }

.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 18px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---------- Forum ---------- */
.forum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.forum-cat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.forum-cat-card:hover {
  border-color: var(--green-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.forum-cat-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: rgba(93,187,0,.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--green);
}
.forum-cat-card h3 { font-size: 1rem; margin-bottom: 4px; }
.forum-cat-card p  { font-size: .83rem; color: var(--text-muted); }

/* Thread list */
.thread-list { display: flex; flex-direction: column; gap: 2px; }
.thread-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all var(--transition);
}
.thread-item:hover {
  border-color: var(--green-dark);
  background: var(--bg-3);
}
.thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.thread-meta { flex: 1; min-width: 0; }
.thread-meta a { color: var(--text); font-weight: 600; font-size: .96rem; }
.thread-meta a:hover { color: var(--green); }
.thread-sub { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }
.thread-stats { text-align: right; flex-shrink: 0; font-size: .82rem; color: var(--text-muted); }
.thread-stats strong { display: block; color: var(--text); font-size: .92rem; }
.thread-pinned { border-left: 3px solid var(--green); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.form-control {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(93,187,0,.14);
}
.form-control::placeholder { color: var(--text-faint); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .92rem;
}
.form-check input { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }

.form-error {
  font-size: .8rem;
  color: var(--red);
  margin-top: 5px;
}

/* Auth card */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 20px 40px;
}
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.auth-logo img { height: 54px; }
.auth-title { text-align: center; margin-bottom: 32px; }
.auth-title h2 { margin-bottom: 6px; }
.auth-title p  { color: var(--text-muted); font-size: .92rem; }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 24px 0;
  color: var(--text-faint);
  font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-switch { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--text-muted); }

@media (max-width: 500px) {
  .auth-card { padding: 32px 22px; }
}

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: .92rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(93,187,0,.08); border-color: var(--green); color: var(--green); }
.alert-error   { background: rgba(227,27,35,.08); border-color: var(--red); color: var(--red); }
.alert-warning { background: rgba(247,148,29,.08); border-color: var(--orange); color: var(--orange); }

/* ---------- Page header ---------- */
.page-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--nav-h) + 40px) 0 40px;
}
.page-header h1 { margin-bottom: 8px; }
.page-header p  { color: var(--text-muted); }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-bar .form-control { width: auto; }
.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filter-search input { padding-left: 42px; }
.filter-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  transition: all var(--transition);
  background: var(--bg-2);
}
.page-link:hover, .page-link.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand img { height: 48px; margin-bottom: 16px; }
.footer-brand p   { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--green); color: var(--green); }

.footer-col h4 { font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a  { color: var(--text-muted); font-size: .9rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--green); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .83rem;
  color: var(--text-faint);
}

/* ---------- Profile layout ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-stats { gap: 24px; }
  .hero-deco  { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 56px 0; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Utility ---------- */
.mt-auto   { margin-top: auto; }
.text-center { text-align: center; }
.flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2     { gap: 8px; }
.gap-3     { gap: 14px; }
.mb-0      { margin-bottom: 0; }
.pt-nav    { padding-top: var(--nav-h); }

/* ---------- Skeleton loader ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{ background-position:200% 0 } 100%{ background-position:-200% 0 } }

/* ---------- Scroll-reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }
