/* ============================================================
   clubs.css – PDLUP public club page
   Tailwind 4 handles layout utilities; this file covers only
   component-specific styles that can't be expressed cleanly
   as utility classes (negative margins, transitions, keyframes,
   object-fit, complex shadows, etc.).
   ============================================================ */

/* ── Cover ──────────────────────────────────────────────────── */
.club-cover {
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 180px;
  background: linear-gradient(135deg, #1d4ed8, #1e40af, #1e3a8a);
  overflow: hidden;
  position: relative;
}

.club-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.club-cover__fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e3a8a 100%);
}

/* ── Profile card ────────────────────────────────────────────── */
.club-profile-card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 0 1.5rem 2rem;
  margin-top: -1rem;          /* overlap the cover */
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
}

/* ── Avatar ──────────────────────────────────────────────────── */
.club-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.club-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  margin-top: -2.75rem;       /* pull avatar above card edge */
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.club-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Name ────────────────────────────────────────────────────── */
.club-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  word-break: break-word;
}

/* ── Stats ───────────────────────────────────────────────────── */
.club-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;   /* row-gap col-gap: beri jarak antar baris saat wrap */
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  flex-wrap: wrap;        /* izinkan wrap di layar sempit */
  padding: 0 0.75rem;    /* padding horizontal agar tidak mentok tepi card */
}

.club-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;  /* tiap item tetap nowrap, tapi antar item boleh wrap */
}

.club-stats .iconify {
  vertical-align: middle;
  font-size: 1rem;
  flex-shrink: 0;
}

.club-stats__dot {
  color: #d1d5db;
  flex-shrink: 0;
}

.club-stats__private {
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* ── Description ─────────────────────────────────────────────── */
.club-description {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  white-space: pre-line;
  word-break: break-word;
}

.club-description--empty {
  color: #9ca3af;
  font-style: italic;
}

/* ── Join button ─────────────────────────────────────────────── */
.club-join-btn {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 0.875rem 2rem;
  background: #2563eb;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  margin-bottom: 1.75rem;
}

.club-join-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.club-join-btn:active {
  transform: translateY(0);
}

/* ── Organizers ──────────────────────────────────────────────── */
.club-organizers {
  border-top: 1px solid #f3f4f6;
  padding-top: 1.25rem;
  margin-top: 0.25rem;
}

.club-organizers__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.club-organizers__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.club-organizer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

/* shared: ukuran & border */
.club-organizer__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  flex-shrink: 0;
}

/* hanya untuk <img> */
img.club-organizer__avatar {
  object-fit: cover;
  display: block;
}

/* hanya untuk <div> placeholder */
div.club-organizer__avatar {
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.club-organizer__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  max-width: 72px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── "Powered by" footer ─────────────────────────────────────── */
.powered-by {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 1.5rem 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.powered-by__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.powered-by__link:hover {
  text-decoration: underline;
}

.powered-by__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ── App bottom sheet ────────────────────────────────────────── */
.app-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.app-sheet[hidden] {
  display: none;
}

.app-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.app-sheet__panel {
  position: relative;
  background: #ffffff;
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.app-sheet__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.35rem;
}

.app-sheet__subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.app-sheet__store-btn {
  display: block;
  margin: 0.5rem auto;
  max-width: 180px;
  transition: transform 0.15s ease;
}

.app-sheet__store-btn img {
  width: 100%;
}

.app-sheet__store-btn:hover {
  transform: scale(1.04);
}

.app-sheet__close {
  margin-top: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.app-sheet__close:hover {
  color: #6b7280;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (min-width: 640px) {
  .club-profile-card {
    margin-top: -4rem;
    padding: 0 2.5rem 2.5rem;
  }
}
