/* Fotoqalereya — Desktop 4921:39655, Mobile 5343:21160. */

.aayda-gallery-page {
  background-color: var(--aayda-colors-surface-disabled);
}

.aayda-gallery-page .aayda-top-block {
  padding-right: 0;
  padding-left: calc(var(--aayda-numbers-spacing-32) - var(--aayda-border-width-card));
}

.aayda-gallery-page .aayda-top-block__inner {
  gap: 96px;
  width: calc(100% + var(--aayda-border-width-card));
}

.aayda-gallery-page .aayda-top-block__heading {
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-gallery-page .aayda-top-block__title {
  font-size: var(--aayda-typography-size-32);
  line-height: var(--aayda-typography-line-height-heading-32);
  letter-spacing: var(--aayda-typography-letter-spacing-32);
}

.aayda-gallery-page .aayda-top-block__description {
  line-height: 18px;
}

.aayda-gallery {
  width: 100%;
  min-width: 0;
  padding: 49px 0 75px;
}

.aayda-gallery__inner {
  display: flex;
  flex-direction: column;
  width: calc(100% - 32px);
  max-width: 370px;
  margin-inline: auto;
}

.aayda-gallery__tabs {
  display: flex;
  align-items: center;
  gap: var(--aayda-numbers-spacing-8);
  width: 100%;
  margin: 0 0 var(--aayda-numbers-spacing-28);
}

.aayda-gallery__tab {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 167px;
  height: 44px;
  padding: var(--aayda-numbers-spacing-8) var(--aayda-numbers-spacing-36);
  font-family: inherit;
  font-size: var(--aayda-typography-size-16);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  color: var(--aayda-colors-gray-800);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.56);
  border: var(--aayda-border-width-card) solid var(--aayda-colors-base-white);
  border-radius: 100px;

  /* Figma's News/Tab (3531:37175) has no motion; the easing is the one the news page gives the
     same component (news.css), shortened to 200ms here so a switch feels quick. js/pages/
     gallery-tabs.js reads this duration from the computed style, so it is set only here. */
  transition:
    background-color 200ms ease-in,
    border-color 200ms ease-in,
    border-width 200ms ease-in,
    color 200ms ease-in;
}

/* News/Tab, State=Active (3531:37174; the strips 4921:39737, 11235:76602, 7341:54324). */
.aayda-gallery__tab.is-active,
.aayda-gallery__tab[aria-selected="true"] {
  color: var(--aayda-colors-navy-700);
  background: var(--aayda-colors-news-tab-active-fill);
  border-width: 1px;
  border-color: var(--aayda-colors-blue-400);
}

/* Keyboard focus at every width: the site's ring, inset as on the news tabs (news.css). */
.aayda-gallery__tab:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: -3px;
}

.aayda-gallery__tab--desktop {
  display: none;
}

/* "(in Azerbaijani)" after a tab that leads to a page served only in Azerbaijani, on the English
 * listing: heard by assistive technology, not shown, so the pill keeps the design's width. The site
 * has no shared visually-hidden utility (see footer.css), so the rule lives with the tab.
 * position: absolute keeps it out of the inline-flex row, so it cannot shift the label. */
.aayda-gallery__tab-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The albums could not be read: the message and a retry link where the grid would be. */
.aayda-gallery__status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--aayda-numbers-spacing-8);
  margin: 0 0 var(--aayda-numbers-spacing-40);
}

.aayda-gallery__retry {
  font-weight: var(--aayda-typography-weight-semi-bold);
  color: var(--aayda-colors-blue-400);
  text-decoration: underline;
}

.aayda-gallery__grid {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-20);
  width: 100%;
  margin: 0 0 var(--aayda-numbers-spacing-40);
  padding: 0;
}

.aayda-gallery__item--desktop {
  display: none;
}

.aayda-gallery__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 369px;
  padding: var(--aayda-numbers-spacing-4) var(--aayda-numbers-spacing-4) var(--aayda-numbers-spacing-12);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--aayda-colors-neutral-surface-subtle);
  border-radius: var(--aayda-radius-card);
  box-shadow: inset 0 0 0 var(--aayda-border-width-card) var(--aayda-colors-base-white);
}

.aayda-gallery__card-media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: var(--aayda-radius-image);
}

.aayda-gallery__card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* FOTO-8: the site's image placeholder tint (the crossing gallery's) while the cover downloads;
     the loaded cover covers it. On the image, so a card with no cover keeps its plain surface. */
  background-color: var(--aayda-colors-news-tab-active-fill);
}

.aayda-gallery__card-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  width: 330px;
  min-height: 0;
  padding-top: var(--aayda-numbers-spacing-10);
}

.aayda-gallery__card-title {
  width: 330px;
  height: 71px;
  margin: 0;
  overflow: hidden;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-bold);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  color: var(--aayda-colors-text-label);
}

.aayda-gallery__card-title-desktop {
  display: none;
}

.aayda-gallery__card-row {
  position: relative;
  width: 100%;
  height: 30px;
}

.aayda-gallery__card-date {
  position: absolute;
  top: 5px;
  left: 0;
  width: 84px;
  margin: 0;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  color: var(--aayda-colors-neutral-500);
  white-space: nowrap;
}

.aayda-gallery__card-more {
  position: absolute;
  top: 0;
  left: 194px;
  display: flex;
  align-items: center;
  width: 136px;
  height: 30px;
  overflow: hidden;
  color: var(--aayda-colors-blue-400);
}

.aayda-gallery__card-more-label {
  width: 106px;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  white-space: nowrap;
}

.aayda-gallery__card-more-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  overflow: hidden;
}

.aayda-gallery__card-more-arrow img {
  display: block;
  width: 30px;
  height: 30px;
  max-width: none;
}

.aayda-gallery__pagination {
  width: 355px;
  max-width: 100%;
  margin-inline: auto;
}

/*
  No fixed gap: the shared space-between spreads seven slots over the 355px row 12px apart, as the
  design draws them, and a narrower row (a 320px phone) closes the gap instead of overflowing.
*/
.aayda-gallery-page .aayda-gallery__pagination .aayda-pagination__list {
  width: 355px;
  max-width: 100%;
}

@media (min-width: 768px) and (max-width: 1415px) {
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__inner {
    width: calc(100% - 32px);
    max-width: 100%;
    min-width: 0;
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-20);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__item,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-media,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-body,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-title {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-more {
    left: auto;
    right: 0;
  }

  /* The text keeps the phone card's inset (14px from the card's edge: its 4px padding and 10px), so
   * the title, the date and "Ətraflı məlumat" line up as they do on a phone instead of running flush
   * with the picture's edges. The column is centred by the card's align-items: center. */
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-body {
    width: calc(100% - 20px);
  }
}

@media (min-width: 1416px) {
  .aayda-gallery-page .aayda-top-block {
    height: 259px;
    min-height: 259px;
    background: rgba(255, 255, 255, 0.56);
    padding-right: 0;
    padding-left: calc(var(--aayda-numbers-spacing-84) - var(--aayda-border-width-card));
  }

  .aayda-gallery-page .aayda-top-block__inner {
    gap: var(--aayda-numbers-spacing-8);
    width: 1356px;
    max-width: none;
  }

  .aayda-gallery-page .aayda-top-block__heading {
    width: 1354px;
    max-width: none;
    gap: var(--aayda-numbers-spacing-24);
  }

  .aayda-gallery-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);
  }

  .aayda-gallery-page .aayda-top-block__description {
    line-height: var(--aayda-typography-line-height-14);
  }

  .aayda-gallery {
    padding: 68px 0 53px;
  }

  .aayda-gallery__inner {
    width: 1272px;
    max-width: none;
    margin-left: calc((100% - 1272px) / 2);
    margin-right: calc((100% - 1272px) / 2);
  }

  .aayda-gallery__tabs {
    width: 517px;
    margin-bottom: 26px;
  }

  .aayda-gallery__tab--desktop {
    display: inline-flex;
  }

  /* News/Tab, State=Hover (3531:37172): white, #2647b4, a 1px border at 66% of #3363ff. */
  .aayda-gallery__tab:not(.is-active):hover,
  .aayda-gallery__tab[aria-selected="false"]:hover,
  .aayda-gallery__tab:not(.is-active):focus-visible,
  .aayda-gallery__tab[aria-selected="false"]:focus-visible {
    color: var(--aayda-colors-news-tab-hover-text);
    background: var(--aayda-colors-base-white);
    border-width: 1px;
    border-color: rgba(51, 99, 255, 0.66);
  }

  .aayda-gallery__grid {
    display: grid;
    grid-template-columns: 408px 408px 408px;
    column-gap: 24px;
    row-gap: 24px;
    width: 1272px;
    max-width: none;
    margin: 0 0 52px;
  }

  .aayda-gallery__item,
  .aayda-gallery__item--desktop {
    display: block;
    width: 408px;
    height: 397px;
  }

  .aayda-gallery__card {
    align-items: flex-start;
    width: 408px;
    height: 397px;
    padding: 4px 4px 25px;
    background: var(--aayda-colors-base-white);
  }

  .aayda-gallery__card-media {
    width: 400px;
    height: 245px;
  }

  /* Bug-fix batch (2026-11-24), photo gallery only (Useful Information shares these classes and
   * already does this in useful-information.css): the photo card takes what the video card
   * (gallery-video.css, bug-fix-3) and the news card already have, so every card in the gallery looks
   * and reacts the same. It keeps the light fill, so its 2px white stroke shows (the white fill hid
   * it), and on hover or keyboard focus it turns white, the picture crops in over 300ms (the news
   * card's values) and "Ətraflı məlumat" opens by 4px in the link's hover colour. */
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card {
    background: var(--aayda-colors-neutral-surface-subtle);
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    transition:
      width 300ms ease-in,
      height 300ms ease-in,
      top 300ms ease-in,
      left 300ms ease-in;
  }

  /* gap 0 at rest (not "normal") so the 4px it opens to on hover animates. */
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-more {
    gap: 0;
    transition: gap 300ms ease-out, color 300ms ease-out, width 300ms ease-out;
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:hover,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:focus-visible {
    background: var(--aayda-colors-base-white);
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:hover .aayda-gallery__card-media img,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:focus-visible .aayda-gallery__card-media img {
    top: -3.67%;
    left: -8.44%;
    width: 116.89%;
    height: 107.35%;
  }

  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:hover .aayda-gallery__card-more,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card:focus-visible .aayda-gallery__card-more {
    width: 140px;
    gap: var(--aayda-numbers-spacing-4);
    color: var(--aayda-colors-news-link-hover);
  }

  .aayda-gallery__card-body {
    display: contents;
  }

  .aayda-gallery__card-title {
    position: absolute;
    top: 257px;
    left: 18px;
    width: 368px;
    height: auto;
    overflow: visible;
    font-size: var(--aayda-typography-size-16);
    line-height: var(--aayda-typography-line-height-16);
    letter-spacing: var(--aayda-typography-letter-spacing-16);
    color: var(--aayda-colors-text);
  }

  .aayda-gallery__card-title-desktop {
    display: inline;
  }

  .aayda-gallery__card-title-mobile {
    display: none;
  }

  .aayda-gallery__card-row {
    position: absolute;
    top: 350px;
    left: 18px;
    width: 372px;
    height: 30px;
  }

  .aayda-gallery__card-date {
    top: 5px;
  }

  .aayda-gallery__card-more {
    left: 232px;
  }

  .aayda-gallery__pagination {
    width: 376px;
    max-width: none;
    margin-inline: auto;
  }

  .aayda-gallery-page .aayda-gallery__pagination .aayda-pagination__list {
    width: auto;
    max-width: none;
    justify-content: flex-start;
    gap: var(--aayda-numbers-spacing-16);
  }
}

/* Reduced motion: the tabs change state at once. */
@media (prefers-reduced-motion: reduce) {
  .aayda-gallery__tab,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-media img,
  .aayda-gallery-page:not(.aayda-gallery-video-page) .aayda-gallery__card-more {
    transition: none;
  }
}
