/* Körpülər — Desktop 5821:22011, Mobile 5821:22126 */

.aayda-bridges-page {
  background-color: var(--aayda-colors-surface-disabled);
}

.aayda-bridges-page .aayda-top-block {
  position: relative;
  min-height: 333px;
  padding: var(--aayda-numbers-spacing-32);
}

.aayda-bridges-page .aayda-top-block__inner {
  gap: 96px;
  width: 100%;
}

.aayda-bridges-page .aayda-top-block__heading {
  gap: var(--aayda-numbers-spacing-12);
}

/* A minimum rather than a fixed height: the description is editorial text now, and a longer one
   must push the block down rather than spill out of it. The design's copy fills it exactly. */
.aayda-bridges-page .aayda-top-block__lede {
  display: flex;
  gap: var(--aayda-numbers-spacing-12);
  min-height: 86px;
}

.aayda-bridges-page .aayda-top-block__description {
  width: min(100%, 292px);
  line-height: 18px;
}

.aayda-bridges {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 71px 0 73px;
}

.aayda-bridges__inner {
  width: 100%;
  min-width: 0;
}

.aayda-bridges__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.aayda-bridges__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: calc(100% - 32px);
  max-width: 370px;
  margin: 0 auto;
  padding: 0;
}

.aayda-bridges__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: 370px;
  height: 326px;
  overflow: clip;
  background: #f8f8fa;
  border: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px var(--aayda-colors-base-white);
  color: inherit;
}

.aayda-bridges__media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.aayda-bridges__image {
  position: absolute;
  display: block;
  max-width: none;
}

.aayda-bridges__image--desktop {
  display: none;
}

.aayda-bridges__image--mobile {
  top: -21.74%;
  left: 0;
  width: 110.27%;
  height: 143.48%;
}

.aayda-bridges__body {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--aayda-numbers-spacing-12);
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  padding: 18px 20px 20px;
  overflow: clip;
}

.aayda-bridges__code {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--aayda-numbers-spacing-8);
  padding: 4px 14px 4px 12px;
  overflow: clip;
  /* bug-fix-5 BUG 3: Figma 5821:22024 (desktop) and 5821:22129 (mobile) fill the badge #F3F4F6. The
     token named here before (neutral-surface-page) is defined nowhere, so the badge painted no
     background at all; surface-disabled is the same #f3f4f6 the roads badge uses. */
  background: var(--aayda-colors-surface-disabled);
  border-radius: 20px;
}

.aayda-bridges__code img {
  display: block;
  width: 6px;
  height: 6px;
}

.aayda-bridges__code-text {
  color: var(--aayda-colors-navy-700);
  font-family: var(--aayda-typography-font-primary);
  font-size: var(--aayda-typography-size-12);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: 18px;
  letter-spacing: var(--aayda-typography-letter-spacing-12);
  white-space: nowrap;
}

.aayda-bridges__code-text--desktop,
.aayda-bridges__title--desktop,
.aayda-bridges__meta-value--desktop {
  display: none;
}

.aayda-bridges__title {
  margin: 0;
  width: 100%;
  height: 56px;
  flex-shrink: 0;
  overflow: clip;
  color: var(--aayda-colors-teal-900);
  font-family: var(--aayda-typography-font-primary);
  font-size: var(--aayda-typography-size-18);
  font-weight: var(--aayda-typography-weight-bold);
  line-height: var(--aayda-typography-line-height-18);
  letter-spacing: var(--aayda-typography-letter-spacing-18);
}

/*
 * ML-E D5: a name longer than the title box ends in an ellipsis on its last whole line instead of
 * being cut through a line. The box keeps the design's height (two 28px lines here); the full name
 * stays in the link text and the heading's title attribute. Only the mobile title is given the
 * clamp's display here: the desktop one stays display: none until ≥1416px, where it is clamped.
 */
.aayda-bridges__title--mobile {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/*
 * The card's one link. It keeps the title's own look, and its ::after covers the whole card so the
 * picture, the title and the "Ətraflı" arrow all open the bridge. The link stays position: static so
 * the card (position: relative) is the box the overlay fills; the title's and body's overflow: clip
 * do not clip it, because the card, not they, is its containing block.
 */
.aayda-bridges__link {
  color: inherit;
  text-decoration: none;
}

.aayda-bridges__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/*
 * Keyboard focus — the site's ring, drawn round the whole card the link stands for. Inset by its own
 * width: the card clips its overflow, so a ring outside its edge would be cut off.
 */
.aayda-bridges__link:focus-visible {
  outline: none;
}

.aayda-bridges__link:focus-visible::after {
  border-radius: 16px;
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: calc(var(--aayda-border-width-focus-ring) * -1);
}

.aayda-bridges__divider {
  display: block;
  flex-shrink: 0;
  height: 1px;
  max-width: 100%;
  object-fit: cover;
}

.aayda-bridges__divider--desktop {
  display: none;
}

.aayda-bridges__divider--mobile {
  width: 330px;
}

.aayda-bridges__row {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 18px;
  overflow: clip;
}

.aayda-bridges__meta {
  display: flex;
  align-items: center;
  gap: var(--aayda-numbers-spacing-4);
  overflow: clip;
  color: var(--aayda-colors-navy-700);
  font-size: var(--aayda-typography-size-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  line-height: var(--aayda-typography-line-height-16);
  white-space: nowrap;
}

.aayda-bridges__meta-value {
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-extra-bold);
}

.aayda-bridges__meta-label {
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-medium);
  white-space: pre;
}

.aayda-bridges__more {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  align-self: flex-start;
  box-sizing: border-box;
  gap: var(--aayda-numbers-spacing-8);
  /* ML-E D2: the design's 76px is the minimum; a longer label ("Read more") widens the link
     leftwards (the row is space-between) instead of running into the arrow. */
  width: auto;
  min-width: 76px;
  height: 28px;
  margin-top: -4px;
  overflow: visible;
  color: var(--aayda-colors-blue-400);
  font-family: var(--aayda-typography-font-primary);
  font-size: var(--aayda-typography-size-12);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: 18px;
  letter-spacing: var(--aayda-typography-letter-spacing-12);
  text-decoration: none;
  white-space: nowrap;
}

.aayda-bridges__more-label {
  display: block;
  flex-shrink: 0;
  width: auto;
  min-width: 40px;
  height: 18px;
  margin-top: 5px;
  line-height: 18px;
}

.aayda-bridges__more img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  max-width: none;
  position: relative;
  top: -2px;
}

.aayda-bridges__more-arrow--desktop {
  display: none;
}

.aayda-bridges__more-arrow--mobile {
  display: block;
}

.aayda-bridges__pagination--desktop {
  display: none;
}

.aayda-bridges__pagination--mobile {
  width: 100%;
  max-width: 354px;
  margin: 20px auto 0;
  padding: 0 8px;
  box-sizing: border-box;
}

@media (min-width: 768px) and (max-width: 1415px) {
  .aayda-bridges__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: calc(100% - 32px);
    max-width: 100%;
    min-width: 0;
  }

  .aayda-bridges__card,
  .aayda-bridges__media,
  .aayda-bridges__body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .aayda-bridges__divider--mobile {
    width: 100%;
    max-width: 100%;
  }

  .aayda-bridges__image--desktop,
  .aayda-bridges__code-text--desktop,
  .aayda-bridges__title--desktop,
  .aayda-bridges__meta-value--desktop,
  .aayda-bridges__divider--desktop,
  .aayda-bridges__more-arrow--desktop,
  .aayda-bridges__pagination--desktop {
    display: none;
  }
}

@media (min-width: 1416px) {
  .aayda-bridges-page .aayda-top-block {
    min-height: 259px;
    padding: var(--aayda-numbers-spacing-32) 0 var(--aayda-numbers-spacing-32) var(--aayda-numbers-spacing-84);
  }

  .aayda-bridges-page .aayda-top-block__inner {
    gap: var(--aayda-numbers-spacing-8);
    width: 1356px;
    max-width: 1356px;
  }

  .aayda-bridges-page .aayda-top-block__heading {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--aayda-numbers-spacing-24);
    width: 1354px;
    max-width: 1354px;
  }

  .aayda-bridges-page .aayda-top-block__title {
    font-size: var(--aayda-typography-size-44);
    line-height: var(--aayda-typography-line-height-44);
    letter-spacing: var(--aayda-typography-letter-spacing-44);
    white-space: nowrap;
  }

  .aayda-bridges-page .aayda-top-block__lede {
    flex: 0 0 490px;
    width: 490px;
    min-height: 159px;
    height: auto;
    gap: 13px;
  }

  .aayda-bridges-page .aayda-top-block__description {
    width: 403px;
    font-size: var(--aayda-typography-size-14);
    line-height: 20px;
    letter-spacing: var(--aayda-typography-letter-spacing-14);
  }

  .aayda-bridges {
    padding: 48px 0 73px;
  }

  .aayda-bridges__inner {
    width: 1440px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .aayda-bridges__content {
    align-items: flex-start;
    width: 1272px;
    max-width: none;
    margin-left: 84px;
    gap: 72px;
  }

  .aayda-bridges__grid {
    display: grid;
    grid-template-columns: 408px 408px 408px;
    column-gap: 24px;
    row-gap: 24px;
    width: 1272px;
    max-width: none;
    margin: 0;
  }

  .aayda-bridges__card {
    width: 408px;
    max-width: none;
    height: 338px;
    background: #fcfcfc;
    transition: background-color 300ms ease-out;
  }

  .aayda-bridges__card:nth-child(n + 4) {
    height: 326px;
  }

  .aayda-bridges__card:hover {
    background: var(--aayda-colors-base-white);
  }

  .aayda-bridges__media {
    width: 100%;
  }

  .aayda-bridges__image--mobile {
    display: none;
  }

  .aayda-bridges__image--desktop {
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
      top 300ms ease-out,
      left 300ms ease-out,
      width 300ms ease-out,
      height 300ms ease-out;
  }

  .aayda-bridges__card:hover .aayda-bridges__image--desktop {
    top: -33.75%;
    left: -4.69%;
    width: 109.39%;
    height: 167.5%;
  }

  .aayda-bridges__body {
    flex: 0 0 auto;
    width: 408px;
  }

  .aayda-bridges__code {
    background: var(--aayda-colors-surface-disabled);
  }

  .aayda-bridges__code-text {
    line-height: var(--aayda-typography-line-height-12);
  }

  .aayda-bridges__code-text--mobile,
  .aayda-bridges__title--mobile,
  .aayda-bridges__meta-value--mobile {
    display: none;
  }

  .aayda-bridges__code-text--desktop,
  .aayda-bridges__title--desktop,
  .aayda-bridges__meta-value--desktop {
    display: inline;
  }

  /* ML-E D5: clamped like the mobile title — two lines in the 56px box, one in the bold 44px one. */
  .aayda-bridges__title--desktop {
    display: -webkit-box;
    width: 368px;
    overflow: hidden;
    font-weight: var(--aayda-typography-weight-semi-bold);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  /* The 44px box is one 28px line and 16px below it, so the clamp's next line — which it still
     paints — falls in padding that the content-box clip hides. */
  .aayda-bridges__title--desktop.aayda-bridges__title--bold {
    box-sizing: border-box;
    height: 44px;
    padding-bottom: 16px;
    overflow: clip;
    overflow-clip-margin: content-box;
    font-weight: var(--aayda-typography-weight-bold);
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .aayda-bridges__divider--mobile {
    display: none;
  }

  .aayda-bridges__divider--desktop {
    display: block;
    width: 368px;
  }

  .aayda-bridges__row {
    width: 368px;
    height: 20px;
  }

  .aayda-bridges__meta {
    font-size: var(--aayda-typography-size-12);
    line-height: var(--aayda-typography-line-height-12);
    letter-spacing: var(--aayda-typography-letter-spacing-12);
  }

  .aayda-bridges__meta--desktop-large {
    font-size: var(--aayda-typography-size-16);
    line-height: var(--aayda-typography-line-height-16);
    letter-spacing: var(--aayda-typography-letter-spacing-16);
  }

  .aayda-bridges__meta-value {
    font-weight: var(--aayda-typography-weight-bold);
  }

  .aayda-bridges__meta--desktop-large .aayda-bridges__meta-value {
    font-weight: var(--aayda-typography-weight-bold);
  }

  .aayda-bridges__more-arrow--mobile {
    display: none;
  }

  .aayda-bridges__more-arrow--desktop {
    display: block;
  }

  .aayda-bridges__pagination--mobile {
    display: none;
  }

  .aayda-bridges__pagination--desktop {
    display: flex;
    width: 376px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aayda-bridges__card,
  .aayda-bridges__image--desktop {
    transition: none;
  }
}
