/* ==========================================================================
   Community Landing Page
   Mobile-first redesign: hero, showcase carousels, search grid, Pro funnel
   ========================================================================== */

.community-landing {
  --exo-navy: #000d33;
  --exo-purple: #6129ff;
  --exo-ink: #0b0b0b;
  --exo-muted: rgba(11, 11, 11, 0.55);
  --exo-line: rgba(11, 11, 11, 0.08);
  --exo-bg-soft: #f6f7fb;
  --exo-radius: 16px;
  --exo-radius-sm: 10px;
  --exo-shadow: 0 6px 24px rgba(0, 13, 51, 0.08);
  --exo-shadow-hover: 0 12px 32px rgba(0, 13, 51, 0.14);
  font-family: 'Poppins', sans-serif;
}

.exo-community {
  display: block;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.exo-community__hero {
  padding: 8px 0 4px;
}

.exo-community__hero-title {
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  color: var(--exo-ink);
  margin: 0 0 8px;
}

.exo-community__hero-tagline {
  font-size: 15px;
  line-height: 1.5;
  color: var(--exo-muted);
  max-width: 640px;
  margin: 0;
}

@media (min-width: 768px) {
  .exo-community__hero-title { font-size: 44px; }
  .exo-community__hero-tagline { font-size: 17px; }
}

/* Hero stats */
.exo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 16px;
}
.exo-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.exo-stat__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--exo-navy);
  line-height: 1;
}
.exo-stat__label {
  font-size: 13px;
  color: var(--exo-muted);
}
@media (min-width: 768px) {
  .exo-stat__value { font-size: 26px; }
}

/* Back to community */
.exo-search__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--exo-purple);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 12px;
}
.exo-search__back:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Pro funnel banner
   -------------------------------------------------------------------------- */

.exo-pro-banner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(120deg, var(--exo-navy) 0%, #1b1147 60%, var(--exo-purple) 130%);
  color: #fff;
  border-radius: var(--exo-radius);
  padding: 22px;
  margin: 20px 0 8px;
  box-shadow: var(--exo-shadow);
}

.exo-pro-banner__content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.exo-pro-banner__badge {
  flex: 0 0 auto;
  background: #fff;
  color: var(--exo-purple);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  margin-top: 2px;
}

.exo-pro-banner__title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

.exo-pro-banner__text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.exo-pro-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .exo-pro-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px;
  }
  .exo-pro-banner__actions { flex-shrink: 0; }
}

/* Buttons */

.exo-btn-pro,
.exo-btn-primary,
.exo-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--exo-radius-sm);
  padding: 11px 20px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.exo-btn-pro {
  background: #fff;
  color: var(--exo-navy);
}
.exo-btn-pro:hover { transform: translateY(-1px); color: var(--exo-navy); }

.exo-btn-primary {
  background: var(--exo-navy);
  color: #fff;
}
.exo-btn-primary:hover { background: #001a66; color: #fff; }
.exo-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.exo-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.exo-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* --------------------------------------------------------------------------
   Showcase rows (horizontal carousels)
   -------------------------------------------------------------------------- */

.exo-showcase {
  margin: 30px 0;
}

.exo-showcase__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.exo-showcase__heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exo-showcase__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-block;
  background: var(--exo-bg-soft);
  position: relative;
}
.exo-showcase__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
  font-family: 'Font Awesome 6 Free', 'FontAwesome';
}
.exo-showcase__icon--new::after { content: '\2728'; line-height: 40px; text-align: center; font-size: 18px; }
.exo-showcase__icon--top::after { content: '\1F3C6'; line-height: 40px; text-align: center; font-size: 18px; }
.exo-showcase__icon--near::after { content: '\1F4CD'; line-height: 40px; text-align: center; font-size: 18px; }

.exo-showcase__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--exo-ink);
  margin: 0;
  line-height: 1.2;
}

.exo-showcase__subtitle {
  font-size: 13px;
  color: var(--exo-muted);
  margin: 2px 0 0;
}

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

.exo-showcase__viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--exo-purple);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  padding: 6px 4px;
}
.exo-showcase__viewall:hover { text-decoration: underline; }
.exo-showcase__viewall i { font-size: 11px; }

.exo-showcase__nav {
  display: none;
  gap: 8px;
  flex-shrink: 0;
}

.exo-showcase__nav button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--exo-line);
  background: #fff;
  color: var(--exo-navy);
  cursor: pointer;
  transition: background 0.15s ease;
}
.exo-showcase__nav button:hover { background: var(--exo-bg-soft); }

@media (min-width: 768px) {
  .exo-showcase__title { font-size: 24px; }
  .exo-showcase__nav { display: flex; }
}

.exo-showcase__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 16px;
  margin: 0 -4px;
  scrollbar-width: thin;
}
.exo-showcase__track::-webkit-scrollbar { height: 6px; }
.exo-showcase__track::-webkit-scrollbar-thumb { background: var(--exo-line); border-radius: 999px; }

.exo-showcase__item {
  flex: 0 0 78%;
  max-width: 78%;
  scroll-snap-align: start;
}

@media (min-width: 560px) {
  .exo-showcase__item { flex-basis: 46%; max-width: 46%; }
}
@media (min-width: 900px) {
  .exo-showcase__item { flex-basis: 31%; max-width: 31%; }
}
@media (min-width: 1200px) {
  .exo-showcase__item { flex-basis: 23.5%; max-width: 23.5%; }
}

/* --------------------------------------------------------------------------
   Profile card (shared)
   -------------------------------------------------------------------------- */

.exo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--exo-line);
  border-radius: var(--exo-radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  word-break: break-word;
}
.exo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--exo-shadow-hover);
}

.exo-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.exo-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: var(--exo-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.exo-card__follow {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
}
.exo-card__follow > span {
  display: block;
  width: 15px;
  height: 14px;
  margin: 0 auto;
  background: url('/images/exo-heart-icon.png') center/contain no-repeat;
}
.exo-card__follow.is-following > span {
  background-image: url('/images/exo-heart-icon-active.png');
}

.exo-card__avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--exo-bg-soft);
  overflow: hidden;
}
.exo-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.exo-card__avatar-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9ecf5, #f6f7fb);
}

.exo-card__body {
  padding: 14px 16px 8px;
  flex: 1 1 auto;
}

.exo-card__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--exo-ink);
  margin-bottom: 4px;
}

.exo-card__verified {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: url('/images/blue-check.png') center/contain no-repeat;
}

.exo-card__location {
  font-size: 13px;
  color: var(--exo-purple);
  margin-bottom: 8px;
}

.exo-card__bio {
  font-size: 13px;
  line-height: 1.5;
  color: var(--exo-muted);
  margin: 0 0 10px;
}

.exo-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--exo-muted);
}
.exo-card__meta-item--followers { color: rgba(97, 41, 255, 0.8); }

.exo-card__actions {
  padding: 12px 16px;
  border-top: 1px solid var(--exo-line);
  position: relative;
  z-index: 2;
}

.exo-card__view {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--exo-navy);
  color: #fff;
  border-radius: var(--exo-radius-sm);
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.exo-card__view:hover { background: #001a66; color: #fff; }

/* CTA card variant */
.exo-card--cta {
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 26px;
  background: linear-gradient(135deg, var(--exo-navy), var(--exo-purple));
  color: #fff;
  text-decoration: none;
  margin: 24px 0;
}
.exo-card--cta:hover { box-shadow: var(--exo-shadow-hover); color: #fff; }
.exo-card--cta__badge {
  background: #fff;
  color: var(--exo-purple);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.exo-card--cta__title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.exo-card--cta__text { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.85); margin: 0 0 16px; max-width: 520px; }

/* --------------------------------------------------------------------------
   Skeleton loading
   -------------------------------------------------------------------------- */

.exo-card--skeleton { pointer-events: none; }
.exo-card--skeleton .exo-card__avatar { aspect-ratio: 1 / 1; }
.skeleton-block,
.skeleton-line {
  background: linear-gradient(90deg, #eef0f6 25%, #f7f8fb 37%, #eef0f6 63%);
  background-size: 400% 100%;
  animation: exo-shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.exo-card--skeleton .exo-card__body { padding: 16px; }
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line--lg { height: 18px; width: 70%; }
.skeleton-line--md { width: 50%; }
.skeleton-line--sm { width: 40%; }

@keyframes exo-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* --------------------------------------------------------------------------
   Search section
   -------------------------------------------------------------------------- */

.exo-search {
  margin-top: 18px;
  scroll-margin-top: 90px;
}

.exo-search__intro { margin-bottom: 16px; }
.exo-search__title { font-size: 24px; font-weight: 700; color: var(--exo-ink); margin: 0 0 4px; }
.exo-search__subtitle { font-size: 14px; color: var(--exo-muted); margin: 0; }

.exo-search__form {
  background: #fff;
  border: 1px solid var(--exo-line);
  border-radius: var(--exo-radius);
  padding: 16px;
  box-shadow: var(--exo-shadow);
}

.exo-search__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exo-search__field {
  position: relative;
  display: flex;
  align-items: center;
}
.exo-search__field--grow { flex: 1 1 auto; }

.exo-search__field-icon {
  position: absolute;
  left: 14px;
  color: var(--exo-muted);
  pointer-events: none;
}

.exo-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--exo-line);
  border-radius: var(--exo-radius-sm);
  background: var(--exo-bg-soft);
  padding: 0 14px 0 38px;
  font-size: 14px;
  font-family: inherit;
  color: var(--exo-ink);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exo-input:focus { border-color: var(--exo-purple); background: #fff; }

.exo-search__field--distance { max-width: 100%; }
.exo-search__field--distance .exo-input { padding-left: 14px; padding-right: 42px; }
.exo-search__unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: var(--exo-muted);
}

.exo-select {
  padding-left: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236129ff' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.exo-search__submit { height: 46px; }

.exo-search__toggles {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}

.exo-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--exo-line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--exo-navy);
  cursor: pointer;
}
.exo-chip-toggle.is-open { background: var(--exo-navy); color: #fff; border-color: var(--exo-navy); }

.exo-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--exo-ink);
  cursor: pointer;
  margin: 0;
}
.exo-switch input { width: 16px; height: 16px; accent-color: var(--exo-purple); cursor: pointer; }

.exo-search__reset {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--exo-muted);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.exo-search__reset:hover { color: var(--exo-navy); }

.exo-search__advanced {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 700px) {
  .exo-search__advanced { grid-template-columns: repeat(3, 1fr); }
}

.exo-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.exo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(97, 41, 255, 0.1);
  color: var(--exo-purple);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.exo-chip:hover { background: rgba(97, 41, 255, 0.18); }

.exo-search__summary {
  font-size: 14px;
  color: var(--exo-muted);
  margin: 20px 0 16px;
}
.exo-search__summary b { color: var(--exo-ink); }

.exo-search__error,
.exo-search__empty {
  font-size: 14px;
  color: var(--exo-muted);
  background: var(--exo-bg-soft);
  border-radius: var(--exo-radius-sm);
  padding: 16px;
  margin: 16px 0;
}
.exo-search__error { color: #b00020; background: rgba(176, 0, 32, 0.06); }

@media (min-width: 768px) {
  .exo-search__row { flex-direction: row; align-items: center; }
  .exo-search__field--distance { max-width: 150px; }
  .exo-search__submit { flex: 0 0 auto; min-width: 120px; }
  .exo-search__title { font-size: 28px; }
}

/* --------------------------------------------------------------------------
   Search results grid
   -------------------------------------------------------------------------- */

.exo-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
  margin-top: 8px;
}

@media (min-width: 480px) { .exo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .exo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .exo-grid { grid-template-columns: repeat(4, 1fr); } }

.exo-grid__item { min-width: 0; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.exo-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 10px;
}
.exo-pagination__prev,
.exo-pagination__next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--exo-navy);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--exo-line);
  border-radius: 999px;
}
.exo-pagination__prev:hover,
.exo-pagination__next:hover { background: var(--exo-bg-soft); color: var(--exo-navy); }
.exo-pagination__next { margin-left: auto; }
