/* Faydalı məlumatlar — Desktop 4921:41750, Mobile 5515:17354. */

.aayda-faydali-melumatlar-page {
  background-color: var(--aayda-colors-surface-disabled);
}

.aayda-faydali-melumatlar-page .aayda-top-block {
  padding-right: 0;
  padding-left: calc(var(--aayda-numbers-spacing-32) - var(--aayda-border-width-card));
}

.aayda-faydali-melumatlar-page .aayda-top-block__inner {
  gap: 96px;
  width: calc(100% + var(--aayda-border-width-card));
}

.aayda-faydali-melumatlar-page .aayda-top-block__heading {
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-faydali-melumatlar-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);
  white-space: normal;
}

.aayda-faydali-melumatlar-page .aayda-top-block__lede {
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-faydali-melumatlar-page .aayda-top-block__description {
  line-height: 18px;
}

/* The Gallery tab strip now leads the section, so it starts where the photo and video listings start
   theirs (49px; 68px from 1416px, below), and the strip does not move when switching between them. */
.aayda-faydali-melumatlar {
  width: 100%;
  min-width: 0;
  padding: 49px 0 96px;
}

.aayda-faydali-melumatlar__inner {
  display: flex;
  flex-direction: column;
  width: calc(100% - 32px);
  max-width: 370px;
  margin-inline: auto;
}

/*
  Final corrections — the cards are the photo gallery's card: its markup (PhotoGallery/Index.cshtml) and
  its rules (css/pages/gallery.css), at every width, with no hover of its own (the photo card has none,
  so the old poster zoom is gone). Useful information Phase 3 still holds: every card is shown at every
  width, twelve to a page. This sheet adds only what a video lays over the picture — the play control,
  the duration and the muted hover preview — and the photo page's two-column tablet grid, which
  gallery.css keeps to its own page.
*/

/* The design's play control, centred on the picture. Shown only on a card with something to play. */
.aayda-faydali-melumatlar__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  /* bug-fix-5 batch 2: Figma's Play icon (I5816:20064) is a 1% white fill and a 1px white ring over a
     background blur of radius 4, which is a CSS blur of half that. blur(4px) doubled it, and over a bright
     picture the disc read as solid white. */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* The photo card's picture rule (.aayda-gallery__card-media img) reaches this icon too; it keeps its own
   size and none of the picture's placeholder tint. */
.aayda-faydali-melumatlar__play img {
  display: block;
  width: 60px;
  height: 60px;
  max-width: none;
  object-fit: contain;
  background-color: transparent;
}

/* 12px from the picture's right and bottom edges. */
.aayda-faydali-melumatlar__duration {
  position: absolute;
  right: var(--aayda-numbers-spacing-12);
  bottom: var(--aayda-numbers-spacing-12);
  z-index: 2;
  box-sizing: border-box;
  padding: var(--aayda-numbers-spacing-4) var(--aayda-numbers-spacing-8);
  overflow: hidden;
  font-size: var(--aayda-typography-size-12);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-12);
  letter-spacing: var(--aayda-typography-letter-spacing-12);
  color: var(--aayda-colors-base-white);
  white-space: nowrap;
  background: rgba(17, 30, 58, 0.72);
  border-radius: 6px;
}

/* Bug-fix 4, correction 34 — the hover preview lies over the poster, under the play control and the
   duration, and shows only while it really plays (js/components/video-hover-preview.js). */
.aayda-faydali-melumatlar .aayda-video-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

.aayda-faydali-melumatlar [data-video-preview-playing="true"] .aayda-video-preview {
  opacity: 1;
}

.aayda-faydali-melumatlar__pagination {
  width: 354px;
  max-width: 100%;
  margin-inline: auto;
}

.aayda-faydali-melumatlar-page .aayda-faydali-melumatlar__pagination .aayda-pagination__list {
  width: 354px;
  max-width: 100%;
}

@media (min-width: 768px) and (max-width: 1415px) {
  .aayda-faydali-melumatlar__inner {
    width: calc(100% - 32px);
    max-width: 100%;
    min-width: 0;
  }

  /* The photo page's tablet grid and card widths (gallery.css scopes them to .aayda-gallery-page). */
  .aayda-faydali-melumatlar .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-faydali-melumatlar .aayda-gallery__item,
  .aayda-faydali-melumatlar .aayda-gallery__card,
  .aayda-faydali-melumatlar .aayda-gallery__card-media,
  .aayda-faydali-melumatlar .aayda-gallery__card-body,
  .aayda-faydali-melumatlar .aayda-gallery__card-title {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .aayda-faydali-melumatlar .aayda-gallery__card-more {
    left: auto;
    right: 0;
  }

  .aayda-faydali-melumatlar__pagination,
  .aayda-faydali-melumatlar-page .aayda-faydali-melumatlar__pagination .aayda-pagination__list {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1416px) {
  .aayda-faydali-melumatlar-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-faydali-melumatlar-page .aayda-top-block__inner {
    gap: var(--aayda-numbers-spacing-8);
    width: 1356px;
    max-width: none;
  }

  .aayda-faydali-melumatlar-page .aayda-top-block__heading {
    width: 1354px;
    max-width: none;
    gap: var(--aayda-numbers-spacing-24);
  }

  .aayda-faydali-melumatlar-page .aayda-top-block__title {
    flex: 0 0 auto;
    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-faydali-melumatlar-page .aayda-top-block__lede {
    flex: 0 0 490px;
    width: 490px;
    height: 159px;
  }

  .aayda-faydali-melumatlar-page .aayda-top-block__description {
    width: 403px;
    font-size: var(--aayda-typography-size-14);
    line-height: var(--aayda-typography-line-height-14);
    letter-spacing: var(--aayda-typography-letter-spacing-14);
  }

  .aayda-faydali-melumatlar {
    padding: 68px 0 80px;
  }

  .aayda-faydali-melumatlar__inner {
    width: 1272px;
    max-width: none;
    margin-left: calc((100% - 1272px) / 2);
    margin-right: calc((100% - 1272px) / 2);
  }

  .aayda-faydali-melumatlar__pagination {
    width: 376px;
    max-width: none;
    margin-inline: auto;
  }

  .aayda-faydali-melumatlar-page .aayda-faydali-melumatlar__pagination .aayda-pagination__list {
    width: auto;
    max-width: none;
    justify-content: flex-start;
    gap: var(--aayda-numbers-spacing-16);
  }
}

/*
  Video modal — Desktop 6470:37220 (component 6470:24501), Mobile 6470:36865 (component 6470:24499).

  The player box holds the real player js/pages/useful-information.js puts in on open (Useful
  information Phase 2): YouTube's frame or the browser's own video. The box is 16:9 at every width
  and is never stretched; when the screen is too short for 16:9 the box is capped, and the player
  inside letterboxes the picture rather than distorting it.

  Below 1416px (mobile frame 402 × 854): the whole screen is black, the close control sits top right,
  the player spans the width in the middle, and the title sits in a bar at the bottom. On a phone at
  least as tall as the frame the player sits where the frame puts it, 283px from the top.
*/

.aayda-inner-page-root.is-faydali-video-modal-open,
.aayda-faydali-melumatlar-page.is-faydali-video-modal-open {
  overflow: hidden;
}

.aayda-faydali-video-modal[hidden] {
  display: none;
}

.aayda-faydali-video-modal:not([hidden]) {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #000;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.aayda-faydali-video-modal__panel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.aayda-faydali-video-modal__header {
  position: absolute;
  top: calc(17px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
}

.aayda-faydali-video-modal__title {
  display: none;
}

.aayda-faydali-video-modal__close {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Keyboard focus on the black backdrop: the site's ring in white, as the dark ring would not show. */
.aayda-faydali-video-modal__close:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-base-white);
  outline-offset: 2px;
}

.aayda-faydali-video-modal__close img {
  display: block;
  width: 15px;
  height: 15px;
  max-width: none;
}

/* Capped so the close control (17px + 40px) and the bottom bar (68px) keep their room. */
.aayda-faydali-video-modal__player {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: calc(100% - 136px);
  overflow: hidden;
  background: #000;
  transform: translateY(-50%);
}

/* The real player fills the box; a picture that does not fit is letterboxed by the player itself. */
.aayda-faydali-video-modal__player > iframe,
.aayda-faydali-video-modal__player > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

/* The title bar at the bottom of the screen (mobile frame: 68px, 21px × 12px padding). It stays
   above the device's home indicator, and a long title ends in an ellipsis on its one line. */
.aayda-faydali-video-modal__caption {
  box-sizing: border-box;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 68px;
  margin: 0;
  padding: 21px 12px calc(21px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  font-size: var(--aayda-typography-size-16);
  font-weight: var(--aayda-typography-weight-bold);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  color: var(--aayda-colors-text-on-brand, #ffffff);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(22, 22, 22, 0.72);
}

/* The frame's own placement, on a phone at least as tall as the frame. A tablet keeps the centred
   player: at its width a 16:9 player 283px down would run past the bottom bar. */
@media (max-width: 767px) and (min-height: 854px) {
  .aayda-faydali-video-modal__player {
    top: 283px;
    transform: none;
  }
}

/* ===========================================================================
 * Bug-fix-3 (2026-11-23): this page's cards as the photo and news cards (.aayda-news-page__card).
 *
 * YouTube's still (hqdefault, 480 × 360) is 4:3 with the 16:9 picture between two black bars, 12.5% of its
 * height each. Drawn a third taller than the picture box and centred, the bars fall outside the box, which
 * clips them, at every width. The editor's own cover is drawn as before. Only the poster (the media box's
 * own <img>, or the one inside its <picture> for a stored cover), never the play icon's.
 *
 * From 1416px the card keeps the photo card's fill, so its 2px white stroke shows (the white fill hid it),
 * and takes the news card's hover: a white card, the picture's 300ms crop (the same values; a YouTube still
 * the same zoom over its taller box) and "Ətraflı məlumat" opening by 4px in the link's hover colour.
 * =========================================================================== */
.aayda-faydali-melumatlar :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img).is-youtube-still {
  position: absolute;
  top: -16.667%;
  left: 0;
  height: 133.334%;
}

@media (min-width: 1416px) {
  .aayda-faydali-melumatlar .aayda-gallery__card {
    background: var(--aayda-colors-neutral-surface-subtle);
  }

  .aayda-faydali-melumatlar :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > 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;
  }

  .aayda-faydali-melumatlar :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img).is-youtube-still {
    top: -16.667%;
    height: 133.334%;
  }

  .aayda-faydali-melumatlar .aayda-gallery__card-more {
    gap: 0;
    transition: gap 300ms ease-out, width 300ms ease-out, color 300ms ease-out;
  }

  .aayda-faydali-melumatlar .aayda-gallery__card:hover,
  .aayda-faydali-melumatlar .aayda-gallery__card:focus-visible {
    background: var(--aayda-colors-base-white);
  }

  .aayda-faydali-melumatlar .aayda-gallery__card:hover :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img),
  .aayda-faydali-melumatlar .aayda-gallery__card:focus-visible :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img) {
    top: -3.67%;
    left: -8.44%;
    width: 116.89%;
    height: 107.35%;
  }

  .aayda-faydali-melumatlar .aayda-gallery__card:hover :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img).is-youtube-still,
  .aayda-faydali-melumatlar .aayda-gallery__card:focus-visible :is(.aayda-gallery__card-media > img, .aayda-gallery__card-media > .aayda-picture > img).is-youtube-still {
    top: -21.565%;
    height: 143.134%;
  }

  .aayda-faydali-melumatlar .aayda-gallery__card:hover .aayda-gallery__card-more,
  .aayda-faydali-melumatlar .aayda-gallery__card:focus-visible .aayda-gallery__card-more {
    width: 140px;
    gap: var(--aayda-numbers-spacing-4);
    color: var(--aayda-colors-news-link-hover);
  }
}

/*
  From 1416px (desktop frame 1440 × 900): a 70px title bar across the top — the title on the left,
  the close control on the right — and the 1056 × 594 player centred below it, rounded 12px. The
  panel is the frame's size at most; on a smaller or shorter window the player narrows, keeping a 32px
  margin each side and 16:9, and is centred in the space under the bar. On a window at least as tall
  as the frame it sits where the frame puts it: 107px under the bar, 177px from the top.
*/
@media (min-width: 1416px) {
  /* Bug-fix 4, correction 36 — the modal is the whole window, as Figma's frame (6470:24182, black,
     Blur/XL) is the whole 1440 × 900 screen. The panel was held to 1440 × 900, so on a larger window
     the page showed through, greyed, on both sides of it; it now covers the window. */
  .aayda-faydali-video-modal:not([hidden]) {
    align-items: center;
    background: #000;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
  }

  .aayda-faydali-video-modal__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .aayda-faydali-video-modal__header {
    position: relative;
    top: auto;
    right: auto;
    box-sizing: border-box;
    flex: none;
    gap: var(--aayda-numbers-spacing-16);
    justify-content: space-between;
    width: 100%;
    height: 70px;
    padding: 10px 32px;
    overflow: hidden;
    background: #191919;
  }

  .aayda-faydali-video-modal__title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: var(--aayda-typography-size-18);
    font-weight: var(--aayda-typography-weight-medium);
    line-height: var(--aayda-typography-line-height-18);
    letter-spacing: var(--aayda-typography-letter-spacing-18);
    color: var(--aayda-colors-text-on-brand, #ffffff);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .aayda-faydali-video-modal__player {
    position: relative;
    top: auto;
    flex: none;
    /* Correction 36: as wide as the window allows — 32px from each side — unless its 16:9 height would
       not fit under the 70px bar with 24px above and below; then as wide as that height allows. The
       fixed 1056px left wide black bands beside the video. Never distorted: the box keeps 16:9. */
    width: min(calc(100% - 64px), calc((100vh - 70px - 48px) * 16 / 9));
    max-height: calc(100% - 70px - 48px);
    margin: auto 0;
    border-radius: 12px;
    transform: none;
  }

  .aayda-faydali-video-modal__caption {
    display: none;
  }
}

/* Reduced motion: the cards' hover preview (bug-fix 4) appears at once. The modal itself has no
   animation, and nothing is hidden. */
@media (prefers-reduced-motion: reduce) {
  .aayda-faydali-melumatlar .aayda-video-preview {
    transition: none;
  }
}
