/* Podstrony w nowym stylu (WWW-006). Ładowane po nowa.css.
   Obsługują klasy treści z dotychczasowych podstron, więc treść przeniesiono bez przepisywania. */

:root { --muted: var(--ink-soft); --display: var(--font-display); }

/* ---------- Nagłówek podstrony ---------- */
.page-hero, .projects-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: #fff; padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px); }
.page-hero::before, .projects-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(900px 420px at 85% -10%, rgba(37,189,127,.28), transparent 60%),
  radial-gradient(600px 300px at 0% 110%, rgba(245,196,90,.18), transparent 60%); }
.page-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.page-hero h1, .projects-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); max-width: 18ch; margin: 14px 0 0; }
.projects-hero h1 span { color: var(--sun); }
.page-hero .eyebrow, .projects-hero .eyebrow, .page-hero .section-eyebrow { color: var(--green); margin: 22px 0 0; }
.page-lead, .projects-intro p { font-size: 1.25rem; color: rgba(255,255,255,.88); margin-top: 20px; max-width: 40em; }
.projects-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; padding: 8px 0; }
.back-link:hover { color: #fff; text-decoration: underline; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.article-meta { color: rgba(255,255,255,.7); margin-top: 16px; font-size: 1rem; }

/* ---------- Przyciski ze starych podstron ---------- */
.btn-primary { background: var(--green); color: var(--ink); box-shadow: 0 12px 26px -12px rgba(37,189,127,.8); }
.btn-primary:hover { background: var(--green-hover); }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn-large { min-height: 62px; padding: 0 32px; font-size: 1.2rem; }
.page-hero .btn-ghost, .final-cta .btn-ghost, .projects-hero .btn-ghost { color: #fff; }

/* ---------- Sekcje treści ---------- */
.content-section { padding: clamp(40px, 5.5vw, 72px) 0; }
/* Sekcje z samym tekstem: jedna wyśrodkowana kolumna do czytania (bez pustej prawej połowy) */
.content-section > .wrap:not(:has(.fact-grid, .detail-card, .blog-grid, .calc-wrap, .steps)) { max-width: 880px; }
.content-section > .wrap:not(:has(.fact-grid, .detail-card, .blog-grid, .calc-wrap, .steps)) h2 { max-width: none; }
.content-section > .wrap:not(:has(.fact-grid, .detail-card, .blog-grid, .calc-wrap, .steps)) p,
.content-section > .wrap:not(:has(.fact-grid, .detail-card, .blog-grid, .calc-wrap, .steps)) .condition-list { max-width: none; }
.content-section.alt { background: var(--bg-alt); }
.content-section h2, .faq h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); max-width: 24ch; margin-bottom: 18px; }
.content-section h3 { font-size: 1.5rem; margin: 28px 0 10px; }
.content-section p { max-width: 46em; margin-bottom: 16px; }
.content-section p:last-child { margin-bottom: 0; }
.content-section ul:not([class]), .content-section ol:not([class]) { padding-left: 1.3em; margin: 0 0 18px; max-width: 46em; }
.content-section ul:not([class]) { list-style: disc; }
.content-section ol:not([class]) { list-style: decimal; }
.content-section li { margin: 6px 0; }
.content-section a:not(.btn):not(.blog-card) { color: var(--mint); font-weight: 600; }
.section-eyebrow { font: 600 1rem/1.2 var(--font-body); color: var(--mint); margin-bottom: 12px; }
.disclaimer { font-size: 1rem; color: var(--ink-soft); background: var(--panel); border-left: 4px solid var(--sun); padding: 14px 18px; border-radius: 0 12px 12px 0; margin-top: 24px; max-width: 46em; }
.content-section table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 1.05rem; background: var(--panel); border-radius: 14px; overflow: hidden; }
.content-section th, .content-section td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.content-section th { background: var(--ink); color: #fff; font-weight: 600; }

/* Liczby i fakty */
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0; }
.fact-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.fact-card .fact-value { font: 800 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--font-display); color: var(--green-dark); margin: 0 0 8px; }
.fact-card .fact-label { font-size: 1rem; color: var(--ink-soft); margin: 0; }

/* Karta urządzenia */
.detail-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 26px 0 0; }
.detail-card { min-height: 340px; }
.detail-card img { width: 100%; height: 0; min-height: 100%; object-fit: cover; } /* wysokość wyznacza tekst, zdjęcie wypełnia */
.detail-card > :not(img) { padding: clamp(22px, 3vw, 36px); }
.detail-card h3 { margin-top: 0; color: var(--ink); font-size: 1.8rem; }
.tech-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.tech-specs dt { font-size: .92rem; color: var(--ink-soft); }
.tech-specs dd { margin: 4px 0 0; font-weight: 600; }

/* Lista warunków */
.condition-list { display: grid; gap: 12px; margin: 22px 0; max-width: 46em; }
.condition-list li { position: relative; padding: 16px 18px 16px 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.condition-list li::before { content: "✓"; position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--ink); font-weight: 800; }

/* Kroki */
.content-section .steps { list-style: none; padding: 0; margin: 30px 0 0; }
.step-num { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: var(--ink); font: 800 1.4rem var(--font-display); margin-bottom: 18px; }
.content-section .step::before { content: none; }
.content-section .step h3 { margin-top: 0; }

/* FAQ */
.faq { padding: clamp(40px, 5.5vw, 72px) 0; }
.faq > .wrap { max-width: 880px; }
.faq-list { display: grid; gap: 12px; margin-top: 30px; max-width: 900px; }
.faq-item { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; }
.faq-item[open] { border-color: var(--green); }
.faq-item summary { cursor: pointer; list-style: none; padding: 22px 26px; font: 700 1.25rem/1.3 var(--font-display); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 2rem; line-height: 1; color: var(--green-dark); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item > :not(summary) { padding: 0 26px; color: var(--ink-soft); }
.faq-item > :last-child { padding-bottom: 24px; }

/* CTA końcowe */
.final-cta { background: var(--ink); color: #fff; text-align: center; padding: clamp(48px, 6vw, 84px) 0; position: relative; overflow: hidden; isolation: isolate; }
.final-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 360px at 50% 0%, rgba(37,189,127,.25), transparent 65%); }
.final-cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; margin: 0 auto; }
.final-cta-inner .hero-ctas, .final-cta-inner > .btn { justify-content: center; margin-top: 30px; }
.final-cta-note { color: rgba(255,255,255,.85); margin: 18px auto 0; font-size: 1.15rem; }
.final-cta-contact { margin-top: 10px; font-weight: 600; }
.final-cta-contact a { color: var(--sun); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 30px; }
.blog-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card-body { padding: 24px; display: grid; gap: 10px; }
.blog-card h2, .blog-card h3 { font-size: 1.45rem; margin: 0; }
.blog-card p { margin: 0; color: var(--ink-soft); }
.blog-card-meta { font-size: .95rem; color: var(--mint) !important; font-weight: 600; }
.article-body { max-width: 760px; margin-inline: auto; font-size: 1.2rem; line-height: 1.75; }
.article-body h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 44px 0 14px; }
.article-body h3 { font-size: 1.4rem; margin: 30px 0 10px; }
.article-body p, .article-body ul, .article-body ol { max-width: none; }
.article-body blockquote { margin: 26px 0; padding: 20px 24px; background: var(--mint-bg); border-left: 5px solid var(--green); border-radius: 0 14px 14px 0; font-weight: 500; }
.article-hero-img { width: 100%; max-width: 760px; margin: 0 auto 34px; border-radius: var(--r); aspect-ratio: 16/9; object-fit: cover; }

/* ---------- Kalkulator ---------- */
.calc-section { background: var(--bg-alt); }
.calc-wrap { max-width: 820px; }
#calc-form { background: var(--panel); border-radius: 26px; padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow); }
.calc-step h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 8px; }
.calc-step-label { font-weight: 600; color: var(--mint); margin-bottom: 8px; }
.calc-hint { font-size: 1rem; color: var(--ink-soft); margin: 8px 0 0; }
.calc-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.calc-option { position: relative; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 44px 14px 18px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.calc-option:hover { border-color: var(--green); transform: translateY(-2px); }
.calc-option-icon { font-size: 1.8rem; }
.calc-option-label { display: block; font-weight: 600; font-size: 1.15rem; }
.calc-option-sub { display: block; font-size: .95rem; color: var(--ink-soft); margin-top: 2px; }
.calc-option::after { content: ""; position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border: 2px solid var(--line); border-radius: 50%; }
.calc-option[aria-pressed="true"] { border-color: var(--green-dark); background: var(--mint-bg); box-shadow: inset 0 0 0 1px var(--green-dark); }
.calc-option[aria-pressed="true"]::after { content: "✓"; display: grid; place-items: center; background: var(--green-dark); border-color: var(--green-dark); color: #fff; font-weight: 800; font-size: .95rem; }
.calc-field { margin: 22px 0; }
.calc-field label { display: block; font-weight: 600; margin-bottom: 8px; }
.calc-field input:not([type="range"]):not([type="radio"]):not([type="checkbox"]), .calc-field select { width: 100%; min-height: 58px; border: 2px solid var(--line); border-radius: 14px; padding: 0 16px; font: 400 1.15rem var(--font-body); color: var(--ink); background: #fff; }
.calc-field input:focus, .calc-field select:focus { border-color: var(--green-dark); outline: none; box-shadow: 0 0 0 4px rgba(37,189,127,.2); }
.usage-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 20px; }
.usage-mode label { position: relative; margin: 0; }
.usage-mode input { position: absolute; opacity: 0; pointer-events: none; }
.usage-mode span { display: flex; min-height: 56px; align-items: center; justify-content: center; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; font-weight: 600; text-align: center; cursor: pointer; }
.usage-mode input:checked + span { border-color: var(--green-dark); background: var(--mint-bg); }
.usage-mode input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.usage-slider { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; }
.usage-slider input[type="range"] { width: 100%; height: 36px; accent-color: var(--green-dark); }
.usage-slider output { min-width: 150px; font: 800 1.5rem var(--font-display); text-align: right; }
.calc-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.calc-nav:has(.calc-next:only-child) { justify-content: flex-end; }
.calc-error { color: #8f2f1c; background: #fdeeea; padding: 12px 14px; border-radius: 12px; margin-top: 16px; }
.result-card { background: var(--ink); color: #fff; border-radius: var(--r); padding: 26px; margin-top: 18px; }
.result-card h3 { font-size: 1.5rem; margin: 0 0 10px; }
.result-note { color: rgba(255,255,255,.88); margin-top: 10px; }
.result-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.result-numbers div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 16px; }
.result-value { display: block; font: 800 1.8rem/1.1 var(--font-display); color: var(--green); }
.result-label { display: block; font-size: .95rem; color: rgba(255,255,255,.8); margin-top: 4px; }
.calc-inline-lead { margin-top: 34px; padding: clamp(22px, 3vw, 32px); border: 2px solid var(--green); border-radius: 22px; background: var(--mint-bg); }
.calc-lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 12px; }
.calc-lead-grid .calc-field { margin: 12px 0; }
.form-consent { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 1rem; line-height: 1.45; color: var(--ink-soft); margin: 14px 0; }
.form-consent input { width: 26px; height: 26px; margin: 0; accent-color: var(--green-dark); }
.form-status { padding: 12px 14px; border-radius: 12px; background: var(--mint-bg); margin: 12px 0; }
.form-status-error { background: #fdeeea; color: #8f2f1c; }

.page-hero .article-hero-img { margin: 40px 0 0; max-width: 760px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }

/* ---------- Realizacje (siatka i lightbox: css/gallery.css, ładowany później) ---------- */
.projects-hero.projects-hero { padding: clamp(40px, 6vw, 88px) 0 clamp(44px, 6vw, 80px); border: 0; }
.projects-hero.projects-hero h1 { max-width: 20ch; margin: 14px 0 0; }
.projects-hero.projects-hero h1 span { color: var(--sun); }
.projects-hero.projects-hero .eyebrow { margin-top: 22px; }
.projects-hero .projects-intro { margin-top: 20px; }
.projects-hero .projects-intro p { color: rgba(255,255,255,.88); font-size: 1.2rem; }
.projects-section { padding-bottom: clamp(56px, 8vw, 104px); }
.project-card h2 { font-size: 1.35rem; }
.projects-help, .projects-count { font-size: 1rem !important; }

/* ---------- Telefon ---------- */
@media (max-width: 900px) {
  .fact-grid, .tech-specs { grid-template-columns: 1fr; }
  .detail-card { grid-template-columns: 1fr; }
  .detail-card { min-height: 0; }
  .detail-card img { min-height: 0; height: auto; aspect-ratio: 4/3; }
  .page-hero h1, .projects-hero h1 { max-width: none; }
}
@media (max-width: 640px) {
  .calc-options, .usage-mode, .calc-lead-grid { grid-template-columns: 1fr; }
  .usage-slider { grid-template-columns: 1fr; gap: 8px; }
  .usage-slider output { text-align: left; }
  .calc-nav .btn { flex: 1; }
  .article-body { font-size: 1.12rem; }
  .content-section table { display: block; overflow-x: auto; }
}
