/* ============================================================
   Pomocnik dla Partnerów hrd.pl
   Paleta zgodna z ksc.hrd.pl. Pasek z logo BIAŁY (nie navy) —
   kontrast tylko na hero i w stopce.
   ============================================================ */

:root {
    --navy-900: #071a3d;
    --navy-800: #0b2350;
    --navy-700: #10305f;
    --blue-600: #0a5cbf;
    --blue-500: #1e6fd9;
    --blue-300: #7fb6f2;
    --blue-050: #eaf2fd;

    --ink:      #1b2a41;
    --ink-soft: #4d5f76;
    --line:     #dde6f2;
    --bg:       #ffffff;
    --bg-soft:  #f2f6fc;

    --amber-600: #b7791f;
    --amber-400: #f0b429;
    --amber-050: #fdf8ec;

    --radius:    14px;
    --radius-sm: 9px;
    --shadow:    0 2px 10px rgba(12, 40, 90, .06);
    --shadow-lg: 0 14px 40px rgba(8, 30, 70, .10);

    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: Poppins, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; color: var(--navy-900); font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue-600); }

.page-container { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--navy-900); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; }

.icon-sprite { display: none; }

/* ---------------- pasek środowiska testowego ----------------
   Do usunięcia razem z blokiem .env-bar w home.php, gdy serwis
   przeniesie się na docelowy adres pomoc.hrd.pl. */

.env-bar {
    background: var(--amber-050);
    border-bottom: 1px solid var(--amber-400);
    color: #6b4c12;
    font-size: .875rem;
    line-height: 1.45;
}
.env-bar .page-container { padding-top: .5rem; padding-bottom: .5rem; }
.env-bar strong { color: var(--amber-600); }
.env-bar a { color: #6b4c12; }

/* ---------------- pasek nawigacji ---------------- */

.main-nav {
    position: sticky; top: 0; z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s ease;
}
.main-nav.is-stuck { box-shadow: var(--shadow); }

.nav-container {
    max-width: var(--wrap); margin: 0 auto; padding: .55rem 1.25rem;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.navbar-brand { display: inline-flex; align-items: center; }
.navbar-brand img { display: block; height: 38px; width: auto; }

.navbar-toggler {
    margin-left: auto; display: none;
    width: 42px; height: 38px; padding: 0;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    cursor: pointer;
}
.navbar-toggler-icon,
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    display: block; width: 20px; height: 2px; margin: 0 auto;
    background: var(--navy-800); content: ''; position: relative;
}
.navbar-toggler-icon::before { top: -6px; }
.navbar-toggler-icon::after  { top: 4px; }

.nav-collapse { margin-left: auto; }
.navbar-nav { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-link {
    display: inline-block; padding: .5rem .8rem;
    color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500;
    border-radius: var(--radius-sm);
}
.nav-link:hover { background: var(--blue-050); color: var(--blue-600); }
.nav-link.nav-cta {
    background: var(--blue-600); color: #fff;
}
.nav-link.nav-cta:hover { background: var(--blue-500); color: #fff; }

@media (max-width: 860px) {
    .navbar-toggler { display: block; }
    .nav-collapse { flex-basis: 100%; margin-left: 0; display: none; }
    .nav-collapse.is-open { display: block; }
    .navbar-nav { flex-direction: column; align-items: stretch; padding: .5rem 0; }
    .nav-link { padding: .65rem .8rem; }
}

/* ---------------- hero ---------------- */

.section-hero {
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 55%, #14417f 100%);
    color: #fff;
    padding: 3.4rem 0 3.1rem;
}
.section-hero h1 { color: #fff; font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.5rem); margin-bottom: .8rem; }
.section-hero .lead {
    font-size: clamp(1rem, .95rem + .35vw, 1.13rem);
    font-weight: 300; color: #d6e4f8; max-width: 62ch; margin-bottom: 1.6rem;
}
.hero-badge {
    display: inline-block; margin-bottom: 1rem;
    background: rgba(127, 182, 242, .16); border: 1px solid rgba(127, 182, 242, .35);
    color: var(--blue-300);
    font-size: 13px; font-weight: 500; letter-spacing: .02em;
    padding: .3rem .8rem; border-radius: 999px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------------- przyciski ---------------- */

.button {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.3rem; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; font-family: inherit;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.button-primary { background: var(--blue-600); color: #fff; }
.button-primary:hover { background: var(--blue-500); }
.button-light { background: #fff; color: var(--navy-900); }
.button-light:hover { background: var(--blue-050); }
.button-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.button-ghost:hover { background: rgba(255, 255, 255, .12); }
.button-quiet { background: var(--bg-soft); color: var(--navy-800); border-color: var(--line); }
.button-quiet:hover { background: var(--blue-050); border-color: var(--blue-300); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------------- sekcja kafelków ---------------- */

.topics-section { padding: 3rem 0 3.4rem; background: var(--bg-soft); }

.section-heading { text-align: center; max-width: 60ch; margin: 0 auto 2.1rem; }
.section-heading h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
.section-heading p { color: var(--ink-soft); margin: 0; }
.heading-line { display: block; width: 54px; height: 3px; border-radius: 2px; background: var(--blue-600); margin: .7rem auto 1rem; }

.topic-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

/* nagłówek grupy kafelków — Partner ma od razu widzieć, którego panelu dotyczy sekcja */
.topic-group {
    display: flex; align-items: center; gap: .8rem;
    margin: 2.2rem 0 .9rem; font-size: .82rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.topic-group::after {
    content: ''; flex: 1; height: 1px; background: var(--line);
}
.topic-group:first-of-type { margin-top: .4rem; }

.topic-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start;
    gap: .45rem; padding: 1.3rem 1.3rem 2.6rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); cursor: pointer; text-align: left;
    font-family: inherit; color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue-300); }
.topic-card strong { font-size: 1.03rem; color: var(--navy-900); line-height: 1.3; }
.topic-card small { font-size: .875rem; color: var(--ink-soft); line-height: 1.5; }

.topic-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: .35rem;
    border-radius: 12px; background: var(--blue-050); color: var(--blue-600);
}
.topic-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.card-arrow {
    position: absolute; right: 1.3rem; bottom: 1.05rem;
    color: var(--blue-600); font-size: 1.15rem; line-height: 1;
    transition: transform .16s ease;
}
.topic-card:hover .card-arrow { transform: translateX(4px); }

.topics-extra { text-align: center; margin-top: 1.8rem; }
.topics-extra a { font-weight: 600; text-decoration: none; }
.topics-extra a:hover { text-decoration: underline; }

/* ---------------- karta procedury ---------------- */

.procedure-section { padding: 2.4rem 0 3.2rem; background: var(--bg-soft); min-height: 60vh; }
.procedure-topbar { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.procedure-home {
    align-self: flex-start; background: none; border: 0; padding: 0;
    color: var(--blue-600); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
}
.procedure-home:hover { text-decoration: underline; }
.eyebrow {
    margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--ink-soft);
}

.procedure-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.7rem 1.6rem;
}
.procedure-card h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.procedure-card p { color: var(--ink); }
.procedure-card .muted { color: var(--ink-soft); font-size: .93rem; }

.answer-list { display: flex; flex-direction: column; gap: .55rem; margin-top: 1.2rem; }
.answer-button {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; padding: .85rem 1.1rem; text-align: left;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; font-weight: 500; color: var(--navy-800); cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.answer-button:hover { border-color: var(--blue-500); background: var(--blue-050); transform: translateX(2px); }
.answer-button::after { content: '→'; color: var(--blue-600); }

.step-back {
    margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
    display: flex; gap: .6rem; flex-wrap: wrap;
}

.notice {
    border-left: 4px solid var(--blue-500); background: var(--blue-050);
    padding: .9rem 1.1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1rem 0;
}
.notice-warn { border-left-color: var(--amber-400); background: var(--amber-050); }
.notice p:last-child { margin-bottom: 0; }

/* Wartości do przepisania wprost (rekordy CAA, formaty kodów) — muszą
   dać się zaznaczyć i nie mogą rozpychać karty na telefonie. */
.procedure-card pre {
    margin: .8rem 0; padding: .8rem 1rem; overflow-x: auto;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: .87rem; line-height: 1.5; color: var(--navy-800);
}
.procedure-card code {
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px;
    padding: .05rem .3rem; font-size: .89em; word-break: break-word;
}
.procedure-card pre code { background: none; border: 0; padding: 0; }

/* ---------------- wynik diagnozy ---------------- */

.diag-box {
    margin: 1.2rem 0; padding: 1.1rem 1.25rem;
    background: var(--blue-050); border: 1px solid #cfe0f7; border-radius: var(--radius-sm);
}
.diag-box h3 { margin: 0 0 .7rem; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
.diag-list { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: .35rem 1.1rem; margin: 0; }
.diag-list dt { font-size: .87rem; color: var(--ink-soft); }
.diag-list dd { margin: 0; font-size: .92rem; color: var(--navy-800); word-break: break-word; }
@media (max-width: 520px) {
    .diag-list { grid-template-columns: 1fr; gap: .1rem .5rem; }
    .diag-list dd { margin-bottom: .5rem; }
}
/* Godzina kontroli i zakres — wynik bez nich jest nie do odtworzenia. */
.diag-time { margin: .7rem 0 0; font-size: .82rem; }

/* ---------------- tabela strefy DNS ---------------- */

.zone-wrap { margin: 1rem 0 1.2rem; }
.zone-wrap > .muted { margin-bottom: .5rem; font-size: .88rem; }
.zone-table {
    width: 100%; border-collapse: collapse; display: block; overflow-x: auto;
    font-size: .88rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.zone-table thead th {
    text-align: left; padding: .5rem .7rem; background: var(--bg-soft);
    font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.zone-table td { padding: .45rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.zone-table tbody tr:last-child td { border-bottom: 0; }
.zone-table td:first-child { font-weight: 600; color: var(--navy-800); white-space: nowrap; }
.zone-table td:nth-child(2) {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    word-break: break-all; min-width: 240px;
}
.zone-table td:last-child { color: var(--ink-soft); text-align: right; white-space: nowrap; }

/* ---------------- formularz zgłoszenia ---------------- */

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-size: .92rem; font-weight: 600; color: var(--navy-800); }
.field input, .field textarea {
    width: 100%; padding: .65rem .85rem;
    font: inherit; font-size: .95rem; color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { background: #fff; border-color: var(--blue-500); }
.field textarea { resize: vertical; min-height: 110px; }

/* zgoda na przetwarzanie danych */
.field-consent label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; cursor: pointer; }
.field-consent input { width: auto; margin-top: .2rem; flex-shrink: 0; }

/* pułapka na roboty — ukryta przed człowiekiem, widoczna dla automatu */
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.report-preview {
    margin: 0; padding: 1rem 1.15rem; overflow-x: auto;
    background: var(--navy-900); color: #d8e6fb;
    border-radius: var(--radius-sm);
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: .84rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}

/* ---------------- pasek ostrzegawczy ---------------- */

.payment-note {
    max-width: var(--wrap); margin: 2.4rem auto; padding: 1.3rem 1.5rem;
    display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
    background: var(--amber-050); border: 1px solid #f3e2bd; border-radius: var(--radius);
}
.payment-note h2 { font-size: 1.05rem; margin-bottom: .2rem; }
.payment-note p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.payment-note > div:nth-child(2) { flex: 1 1 320px; }
.payment-icon { color: var(--amber-600); flex-shrink: 0; }
.payment-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- stopka ---------------- */

.site-footer { background: var(--navy-900); color: #c8d7ee; margin-top: 0; padding: 2.6rem 0 1.4rem; }
.footer-grid {
    display: grid; gap: 1.8rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    padding-bottom: 1.8rem;
}
.footer-brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { margin-top: .8rem; font-size: .89rem; color: #9fb4d4; }
.site-footer h2 { font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: #fff; margin-bottom: .8rem; }
.site-footer nav a, .site-footer nav button {
    display: block; padding: .2rem 0; color: #c8d7ee; text-decoration: none;
    font-size: .9rem; background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.site-footer nav a:hover, .site-footer nav button:hover { color: #fff; text-decoration: underline; }
.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, .13); padding-top: 1.1rem;
    font-size: .82rem; color: #8fa6c8;
}
.footer-legal p { margin: .15rem 0; }
.footer-legal a { color: #c8d7ee; }

/* ---------------- animacja pojawiania ---------------- */

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .topic-card:hover { transform: none; }
}
