/* ================================================================
   SnowCrew Resort Cards + Challenges + Forum
   ================================================================ */

/* ── Lucide icon sizing ─────────────────────────────────────────── */
.sc-ico {
  display: inline-block;
  width: 14px; height: 14px;
  vertical-align: -2px;
  stroke-width: 2;
}
.sc-ico-green { color: #22c55e; }
.sc-ico-blue  { color: #3b82f6; }
.sc-ico-red   { color: #ef4444; }
.sc-ico-black { color: #1e293b; }

/* ── Section wrapper ────────────────────────────────────────────── */
.sc-section {
  margin: 1.5rem 0;
}
.sc-section-head {
  margin-bottom: .75rem;
}
.sc-section-head h2 {
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 800;
  margin: 0 0 2px;
  letter-spacing: .2px;
}
.sc-section-sub {
  color: #64748b;
  font-size: .85rem;
  margin: 0;
}

/* ── Loading skeleton ───────────────────────────────────────────── */
.sc-loading {
  text-align: center;
  padding: 1.25rem;
  color: #94a3b8;
  font-size: .85rem;
}

/* ── Resort grid ────────────────────────────────────────────────── */
.sc-resort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ── Resort card ────────────────────────────────────────────────── */
.sc-resort-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(2,12,27,.04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.sc-resort-card:hover {
  box-shadow: 0 6px 20px rgba(2,12,27,.08);
  transform: translateY(-1px);
}

/* Cover image */
.sc-resort-img {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, #e6f4ff, #eef7ff);
  background-size: cover;
  background-position: center;
}

/* Status badge */
.sc-status {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .3px;
  backdrop-filter: blur(4px);
}
.sc-status--open {
  background: rgba(34,197,94,.15);
  color: #15803d;
  border: 1px solid rgba(34,197,94,.3);
}
.sc-status--closed {
  background: rgba(100,116,139,.12);
  color: #475569;
  border: 1px solid rgba(100,116,139,.2);
}

/* Card body */
.sc-resort-body {
  padding: 10px 14px 10px;
}
.sc-resort-name {
  font-size: .92rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.25;
}
.sc-resort-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: #64748b;
  margin: 0 0 6px;
}
.sc-resort-dist {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── Difficulty bar ─────────────────────────────────────────────── */
.sc-diff-bar {
  display: flex;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
  background: #f1f5f9;
}
.sc-diff-seg {
  display: block;
  min-width: 4px;
  transition: width .3s ease;
}
.sc-diff-green { background: #22c55e; }
.sc-diff-blue  { background: #3b82f6; }
.sc-diff-red   { background: #ef4444; }
.sc-diff-black { background: #1e293b; }

.sc-diff-legend {
  display: flex;
  gap: 8px;
  font-size: .72rem;
  color: #64748b;
  margin-bottom: 6px;
}
.sc-diff-legend span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Resort link */
.sc-resort-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand, #0ea5e9);
  text-decoration: none;
}
.sc-resort-link:hover {
  text-decoration: underline;
}

/* Country code badge (no emojis) */
.sc-country-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  letter-spacing: .5px;
  vertical-align: 1px;
}

/* ── Challenge grid ─────────────────────────────────────────────── */
.sc-challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.sc-challenge-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(2,12,27,.04);
  transition: box-shadow .2s ease;
}
.sc-challenge-card:hover {
  box-shadow: 0 6px 18px rgba(2,12,27,.08);
}
.sc-challenge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.sc-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sc-badge--easy   { background: #dcfce7; color: #166534; }
.sc-badge--medium { background: #dbeafe; color: #1e40af; }
.sc-badge--hard   { background: #fee2e2; color: #991b1b; }

.sc-challenge-pts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .72rem;
  color: #b45309;
  font-weight: 600;
}
.sc-challenge-name {
  font-size: .88rem;
  font-weight: 700;
  margin: 0 0 3px;
}
.sc-challenge-desc {
  font-size: .8rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 5px;
}
.sc-challenge-resort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .75rem;
  color: #64748b;
  margin: 0;
}

/* ================================================================
   FORUM / COMMUNITY TALK SECTION
   Always visible, SEO-heavy, looks like real user discussions.
   ================================================================ */

.forum-section {
  margin: 2rem 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.forum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.forum-header h2 {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.forum-header-sub {
  font-size: .8rem;
  color: #64748b;
}

/* Thread list */
.forum-threads {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.forum-thread {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  transition: box-shadow .15s ease;
}
.forum-thread:hover {
  box-shadow: 0 3px 12px rgba(2,12,27,.05);
}

.forum-thread-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Avatar (initials) */
.forum-avatar {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.forum-avatar--1 { background: #6366f1; }
.forum-avatar--2 { background: #0ea5e9; }
.forum-avatar--3 { background: #f59e0b; }
.forum-avatar--4 { background: #10b981; }
.forum-avatar--5 { background: #ec4899; }
.forum-avatar--6 { background: #8b5cf6; }
.forum-avatar--7 { background: #ef4444; }
.forum-avatar--8 { background: #14b8a6; }

.forum-thread-content {
  flex: 1;
  min-width: 0;
}
.forum-thread-title {
  font-size: .88rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
  color: #0b1220;
}
.forum-thread-body {
  font-size: .8rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.forum-thread-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  color: #94a3b8;
  flex-wrap: wrap;
}
.forum-thread-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Tags in forum */
.forum-tag {
  font-size: .62rem;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}

/* Replies (nested) */
.forum-replies {
  margin: 6px 0 0 40px;
  padding: 0;
  list-style: none;
  border-left: 2px solid #e2e8f0;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.forum-reply {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.forum-reply-avatar {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .58rem;
  font-weight: 700;
  color: #fff;
}
.forum-reply-content {
  flex: 1;
}
.forum-reply-author {
  font-size: .72rem;
  font-weight: 700;
  color: #334155;
}
.forum-reply-text {
  font-size: .78rem;
  color: #475569;
  line-height: 1.4;
  margin: 1px 0 0;
}
.forum-reply-time {
  font-size: .65rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Join CTA at bottom of forum */
.forum-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: .75rem;
  padding: 10px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: .82rem;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.forum-cta:hover {
  border-color: var(--brand, #0ea5e9);
  color: var(--brand, #0ea5e9);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sc-resort-grid {
    grid-template-columns: 1fr;
  }
  .sc-challenge-grid {
    grid-template-columns: 1fr;
  }
  .forum-replies {
    margin-left: 30px;
    padding-left: 10px;
  }
  .forum-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .sc-resort-img {
    height: 100px;
  }
}

/* ── Dark mode ──────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .sc-resort-card,
  .sc-challenge-card,
  .forum-thread {
    background: #0f172a;
    border-color: #1e293b;
  }
  .sc-resort-name,
  .forum-thread-title { color: #e2e8f0; }
  .sc-resort-meta,
  .sc-diff-legend,
  .sc-challenge-desc,
  .forum-thread-body { color: #94a3b8; }
  .forum-section {
    background: #0b1220;
    border-color: #1e293b;
  }
  .forum-cta {
    background: #0f172a;
    border-color: #1e293b;
    color: #94a3b8;
  }
  .forum-tag {
    background: #072b35;
    border-color: #0b4a5a;
    color: #8ce1ff;
  }
  .forum-replies {
    border-left-color: #1e293b;
  }
  .sc-diff-bar { background: #1e293b; }
  .sc-status--open { background: rgba(34,197,94,.1); }
  .sc-status--closed { background: rgba(100,116,139,.1); }
  .sc-country-code { background: #1e293b; border-color: #334155; color: #94a3b8; }
}

/* ============================================================
   ABOVE-FOLD LAYOUT — 2-column: resort grid + forum sidebar
   ============================================================ */

/* Topbar: replaces .hero — compact header, navbar only, no hero content */
.topbar {
  position: relative;
  background: linear-gradient(135deg, #0b1220 0%, #1a2a4a 100%);
  /* No height/min-height — shrinks to navbar content */
}
/* Navbar inside topbar uses position:absolute by default — override */
.topbar .navbar {
  position: relative;
}

/* ---- Above-fold 2-column grid ---- */
.above-fold-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 12px;
}

/* Left column inherits sc-section spacing, no extra padding needed */
.above-fold-main {
  min-width: 0; /* prevent grid blowout */
}

/* ---- Forum sidebar ---- */
.forum-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 16px;
}

.forum-sidebar-head {
  margin-bottom: 10px;
}
.forum-sidebar-head h2 {
  font-size: .95rem;
  font-weight: 800;
  margin: 0 0 2px;
  color: #0b1220;
}
.forum-sidebar-head p {
  font-size: .75rem;
  color: #64748b;
  margin: 0;
}

/* ---- Compact thread list (sidebar) ---- */
.forum-threads--compact {
  list-style: none;
  margin: 0;
  padding: 0;
}
.forum-thread--compact {
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.forum-thread--compact:last-child {
  border-bottom: none;
}

.forum-thread--compact .forum-thread-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.forum-thread--compact .forum-avatar {
  width: 26px;
  height: 26px;
  font-size: .65rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.forum-thread--compact .forum-thread-content {
  min-width: 0;
}
.forum-thread--compact .forum-thread-title {
  font-size: .8rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.35;
  color: #0b1220;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.forum-thread--compact .forum-thread-meta {
  font-size: .68rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.forum-thread--compact .forum-tag {
  font-size: .65rem;
  padding: 1px 6px;
}
/* Hide thread body in compact mode */
.forum-thread--compact .forum-thread-body {
  display: none;
}

/* ---- Sidebar CTA ---- */
.forum-cta--sidebar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  padding: 9px 12px;
  margin-top: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  color: #0284c7;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  width: 100%;
  justify-content: center;
}
.forum-cta--sidebar:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* ---- Mobile: stack to single column ---- */
@media (max-width: 820px) {
  .above-fold-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 12px;
    gap: 16px;
  }
  .forum-sidebar {
    position: static;
  }
}

/* ---- Dark mode overrides for sidebar ---- */
@media (prefers-color-scheme: dark) {
  .forum-sidebar {
    background: #0f172a;
    border-color: #1e293b;
  }
  .forum-sidebar-head h2 { color: #e2e8f0; }
  .forum-sidebar-head p  { color: #94a3b8; }
  .forum-thread--compact .forum-thread-title { color: #e2e8f0; }
  .forum-thread--compact { border-bottom-color: #1e293b; }
  .forum-cta--sidebar {
    background: #0c1a28;
    border-color: #0c4a6e;
    color: #38bdf8;
  }
  .forum-cta--sidebar:hover {
    background: #0d2236;
    border-color: #0369a1;
  }
}
