/* AZB Ads — reklam slotları. Premium minimalizm: kiçik «Reklam» etiketi,
   kvadrat künclər (yalnız bağla düyməsi dairə), böyük qırmızı fon yoxdur.
   Yer aspect-ratio ilə əvvəlcədən ayrılır → CLS yoxdur. */

.azb-ad { display: none; }
html.azb-ads-js .azb-ad { display: flex; justify-content: center; margin: 0; }
.azb-ad[hidden] { display: none !important; }
/* Məqalə mətninin (.prose) serif şrifti, sətir hündürlüyü və link xətti reklama keçməsin. */
.azb-ad { font-family: var(--font-brand); font-size: 15px; line-height: 22px; }
.azb-ad a, .azb-ad a:hover, .azb-ad a * { text-decoration: none; }
/* Banner həmişə konteynerin (kontent sütunu, yan panel) tam eninə oturur, hündürlük
   seçilmiş ölçünün nisbətindəndir: kənarlar səhifə ilə bir xəttdə, boş zolaq qalmır. */
.azb-ad__inner { position: relative; width: 100%; display: flex; flex-direction: column; gap: 4px; }
.azb-ad__label {
  font-family: var(--font-brand); font-size: 10px; line-height: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
}
.azb-ad__box {
  position: relative; width: 100%; aspect-ratio: var(--azb-dw) / var(--azb-dh);
  overflow: hidden; background: var(--surface-sunken); container-type: size;
}
.azb-ad.is-filled .azb-ad__box { background: transparent; }
.azb-ad__img, .azb-ad__img picture { display: block; width: 100%; height: 100%; }
.azb-ad__img img { width: 100%; height: 100%; object-fit: cover; }
.azb-ad__code { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.azb-ad__code > * { max-width: 100%; }
.azb-ad__shadow { position: absolute; inset: 0; }
.azb-ad__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Yerləşmələr: hər səhifə növündə eyni ritm, sıx və simmetrik boşluqlar. */
.azb-ad-row--top { padding-top: 24px; }
.azb-ad-row--top.azb-ad-row--home { padding-top: 28px; }
.azb-ad-row--bottom { margin-top: -24px; padding-bottom: 32px; }
.home-main > .azb-ad--middle { margin-block: -8px; }
.prose > .azb-ad { padding-block: 6px; }
.azb-ad--middle:is(.grid-3 > *, .grid-4 > *, .feed > *) { grid-column: 1 / -1; }
.popular > .azb-ad--side { padding-top: 16px; }
@media (min-width: 901px) {
  .azb-ad--sticky { position: sticky; top: 24px; }
  .azb-ad--no-d { display: none !important; }
}

/* Mobil */
@media (max-width: 900px) {
  .azb-ad--no-m { display: none !important; }
  .azb-ad__box { aspect-ratio: var(--azb-mw) / var(--azb-mh); }
  .azb-ad-row--top, .azb-ad-row--top.azb-ad-row--home { padding-top: 16px; }
  .azb-ad-row--bottom { margin-top: -16px; padding-bottom: 24px; }
  .home-main > .azb-ad--middle { margin-block: -4px; }

  /* Yapışqan alt bar: ekranın altında sabit, bağlana bilir, keçid animasiyası layout-a toxunmur. */
  html.azb-ads-js .azb-ad--mobile_sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-float);
    transform: translateY(110%); transition: transform 220ms ease-out; visibility: hidden;
  }
  html.azb-ads-js .azb-ad--mobile_sticky.is-shown { transform: none; visibility: visible; }
  .azb-ad--mobile_sticky .azb-ad__inner { flex-direction: row; align-items: center; justify-content: center; gap: 8px; width: 100%; }
  .azb-ad--mobile_sticky .azb-ad__label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9px; letter-spacing: 0.1em; }
  .azb-ad--mobile_sticky .azb-ad__box { width: min(100% - 60px, calc(var(--azb-mw) * 1.15px)); }
  body.azb-sticky-on { padding-bottom: 72px; }
}
.azb-ad--mobile_sticky:not(.is-shown) .azb-ad__close { display: none; }
.azb-ad__close {
  flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-btn, 6px); background: var(--surface); color: var(--ink); cursor: pointer; order: 3;
}
.azb-ad__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .azb-ad--mobile_sticky { transition: none !important; } }

/* Daxili reklam (öz kurslarımız). Container query ilə slot ölçüsünə uyğunlaşır. */
.azb-house {
  position: absolute; inset: 0; display: grid; align-content: center; gap: 8px; padding: 20px 24px;
  background: var(--bg); color: var(--ink); text-decoration: none; border: 1px solid var(--line);
}
.azb-house:hover { text-decoration: none; }
.azb-house:hover .azb-house__cta { background: var(--buy-hover); }
.azb-house:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.azb-house--dark { background: var(--bg); border-color: transparent; background-image: url(../../../themes/azb/assets/img/patterns/pattern-monoqram-inverse.svg); }
.azb-house__kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.azb-house__dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--brand-nar); }
.azb-house__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 28px; color: var(--ink); text-wrap: balance; }
.azb-house__text { font-size: 14px; line-height: 20px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.azb-house__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.azb-house__price { font-family: var(--font-mono); font-size: 20px; font-weight: 500; }
.azb-house__cta { pointer-events: none; white-space: nowrap; }

/* Uzun, alçaq slotlar (leaderboard, mobil banner): bir sətir. */
@container (max-height: 130px) {
  .azb-house { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 20px; }
  .azb-house__title { font-size: 20px; line-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .azb-house__text { display: none; }
  .azb-house__foot { padding-top: 0; border-top: 0; }
}
@container (max-height: 130px) and (max-width: 420px) {
  .azb-house { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 6px 10px; }
  .azb-house__kicker, .azb-house__price { display: none; }
  .azb-house__title { font-size: 15px; line-height: 19px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .azb-house__cta { padding: 6px 12px; font-size: 12px; }
}
@container (max-height: 60px) {
  .azb-house__title { -webkit-line-clamp: 1; font-size: 14px; }
}
/* Kvadrata yaxın (300×250, 336×280). */
@container (min-height: 131px) and (max-height: 320px) {
  .azb-house { align-content: end; }
  .azb-house__title { font-size: 22px; line-height: 26px; }
  .azb-house__text { -webkit-line-clamp: 2; }
}
/* Hündür (300×600, 160×600). */
@container (min-height: 321px) {
  .azb-house { align-content: end; padding: 28px 24px; gap: 14px; }
  .azb-house__title { font-size: 30px; line-height: 34px; }
  .azb-house__text { -webkit-line-clamp: 6; font-size: 15px; line-height: 22px; }
  .azb-house__foot { flex-direction: column; align-items: stretch; }
  .azb-house__cta { justify-content: center; }
}
@container (min-height: 321px) and (max-width: 200px) {
  .azb-house { padding: 20px 14px; }
  .azb-house__title { font-size: 22px; line-height: 26px; }
}
/* Geniş billboard (970×250). */
@container (min-width: 700px) and (min-height: 131px) {
  .azb-house { grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: 40px; padding: 28px 40px; }
  .azb-house__kicker, .azb-house__title, .azb-house__text { grid-column: 1; }
  .azb-house__title { font-size: 34px; line-height: 38px; }
  .azb-house__foot { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; align-items: stretch; border-top: 0; padding-top: 0; }
}

/* Razılıq paneli: sakit, bərabər çəkili iki düymə (Nar yoxdur). */
.azb-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 760px; margin-inline: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float);
}
.azb-consent__inner { display: flex; gap: 24px; align-items: flex-end; padding: 20px 24px; }
.azb-consent__title { margin: 0 0 6px; font-size: 15px; line-height: 20px; font-weight: 700; }
.azb-consent__text p { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.azb-consent__text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.azb-consent__actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 900px) {
  .azb-consent { left: 8px; right: 8px; bottom: 8px; }
  .azb-consent__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .azb-consent__actions > * { flex: 1; justify-content: center; }
}
.azb-consent-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.azb-consent-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- In-page video (format «inpage»): 16:9, poster dərhal, Neft fon ---------- */
.azb-ad--inpage .azb-ad__box { background: #111214; }
.azb-vid { position: absolute; inset: 0; background: #111214; color: #fff; overflow: hidden; }
.azb-vid__media { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.azb-vid__sound, .azb-vid__play {
  position: absolute; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.azb-vid__sound { left: 12px; bottom: 14px; width: 36px; height: 36px; border-radius: var(--radius-btn, 6px); background: rgba(17, 18, 20, 0.72); }
.azb-vid .azb-vid__on, .azb-vid.is-sound .azb-vid__off { display: none; }
.azb-vid.is-sound .azb-vid__on { display: inline; }
.azb-vid__play { left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: var(--radius-btn, 6px); background: var(--buy, #C1121F); box-shadow: 0 8px 24px rgba(17, 18, 20, 0.3); }
.azb-vid__play[hidden] { display: none; }
.azb-vid__sound:focus-visible, .azb-vid__play:focus-visible, .azb-vid__cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.azb-vid__cta {
  position: absolute; right: 12px; bottom: 14px; padding: 8px 14px; border-radius: 6px; background: #fff; color: #111214;
  font-family: var(--font-brand); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap;
}
.azb-vid__cta:hover { background: #EDEBE8; }
.azb-vid__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.18); pointer-events: none; }
.azb-vid__progress > span { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
@media (max-width: 900px) {
  .azb-vid__play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .azb-vid__cta { right: 8px; bottom: 10px; padding: 6px 10px; font-size: 12px; }
  .azb-vid__sound { left: 8px; bottom: 10px; width: 32px; height: 32px; }
}

/* ---------- Background skin (format «background»), yalnız desktop ----------
   Seçim body-nin əvvəlində sinxron edilir: <1100 px-də heç nə yoxdur; zolaq ≥1100 px,
   tərəflər ≥1280 px. Skin aktivdirsə body-nin birbaşa övladları 1280 px sütuna yığılır
   (temada vahid .site sarğısı olmadığı üçün; :where — temanın öz fonları üstün qalır),
   tərəflər sütunun kənarındakı boşluğu tutur və heç vaxt kontentin üstünə düşmür. */
.azb-skin, .azb-skin__side { display: none; }
.azb-skin__band { display: block; position: relative; width: 100%; max-width: 1280px; margin: 0 auto; overflow: hidden; background: var(--azb-skin-bg, #EDEBE8); }
.azb-skin__band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.azb-skin__label {
  position: absolute; top: 6px; z-index: 1; padding: 2px 6px; background: rgba(247, 246, 244, 0.86); color: #5E5A55;
  font-family: var(--font-brand); font-size: 10px; line-height: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.azb-skin__band .azb-skin__label { right: 8px; }
.azb-skin__side--l .azb-skin__label { right: 8px; }
.azb-skin__side--r .azb-skin__label { left: 8px; }
@media (min-width: 1100px) {
  html.azb-skin-on .azb-skin:not([hidden]) { display: block; }
}
@media (min-width: 1280px) {
  html.azb-skin-on body { background-color: var(--azb-skin-bg, #EDEBE8); }
  :where(html.azb-skin-on) body > :where(:not(.azb-skin, script, style, link, noscript, template, #wpadminbar, .skip-link, .azb-ad--mobile_sticky, .azb-consent)) {
    max-width: 1280px; margin-left: auto; margin-right: auto; background-color: var(--bg);
  }
  html.azb-skin-on .azb-skin__side {
    display: block; position: fixed; top: var(--wp-admin--admin-bar--height, 0px); bottom: 0; z-index: 1; overflow: hidden;
  }
  html.azb-skin-on .azb-skin__side--scroll { position: absolute; bottom: auto; height: 100vh; }
  .azb-skin__side--l { left: 0; right: calc(50% + 640px); }
  .azb-skin__side--r { left: calc(50% + 640px); right: 0; }
  .azb-skin__side img { position: absolute; top: 0; width: var(--azb-skin-w, 320px); max-width: none; height: auto; }
  .azb-skin__side--l img { right: 0; }
  .azb-skin__side--r img { left: 0; }
}
@media print { .azb-skin { display: none !important; } }
