/* ==========================================================================
   PROPOSALS – Beige Light Theme + Warianty Gallery + Prev/Next Nav
   Overrides default light tokens to warm cream/sand for /warianty/* only.
   Dark theme inherits from klinika-redesign.css unchanged.
   ========================================================================== */

/* --- Beige light theme tokens (override) ---
   Scope to [data-theme="light"] ONLY. Overriding :root leaks the cream
   palette into dark mode (same specificity, loaded later than the dark
   token block), which left dark mode half-applied. Every page ships
   <html data-theme="light">, so light still gets the cream tokens. */
[data-theme="light"] {
  --surface-0:            #f5efe6;
  --surface-1:            #ebe3d4;
  --surface-2:            #ddd2bd;
  --surface-3:            #cdbfa3;

  --text-primary:         #2a2a2a;
  --text-secondary:       #4a463e;
  --text-muted:           #6e6755;
  --text-inverse:         #f5efe6;

  --accent-primary:       #1d8a7d;
  --accent-secondary:     #61a229;
  --accent-amber:         #B58E3A;

  --color-teal:           #1d8a7d;
  --color-teal-deep:      #0a4f4a;

  --shadow-sm:            0 1px 3px rgba(60, 50, 30, 0.08), 0 1px 2px rgba(60, 50, 30, 0.05);
  --shadow-md:            0 4px 16px rgba(60, 50, 30, 0.10), 0 2px 6px rgba(60, 50, 30, 0.06);
  --shadow-lg:            0 10px 40px rgba(60, 50, 30, 0.14), 0 4px 12px rgba(60, 50, 30, 0.08);
  --shadow-xl:            0 24px 64px rgba(60, 50, 30, 0.18), 0 8px 24px rgba(60, 50, 30, 0.10);

  --glass-bg:             rgba(255, 252, 245, 0.65);
  --glass-border:         rgba(60, 50, 30, 0.10);
}

html,
body {
  background: var(--surface-0);
  color: var(--text-primary);
}

/* Hero mesh background — warmer tones for beige theme.
   Variants combine .hero-section + .hero-mesh-bg on the SAME element,
   so we must override the default abs-positioned overlay treatment. */
section.hero-mesh-bg,
[data-theme="light"] section.hero-mesh-bg {
  position: relative;
  inset: auto;
  animation: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(29, 138, 125, 0.10), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(181, 142, 58, 0.12), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(97, 162, 41, 0.08), transparent 50%),
    var(--surface-0);
}

/* Hero text in beige theme — ensure readable on cream background */
[data-theme="light"] .hero-section .hero-title,
[data-theme="light"] .hero-content .hero-title {
  color: var(--text-primary);
}
[data-theme="light"] .hero-section .hero-subtitle,
[data-theme="light"] .hero-content .hero-subtitle {
  color: var(--text-secondary);
}
[data-theme="light"] .hero-title .highlight {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tagline pill — make "lepiej zapobiegać niż leczyć" prominent */
.tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(29, 138, 125, 0.10);
  border: 1px solid rgba(29, 138, 125, 0.25);
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  margin-bottom: 1.5rem;
}

.tagline-pill::before {
  content: "+";
  font-weight: 900;
  font-size: 1rem;
  color: var(--accent-primary);
}

.tagline-prominent {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.2;
  color: var(--accent-primary);
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent-primary);
  background: rgba(29, 138, 125, 0.06);
  border-radius: 0 12px 12px 0;
}

.tagline-prominent em {
  font-style: normal;
  color: var(--text-primary);
  font-weight: 800;
}

/* Brand logo in nav */
.brand-logo {
  display: inline-flex;
  align-items: center;
  height: 44px;
  color: var(--text-primary);
}
.brand-logo svg,
.brand-logo img {
  height: 100%;
  width: auto;
  display: block;
}
.site-header .brand-logo img {
  max-height: 40px;
}
.site-footer .footer-brand img {
  max-height: 36px;
  width: auto;
  display: block;
  margin-bottom: 0.75rem;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Footer text contrast on navy bg */
.site-footer .footer-company,
.site-footer .footer-tagline {
  color: rgba(255, 255, 255, 0.70);
}
.site-footer .footer-company strong,
.site-footer .footer-tagline strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

/* Force light-theme logo PNG in dark site-header */
[data-theme="dark"] .site-header .brand-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Lock brand-logo size — prevent oversized img */
.site-header .brand-logo {
  height: 40px;
  max-width: 180px;
  overflow: hidden;
}
.site-header .brand-logo img {
  height: 100%;
  width: auto;
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
}

/* Hero inline form variant */
.hero-form {
  background: var(--surface-1);
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.hero-form h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.hero-form p.muted {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* Warianty gallery */
.warianty-page {
  min-height: 100vh;
  background: var(--surface-0);
  padding: 4rem 1.5rem;
}
.warianty-page .container {
  max-width: 1100px;
  margin: 0 auto;
}
.warianty-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.warianty-page .lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 0 3rem;
  line-height: 1.6;
}
.warianty-page .feedback-recap {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}
.warianty-page .feedback-recap h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-primary);
}
.warianty-page .feedback-recap ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}
.warianty-page .feedback-recap li {
  margin: 0.25rem 0;
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.variant-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.variant-card:hover,
.variant-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
  outline: none;
}
.variant-card .vc-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}
.variant-card .vc-name {
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
}
.variant-card .vc-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(29, 138, 125, 0.12);
  color: var(--accent-primary);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}
.variant-card .vc-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.variant-card .vc-cta {
  margin-top: 1rem;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Prev / Next nav at bottom of each variant */
.variant-nav {
  position: sticky;
  bottom: 0;
  z-index: 50;
  background: var(--surface-1);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -8px 24px rgba(60, 50, 30, 0.08);
}
.variant-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
}
.variant-nav a,
.variant-nav .vn-disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--surface-0);
  border: 1px solid var(--glass-border);
  transition: background 0.15s ease, transform 0.15s ease;
}
.variant-nav a:hover {
  background: rgba(29, 138, 125, 0.10);
  border-color: var(--accent-primary);
}
.variant-nav .vn-prev {
  justify-self: start;
}
.variant-nav .vn-next {
  justify-self: end;
}
.variant-nav .vn-center {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.variant-nav .vn-center strong {
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: block;
}
.variant-nav .vn-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.variant-nav .vn-up {
  color: var(--accent-primary);
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .variant-nav-inner {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .variant-nav .vn-center {
    display: none;
  }
  .variant-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Variant header banner with name + return-to-warianty link */
.variant-banner {
  background: var(--accent-primary);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.variant-banner a {
  color: #fff;
  text-decoration: underline;
}
.variant-banner strong {
  margin-right: 0.5rem;
}

/* Inline insurance section — for variants that highlight ubezpieczenia */
.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.insurance-grid article {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
}
.insurance-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--accent-primary);
}
.insurance-grid p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bento — force 6 tiles symmetric for variants that want service-count match */
.bento-grid--six {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.bento-grid--six > article {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem;
}
@media (max-width: 800px) {
  .bento-grid--six {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .bento-grid--six {
    grid-template-columns: 1fr;
  }
}

/* Letter from founder — readable long-form */
.founder-letter {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.7;
}
.founder-letter p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.founder-letter .sig {
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 1.5rem;
  color: var(--accent-primary);
}

/* Honest disclosure line — replaces marketing absolutes */
.honest-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ==========================================================================
   BLOG ARTICLE LAYER
   Layout + typography for long-form article pages (/blog/<slug>/ and
   /proposals/<slug>/). These classes come from the article template and had
   no definitions anywhere; loaded after klinika-redesign.css/components.css
   so .container-narrow can override .container's max-width.
   ========================================================================== */

.container-narrow {
  max-width: calc(72ch + 2 * var(--container-padding));
}

.blog-article-section {
  padding-block: var(--space-8);
}

.blog-article-section:first-of-type {
  padding-top: var(--space-10);
}

/* --- Table of contents --- */
.blog-toc {
  padding: var(--space-8);
  margin-bottom: var(--space-4);
}

.blog-toc-title {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-4);
}

.blog-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.blog-toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-toc-list a:hover,
.blog-toc-list a:focus-visible {
  color: var(--accent-primary);
}

/* --- Prose --- */
.blog-prose {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--text-secondary);
}

.blog-prose p {
  margin: 0 0 var(--space-5);
}

.blog-prose p:last-child {
  margin-bottom: 0;
}

.blog-prose strong {
  color: var(--text-primary);
}

.blog-prose a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-primary) 40%, transparent);
  text-underline-offset: 3px;
}

.blog-prose a:hover {
  text-decoration-color: var(--accent-primary);
}

.blog-prose h3,
.blog-h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--text-primary);
  margin: var(--space-8) 0 var(--space-4);
}

.blog-article-section .section-title {
  margin-bottom: var(--space-6);
}

/* --- Lists --- */
.blog-list {
  margin: 0 0 var(--space-5);
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.blog-list ::marker {
  color: var(--accent-primary);
}

.blog-list-checks {
  list-style: none;
  padding-left: 0;
}

.blog-list-checks > li {
  padding-left: 1.7em;
  position: relative;
}

.blog-list-checks > li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 700;
}

/* --- Callout box --- */
.blog-callout {
  padding: var(--space-6) var(--space-8);
  margin: 0 0 var(--space-6);
  border-left: 3px solid var(--accent-primary);
}

.blog-callout > :last-child {
  margin-bottom: 0;
}

/* --- Tables --- */
.blog-table-wrap {
  padding: var(--space-4);
  margin: 0 0 var(--space-6);
  overflow-x: auto;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}

.blog-table th,
.blog-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.blog-table thead th {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.blog-table tbody tr:last-child th,
.blog-table tbody tr:last-child td {
  border-bottom: none;
}

.blog-table tbody th {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-table-total th,
.blog-table-total td {
  border-top: 2px solid var(--accent-primary);
  color: var(--text-primary);
  font-weight: 700;
}

/* --- Checklist card --- */
.blog-checklist {
  padding: var(--space-8);
}

.blog-checklist > :last-child {
  margin-bottom: 0;
}

/* --- Author box --- */
.blog-author-box {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
  margin-top: var(--space-8);
}

.blog-author-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: var(--text-lg);
}

.blog-author-name {
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
}

.blog-author-role,
.blog-author-bio {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

/* --- Related articles --- */
.blog-related {
  padding-bottom: var(--space-16);
}

@media (max-width: 720px) {
  .blog-toc,
  .blog-checklist,
  .blog-callout,
  .blog-author-box {
    padding: var(--space-5);
  }

  .blog-prose {
    font-size: var(--text-base);
  }

  .blog-table th,
  .blog-table td {
    padding: var(--space-2) var(--space-3);
  }
}
