/* ==========================================================
   Riverport Business Club - Club Members
   hero > directory (grey, wide): category sidebar with exclusivity card
   + one-per-row member cards > footer
   ========================================================== */

/* ---------- Directory layout (wide container) ---------- */
.cm-dir__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(1.75rem, 3vw, 3rem); align-items: start; }

/* Category sidebar - sticky on desktop; list scrolls, claim card stays pinned below it */
.cm-filter {
  position: sticky; top: calc(var(--header-h) + 1.25rem);
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--header-h) - 2.5rem);
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cm-filter__title {
  display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0;
  font-size: 1.05rem; font-weight: 800; margin: 0; padding: 1.25rem 1.4rem 0;
}
.cm-filter__title i { color: var(--brand); font-size: 0.9em; }
.cm-filter__help { flex-shrink: 0; margin: 0; padding: 0.7rem 1.4rem 0.75rem; font-size: 0.825rem; line-height: 1.5; color: var(--muted); border-bottom: 1px solid var(--grey-line); }
.cm-filter__help strong { font-weight: 700; color: #4a4a4a; }
.cm-filter__swipe { display: none; }
.cm-filter__list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 0.6rem 0.7rem;
  scrollbar-width: thin; scrollbar-color: #cfcfcf transparent;
}
.cm-filter__list::-webkit-scrollbar { width: 6px; }
.cm-filter__list::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 6px; }
.cm-filter__list::-webkit-scrollbar-track { background: transparent; }
.cm-chip {
  position: relative; display: block; padding: 0.5rem 0.75rem 0.5rem 1rem; border-radius: 8px;
  color: #474747; font-size: 0.9rem; font-weight: 600; line-height: 1.35; text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.cm-chip::before { content: ""; position: absolute; left: 0.35rem; top: 50%; width: 3px; height: 0; border-radius: 3px; background: var(--brand); transform: translateY(-50%); transition: height 0.2s var(--ease); }
.cm-chip:hover { background: var(--grey); color: #000; }
.cm-chip.is-active { background: var(--grey); color: #000; font-weight: 800; }
.cm-chip.is-active::before { height: 60%; }

.cm-dir__status { margin: 0 0 1rem; color: var(--muted); font-weight: 600; }

/* ---------- Member card: one per row, logo left ---------- */
.cm-list { display: grid; gap: 1rem; }
.cm-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: stretch;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; scroll-margin-top: calc(var(--header-h) + 1.5rem);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.cm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cm-card[hidden] { display: none; }

.cm-card__logo {
  display: flex; align-items: center; justify-content: center;
  min-height: 170px; padding: 1.5rem;
  border-right: 1px solid var(--grey-line);
}
.cm-card__logo img { max-width: 100%; max-height: 130px; width: auto; height: auto; object-fit: contain; transition: transform 0.3s var(--ease); }
a.cm-card__logo { text-decoration: none; cursor: pointer; }
a.cm-card__logo:hover img, a.cm-card__logo:hover .cm-card__mono { transform: scale(1.05); }
.cm-card__mono { transition: transform 0.3s var(--ease); }
.cm-card__mono {
  display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%;
  background: var(--charcoal); color: var(--white); font-weight: 800; font-size: 1.7rem; letter-spacing: 0.04em;
  box-shadow: 14px -8px 0 -3px rgba(254, 104, 191, 0.35);
}

.cm-card__body { display: flex; flex-direction: column; justify-content: center; gap: 0.9rem; padding: 1.5rem 1.75rem; min-width: 0; }
.cm-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.cm-card__cat {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-deep); font-size: 0.8rem; font-weight: 700; line-height: 1.4;
}
.cm-card__name { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); font-weight: 800; line-height: 1.25; margin: 0; }
/* Name links to the profile - looks the same, just a hint of pink on hover */
.cm-card__name-link { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
.cm-card__name-link:hover { color: var(--brand-deep); }
.cm-card__name-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.cm-card__badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 700; color: var(--charcoal); }
.cm-card__badge i { color: var(--brand); }

.cm-card__contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; font-size: 0.95rem; }
.cm-card__contact li { display: flex; align-items: baseline; gap: 0.55rem; min-width: 0; line-height: 1.45; }
.cm-card__contact i { width: 1rem; flex-shrink: 0; text-align: center; color: var(--brand); font-size: 0.9rem; }
.cm-card__contact a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.cm-card__contact a[href^="mailto"] { overflow-wrap: normal; word-break: normal; } /* long addresses break cleanly at the @ */
.cm-card__contact a:hover { color: #000; text-decoration: underline; text-underline-offset: 3px; }

.cm-card__actions {
  display: flex; flex-direction: column; justify-content: center; gap: 0.6rem;
  padding: 1.5rem 1.75rem 1.5rem 0;
}
.cm-card__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; white-space: nowrap;
  padding: 0.6rem 1.1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 700; text-decoration: none;
  background: var(--brand); color: var(--white); transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cm-card__btn:hover { background: var(--brand-dark); color: var(--white); box-shadow: 0 8px 20px rgba(254, 104, 191, 0.3); }   /* View profile - pink */
.cm-card__btn i { font-size: 0.85em; }
.cm-card__btn--web { background: var(--charcoal); color: var(--white); }
.cm-card__btn--web:hover { background: #222; box-shadow: none; }
.cm-card__btn--web i { color: var(--brand); }
.cm-card__ext { font-size: 0.7em; opacity: 0.85; }

/* ---------- Slim category CTA (above the footer) ---------- */
.cm-claim { background: var(--white); padding-block: clamp(1.75rem, 3.5vw, 2.5rem); }
.cm-claim__inner {
  display: flex; align-items: center; gap: 1.25rem 1.75rem;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
  background: var(--grey); border-radius: var(--radius-lg); border-left: 4px solid var(--brand);
}
.cm-claim__icon { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; background: var(--charcoal); color: var(--brand); font-size: 1.15rem; }
.cm-claim__text { flex: 1; min-width: 0; }
.cm-claim__title { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-weight: 800; margin: 0 0 0.2rem; }
.cm-claim__text p { margin: 0; font-size: 0.975rem; color: #4a4a4a; line-height: 1.55; }
.cm-claim__btn { flex-shrink: 0; }

/* ---------- Responsive ---------- */

/* Tablet: categories move above the list as one clean scrolling row */
@media (max-width: 1024px) {
  .cm-dir__layout { grid-template-columns: minmax(0, 1fr); }
  .cm-filter { position: static; max-height: none; overflow: visible; }
  .cm-filter__title { padding: 1.1rem 1.25rem 0; }
  .cm-filter__help { padding: 0.5rem 1.25rem 0.85rem; }
  .cm-filter__swipe { display: inline; }
  .cm-filter__list {
    flex-direction: row; gap: 0.4rem; overflow-x: auto; overflow-y: hidden;
    padding: 0.85rem 1.25rem 0.95rem; scroll-snap-type: x proximity; scroll-padding-inline: 1.25rem;
    scrollbar-width: none;
  }
  .cm-filter__list::-webkit-scrollbar { display: none; }
  .cm-filter__list li { flex-shrink: 0; scroll-snap-align: start; }
  .cm-chip { white-space: nowrap; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--grey); }
  .cm-chip::before { display: none; }
  .cm-chip.is-active { background: var(--charcoal); color: var(--white); font-weight: 700; }
  .cm-card { grid-template-columns: 200px minmax(0, 1fr) auto; }
}

@media (max-width: 900px) {
  /* Actions drop under the details, logo stays left */
  .cm-card { grid-template-columns: 170px minmax(0, 1fr); }
  .cm-card__logo { grid-row: span 2; }
  .cm-card__actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; padding: 0 1.5rem 1.4rem; }
  .cm-card__body { padding-bottom: 1rem; }
}

@media (max-width: 600px) {
  /* Phone: logo + name share the top row; contact details get the full card width */
  .cm-card { grid-template-columns: 104px minmax(0, 1fr); column-gap: 1rem; padding: 1.25rem 1.25rem 0; }
  .cm-card__logo {
    grid-column: 1; grid-row: 1; align-self: center;
    width: 104px; height: 76px; min-height: 0; padding: 0.45rem;
    border: 1px solid var(--grey-line); border-radius: var(--radius);
  }
  .cm-card__logo img { max-height: 100%; }
  .cm-card__mono { width: 54px; height: 54px; font-size: 1.05rem; box-shadow: 6px -4px 0 -2px rgba(254, 104, 191, 0.35); }

  .cm-card__body { display: contents; }
  .cm-card__head { grid-column: 2; grid-row: 1; align-self: center; gap: 0.3rem; }
  .cm-card__name { font-size: 1.1rem; }
  .cm-card__cat { font-size: 0.75rem; }

  .cm-card__contact {
    grid-column: 1 / -1; grid-row: 2;
    flex-direction: column; gap: 0.55rem;
    margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--grey-line);
    font-size: 0.925rem;
  }
  .cm-card__contact li { align-items: center; }
  .cm-card__contact a { font-size: 0.875rem; }
  .cm-card__contact a[href^="mailto"] { font-size: 0.84rem; letter-spacing: -0.005em; }

  .cm-card__actions {
    grid-column: 1 / -1; grid-row: 3; flex-wrap: nowrap;
    margin: 1.1rem -1.25rem 0; padding: 0.9rem 1.25rem 1.1rem;
    border-top: 1px solid var(--grey-line); background: #fcfcfc;
  }
  .cm-card__btn { flex: 1 1 0; }
}

@media (max-width: 360px) {
  .cm-card { padding: 1.1rem 1rem 0; column-gap: 0.85rem; grid-template-columns: 88px minmax(0, 1fr); }
  .cm-card__logo { width: 88px; height: 66px; }
  .cm-card__mono { width: 46px; height: 46px; font-size: 0.95rem; }
  .cm-card__contact a { font-size: 0.85rem; }
  .cm-card__contact a[href^="mailto"] { font-size: 0.78rem; }
  .cm-card__actions { margin-inline: -1rem; padding-inline: 1rem; }
}

@media (max-width: 760px) {
  .cm-claim__inner { flex-wrap: wrap; align-items: flex-start; }
  .cm-claim__text { flex: 1 1 calc(100% - 80px); }
  .cm-claim__btn { width: 100%; }
}
