/* =============================================
   BLOG.CSS - artykuly (/artykuly/), wzorzec ukladu: Naukowa Przystan,
   kolory i fonty: tokeny Astronomii ze style.css
   ============================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blog-page :focus-visible {
  outline: 3px solid #f0b400;
  outline-offset: 3px;
}

.page-subtitle a,
.post-lead a,
.post-body a,
.post-note a,
.post-sources a,
.post-correction a,
.post-meta a {
  color: var(--clr-accent-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.page-subtitle a:hover,
.post-body a:hover,
.post-note a:hover,
.post-sources a:hover,
.post-correction a:hover {
  color: #7fe9ff;
  text-decoration-thickness: 2px;
}

/* ---------- okruszki ---------- */
.breadcrumbs { margin-bottom: 2rem; }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  font-size: 0.8rem;
  color: var(--clr-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: #56607d;
}

.breadcrumbs a { color: #b9c2dd; }
.breadcrumbs a:hover { color: var(--clr-accent-2); }
.breadcrumbs [aria-current="page"] { color: var(--clr-text); }

/* ---------- etykieta ---------- */
.badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border: 1px solid rgba(124, 92, 252, 0.45);
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.14);
  color: #cfc4ff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- pojedynczy wpis ---------- */
.container--text { max-width: 760px; }

.post {
  position: relative;
  z-index: 1;
  padding: 7.5rem 0 5rem;
  /* 26.10.2026: gora artykulu przepuszcza gwiazdy tla z fioletowa poswiata, ponizej naglowka ciemne tlo pod tekst */
  background:
    radial-gradient(ellipse 70% 420px at 50% 180px, rgba(124, 92, 252, 0.2) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(8, 10, 22, 0) 0, rgba(8, 10, 22, 0.55) 360px, rgba(8, 10, 22, 0.97) 620px);
}

.post-header { margin-bottom: 2rem; }

.post-title {
  margin: 1rem 0 1.1rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.post-lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: #d4d9ee;
}

.post-meta {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: #9aa4c2;
}

.post-figure { margin: 0 0 2rem; }

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
}

.post-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #9aa4c2;
}

.post-summary {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  border-radius: 10px;
}

.post-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.post-summary-head h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent-2);
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #9aa4c2;
}

.reading-time svg { flex: none; }

.post-summary ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.post-summary li { margin-bottom: 0.4rem; }
.post-summary li:last-child { margin-bottom: 0; }
.post-summary li::marker { color: var(--clr-accent); }

.post-toc {
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.5rem;
  border: 1px solid var(--clr-border);
  border-radius: 10px;
}

.post-toc-title {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent-2);
}

.post-toc ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2 16rem;
  column-gap: 2rem;
}

.post-toc li { margin-bottom: 0.35rem; break-inside: avoid; }
.post-toc li::marker { color: var(--clr-accent); }
.post-toc a { color: inherit; text-decoration: none; }
.post-toc a:hover,
.post-toc a:focus-visible { color: var(--clr-accent-2); text-decoration: underline; }
.post-body h2[id] { scroll-margin-top: 6rem; }

.post-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #dfe3f3;
}

.post-body h2 {
  margin: 2.6rem 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  line-height: 1.25;
  color: var(--clr-text);
}

.post-body h3 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.3;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body figure { margin-bottom: 1.25rem; }

.post-body ul { list-style: disc; padding-left: 1.4rem; }
.post-body ol { list-style: decimal; padding-left: 1.6rem; }
.post-body li { margin-bottom: 0.45rem; }
.post-body li::marker { color: var(--clr-accent-2); }
.post-body strong { color: var(--clr-text); }

.post-body blockquote {
  padding: 0.25rem 0 0.25rem 1.2rem;
  border-left: 3px solid var(--clr-gold);
  color: #e9e2c8;
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.post-note {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--clr-border);
  font-size: 0.92rem;
  color: #aab3cf;
}

/* ---------- baner prenumeraty (przed zrodlami) ---------- */
.post-subscribe {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(0, 212, 255, 0.05) 60%, transparent),
    var(--clr-surface-2);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.6rem;
}

.post-subscribe-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.5rem;
}

/* trzy okladki wachlarzem, kazda to link do swojego numeru: w HTML od lewej, srodkowa na wierzchu,
   wskazana myszka albo klawiatura wychodzi na wierzch */
.post-subscribe-covers {
  position: relative;
  width: 152px;
  height: 128px;
}

.post-subscribe-covers a {
  position: absolute;
  top: 10px;
  z-index: 1;
  display: block;
  width: 76px;
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
}

.post-subscribe-covers img { display: block; width: 100%; height: auto; border-radius: 3px; }

.post-subscribe-covers a:nth-child(1) { left: 0; transform: rotate(-9deg); }
.post-subscribe-covers a:nth-child(2) { top: 0; left: 34px; z-index: 2; width: 84px; }
.post-subscribe-covers a:nth-child(3) { right: 0; transform: rotate(9deg); }
.post-subscribe-covers:hover a:nth-child(1) { transform: rotate(-13deg) translateX(-5px); }
.post-subscribe-covers:hover a:nth-child(2) { transform: translateY(-4px); }
.post-subscribe-covers:hover a:nth-child(3) { transform: rotate(13deg) translateX(5px); }
.post-subscribe-covers a:hover,
.post-subscribe-covers a:focus-visible { z-index: 3; }
.post-subscribe-covers a:focus-visible { outline: 2px solid var(--clr-accent-2); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .post-subscribe-covers a { transition: none; }
}

@media (max-width: 540px) {
  .post-subscribe { grid-template-columns: minmax(0, 1fr); }
  .post-subscribe-covers { justify-self: center; }
}

.post-subscribe-title {
  flex: 1 1 100%;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-text);
}

.post-subscribe-text {
  flex: 1 1 22rem;
  margin: 0;
  font-size: 0.92rem;
  color: #aab3cf;
}

.post-subscribe .btn-primary { flex: 0 0 auto; }

.post-sources {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--clr-border);
}

.post-sources h2 {
  margin-bottom: 0.8rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.post-sources ol {
  list-style: decimal;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: #aab3cf;
}

.post-sources li { margin-bottom: 0.5rem; }
.post-sources a { overflow-wrap: anywhere; }

.post-correction {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: #9aa4c2;
}

.post-back { margin-top: 3rem; }

/* ---------- lista artykulow ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.75rem;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  transition: border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.article-card:hover {
  border-color: rgba(124, 92, 252, 0.55);
  transform: translateY(-3px);
}

.article-card:has(:focus-visible) {
  outline: 3px solid #f0b400;
  outline-offset: 3px;
}

.article-card :focus-visible { outline: none; }

.article-card-visual {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--clr-surface);
}

.article-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.article-card:hover .article-card-visual img { transform: scale(1.03); }

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.4rem 1.5rem 1.5rem;
}

.article-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.article-status {
  font-size: 0.8rem;
  color: #9aa4c2;
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.3;
}

.article-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.article-card-body > p:not([class]) {
  font-size: 0.95rem;
  color: #c2c9e0;
}

.article-read {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-accent-2);
}

.article-source {
  margin-top: auto;
  font-size: 0.8rem;
  color: #8f99b8;
}

@media (max-width: 600px) {
  .post { padding-top: 6.5rem; }
  .post-lead { font-size: 1.08rem; }
  .post-body { font-size: 1.02rem; }
  .post-summary { padding: 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .article-card,
  .article-card-visual img { transition: none; }
  .article-card:hover,
  .article-card:hover .article-card-visual img { transform: none; }
}

/* ---------- zdjecia w tresci + powiekszanie (blog-lightbox.js) ---------- */
.post-inline { margin: 2rem 0; }

.post-inline img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
}

.post-inline figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #9aa4c2;
}

a.zoom {
  position: relative;
  display: block;
  cursor: zoom-in;
  border-radius: 12px;
}

a.zoom:focus-visible { outline: 2px solid var(--clr-accent-2); outline-offset: 3px; }

.zoom-hint {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(3, 4, 10, 0.72);
  color: #e6ebff;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

a.zoom:hover .zoom-hint,
a.zoom:focus-visible .zoom-hint { opacity: 1; }

@media (hover: none) {
  .zoom-hint { opacity: 0.85; }
}

html.lightbox-open { overflow: hidden; }
/* iOS Safari ignoruje overflow:hidden na html; JS ustawia top:-scrollY i przywraca pozycje przy zamknieciu */
html.lightbox-open body { position: fixed; left: 0; right: 0; width: 100%; }

dialog.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e6ebff;
}

dialog.lightbox::backdrop { background: rgba(3, 4, 10, 0.94); }

.lightbox-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 1rem 1.25rem;
  box-sizing: border-box;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
  border-radius: 6px;
  cursor: default;
}

.lightbox-cap {
  max-width: 60rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #b9c2de;
  text-align: center;
}

.lightbox-btn {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(230, 235, 255, 0.25);
  border-radius: 50%;
  background: rgba(3, 4, 10, 0.6);
  color: #e6ebff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible { border-color: var(--clr-accent-2); color: #fff; }

.lightbox-close { top: 0.75rem; right: 0.75rem; }
.lightbox-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox-btn[hidden] { display: none; }

@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 0.75rem; transform: none; }
  .lightbox-figure { padding-bottom: 4rem; }
}
