.amr-useful-links {
  --amr-ul-desktop: 5;
  --amr-ul-tablet: 3;
  --amr-ul-mobile: 1;
  --amr-ul-current: var(--amr-ul-desktop);
  --amr-ul-gap: 18px;
  --amr-ul-height: 145px;
  --amr-ul-radius: 0px;
  --amr-ul-fit: cover;
  --amr-ul-section: #fff;
  --amr-ul-card: #fff;
  --amr-ul-title: #08264d;
  --amr-ul-button: #eaf3fc;
  --amr-ul-button-color: #08264d;
  width: 100%;
  padding: 24px 0;
  color: var(--amr-ul-title);
  background: var(--amr-ul-section);
  font-family: "Fira Sans", "Segoe UI", Arial, sans-serif;
}

.amr-useful-links,
.amr-useful-links *,
.amr-useful-links *::before,
.amr-useful-links *::after { box-sizing: border-box; }

.amr-useful-links--shadow { box-shadow: 0 12px 34px rgba(9, 43, 79, .08); }

.amr-useful-links__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.amr-useful-links__heading {
  margin: 0;
  color: var(--amr-ul-title);
  font: 700 clamp(1.45rem, 2.4vw, 2rem)/1.18 "Fira Sans", "Segoe UI", Arial, sans-serif;
}

.amr-useful-links__controls { display: flex; align-items: center; gap: 10px; }

.amr-useful-links__button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--amr-ul-button-color);
  background: var(--amr-ul-button);
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, opacity .18s ease;
}

.amr-useful-links__button:hover { transform: translateY(-2px); filter: brightness(.97); }
.amr-useful-links__button:disabled { opacity: .38; cursor: default; transform: none; }
.amr-useful-links__button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.amr-useful-links__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  cursor: grab;
}

.amr-useful-links__viewport::-webkit-scrollbar { display: none; }
.amr-useful-links__viewport.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }

.amr-useful-links__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--amr-ul-current) - 1) * var(--amr-ul-gap)) / var(--amr-ul-current));
  gap: var(--amr-ul-gap);
  width: 100%;
}

.amr-useful-links__card {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  height: var(--amr-ul-height);
  overflow: hidden;
  color: #fff;
  background: var(--amr-ul-card);
  border: 0;
  border-radius: var(--amr-ul-radius);
  scroll-snap-align: start;
  text-decoration: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
}

.amr-useful-links__card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: var(--amr-ul-fit);
  pointer-events: none;
  transition: transform .35s ease, filter .35s ease;
}

.amr-useful-links__card:is(a):hover img { transform: scale(1.035); filter: saturate(1.05); }

.amr-useful-links__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: block;
  padding: 28px 14px 12px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(4, 30, 59, .88));
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
}

.amr-useful-links :focus-visible { outline: 3px solid #f0b84b; outline-offset: 3px; }

@media (max-width: 1024px) {
  .amr-useful-links { --amr-ul-current: var(--amr-ul-tablet); }
}

@media (max-width: 620px) {
  .amr-useful-links { --amr-ul-current: var(--amr-ul-mobile); padding: 18px 0; }
  .amr-useful-links__header { margin-bottom: 16px; }
  .amr-useful-links__button { width: 40px; height: 40px; }
  .amr-useful-links__card { height: min(var(--amr-ul-height), 180px); }
}

@media (prefers-reduced-motion: reduce) {
  .amr-useful-links__viewport { scroll-behavior: auto; }
  .amr-useful-links__button,
  .amr-useful-links__card img { transition: none; }
}
