/*
Theme Name: Chirurg Naczyniowy Portal — optymalizacja
Theme URI: https://chirurg-naczyniowy.waw.pl/
Description: Ręczna warstwa wydajności, SEO i dostępności dla motywu Chirurg Naczyniowy Portal.
Author: GraySEO
Template: chirurg-naczyniowy-portal
Version: 1.0.0
Text Domain: chirurg-naczyniowy-portal-child
*/

/* Czytelniejsza nawigacja i pełna obsługa klawiatury. */
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a,
.nav-list a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.nav-list a,
.mobile-nav a,
.footer-grid nav a,
.deck-read,
.archive-link {
  transition: color .2s ease, text-decoration-color .2s ease;
}

.menu-toggle,
.topic-tabs button,
.search-form button {
  min-height: 44px;
  min-width: 44px;
}

/* Rezerwacja miejsca na obrazy usuwa skoki układu podczas ładowania. */
.post-hero {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e1ebe7;
}

.post-hero img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.card-image,
.category-photo,
.guide-image,
.intro-visual img,
.chapter-row img {
  background: #dce8e3;
}

/* Artykuły: wygodniejsze czytanie i odporność na szerokie tabele/media. */
.post-content > p,
.post-content > ul,
.post-content > ol,
.post-content > blockquote {
  max-width: 68ch;
}

.post-content :where(ul, ol) {
  padding-left: 1.35em;
}

.post-content :where(li + li) {
  margin-top: .55em;
}

.post-content :where(table) {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

.post-content :where(th, td) {
  padding: .75rem;
  border: 1px solid #cad9d4;
  text-align: left;
}

.post-content :where(h2, h3) {
  scroll-margin-top: 2rem;
}

.post-content :where(a) {
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

/* Sekcje poniżej pierwszego ekranu są renderowane dopiero tuż przed przewinięciem. */
.vascular-categories,
.report-articles,
.report-guide,
.vascular-faq,
.vascular-library,
.library-extra,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

@media (max-width: 900px) {
  .report-title-row h1 {
    white-space: normal;
  }

  .post-layout {
    width: min(100% - 32px, 1100px);
  }
}

@media (max-width: 700px) {
  .post-hero {
    aspect-ratio: 4 / 3;
    border-radius: 6px 30px 6px 30px;
  }

  .post-content {
    line-height: 1.72;
  }

  .breadcrumbs {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
