.avsec-resource-hub {
  --avsec-navy: #102b50;
  --avsec-navy-dark: #091d38;
  --avsec-red: #df252b;
  --avsec-text: #26384b;
  --avsec-muted: #5f6f7f;
  --avsec-border: #dfe5eb;
  --avsec-surface: #ffffff;
  --avsec-surface-muted: #f7f9fb;
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.25rem) 1rem;
  color: var(--avsec-text);
}

.avsec-resource-hub * {
  box-sizing: border-box;
}

.avsec-resource-hub__intro {
  min-width: 0;
  max-width: 720px;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.avsec-resource-hub__kicker,
.avsec-resource-card__eyebrow {
  margin: 0 0 .65rem;
  color: var(--avsec-red);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.avsec-resource-hub__intro h2 {
  margin: 0 0 .8rem;
  color: var(--avsec-navy);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.1;
}

.avsec-resource-hub__intro > p:last-child {
  margin: 0;
  color: var(--avsec-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.7;
}

.avsec-resource-hub__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 1.4rem;
}

.avsec-resource-hub__view-switcher {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .7rem;
  border: 1px solid var(--avsec-border);
  border-radius: 12px;
  background: var(--avsec-surface-muted);
}

.avsec-resource-hub__view-label {
  color: var(--avsec-navy);
  font-size: .9rem;
  font-weight: 700;
}

.avsec-resource-hub__view-buttons {
  display: inline-flex;
  gap: .45rem;
}

.avsec-resource-hub__view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #c9d4e0;
  border-radius: 8px;
  background: var(--avsec-surface);
  color: var(--avsec-navy);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.avsec-resource-hub__view-button:hover {
  border-color: var(--avsec-navy);
  transform: translateY(-1px);
}

.avsec-resource-hub__view-button.is-active {
  border-color: var(--avsec-navy);
  background: var(--avsec-navy);
  color: #fff;
}

.avsec-resource-hub__view-button:focus-visible {
  outline: 3px solid var(--avsec-red);
  outline-offset: 2px;
}

.avsec-resource-hub__view-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.avsec-resource-hub__view-icon--grid {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 11px 0 / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 0 11px / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 11px 11px / 7px 7px no-repeat;
}

.avsec-resource-hub__view-icon--spotlight {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 18px 6px no-repeat,
    linear-gradient(currentColor 0 0) 0 9px / 18px 9px no-repeat;
}

.avsec-resource-hub__view-icon--compact {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 6.5px 0 / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 13px 0 / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 0 6.5px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 6.5px 6.5px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 13px 6.5px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 0 13px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 6.5px 13px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 13px 13px / 5px 5px no-repeat;
}

.avsec-resource-hub__view-icon--list {
  background:
    linear-gradient(currentColor 0 0) 0 1px / 18px 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 8px / 18px 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 15px / 18px 2px no-repeat;
}

.avsec-resource-hub__grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  align-items: stretch;
}

.avsec-resource-hub[data-view="grid"] .avsec-resource-hub__grid,
.avsec-resource-hub[data-view="compact"] .avsec-resource-hub__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.avsec-resource-hub[data-view="spotlight"] .avsec-resource-hub__grid,
.avsec-resource-hub[data-view="list"] .avsec-resource-hub__grid {
  grid-template-columns: 1fr;
}

.avsec-resource-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--avsec-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 43, 80, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.avsec-resource-card:hover {
  transform: translateY(-4px);
  border-color: #c7d1dc;
  box-shadow: 0 16px 38px rgba(16, 43, 80, .14);
}

.avsec-resource-card__image-link {
  display: block;
  overflow: hidden;
  border-bottom: 4px solid var(--avsec-red);
  background: #f7f9fb;
}

.avsec-resource-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  transition: transform .3s ease;
}

.avsec-resource-card:hover .avsec-resource-card__image {
  transform: scale(1.025);
}

.avsec-resource-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.2rem, 2.2vw, 1.65rem);
}

.avsec-resource-card h3 {
  margin: 0 0 .8rem;
  color: var(--avsec-navy);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.22;
}

.avsec-resource-card__description {
  flex: 1;
  margin: 0 0 1.4rem;
  color: var(--avsec-muted);
  font-size: .98rem;
  line-height: 1.65;
}

.avsec-resource-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  min-height: 48px;
  padding: .78rem 1rem;
  border: 2px solid var(--avsec-navy);
  border-radius: 8px;
  background: var(--avsec-navy);
  color: #fff !important;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition: background .2s ease, border-color .2s ease;
}

.avsec-resource-card__button:hover {
  border-color: var(--avsec-red);
  background: var(--avsec-red);
}

.avsec-resource-card__button:focus-visible,
.avsec-resource-card__image-link:focus-visible {
  outline: 3px solid var(--avsec-red);
  outline-offset: 3px;
}

.avsec-resource-hub__intro p,
.avsec-resource-card h3,
.avsec-resource-card__description,
.avsec-resource-card__button {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.avsec-resource-hub__notice {
  max-width: 900px;
  margin: 2.25rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--avsec-border);
  color: var(--avsec-muted);
  font-size: .88rem;
  line-height: 1.6;
  text-align: center;
}

.avsec-resource-hub[data-view="spotlight"] .avsec-resource-hub__grid {
  max-width: 980px;
  margin-inline: auto;
}

.avsec-resource-hub[data-view="spotlight"] .avsec-resource-card__image {
  aspect-ratio: 16 / 8.5;
}

.avsec-resource-hub[data-view="spotlight"] .avsec-resource-card__body {
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
}

.avsec-resource-hub[data-view="compact"] .avsec-resource-hub__grid {
  gap: 1rem;
}

.avsec-resource-hub[data-view="compact"] .avsec-resource-card__image {
  aspect-ratio: 16 / 9;
}

.avsec-resource-hub[data-view="compact"] .avsec-resource-card__body {
  padding: 1rem 1rem 1.1rem;
}

.avsec-resource-hub[data-view="compact"] .avsec-resource-card h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  margin-bottom: .6rem;
}

.avsec-resource-hub[data-view="compact"] .avsec-resource-card__description {
  font-size: .92rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.avsec-resource-hub[data-view="list"] .avsec-resource-hub__grid {
  gap: 1rem;
}

.avsec-resource-hub[data-view="list"] .avsec-resource-card {
  flex-direction: row;
  align-items: stretch;
}

.avsec-resource-hub[data-view="list"] .avsec-resource-card__image-link {
  flex: 0 0 clamp(220px, 32%, 360px);
  border-right: 4px solid var(--avsec-red);
  border-bottom: 0;
}

.avsec-resource-hub[data-view="list"] .avsec-resource-card__image {
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
}

.avsec-resource-hub[data-view="list"] .avsec-resource-card__body {
  padding: 1.2rem 1.35rem;
}

@media (max-width: 900px) {
  .avsec-resource-hub[data-view="grid"] .avsec-resource-hub__grid,
  .avsec-resource-hub[data-view="compact"] .avsec-resource-hub__grid {
    grid-template-columns: 1fr;
  }

  .avsec-resource-hub[data-view="list"] .avsec-resource-card {
    flex-direction: column;
  }

  .avsec-resource-hub[data-view="list"] .avsec-resource-card__image-link {
    flex-basis: auto;
    border-right: 0;
    border-bottom: 4px solid var(--avsec-red);
  }

  .avsec-resource-hub[data-view="list"] .avsec-resource-card__image {
    aspect-ratio: 3 / 2;
    height: auto;
  }
}

@media (max-width: 700px) {
  .avsec-resource-hub__toolbar {
    justify-content: center;
  }

  .avsec-resource-hub__view-switcher {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .avsec-resource-hub__view-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .avsec-resource-hub__grid {
    max-width: 650px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avsec-resource-card,
  .avsec-resource-card__image,
  .avsec-resource-hub__view-button {
    transition: none;
  }
}

/* Show complete artwork in every view so titles and badges are never cut off. */
.avsec-resource-hub .avsec-resource-card__image--uncropped {
  object-fit: contain;
  object-position: center center;
  background-color: #fff;
}

/* TrainerClock assets retain a consistent 3:2 presentation in all four views. */
.avsec-resource-hub .avsec-resource-card--trainerclock .avsec-resource-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  transform: none;
}
.avsec-resource-hub .avsec-resource-card--trainerclock:hover .avsec-resource-card__image {
  transform: none;
}
.avsec-resource-hub[data-view="spotlight"] .avsec-resource-card--trainerclock .avsec-resource-card__image,
.avsec-resource-hub[data-view="compact"] .avsec-resource-card--trainerclock .avsec-resource-card__image,
.avsec-resource-hub[data-view="list"] .avsec-resource-card--trainerclock .avsec-resource-card__image {
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: contain;
}
