/* ===========================================================================
   Cisco Dental — Professional Affiliations band
   File: /assets/css/affiliations.css
   Self-contained. No dependency on existing site tokens; every value is a
   local custom property with a literal fallback, so it renders identically
   whether or not your global stylesheet defines matching variables.
   Scope: everything is namespaced under .cd-affil to prevent selector
   collisions with existing footer rules.
   =========================================================================== */

.cd-affil {
  --cd-affil-ink:        #0F2A23;  /* site theme-color, deep green          */
  --cd-affil-paper:      #FFFFFF;  /* logo chip background                  */
  --cd-affil-rule:       rgba(255, 255, 255, 0.14);
  --cd-affil-label:      rgba(255, 255, 255, 0.62);
  --cd-affil-heading:    rgba(255, 255, 255, 0.92);
  --cd-affil-fine:       rgba(255, 255, 255, 0.48);
  --cd-affil-chip-w:     148px;
  --cd-affil-chip-h:     92px;
  --cd-affil-radius:     10px;
  --cd-affil-gap:        18px;

  margin: 40px 0 0;
  padding: 34px 0 6px;
  border-top: 1px solid var(--cd-affil-rule);
}

/* --- Section heading ----------------------------------------------------- */

.cd-affil__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cd-affil-label);
}

.cd-affil__title {
  margin: 0 0 22px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cd-affil-heading);
}

/* --- Logo grid ----------------------------------------------------------- */

.cd-affil__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cd-affil-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cd-affil__item {
  margin: 0;
  padding: 0;
}

.cd-affil__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--cd-affil-chip-w);
  height: var(--cd-affil-chip-h);
  padding: 12px 14px;
  background: var(--cd-affil-paper);
  border: 1px solid rgba(15, 42, 35, 0.10);
  border-radius: var(--cd-affil-radius);
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.cd-affil__chip:hover,
.cd-affil__chip:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.cd-affil__chip:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

/* Non-linking chips (organizations without a public member-verification URL) */
.cd-affil__chip--static {
  cursor: default;
}

.cd-affil__chip--static:hover {
  transform: none;
  box-shadow: none;
}

.cd-affil__chip img,
.cd-affil__chip svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* The alumni badge is a circular mark — it reads better without a paper chip */
.cd-affil__chip--badge {
  background: transparent;
  border-color: transparent;
  padding: 4px;
}

.cd-affil__chip--badge:hover,
.cd-affil__chip--badge:focus-visible {
  box-shadow: none;
}

/* --- Disclosure ---------------------------------------------------------- */

.cd-affil__note {
  max-width: 74ch;
  margin: 24px 0 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--cd-affil-fine);
}

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

@media (max-width: 720px) {
  .cd-affil {
    --cd-affil-chip-w: 126px;
    --cd-affil-chip-h: 80px;
    --cd-affil-gap: 12px;
    padding-top: 28px;
  }

  .cd-affil__grid {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .cd-affil {
    --cd-affil-chip-w: calc(50% - 6px);
  }

  .cd-affil__item {
    flex: 0 0 auto;
    width: var(--cd-affil-chip-w);
  }

  .cd-affil__chip {
    width: 100%;
  }
}

/* --- Motion / contrast preferences --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cd-affil__chip {
    transition: none;
  }

  .cd-affil__chip:hover,
  .cd-affil__chip:focus-visible {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  .cd-affil__note,
  .cd-affil__eyebrow {
    color: rgba(255, 255, 255, 0.86);
  }
}

/* ===========================================================================
   Light-background variant.
   Add class .cd-affil--light when placing this band on the About page or any
   other light-background section instead of the dark footer.
   =========================================================================== */

.cd-affil--light {
  --cd-affil-rule:    rgba(15, 42, 35, 0.14);
  --cd-affil-label:   rgba(15, 42, 35, 0.62);
  --cd-affil-heading: var(--cd-affil-ink);
  --cd-affil-fine:    rgba(15, 42, 35, 0.62);
}

.cd-affil--light .cd-affil__chip {
  border-color: rgba(15, 42, 35, 0.14);
  box-shadow: 0 1px 2px rgba(15, 42, 35, 0.06);
}

.cd-affil--light .cd-affil__chip:hover,
.cd-affil--light .cd-affil__chip:focus-visible {
  box-shadow: 0 6px 18px rgba(15, 42, 35, 0.14);
}

.cd-affil--light .cd-affil__chip:focus-visible {
  outline-color: var(--cd-affil-ink);
}
