/* Associations page specific styles. Base theme & typography come from landingpg.css. */

/* Add breathing room below the fixed glass header */
.associations-page main {
  padding-top: 140px;
}

.associations-hero {
  padding: 90px 0 44px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.page-title {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 5rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-subscript {
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
}

.page-subtitle {
  margin: 0;
  max-width: 680px;
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Association list */
.association-list-section {
  padding: 56px 0 120px;
}

.associations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  overflow: visible;
}

/* Card container: clickable link card */
.association-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(24, 34, 52, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: visible;
  transition: transform 320ms cubic-bezier(0.22, 0.8, 0.48, 1), border-color 360ms ease,
    box-shadow 380ms ease, background 200ms ease, opacity 240ms ease;
  isolation: isolate;
  transform-origin: center center;
  z-index: 1;
  will-change: transform, box-shadow;
  --glow: rgba(140, 210, 255, 0.32); /* Adjust glow color */
  --glow-strong: rgba(140, 210, 255, 0.82); /* Adjust glow intensity */
  cursor: pointer; /* Indicates click target */
  text-decoration: none; /* Remove anchor underline */
  color: inherit; /* Keep text color */
}

.association-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
}

/* Outer glow spill kept outside the card */
.association-card::before {
  content: "";
  position: absolute;
  inset: -70px;
  border-radius: 52px;
  background: radial-gradient(
    circle at center,
    rgba(140, 210, 255, 0.18) 0%,
    rgba(140, 210, 255, 0.14) 38%,
    rgba(140, 210, 255, 0.09) 55%,
    rgba(140, 210, 255, 0.04) 72%,
    rgba(140, 210, 255, 0.01) 88%,
    rgba(140, 210, 255, 0) 100%
  );
  filter: blur(32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease-out;
  z-index: 0;
}

.association-card:hover {
  transform: scale(1.12);
  z-index: 20;
  border-color: var(--glow-strong); /* Hover border color */
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38),
    0 0 0 1px var(--glow),
    0 0 18px rgba(140, 210, 255, 0.4),
    0 0 40px rgba(140, 210, 255, 0.32);
}

.association-card:hover::before {
  opacity: 1;
}

.brand-avatar {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: saturate(1.05);
}

.brand-avatar.fallback {
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.4rem;
  background: rgba(15, 23, 42, 0.95);
}

.brand-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .association-card,
  .association-card::before {
    transition: none;
    animation: none;
  }

  .association-card:hover {
    transform: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
}

/* Responsive tweaks */
@media (max-width: 860px) {
  .associations-page main {
    padding-top: 120px;
  }

  .associations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .association-card {
    padding: 16px;
  }

  .brand-avatar {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
}

@media (max-width: 640px) {
  .associations-hero {
    padding: 74px 0 36px;
  }

  .associations-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
