/* =============================================================================
   Directory pages (/events/, /groups/) — light-theme cards on the marketing
   site. Same event-card vocabulary as the share SPA's dark version (cover +
   date leaf + pills + when/where/who rows) translated to choyens.com tokens.
   ===========================================================================*/

.dir-hero .legal-hero-inner { max-width: 720px; }

.dir-main {
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(56px, 7vw, 88px);
}

.dir-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 34px 0 16px;
}

.dir-section-title:first-child { margin-top: 0; }

/* Breathing room between stacked directory sections (Upcoming → Past
   events). The heading's own top margin is zeroed by the :first-child
   rule above, so the gap lives on the section boundary instead. */
.dir-main > section + section { margin-top: clamp(44px, 6vw, 64px); }

/* ─── Status (loading / error / empty) ─────────────────────────────────── */
.dir-status {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.dir-status-icon { font-size: 26px; color: var(--primary); margin-bottom: 10px; }

.dir-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: dir-spin 0.9s linear infinite;
}

@keyframes dir-spin { to { transform: rotate(360deg); } }

/* ─── Event cards ──────────────────────────────────────────────────────── */
.dir-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.dir-event-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 30px -18px rgba(78, 34, 28, 0.18);
  transition: transform 0.25s var(--easing), border-color 0.25s var(--easing), box-shadow 0.25s var(--easing);
}

.dir-event-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 44px -20px rgba(78, 34, 28, 0.3);
}

.dir-event-card--past .dir-event-cover { filter: saturate(0.55); opacity: 0.85; }

.dir-event-cover {
  position: relative;
  height: 148px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dir-event-cover img { width: 100%; height: 100%; object-fit: cover; }

.dir-event-cover-glyph { font-size: 60px; color: rgba(242, 206, 152, 0.3); }

.dir-pill {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dir-pill--sport { left: 10px; color: var(--accent); }
.dir-pill--live  { right: 10px; color: #ff9d8f; }
.dir-pill--ended { right: 10px; color: rgba(255, 255, 255, 0.75); }

.dir-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9d8f;
  animation: dir-pulse 1.4s ease-in-out infinite;
}

@keyframes dir-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.dir-date-leaf {
  position: absolute;
  left: 12px;
  bottom: -14px;
  width: 52px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px -10px rgba(78, 34, 28, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 7px;
  z-index: 1;
}

.dir-date-leaf-mon {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--accent-dark);
}

.dir-date-leaf-day {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.dir-event-body { padding: 22px 16px 14px; }

.dir-event-name {
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  margin: 0 0 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dir-event-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-top: 6px;
  min-width: 0;
}

.dir-event-row i {
  width: 15px;
  text-align: center;
  color: var(--accent-dark);
  flex: none;
  font-size: 12px;
}

.dir-event-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-event-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.dir-event-going {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.dir-event-going i { margin-right: 5px; color: var(--accent-dark); }

.dir-event-ctalink {
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
}

.dir-event-ctalink i {
  margin-left: 4px;
  font-size: 0.7rem;
  transition: transform 0.25s var(--easing);
}

.dir-event-card:hover .dir-event-ctalink i { transform: translateX(4px); }

/* ─── Group cards ──────────────────────────────────────────────────────── */
.dir-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dir-group-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 30px -18px rgba(78, 34, 28, 0.18);
  transition: transform 0.25s var(--easing), border-color 0.25s var(--easing), box-shadow 0.25s var(--easing);
}

.dir-group-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 44px -20px rgba(78, 34, 28, 0.3);
}

.dir-group-cover {
  height: 100px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dir-group-cover img { width: 100%; height: 100%; object-fit: cover; }

.dir-group-cover-glyph { font-size: 44px; color: rgba(242, 206, 152, 0.3); }

.dir-group-body {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
}

.dir-group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: var(--bg-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}

.dir-group-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dir-group-meta { min-width: 0; }

.dir-group-name {
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-group-tag {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 2px;
}

.dir-group-tag i { margin-right: 4px; color: var(--accent-dark); font-size: 0.72rem; }

/* ─── Pager ────────────────────────────────────────────────────────────── */
.dir-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 22px 0 6px;
}

.dir-pager:empty { display: none; }

.dir-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s var(--easing), border-color 0.2s var(--easing);
}

.dir-pager-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.dir-pager-btn:disabled { opacity: 0.4; cursor: default; }
.dir-pager-btn i { font-size: 0.7rem; }

.dir-pager-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ─── Download CTA ─────────────────────────────────────────────────────── */
.dir-download {
  margin-top: clamp(44px, 6vw, 64px);
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 0%, rgba(242, 206, 152, 0.15) 0%, transparent 55%),
    linear-gradient(160deg, var(--primary) 0%, var(--primary-grad-tail) 100%);
  color: var(--text-on-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dir-download-glyph {
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 14px;
}

.dir-download-title {
  color: var(--text-white);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.dir-download-sub {
  color: var(--text-on-dark);
  max-width: 520px;
  margin: 0 auto 26px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.dir-download .store-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .dir-events { grid-template-columns: 1fr; }
  .dir-groups { grid-template-columns: 1fr 1fr; }
}
