.aayda-useful-links {
  /* Figma Links Section: no fill — white cards on page #F3F4F6.
   * Mobile Links Section fill is also #F3F4F6. */
  --aayda-useful-links-background: var(--aayda-colors-surface-disabled);
  /* Desktop Official site card 4979:22603 divider. The mobile card uses a different one — see the
   * max-width: 767px block at the foot of this file. */
  --aayda-useful-links-divider: #e8ebf2;
  /* Figma binds the card's address to navy-700; the literal #365383 it resolved to is the token's
   * own value, so this is the same colour named rather than repeated. */
  --aayda-useful-links-url: var(--aayda-colors-navy-700);
  /* Official site card arrow: SMART_ANIMATE GENTLE 1.0221s */
  --aayda-useful-links-arrow-duration: 1.0221s;
  --aayda-useful-links-arrow-easing: cubic-bezier(0.33, 1, 0.68, 1);
  width: 100%;
  max-width: 403px;
  /* Mobile Figma Links Section 5257:19592 — 24 + 116 + 24 = 164 */
  height: 164px;
  margin-inline: auto;
  /* Mobile: Contact bottom 6706 → Links 6726 = 20px page fill */
  margin-top: 20px;
  overflow: hidden;
  background: var(--aayda-useful-links-background);
  font-family: var(--aayda-typography-font-primary);
}

.aayda-useful-links__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Screen-reader only: the card's "external site, opens in a new window" note.
 *
 * Same clip technique as __heading above, and component-scoped for the same reason — the public
 * site has no site-wide visually-hidden utility. The one .aayda-visually-hidden that exists lives
 * in css/pages/payment-info.css, which only /paid-roads loads, so relying on it would print this
 * text on every page that carries the strip.
 *
 * position: absolute keeps it out of flow, so it is not a flex item of the card, takes no part in
 * the card's gap, and cannot shift the Figma geometry at any breakpoint. No top/left is set, so it
 * resolves to its static position and stays inside its own card. */
.aayda-useful-links__external-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aayda-useful-links__viewport {
  width: 100%;
  height: 100%;
  /* Mobile Figma Links Section: padding 24 top/bottom, 16 left/right */
  padding: 24px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.aayda-useful-links__viewport::-webkit-scrollbar {
  display: none;
}

.aayda-useful-links__track {
  display: flex;
  width: max-content;
  height: 116px;
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-useful-links__track--desktop {
  display: none;
}

.aayda-useful-links__item,
.aayda-useful-links__card {
  flex: 0 0 207.372543px;
  width: 207.372543px;
  height: 116px;
}

.aayda-useful-links__card {
  /* Containing block for __external-note, and nothing else — no offsets change here.
   *
   * Without it the note's containing block is whatever positioned ancestor happens to be above
   * the strip, so the note is not a descendant of the __viewport scroll container for clipping
   * purposes and escapes its overflow. Measured at 390px that pushed the page's scrollWidth from
   * 390 to 690 — a horizontal scrollbar on every phone — because the notes in cards 2-4 sit past
   * the viewport edge on the mobile track. */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-8);
  padding: 16px 16px 4px;
  color: var(--aayda-colors-gray-800);
  background: var(--aayda-colors-base-white);
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}

.aayda-useful-links__content {
  display: flex;
  flex: 0 0 59px;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-4);
  width: 162px;
  height: 59px;
  text-align: left;
}

.aayda-useful-links__title {
  flex: 0 0 23px;
  width: 162px;
  height: 23px;
  color: var(--aayda-colors-gray-800);
  font-size: var(--aayda-typography-size-16);
  font-weight: var(--aayda-typography-weight-extra-bold);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
}

.aayda-useful-links__description {
  flex: 0 0 32px;
  width: 162px;
  height: 32px;
  color: var(--aayda-colors-gray-800);
  font-size: 10px;
  font-weight: var(--aayda-typography-weight-regular);
  /* Mobile Figma: Regular 10 / lh 18 / ls 0 */
  line-height: 18px;
  letter-spacing: 0;
}

.aayda-useful-links__link-row {
  position: relative;
  display: flex;
  flex: 0 0 29px;
  align-items: center;
  width: 175.372543px;
  height: 29px;
  border-top: 0.769px solid var(--aayda-useful-links-divider);
}

.aayda-useful-links__url {
  position: absolute;
  top: 4.5px;
  left: 0;
  color: var(--aayda-useful-links-url);
  font-size: 10px;
  font-weight: var(--aayda-typography-weight-bold);
  line-height: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}

.aayda-useful-links__arrow {
  position: absolute;
  top: 5.813725px;
  right: 0;
  flex: 0 0 15.372549px;
  width: 15.372549px;
  height: 15.372549px;
}

.aayda-useful-links__arrow-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
}

/* One ↗ vector stays visible; Desktop hover rotates +45° (Figma −45° → −90°). */
.aayda-useful-links__arrow-image--default {
  opacity: 1;
  transform: rotate(0deg);
  transform-origin: center center;
}

/* No pressed state on the link row (removed 2026-11-28, owner request): the design's
   .aayda-useful-links__card:active .aayda-useful-links__link-row { opacity: 0.008 } hid the divider, the address
   and the arrow from the moment the mouse went down, so pressing, holding or dragging a card made them vanish.
   Its copy in home-large-screens.css is removed too. */

.aayda-useful-links__card:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
}

/* Tablet: Mobile 5257:19592 chrome, fluid 2×2 then 4-col. No Desktop 300×135 / hover. */
@media (min-width: 768px) and (max-width: 1415px) {
  .aayda-useful-links {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    overflow: visible;
  }

  .aayda-useful-links__viewport {
    width: 100%;
    height: auto;
    padding: 24px 16px;
    overflow: visible;
  }

  .aayda-useful-links__track--mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-12);
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .aayda-useful-links__item,
  .aayda-useful-links__card {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 116px;
  }

  .aayda-useful-links__content,
  .aayda-useful-links__title,
  .aayda-useful-links__description,
  .aayda-useful-links__link-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (min-width: 900px) and (max-width: 1415px) {
  .aayda-useful-links__track--mobile {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1416px) {
  .aayda-useful-links {
    max-width: var(--aayda-container-desktop);
    /* Contact h=581 → Links y=655 = 74px of page #F3F4F6.
     * Links Section itself has no fill/radius — cards on page fill. */
    margin-top: 74px;
    height: 135px;
    border-radius: 0;
    background: transparent;
    /* Both clips are released here — see __viewport below. Height stays 135, so the
     * section still occupies exactly the Figma box and nothing below it moves. */
    overflow: visible;
  }

  .aayda-useful-links__viewport {
    padding: 0 84px;
    /* Was `hidden`, on both this and .aayda-useful-links. The card is 135px inside a 135px
     * box, so the :focus-visible ring — 3px at a 2px offset, painted outside the border box —
     * lost 5px at the top and 5px at the bottom on every card.
     *
     * Released rather than padded around: padding would need +10px of height and would push
     * the footer down, and `overflow-x: hidden` cannot be paired with `overflow-y: visible`
     * (a visible value computes to auto when its pair is not visible), so the clip is all or
     * nothing. Nothing needs clipping here: the strip holds at most
     * SiteConfigurationContentLimits.MaxPublishedUsefulLinks published links, and four
     * 300px cards at a 24px gap are exactly the 1272px track, so the row cannot overflow.
     *
     * Mobile and tablet are untouched: the base rule still clips and scrolls below 1416, and
     * the mobile viewport's own 24px of vertical padding already clears the ring there. */
    overflow: visible;
  }

  .aayda-useful-links__track--mobile {
    display: none;
  }

  .aayda-useful-links__track--desktop {
    display: flex;
    width: var(--aayda-container-content);
    height: 135px;
    gap: var(--aayda-numbers-spacing-24);
  }

  .aayda-useful-links__item,
  .aayda-useful-links__card {
    flex-basis: 300px;
    width: 300px;
    height: 135px;
  }

  .aayda-useful-links__card {
    gap: var(--aayda-numbers-spacing-12);
    padding: 16px 20px 4px 25px;
    border-radius: var(--aayda-radius-card);
    transition: box-shadow var(--aayda-useful-links-arrow-duration) var(--aayda-useful-links-arrow-easing);
  }

  .aayda-useful-links__content {
    width: 196px;
  }

  .aayda-useful-links__title,
  .aayda-useful-links__description {
    width: 196px;
  }

  .aayda-useful-links__title {
    transition: color var(--aayda-useful-links-arrow-duration) var(--aayda-useful-links-arrow-easing);
  }

  .aayda-useful-links__description {
    font-size: var(--aayda-typography-size-12);
    line-height: var(--aayda-typography-line-height-12);
    letter-spacing: var(--aayda-typography-letter-spacing-12);
  }

  .aayda-useful-links__link-row {
    flex-basis: 44px;
    width: 255px;
    height: 44px;
    border-top-width: 1px;
  }

  .aayda-useful-links__url {
    top: 11px;
    font-size: var(--aayda-typography-size-14);
    line-height: var(--aayda-typography-line-height-14);
    letter-spacing: var(--aayda-typography-letter-spacing-14);
    transition: color var(--aayda-useful-links-arrow-duration) var(--aayda-useful-links-arrow-easing);
  }

  .aayda-useful-links__arrow {
    top: 9px;
    flex-basis: var(--aayda-icon-size-24);
    width: var(--aayda-icon-size-24);
    height: var(--aayda-icon-size-24);
  }

  /* Figma's card hover is 1.0221s GENTLE; the arrow turns in half that (it lagged), on the same
     curve. The card's colours and shadow keep the design's 1.0221s. */
  .aayda-useful-links__arrow-image--default {
    transition: transform 0.5s var(--aayda-useful-links-arrow-easing);
  }

  /* Hover: Figma Vector −45° → −90° ⇒ CSS rotate(0deg) → rotate(45deg) */
  .aayda-useful-links__card:hover .aayda-useful-links__arrow-image--default,
  .aayda-useful-links__card:focus-visible .aayda-useful-links__arrow-image--default {
    transform: rotate(45deg);
  }

  .aayda-useful-links__card:hover .aayda-useful-links__title,
  .aayda-useful-links__card:focus-visible .aayda-useful-links__title {
    color: var(--aayda-useful-links-url);
  }

  .aayda-useful-links__card:hover .aayda-useful-links__url,
  .aayda-useful-links__card:focus-visible .aayda-useful-links__url {
    color: var(--aayda-colors-blue-400);
  }

  .aayda-useful-links__card:hover {
    box-shadow: 0 2px 2.15px rgba(0, 0, 0, 0.06);
  }

  @media (prefers-reduced-motion: reduce) {
    .aayda-useful-links__card,
    .aayda-useful-links__title,
    .aayda-useful-links__url,
    .aayda-useful-links__arrow-image--default {
      transition: none;
    }
  }
}

/* Mobile: Figma Official site card uses ON_CLICK, not hover — keep arrow static. */
@media (max-width: 1415px) {
  .aayda-useful-links__card:hover .aayda-useful-links__arrow-image--default {
    transform: rotate(0deg);
  }
}

/* The two cards draw their divider in different colours, and one variable was serving both.
 * Mobile .Source/Official site card/Mobile 5301:23015 binds it to neutral-border-default #e2e7ec;
 * desktop Official site card 4979:22603 uses a literal #e8ebf2, which stays the base value above.
 *
 * Scoped to max-width: 767px rather than the 1415px the rest of the mobile chrome uses, so the
 * 768–1415 range keeps exactly the colour it renders today. Tablet borrows the mobile card but has
 * no Figma frame of its own (UL-27), so nothing here establishes which of the two it should take —
 * that belongs with the tablet design decision, not with this correction. */
@media (max-width: 767px) {
  .aayda-useful-links {
    --aayda-useful-links-divider: #e2e7ec;
  }
}

/* --------------------------------------------------------------------------------------------------
 * Automatic carousel (bug-fix-5, 2026-11-27, owner request).
 *
 * The strip shows as many cards as its frame holds; when there are more, they form ONE row that scrolls
 * sideways inside that frame, and js/components/useful-links-carousel.js moves it one card at a time,
 * right to left, in a loop. The cards themselves (size, type, colours, spacing, hover) are untouched, and
 * so is every page's own padding and height for the strip (about-us, charter, contact, faq, leadership,
 * leadership-detail, structure each restate them): only the overflow and the row layout change here.
 *
 * The row layout is chosen by the server, not by the script, so there is no layout shift when the script
 * runs: the component adds --scrolls-2 when there are more than two cards and --scrolls-4 when there are
 * more than four. Four or fewer render exactly as before at every width. Without JavaScript the row still
 * scrolls by swipe or trackpad.
 *
 *   < 768px       the mobile strip already scrolls sideways (its own design); unchanged.
 *   768 - 899px   with more than two cards: one row of two-card-wide slots instead of a 2-column grid.
 *   900 - 1415px  with more than four cards: one row of four slots instead of a 4-column grid.
 *   >= 1416px     with more than four cards: the design's cards in one row.
 *
 * From 768px the script clips the viewport's side padding (clip-path, paint only, read from the page's
 * computed padding), so cards scrolled past the frame do not show in the gutters. Below 768px the gutters
 * stay visible: the mobile design shows the next card peeking in.
 *
 * The script's own state: data-useful-links-carousel="on" shows the loop's copies of the cards
 * ([data-useful-links-clone], hidden from assistive technology and out of the tab order, still clickable) and its controls.
 * -------------------------------------------------------------------------------------------------- */

.aayda-useful-links:not([data-useful-links-carousel="on"]) [data-useful-links-clone] {
  display: none;
}

/* Previous / pause / next: visually hidden until one of them has keyboard focus, as the Karabakh video's
   pause button is (no visible control in the design). Then shown over the strip's top edge.
   The row is in flow with no height, so it moves nothing. The section is deliberately not positioned:
   that would make it the containing block of the cards' absolutely positioned external notes. */
.aayda-useful-links__controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  height: 0;
  /* No top padding: with border-box a padded zero-height row still took 4px of flow and pushed the cards down
     (fixed 2026-11-28). The 4px gap is the buttons' own top margin, painted over the strip. */
  padding: 0 16px;
}

.aayda-useful-links__controls[hidden] {
  display: none;
}

.aayda-useful-links__control {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aayda-useful-links__controls:focus-within .aayda-useful-links__control {
  position: static;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 4px 10px;
  margin: 4px 0 0;
  clip: auto;
  color: var(--aayda-colors-base-white);
  font-family: var(--aayda-typography-font-primary);
  font-size: 12px;
  line-height: 16px;
  background: var(--aayda-colors-navy-700);
  border-radius: 6px;
  cursor: pointer;
}

.aayda-useful-links__control:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
}

@media (min-width: 768px) and (max-width: 899px) {
  .aayda-useful-links--scrolls-2 .aayda-useful-links__viewport {
    --aayda-useful-links-columns: 2;
    overflow-x: auto;
    overflow-y: hidden;
    container-type: inline-size;
    scrollbar-width: none;
  }

  .aayda-useful-links.aayda-useful-links--scrolls-2 .aayda-useful-links__track--mobile {
    display: flex;
    width: max-content;
  }

  .aayda-useful-links.aayda-useful-links--scrolls-2 .aayda-useful-links__item,
  .aayda-useful-links.aayda-useful-links--scrolls-2 .aayda-useful-links__card {
    flex: 0 0 calc((100cqi - (var(--aayda-useful-links-columns) - 1) * var(--aayda-numbers-spacing-12)) / var(--aayda-useful-links-columns));
    width: calc((100cqi - (var(--aayda-useful-links-columns) - 1) * var(--aayda-numbers-spacing-12)) / var(--aayda-useful-links-columns));
  }
}

@media (min-width: 900px) and (max-width: 1415px) {
  .aayda-useful-links--scrolls-4 .aayda-useful-links__viewport {
    --aayda-useful-links-columns: 4;
    overflow-x: auto;
    overflow-y: hidden;
    container-type: inline-size;
    scrollbar-width: none;
  }

  .aayda-useful-links.aayda-useful-links--scrolls-4 .aayda-useful-links__track--mobile {
    display: flex;
    width: max-content;
  }

  .aayda-useful-links.aayda-useful-links--scrolls-4 .aayda-useful-links__item,
  .aayda-useful-links.aayda-useful-links--scrolls-4 .aayda-useful-links__card {
    flex: 0 0 calc((100cqi - (var(--aayda-useful-links-columns) - 1) * var(--aayda-numbers-spacing-12)) / var(--aayda-useful-links-columns));
    width: calc((100cqi - (var(--aayda-useful-links-columns) - 1) * var(--aayda-numbers-spacing-12)) / var(--aayda-useful-links-columns));
  }
}

@media (min-width: 1416px) {
  .aayda-useful-links--scrolls-4 .aayda-useful-links__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .aayda-useful-links.aayda-useful-links--scrolls-4 .aayda-useful-links__track--desktop {
    width: max-content;
  }

  .aayda-useful-links__controls {
    padding-inline: 84px;
  }
}

/* Dragging and snapping (2026-11-28). The layout above is unchanged; these rules apply only while the script has
 * the carousel on (data-useful-links-carousel="on"):
 *   - every card is a snap point and a swipe or trackpad gesture stops at the next one (snap-stop), so the row always
 *     comes to rest on a whole card, one card per gesture. The script restates scroll-padding from each page's own
 *     padding, so a card rests on the frame's content edge;
 *   - sideways drags (mouse, finger, pen) are the script's, one card per drag; vertical swipes and pinch-zoom stay the
 *     browser's, so the page still scrolls and zooms over the strip;
 *   - while the script drags, animates or loops the row it frees the snapping, and puts it back on a card. */
.aayda-useful-links[data-useful-links-carousel="on"] .aayda-useful-links__viewport {
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-y pinch-zoom;
}

.aayda-useful-links[data-useful-links-carousel="on"] .aayda-useful-links__viewport[data-useful-links-free] {
  scroll-snap-type: none;
}

.aayda-useful-links[data-useful-links-carousel="on"] .aayda-useful-links__item {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.aayda-useful-links[data-useful-links-carousel="on"] .aayda-useful-links__viewport[data-useful-links-dragging],
.aayda-useful-links[data-useful-links-carousel="on"] .aayda-useful-links__viewport[data-useful-links-dragging] .aayda-useful-links__card {
  cursor: grabbing;
  user-select: none;
}

/* --------------------------------------------------------------------------------------------------
 * Long titles, descriptions and addresses (2026-11-28, owner's final rule).
 *
 * The card keeps every size it has (116 / 135px tall, the 59px text area, the divider and address where they
 * are). Before this, the title was a fixed 23px slot holding a 26px line with nothing clipping it, so a title
 * that wrapped painted over the description; a long description ran into the address row and out of the card;
 * a long address ran under the arrow and past the card's edge. Now, at every width:
 *
 *   - the title is always one line, ended with an ellipsis when it is too long. It takes its real 26px line
 *     box (nothing of the glyphs is clipped) and gives the 3px back with a negative margin, so the title and
 *     the description sit exactly where the design puts them;
 *   - the description is always shown, at most two lines, ended with an ellipsis;
 *   - the text area is clipped to its box: the design's 59px plus the part of the gap above the divider that a
 *     two-line description already used (4px, 8px on desktop), taken back by a negative margin, so the divider
 *     and the address do not move;
 *   - an unbroken word in the description wraps rather than leaving the card;
 *   - the address ends with an ellipsis before the arrow.
 *
 * The homepage's large-screen stylesheet (css/pages/home-large-screens.css, 2561px and wider) restates the
 * same rules at its scale.
 * -------------------------------------------------------------------------------------------------- */

.aayda-useful-links__content {
  --aayda-useful-links-text-allowance: 4px;
  flex-basis: calc(59px + var(--aayda-useful-links-text-allowance));
  height: calc(59px + var(--aayda-useful-links-text-allowance));
  margin-bottom: calc(-1 * var(--aayda-useful-links-text-allowance));
  overflow: hidden;
}

.aayda-useful-links__title {
  flex: 0 0 auto;
  height: auto;
  margin-bottom: calc(23px - var(--aayda-typography-line-height-16));
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aayda-useful-links__description {
  display: -webkit-box;
  flex: 0 0 auto;
  height: auto;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.aayda-useful-links__url {
  max-width: calc(100% - 15.372549px - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 1416px) {
  .aayda-useful-links__content {
    --aayda-useful-links-text-allowance: 8px;
  }

  .aayda-useful-links__url {
    max-width: calc(100% - var(--aayda-icon-size-24) - 8px);
  }
}
