/*
Theme Name: Prawo Jazdy Test Pro
Theme URI: https://prawojazdytestpro.pl
Author: Prime Minds AI
Author URI: https://primeminds-ai.co.uk
Description: Motyw do testów na prawo jazdy kategorii B — baza pytań, płatny pełny test WooCommerce. Niezależna pomoc do nauki, niepowiązana z żadnym WORD ani infoCar.pl.
Version: 2.1.0
Requires PHP: 7.4
License: Proprietary
Text Domain: pjtestpro
*/

/* ==========================================================
   PRAWO JAZDY TEST PRO — tokeny designu
   Barwy narodowe: biel i czerwień, na tle grafitowym.
   Sygnaturowy motyw: trójkątny znak ostrzegawczy.
   ========================================================== */
:root {
  --graphite: #1f2226;
  --graphite-deep: #14161a;
  --panel: #f6f6f4;
  --line: #e2e0da;
  --red: #d4213d;
  --red-deep: #a8182f;
  --red-pale: #fce9ec;
  --white: #ffffff;
  --muted: #5b6068;
  --pass: #2f8f5b;
  --fail: #c1443f;
  --radius: 8px;
  --font-display: 'Barlow', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- Sygnatura: pasek biało-czerwony ---------- */
.pl-stripe { height: 8px; background: linear-gradient(90deg, var(--white) 50%, var(--red) 50%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Typografia ---------- */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 800; line-height: 1.15; color: var(--graphite); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: 12px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 640px; }

/* ---------- Header ---------- */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 68px; gap: 10px 18px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; color: var(--graphite); display: flex; align-items: center; gap: 12px; white-space: nowrap; flex-shrink: 0; line-height: 1; }
.brand:hover { color: var(--graphite); }
.brand .brand-logo { width: 40px; height: 40px; display: block; flex-shrink: 0; }
.main-nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; flex-basis: 100%; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 12px; }
.main-nav a { color: var(--graphite); font-size: 0.92rem; font-weight: 700; white-space: nowrap; }
.main-nav a:hover { color: var(--red); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--graphite); font-size: 1.3rem; padding: 6px 12px; border-radius: 6px; cursor: pointer; }

/* ---------- Przyciski ---------- */
.btn { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 1rem; padding: 13px 28px; border-radius: var(--radius); border: 2px solid var(--red); cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.btn--solid { background: var(--red); color: var(--white); }
.btn--solid:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--red); }
.btn--ghost:hover { background: var(--red-pale); }
.btn--wide { width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero { padding: 78px 0 62px; background: var(--panel); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--red); }
.hero-actions { display: flex; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta { margin-top: 22px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; }

.sign-card { background: var(--white); border: 3px solid var(--graphite); border-radius: 14px; padding: 28px; box-shadow: 8px 8px 0 var(--graphite); }
.sign-card .sc-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--red); padding-bottom: 12px; margin-bottom: 16px; }
.sign-card .sc-title { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.sign-card .sc-tri { width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 28px solid var(--red); }
.sign-card .sc-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sign-card .sc-row strong { color: var(--graphite); }
.sign-card .sc-pass { margin-top: 16px; text-align: center; font-family: var(--font-display); font-size: 1.4rem; color: var(--pass); border: 3px dashed var(--pass); border-radius: 8px; padding: 8px; }

/* ---------- Sekcje ---------- */
.section { padding: 64px 0; }
.section--panel { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 38px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { color: var(--graphite); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .unit-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--red); background: var(--red-pale); padding: 3px 10px; border-radius: 4px; display: inline-block; margin-bottom: 12px; text-transform: uppercase; }
.card--blue { border-left: 5px solid #1155a4; }
.card--blue .unit-tag { background: #e8f0fa; color: #1155a4; }

/* ---------- Komunikat / zastrzeżenie ---------- */
.notice { background: var(--red-pale); border: 2px solid var(--red); border-radius: var(--radius); padding: 18px 22px; font-size: 0.93rem; color: #6b1a26; }
.notice strong { color: #8a1e2e; }

/* ---------- Cennik ---------- */
.price-card { text-align: center; position: relative; background: var(--white); }
.card-icon { width: 68px; height: 68px; margin: 0 auto 14px; }
.card-icon img { width: 100%; height: 100%; display: block; }
.price-card--featured { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.price-tag { font-family: var(--font-display); font-size: 2.7rem; font-weight: 800; color: var(--graphite); margin: 10px 0; }
.price-tag small { font-size: 1rem; color: var(--muted); }
.price-card ul { list-style: none; margin: 16px 0 24px; text-align: left; }
.price-card ul li { padding: 8px 0 8px 26px; border-bottom: 1px dashed var(--line); font-size: 0.92rem; color: var(--muted); position: relative; }
.price-card ul li::before { content: '✓'; position: absolute; left: 2px; color: var(--red); font-weight: 700; }
.flag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--red); color: var(--white); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 14px; border-radius: 4px; white-space: nowrap; }

/* ---------- Silnik quizu ---------- */
.quiz-shell { max-width: 760px; margin: 0 auto; }
.quiz-status { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.quiz-status .q-timer { color: var(--red); }
.quiz-progress { height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; margin-bottom: 26px; border: 1px solid var(--line); }
.quiz-progress .bar { height: 100%; width: 0%; background: var(--red); transition: width 0.25s ease; }

.q-card { background: var(--white); border: 2px solid var(--graphite); border-radius: var(--radius); padding: 30px; }
.q-unit { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--red); text-transform: uppercase; display: block; margin-bottom: 12px; }
.q-image { display: block; width: 160px; height: 160px; margin: 0 auto 22px; }
.q-text { font-size: 1.2rem; font-weight: 600; line-height: 1.45; margin-bottom: 22px; color: var(--graphite); }
.q-options { list-style: none; }
.q-options li { margin-bottom: 12px; }
.q-opt { width: 100%; text-align: left; background: var(--panel); border: 2px solid var(--line); color: var(--graphite); border-radius: 8px; padding: 14px 18px; font-family: var(--font-body); font-size: 1rem; cursor: pointer; display: flex; gap: 14px; align-items: baseline; }
.q-opt:hover { border-color: var(--red); }
.q-opt .opt-key { font-family: var(--font-mono); color: var(--red); font-weight: 700; }
.q-opt.is-correct { border-color: var(--pass); background: rgba(47,143,91,0.1); }
.q-opt.is-wrong { border-color: var(--fail); background: rgba(193,68,63,0.1); }
.q-opt:disabled { cursor: default; opacity: 0.9; }
.q-feedback { margin-top: 16px; font-size: 0.94rem; color: var(--muted); border-left: 3px solid var(--red); padding-left: 14px; display: none; }
.q-actions { margin-top: 24px; display: flex; justify-content: flex-end; }

.result-card { background: var(--panel); border: 2px solid var(--graphite); border-radius: 14px; padding: 40px; text-align: center; }
.result-score { font-family: var(--font-display); font-size: 4rem; font-weight: 800; color: var(--graphite); line-height: 1; }
.result-verdict { font-family: var(--font-display); font-size: 1.6rem; margin: 14px 0; padding: 10px; border: 3px dashed; border-radius: 8px; display: inline-block; }
.result-verdict.pass { color: var(--pass); border-color: var(--pass); }
.result-verdict.fail { color: var(--fail); border-color: var(--fail); }
.result-breakdown { margin: 24px auto 0; max-width: 420px; text-align: left; font-family: var(--font-mono); font-size: 0.84rem; }
.result-breakdown .rb-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.result-breakdown .rb-row strong { color: var(--graphite); }
.result-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.review-list { list-style: none; margin-top: 28px; text-align: left; }
.review-list li { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--fail); border-radius: 8px; padding: 18px; margin-bottom: 14px; font-size: 0.94rem; }
.review-list li .rv-q { font-weight: 600; margin-bottom: 8px; color: var(--graphite); }
.review-list li .rv-a { color: var(--muted); }
.review-list li .rv-a strong { color: var(--pass); }

.gate-card { max-width: 620px; margin: 0 auto; text-align: center; background: var(--panel); border: 3px solid var(--graphite); border-radius: 14px; padding: 46px 32px; }
.gate-card .gate-icon { font-size: 3rem; margin-bottom: 14px; }
.gate-card p { color: var(--muted); margin: 14px 0 24px; }

/* ---------- Poradnik ---------- */
.guide-toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 38px; }
.guide-toc ol { margin-left: 22px; }
.guide-section { margin-bottom: 46px; }
.guide-section h2 { color: var(--red); border-bottom: 3px solid var(--graphite); padding-bottom: 10px; margin-bottom: 18px; }
.guide-section p, .guide-section li { color: #2c2f33; }
.guide-section ul { margin: 14px 0 14px 24px; }

/* ---------- Strony treściowe ---------- */
.entry { padding: 60px 0; }
.entry-content { max-width: 760px; }
.entry-content p { margin-bottom: 18px; color: #2c2f33; }
.entry-content h2 { margin: 32px 0 14px; color: var(--red); }
.entry-content ul, .entry-content ol { margin: 0 0 18px 24px; color: #2c2f33; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--white); overflow: hidden; }
.faq-item summary { padding: 18px 22px; cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 48px; }
.faq-item summary::after { content: '+'; position: absolute; right: 20px; top: 14px; font-family: var(--font-mono); font-size: 1.4rem; color: var(--red); }
.faq-item[open] summary::after { content: '–'; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form input, .contact-form textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--graphite); padding: 13px 16px; font-family: var(--font-body); font-size: 1rem; margin-bottom: 16px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.contact-form label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- Newsletter ---------- */
.newsletter-box { background: var(--graphite); border-radius: 16px; padding: 46px 40px; text-align: center; }
.newsletter-box .eyebrow { color: var(--red); }
.newsletter-box h2, .newsletter-box p { color: var(--white); }
.newsletter-box .lede { color: #b3b6ba; margin: 12px auto 28px; }
.newsletter-form { display: flex; gap: 12px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] { flex: 1; min-width: 220px; background: #2a2d32; border: 1px solid #40434a; border-radius: 8px; color: var(--white); padding: 13px 16px; font-family: var(--font-body); font-size: 1rem; }
.newsletter-form input[type="email"]::placeholder { color: #8a8d92; }
.newsletter-form input[type="email"]:focus { outline: 2px solid var(--red); border-color: var(--red); }
.newsletter-note { margin-top: 16px; font-size: 0.82rem; color: #8a8d92; }
.newsletter-status { margin: 0 auto 20px; max-width: 460px; padding: 12px 16px; border-radius: 8px; font-size: 0.92rem; }
.newsletter-status.is-sent { background: rgba(47,143,91,0.15); border: 1px solid var(--pass); color: #b8e6cc; }
.newsletter-status.is-error { background: rgba(193,68,63,0.15); border: 1px solid var(--fail); color: #f5c2c0; }

/* ---------- Opinie / testimonials ---------- */
.testimonial-card { border-top: 4px solid var(--red); }
.testimonial-card p { font-style: italic; color: var(--muted); margin-bottom: 16px; }
.testimonial-card .t-name { font-weight: 700; color: var(--graphite); font-size: 0.9rem; }
.testimonial-disclaimer { text-align: center; color: var(--muted); font-size: 0.78rem; font-family: var(--font-mono); margin-top: 24px; }

/* ---------- WooCommerce ---------- */
.woocommerce-page .site-main { padding: 54px 0; }
.woocommerce ul.products li.product { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--font-display); color: var(--red); font-size: 1.15rem; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: var(--graphite); font-family: var(--font-display); font-size: 1.4rem; }
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #place_order { background: var(--red); color: var(--white); font-family: var(--font-display); font-weight: 700; border-radius: var(--radius); padding: 12px 24px; border: none; }
.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--red-deep); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--red); background: var(--panel); color: var(--graphite); }

/* ---------- Stopka ---------- */
.site-foot { background: var(--graphite); color: var(--white); padding: 46px 0 30px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; }
.foot-grid h3 { font-size: 1rem; color: var(--red); margin-bottom: 14px; display: flex; align-items: center; }
.foot-logo { width: 28px; height: 28px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.foot-grid ul { list-style: none; }
.foot-grid li { padding: 4px 0; }
.foot-grid a { color: #b3b6ba; font-size: 0.92rem; }
.foot-grid a:hover { color: var(--white); }
.foot-note { margin-top: 34px; padding-top: 18px; border-top: 1px solid #33363b; font-family: var(--font-mono); font-size: 0.72rem; color: #85888c; }

/* ---------- Responsywność ---------- */
@media (max-width: 880px) {
  .hero .wrap, .grid-3, .grid-2, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 12px 0 18px; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .site-head .wrap { flex-wrap: wrap; }
}
