/* ===== PAGE ===== */
.page {
  padding-top: 12px;
}

/* ===== ARTICLE CARD ===== */
.article-card {
  background: #ffffff;
  max-width: 1599px;
  margin: 0 auto 32px auto;
  padding: 16px 16px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 20px;
  line-height: 1.6;  
  letter-spacing: 0.02em;
}

/* ===== META ===== */
.article-meta {
  text-align: right;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: #6b7280;
  margin-bottom: 16px;
}

.article-meta time {
  border-bottom: 1px solid #d8dbe2;
  padding-bottom: 3px;
}

/* ===== TITLE ===== */
.article-title {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0;
  font-weight: 700;
  color: #2a2f36;
}

.article-lead {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0;
  font-weight: 500;
  color: #2a2f36;
}

/* ===== SEPARATOR ===== */
.article-separator {
  border: none;
  height: 2px;
  background: #1864ab;
  margin-top: 10px;
  margin-bottom: 24px;
}

.article-1-separator {
  border: none;
  height: 1px;
  background: #1864ab;
  margin-top: 10px;
  margin-bottom: 16px;
}

/* ≥ 1024px */
@media (min-width: 1024px) {
  .article-card {
    padding: 20px;
  }
  .article-title {
    font-size: 30px;
  }
  .article-lead {
    font-size: 20px;
  }  
}

/* ≥ 1280px */
@media (min-width: 1280px) {
  .article-card {
    padding: 22px;
  }
  .article-lead {
    font-size: 22px;
  }   
}

/* ≥ 1600px */
@media (min-width: 1600px) {
  .article-card {
    padding: 24px;
  } 
}

/* ===== INTRO ===== */
.article-intro {
  margin-top: 28px;
}

/* ===== OBRAZ ===== */
.intro-media {
  float: none;
  margin: 0 0 16px 0;
}

.intro-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 10px;
}

/* ===== TEKST ===== */
.intro-text,
.intro-text-below {
  margin: 0;
}

.intro-text p,
.intro-text-below p {
  margin: 0 0 14px 0;
}

/* ===== ≥ 1024px ===== */
@media (min-width: 1024px) {

  /* OBRAZ PO LEWEJ – 50% */
  .intro-media {
    float: left;
    width: 50%;
    margin: 0 24px 14px 0;
  }

  /* 3 AKAPITY OBLEWAJĄCE */
  .intro-text {
    margin-top: 0;
  }

  /* 2 AKAPITY ZAWSZE POD OBRAZKIEM */
  .intro-text-below {
    clear: both;
    margin-top: 8px;
  }
}

/* ===== ≥ 1280px ===== */
@media (min-width: 1280px) {

  .intro-media {
    width: 35%;
    margin-right: 28px;
  }
}

/* ===== CLEAR FLOATS ===== */
.article-intro::after {
  content: "";
  display: block;
  clear: both;
}

/* ===== H2 – SEKCJE ARTYKUŁU ===== */
.article-h2 {
  margin: 24px 0 12px 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2a2f36;
  clear: both;
}

.article-h3{
    clear: both;
}

/* ≥ 1024px */
@media (min-width: 1024px) {
  .article-h2 {
    font-size: 24px;
    margin-top: 24px;
  }
}

/* ≥ 1280px */
@media (min-width: 1280px) {
  .article-h2 {
    font-size: 26px;
    margin-top: 28px;
  }
}

/* ===== SEKCJA Z OBRAZKIEM PO PRAWEJ ===== */
.article-section-image-right {
  margin-top: 32px;
}

/* OBRAZ */
.section-media-right {
  float: none;
  margin: 0 0 16px 0;
}

.section-media-right img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 10px;
}

/* ===== ≥ 1024px ===== */
@media (min-width: 1024px) {

  .section-media-right {
    float: right;
    width: 50%;
    margin: 0 0 14px 24px; /* KLUCZ: odstęp PO LEWEJ */
  }
}

/* ===== ≥ 1280px ===== */
@media (min-width: 1280px) {

  .section-media-right {
    width: 35%;
    margin-left: 28px;
  }
}

/* CLEAR FLOATS */
.article-section-image-right::after {
  content: "";
  display: block;
  clear: both;
}

/* ===== AUTOR ===== */
.article-author {
  margin: 16px 0;
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.author-photo {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #1864ab;
  object-fit: cover;
}

.author-info {
  flex: 1;
}

.author-name {
  margin: 0 0 6px 0;
  font-size: 19px;
  color: #2a2f36;
}

.author-name strong {
  font-weight: 700;
}

.author-bio {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: #545962;
}

/* ≥ 1024px */
@media (min-width: 1024px) {
  .author-card {
    gap: 18px;
  }
  
  .author-name {
    font-size: 20px;
  }
  
  .author-bio {
    font-size: 17px;
    line-height: 1.45;
  }
}

/* ===== LINKI W ARTYKULE ===== */
.article-card a {
  color: #1864ab;  
  transition: text-decoration 0.2s ease;
}

.article-card a:hover {
  text-decoration: none;
}

.article-card a:visited {
  color: #2c79b8;
}

.article-insert {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px 20px;
  background: #f8f9fa;
  border-left: 4px solid #4aa3df;
  border-radius: 4px;
  font-size: 18px;
}

/* ===== FAQ ===== */
.article-faq {
  margin-top: 36px;
  margin-bottom: 36px;
  padding: 20px;
  padding-top: 1px;
  background: #f8f9fa;
  border-left: 4px solid #4aa3df;
  border-radius: 4px;
}

.faq-item {
  margin-bottom: 24px;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  font-size: 21px;
  font-weight: 700;
  color: #2a2f36;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.faq-answer {
  font-size: 20px;
  line-height: 1.6;
  color: #2a2f36;
  margin: 0;
}

/* =====================================================
   ARTICLE FOOTER (3 KOLUMNY)
   ===================================================== */

.article-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e6ec;
  background: #fafbfc;
  font-size: 18px;
  line-height: 1.6;
  color: #2a2f36;
}

/* WRAPPER */
.article-footer-inner {
  max-width: 1599px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* KOLUMNA */
.footer-col {
  max-width: 520px;
}

/* TYTUŁ */
.footer-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
  color: #1f2937;
}

/* TEKST */
.footer-text {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #4a4f57;
}

/* LINKI */
.footer-links a,
.article-footer-inner a {
  color: #1864ab;
}

.footer-links a:hover,
.article-footer-inner a:hover {
  text-decoration: none;
}

/* DOLNA LINIA */
.article-footer-bottom {
  margin-top: 8px;
  padding: 16px;
  border-top: 1px solid #e2e6ec;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

/* =======================
   ≥ 1024px — 3 KOLUMNY
   ======================= */
@media (min-width: 1024px) {

  .article-footer-inner {
    grid-template-columns: 45% 30% 25%;
    gap: 32px;
  }

  .footer-col {
    max-width: none;
  }
}

.article-cta a,
.article-footer a,
.article-card a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ===== SEKCJA Z OBRAZKIEM PO LEWEJ ===== */
.article-section-image-left {
  margin-top: 32px;
  display: flow-root; /* zamyka floaty w sekcji */
}

/* FIGURE: kasujemy domyślne marginesy <figure> */
.article-section-image-left .section-media-left {
  margin: 0 0 16px 0;
  float: none;         /* mobile: obrazek nad tekstem */
  width: 100%;
}

.article-section-image-left .section-media-left img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ≥ 1024px: float + wrap (50%) */
@media (min-width: 1024px) {
  .article-section-image-left .section-media-left {
    float: left;
    width: 50%;
    margin: 0 24px 14px 0; /* top right bottom left */
  }
}

/* ≥ 1280px: 35% */
@media (min-width: 1280px) {
  .article-section-image-left .section-media-left {
    width: 35%;
    margin-right: 28px;
  }
}

.media-with-cta-left {
  float: left;
  max-width: 35%;
  margin: 0 20px 20px 0;
}

.media-with-cta-left .section-media-left {
  float: none;
  margin: 0;
  width: 100%;
}

.product-cta-below-image {
  text-align: center;
  margin-top: 15px;
  padding: 15px 0;
}

.btn-check-price {
  background-color: #d32f2f;
  color: white !important;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.95em;
}

.btn-check-price:hover {
  background-color: #b71c1c;
  color: white !important;
}

.cta-variants {
  font-size: 0.85em;
  color: #666;
  margin: 8px 0 0 0;
}

@media (max-width: 1023.99px) {
  .media-with-cta-left {
    float: none;
    max-width: 100%;
    margin: 20px 0;
  }
}

/* ===== SPIS TREŚCI (TOC) ===== */
.article-toc {
  margin: 24px 0;
  padding: 20px 24px;
  background: #f8f9fa;
  border-left: 4px solid #1864ab;
  border-radius: 4px;
}

.toc-header {
  font-size: 19px;
  font-weight: 700;
  color: #2a2f36;
  margin-bottom: 12px;
}

.article-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li {
  margin-bottom: 10px;
  padding-left: 0;
}

.article-toc li:last-child {
  margin-bottom: 0;
}

.article-toc a {
  color: #115293;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.5;
  display: block;  
  transition: color 0.2s ease;
}

.article-toc a:hover {
  color: #0d3c6b;
  text-decoration: underline;
}

/* ===== SCROLL OFFSET (żeby header nie zasłaniał nagłówków) ===== */
.article-h2,
.article-cta h2,
.article-faq h2 {
  scroll-margin-top: 80px;
}

/* ===== ≥ 1024px ===== */
@media (min-width: 1024px) {
  .toc-header {
    font-size: 20px;
  }
  
  .article-toc a {
    font-size: 19px;
  }
}

/* ===== FLOATING TOC BUTTON ===== */

/* Scroll offset dla spisu treści */
#toc {
  scroll-margin-top: 80px;
}

/* ===== FLOATING TOC BUTTON ===== */
.floating-toc-btn {
  position: fixed;
  right: 0;
  bottom: 80px;
  background: #1864ab;
  color: white !important;
  padding: 12px 6px;
  border-radius: 4px 0 0 4px; /* zaokrąglenia TYLKO z lewej */
  text-decoration: none;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  display: block; /* ZAWSZE widoczny */
}

.floating-toc-btn:hover {
  background: #0d3c6b;
  box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.3);
}

.floating-toc-text {
  writing-mode: vertical-rl; /* pionowy tekst */
  text-orientation: upright;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Desktop - trochę szerszy i z marginesem */
@media (min-width: 1024px) {
  .floating-toc-btn {
    right: 12px;
    padding: 16px 10px;
    border-radius: 4px; /* wszystkie rogi zaokrąglone */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .floating-toc-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
  }
  
  .floating-toc-text {
    font-size: 14px;
  }
}
