/* ═══════════════════════════════════════════════════════════════
   MSP Industrial Blog – Custom CSS
   Ładowany po Google Fonts i przed Tailwind inline-config.
   Nie nadpisuje klas Tailwind, uzupełnia je o własne właściwości.
═══════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #F8F9FA;
  color: #1A1D23;
}

h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  letter-spacing: -0.01em;
}

img { height: auto; }

/* ── Accessibility: skip link ─────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: #F2994A;
  color: #1E2229;
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 1rem; }

/* ── Hero overlay gradient ────────────────────────────────── */
.hero-overlay {
  background: linear-gradient(
    to right,
    rgba(30, 34, 41, 0.92) 0%,
    rgba(30, 34, 41, 0.70) 55%,
    rgba(30, 34, 41, 0.20) 100%
  );
}

/* ── Accent bar na nagłówkach sekcji ──────────────────────── */
.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: #F2994A;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 2px;
}

/* ── Aktywny link w TOC ──────────────────────────────────── */
.toc-link.active {
  color: #F2994A;
  font-weight: 600;
}

/* ── Tabela specyfikacji technicznej ──────────────────────── */
.spec-table {
  border-collapse: collapse;
  width: 100%;
}
.spec-table th,
.spec-table td {
  width: 50%;
  padding: 10px 14px;
  vertical-align: top;
  border: 1px solid #E5E7EB;
  line-height: 1.5;
}
.spec-table thead th {
  background: #1E2229;
  color: #F2994A;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.spec-table tbody tr:nth-child(even) td { background: #F3F4F6; }
.spec-table tbody tr:hover td          { background: #FEF3E8; }
.spec-table td:first-child             { font-weight: 600; color: #374151; }

/* ── Prose content (treść artykułu) ──────────────────────── */
.prose-content p {
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: #374151;
}
.prose-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: #1A1D23;
  line-height: 1.2;
}
.prose-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #1A1D23;
  line-height: 1.25;
}
.prose-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: #F2994A;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 2px;
}
.prose-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.25rem;
}
.prose-content ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.75;
}
.prose-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F2994A;
}
.prose-content ol {
  counter-reset: msp-ol;
  list-style: none;
  padding: 0;
  margin-bottom: 1.25rem;
}
.prose-content ol li {
  counter-increment: msp-ol;
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.75;
}
.prose-content ol li::before {
  content: counter(msp-ol) '.';
  position: absolute;
  left: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  color: #F2994A;
  font-size: 1rem;
}
.prose-content blockquote {
  border-left: 4px solid #F2994A;
  padding: 1rem 1.25rem;
  background: #FEF3E8;
  border-radius: 0 6px 6px 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: #4B5563;
}
.prose-content a {
  color: #F2994A;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-content a:hover {
  color: #D4782A;
}
.prose-content strong { color: #1A1D23; }
.prose-content table  { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.prose-content table th,
.prose-content table td {
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  font-size: 0.875rem;
  vertical-align: top;
}
.prose-content table th {
  background: #1E2229;
  color: #F2994A;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prose-content table tbody tr:nth-child(even) td { background: #F9FAFB; }
.prose-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem auto;
  display: block;
}
.prose-content figure { margin: 1.5rem 0; }
.prose-content figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: #9CA3AF;
  margin-top: 0.5rem;
}
.prose-content code {
  background: #F3F4F6;
  color: #1E2229;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}
.prose-content pre {
  background: #1E2229;
  color: #F3F4F6;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.prose-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
}
.prose-content hr {
  border: none;
  border-top: 2px solid #F2994A;
  margin: 2.5rem 0;
  opacity: 0.4;
}

/* ── WordPress core: align classes ───────────────────────── */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ── WordPress: gallery ───────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.gallery-item img { border-radius: 6px; width: 100%; height: auto; }

/* ── WP Comment form ──────────────────────────────────────── */
#respond h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1A1D23;
}
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #1A1D23;
  transition: border-color 0.15s;
}
#respond input:focus,
#respond textarea:focus {
  outline: none;
  border-color: #F2994A;
  box-shadow: 0 0 0 3px rgba(242, 153, 74, 0.15);
}
#respond input[type="submit"] {
  background: #F2994A;
  color: #1E2229;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
#respond input[type="submit"]:hover { background: #D4782A; }

/* ── WP Pagination ────────────────────────────────────────── */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.15s;
  margin: 0 2px;
  text-decoration: none;
}
.page-numbers:hover      { border-color: #F2994A; color: #F2994A; }
.page-numbers.current    { background: #F2994A; color: #1E2229; border-color: #F2994A; font-weight: 700; }
.page-numbers.dots       { border: none; }

/* ── Custom logo wrapper ──────────────────────────────────── */
.custom-logo-link img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Mobile tweaks ────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-overlay {
    background: rgba(30, 34, 41, 0.85);
  }
  .prose-content h2 { font-size: 1.5rem; }
  .prose-content h3 { font-size: 1.25rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
