/* Small CR-011/016/024/025/031/032 overrides on top of prod CSS.
   Desktop layout stays the same except intended contrast tweaks. */

/* CR-016: LCP hero <img> painted like the existing cover background */
.amp-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
  pointer-events: none;
}
body.home .amp-hero--cover .amp-hero-photo,
body.page-id-103 .amp-hero--cover .amp-hero-photo {
  object-position: 72% center;
}
.amp-hero-overlay,
.amp-hero-content {
  z-index: 1;
}
@media (max-width: 768px) {
  .amp-hero--cover .amp-hero-photo {
    object-position: center center;
  }
}

/* CR-011: "Two directions" cards stack on narrow phones */
@media (max-width: 640px) {
  .amp-cat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* CR-024: opaque mobile menu (prod uses #fffffffa + blur) */
@media (max-width: 1280px) {
  .amp-main-nav {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* CR-025: 44px tap targets on small screens + sticky action bar */
.amp-mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 920;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--amp-gray-200, #e2e8f0);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
}
@media (max-width: 768px) {
  .amp-nav-list a,
  .amp-lang-btn,
  .amp-lang-dropdown a,
  .amp-footer-links a,
  .amp-footer-bar-links a {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
  }
  .amp-lang-btn,
  .amp-nav-list a,
  .amp-lang-dropdown a,
  .amp-footer-links a,
  .amp-footer-bar-links a {
    display: inline-flex;
    align-items: center;
  }
  .amp-site {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  .amp-mobile-dock {
    display: flex;
  }
}
.amp-mobile-dock__btn {
  flex: 1 1 0;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--amp-gray-200, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: var(--amp-dark, #232d55);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.amp-mobile-dock__btn--primary {
  background: var(--amp-primary, #055aa0);
  border-color: var(--amp-primary, #055aa0);
  color: #fff;
}

/* CR-031: raise contrast on stats labels, news dates, footer legal links */
.amp-stat-label {
  color: #f8fafc;
}
.amp-stat-tag {
  color: #bfdbfe;
}
.amp-news-card time {
  color: #475569;
}
.amp-footer-bar {
  color: #e2e8f0;
}
.amp-footer-bar-links a {
  color: #e2e8f0;
}

/* CR-032: footer heading level change keeps the existing h4 look */
.amp-footer-col h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin: 0 0 16px;
}

/* RU desktop header (>=1281px): the six RU menu labels (829px at 15px/14px padding)
   did not fit next to the logo inside the 1200px container and spilled ~25px onto
   the logo. Compact RU-only nav sizing; burger breakpoint (<=1280px) unchanged.
   Approved by Pavel Anisimov, 2026-10-26 (audit "Fix A"). */
@media (min-width: 1281px) {
  html[lang="ru"] .amp-nav-list {
    gap: 0;
  }
  html[lang="ru"] .amp-nav-list a {
    padding: 10px 9px;
    font-size: 14px;
  }
  html[lang="ru"] .amp-header-inner {
    gap: 16px;
  }
}

/* Burger menu (<=1280px): long submenu labels (DE/FR/ES ORTOLEKS categories)
   wrap inside their row instead of running past the highlighted background. */
@media (max-width: 1280px) {
  .amp-nav-list .sub-menu a {
    white-space: normal;
    line-height: 1.35;
    height: auto;
    min-height: 44px;
    overflow-wrap: anywhere;
  }
}
