/* ==========================================================================
   NMED Gabinety – arkusz stylów
   Biel + zieleń. Motyw: warstwy skóry (naskórek, skóra właściwa, tkanka podskórna).
   ========================================================================== */

:root {
    --white: #FFFFFF;
    --mist: #F2F7F3;      /* tło sekcji */
    --sage: #DCEAE0;      /* linie, delikatne wypełnienia */
    --fern: #9CCBAE;      /* warstwa 2 */
    --leaf: #3E8E63;      /* akcent, linki */
    --pine: #1D4E3A;      /* kolor główny */
    --pine-deep: #153A2B;
    --ink: #17241D;       /* tekst */
    --muted: #55665C;

    --font-serif: "Spectral", Georgia, "Times New Roman", serif;
    --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: 1.6rem;
    --step-3: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
    --step-4: clamp(2.4rem, 1.6rem + 3vw, 4rem);

    --wrap: 1180px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --radius-lg: 28px;
    --radius-sm: 10px;
    --header-h: 76px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.15;
    color: var(--pine-deep);
    margin: 0 0 0.6em;
    text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine); }

:focus-visible {
    outline: 3px solid var(--leaf);
    outline-offset: 3px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    background: var(--pine); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip:focus { top: 1rem; }

.wrap {
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
}

.muted { color: var(--muted); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 38ch; }

/* ---------- Przyciski i linki ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 1.4rem;
    border-radius: 999px; border: 1.5px solid transparent;
    font: 600 var(--step--1)/1 var(--font-sans); letter-spacing: .01em;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--pine); color: var(--white); }
.btn-primary:hover { background: var(--pine-deep); color: var(--white); }
.btn-ghost { border-color: var(--sage); color: var(--pine); background: var(--white); }
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); }
.btn-light { background: var(--white); color: var(--pine); }
.btn-light:hover { background: var(--mist); color: var(--pine-deep); }
.btn-outline-light { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.link-arrow {
    font-weight: 600; text-decoration: none; color: var(--pine);
    border-bottom: 1.5px solid var(--fern); padding-bottom: 2px;
}
.link-arrow:hover { border-color: var(--pine); }
.links-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ---------- Nagłówek ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--sage);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark svg { display: block; width: 40px; height: 40px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font: 600 1.2rem/1.1 var(--font-serif); color: var(--pine-deep); }
.brand-text span { font-size: .8rem; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav > ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; display: flex; align-items: center; }
.site-nav a { text-decoration: none; }
.site-nav > ul > li > a {
    display: block; padding: .5rem .65rem; border-radius: 8px;
    color: var(--ink); font-size: .95rem; font-weight: 500;
}
.site-nav > ul > li > a:hover { color: var(--pine); background: var(--mist); }
.site-nav > ul > li > a[aria-current="page"] { color: var(--pine); box-shadow: inset 0 -2px 0 var(--leaf); border-radius: 0; }

.sub-toggle {
    width: 22px; height: 30px; margin-left: -.35rem; border: 0; background: none; cursor: pointer; color: var(--muted);
}
.sub-toggle::before {
    content: ""; display: block; width: 7px; height: 7px; margin: auto;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg);
    transition: transform .2s;
}
.sub-toggle[aria-expanded="true"]::before { transform: translateY(1px) rotate(-135deg); }

.sub {
    position: absolute; top: calc(100% + .4rem); left: 0; min-width: 260px;
    list-style: none; margin: 0; padding: .5rem;
    background: var(--white); border: 1px solid var(--sage); border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(21,58,43,.35);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .sub.is-open { opacity: 1; visibility: visible; transform: none; }
.sub a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border-radius: 8px; color: var(--ink); font-size: .95rem; }
.sub a span { color: var(--muted); font-size: .85rem; }
.sub a:hover { background: var(--mist); color: var(--pine); }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
    .nav-toggle {
        display: inline-flex; align-items: center; gap: .6rem;
        height: 44px; padding: 0 1rem; border: 1.5px solid var(--sage); border-radius: 999px;
        background: var(--white); color: var(--pine); font: 600 .9rem var(--font-sans); cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
        display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s;
    }
    .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bars::before { top: -6px; }
    .nav-toggle-bars::after { top: 6px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

    .site-nav {
        position: fixed; inset: var(--header-h) 0 0 0;
        flex-direction: column; align-items: stretch; gap: 1.5rem;
        padding: 1.5rem var(--gutter) 2rem; overflow-y: auto;
        background: var(--white);
        visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s;
    }
    .site-nav.is-open { visibility: visible; opacity: 1; }
    .site-nav > ul { flex-direction: column; }
    .site-nav > ul > li { flex-wrap: wrap; border-bottom: 1px solid var(--sage); }
    .site-nav > ul > li > a { flex: 1; padding: .9rem 0; font-size: 1.15rem; font-family: var(--font-serif); }
    .site-nav > ul > li > a[aria-current="page"] { box-shadow: none; color: var(--leaf); }
    .sub-toggle { width: 44px; height: 44px; margin: 0; }
    .sub {
        position: static; flex-basis: 100%; min-width: 0; padding: 0 0 .75rem;
        border: 0; box-shadow: none; display: none; opacity: 1; visibility: visible; transform: none;
    }
    .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; }
    .sub.is-open { display: block; }
    .nav-cta { align-self: flex-start; }
    body.nav-open { overflow: hidden; }
}

/* ---------- Warstwy skóry (motyw graficzny) ---------- */

.strata { line-height: 0; }
.strata svg { width: 100%; height: clamp(56px, 8vw, 120px); display: block; overflow: visible; }
.strata-light svg { height: clamp(40px, 6vw, 90px); }
.strata-light path { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.strata-light .s1 { stroke: var(--sage); }
.strata-light .s2 { stroke: var(--fern); }
.strata-light .s3 { stroke: var(--leaf); }

/* Jedyny ruch na stronie: warstwy „rysują się” po załadowaniu nagłówka. */
@media (prefers-reduced-motion: no-preference) {
    .hero .strata-light path,
    .page-hero .strata-light path,
    .page-head .strata-light path {
        stroke-dasharray: 1; stroke-dashoffset: 1;
        animation: strata-draw 1.8s cubic-bezier(.45, 0, .2, 1) forwards;
    }
    .strata-light .s2 { animation-delay: .18s !important; }
    .strata-light .s3 { animation-delay: .36s !important; }
}
@keyframes strata-draw { to { stroke-dashoffset: 0; } }
.strata-dark { background: var(--white); }
.strata-dark .s1 { fill: var(--sage); }
.strata-dark .s2 { fill: var(--leaf); }
.strata-dark .s3 { fill: var(--pine-deep); }
/* Gdy strona kończy się sekcją CTA, warstwy wyrastają z jej zieleni. */
body:has(main > .cta:last-child) .strata-dark { background: var(--pine); }
body:has(main > .cta:last-child) .strata-dark .s1 { fill: #2B6A4F; }
body:has(main > .cta:last-child) .strata-dark .s2 { fill: #22583F; }

.hero .strata, .page-hero .strata, .page-head .strata { margin-top: clamp(2.5rem, 6vw, 5rem); }
.hero + .section, .page-hero + .section, .page-head + .section { border-top: 0; }

/* ---------- Hero (strona główna) ---------- */

.hero { padding-top: clamp(2.5rem, 6vw, 5rem); background: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-cities { color: var(--leaf); font-weight: 500; font-size: var(--step--1); margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.8rem, 1.8rem + 4.2vw, 5.4rem); line-height: 1; margin-bottom: .35em; }
.hero-degree { display: block; font-size: .36em; font-style: italic; font-weight: 400; color: var(--leaf); letter-spacing: 0; margin-bottom: .35em; }
.hero-role { font: 400 var(--step-2)/1.3 var(--font-serif); color: var(--pine); margin-bottom: 1rem; }
.hero-photo { position: relative; }
.hero-photo::before {
    content: ""; position: absolute; inset: 8% -6% -6% 10%;
    border-radius: var(--radius-lg); background: var(--mist); z-index: -1;
}

/* ---------- Nagłówek podstron ---------- */

.page-hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.kicker { color: var(--leaf); font-weight: 600; font-size: var(--step--1); margin-bottom: 1rem; }
.page-hero h1 { margin-bottom: .4em; }

.page-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 { max-width: 18ch; }

/* ---------- Zdjęcia i placeholdery ---------- */

.media { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-sm); }
.media.rounded { border-radius: var(--radius-lg); }

.ph {
    position: relative; display: grid; place-items: center; overflow: hidden;
    background:
        repeating-linear-gradient(135deg, transparent 0 14px, rgba(62,142,99,.07) 14px 15px),
        var(--mist);
    border: 1.5px dashed var(--fern);
    color: var(--muted); text-align: center;
}
.ph-mark {
    font: 500 clamp(2.5rem, 6vw, 4.5rem)/1 var(--font-serif);
    color: var(--fern);
}
.ph-label {
    position: absolute; left: .75rem; right: .75rem; bottom: .75rem;
    font-size: .8rem; line-height: 1.35; color: var(--pine);
}
.ph-label small { color: var(--muted); font-size: .72rem; word-break: break-all; }

/* ---------- Sekcje ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-mist { background: var(--mist); }
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); }

.prose { max-width: 62ch; }
.prose.narrow { margin-inline: auto; }
.prose h2 { margin-bottom: .75em; }

.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); }

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }

/* Fakty (lista definicji w ramce) */
.facts {
    border-top: 3px solid var(--pine);
    background: var(--white);
    padding: 1.5rem 0 0;
}
.section-mist .facts { background: transparent; }
.facts dl { margin: 0; display: grid; gap: 1.25rem; }
.facts dt { font-size: var(--step--1); color: var(--muted); margin-bottom: .2rem; }
.facts dd { margin: 0; font-weight: 500; }
.facts dl > div + div { border-top: 1px solid var(--sage); padding-top: 1.25rem; }
.rating { font: 600 var(--step-2)/1 var(--font-serif); color: var(--pine); display: block; margin-bottom: .25rem; }

/* ---------- Cytat ---------- */

.quote { background: var(--pine); color: var(--white); padding-block: clamp(3.5rem, 8vw, 6rem); }
.quote blockquote { margin: 0; max-width: 30ch; }
.quote p { font: 400 italic clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem)/1.15 var(--font-serif); margin-bottom: 1.25rem; }
.quote footer { color: var(--fern); }

/* ---------- Galeria ---------- */

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.page-o-nas .gallery, .gallery-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .page-o-nas .gallery, .gallery-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .page-o-nas .gallery, .gallery-3 { grid-template-columns: 1fr; } }
.gallery-item { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); }
.gallery-item .media { transition: transform .25s; }
.gallery-item:hover .media { transform: scale(1.015); }

.lightbox {
    width: min(92vw, 980px); max-height: 92vh; padding: 0; border: 0; border-radius: 18px;
    background: var(--white); color: var(--ink); overflow: visible;
}
.lightbox::backdrop { background: rgba(21,58,43,.82); }
.lightbox-figure { margin: 0; padding: 1rem; }
.lightbox-stage .media { max-height: 76vh; width: 100%; object-fit: contain; }
.lightbox-stage .ph { max-height: 76vh; }
.lightbox-caption { padding: .75rem .25rem 0; color: var(--muted); }
.lightbox-close, .lightbox-nav {
    position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: var(--white); color: var(--pine); font-size: 1.6rem; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 20px -8px rgba(0,0,0,.35);
}
.lightbox-close { top: -14px; right: -14px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: -22px; }
.lightbox-nav.next { right: -22px; }

/* ---------- Zespół (O nas) ---------- */

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
    min-height: 40px; padding: 0 1rem; border-radius: 999px;
    border: 1.5px solid var(--fern); background: var(--white); color: var(--pine);
    font: 500 .9rem var(--font-sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--pine); }
.chip.is-active { background: var(--pine); border-color: var(--pine); color: var(--white); }

.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.person { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-sm); overflow: hidden; }
.person[hidden] { display: none; }
.person .media { border-radius: 0; }
.person-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.person-role { color: var(--leaf); font-size: var(--step--1); font-weight: 600; margin-bottom: .4rem; }
.person h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.person-title { display: block; font: 400 italic .95rem/1.3 var(--font-serif); color: var(--muted); margin-bottom: .15rem; }
.person-body > p:not([class]) { font-size: .97rem; color: var(--muted); }
.person-scope { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.person-scope li { font-size: .8rem; padding: .25rem .6rem; border-radius: 999px; background: var(--mist); color: var(--pine); }
.person-links { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; font-size: .95rem; }
.person.is-todo { outline: 1.5px dashed var(--fern); outline-offset: -1.5px; background: transparent; }
.person.is-todo h3 { color: var(--muted); }

/* ---------- Oferta (O nas) ---------- */

.offer { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); }
.offer h2 { font-size: var(--step-2); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--sage); color: var(--pine); font-weight: 500; font-size: .95rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: .6rem 0 .6rem 1.75rem; border-bottom: 1px solid var(--sage); }
.checklist li::before {
    content: ""; position: absolute; left: .15rem; top: 1.05rem; width: 10px; height: 6px;
    border: solid var(--leaf); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.equipment { margin: 0; }
.equipment > div { padding: .6rem 0; border-bottom: 1px solid var(--sage); }
.equipment dt { font-weight: 600; color: var(--pine-deep); }
.equipment dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- CTA ---------- */

.cta { background: var(--pine); color: var(--white); padding-block: clamp(3rem, 7vw, 5rem); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.cta h2 { color: var(--white); margin-bottom: .4rem; }
.cta p { color: var(--sage); max-width: 52ch; margin: 0; }
.cta .actions { margin: 0; }

/* ---------- Formularz ---------- */

.form { display: grid; gap: 1.25rem; max-width: 560px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.field input:not([type="checkbox"]), .field textarea {
    width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--sage); border-radius: var(--radius-sm);
    font: inherit; color: var(--ink); background: var(--white);
}
.field input:focus, .field textarea:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(62,142,99,.2); }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; }
.field-error { color: #B3261E; font-size: .9rem; margin: .35rem 0 0; }
.hint { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; align-items: start; }
.field-check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--pine); }
.field-check label { font-weight: 400; font-size: .92rem; margin: 0; }
.field-check .field-error { grid-column: 2; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; }
.notice p { margin: 0; }
.notice-ok { background: var(--mist); border-left: 4px solid var(--leaf); }
.notice-error { background: #FCEEEE; border-left: 4px solid #B3261E; }

/* ---------- Stopka ---------- */

.site-footer { color: var(--sage); }
.footer-body { background: var(--pine-deep); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 2.5rem; }
.footer-name { font: 500 var(--step-2)/1.2 var(--font-serif); color: var(--white); }
.footer-title { font: 600 var(--step--1) var(--font-sans); color: var(--fern); margin-bottom: 1rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-list li { display: flex; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-tel { color: var(--fern) !important; white-space: nowrap; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
    margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(220,234,224,.18);
    font-size: var(--step--1);
}
.footer-bottom p { margin: 0; }

/* ---------- Responsywność ---------- */

@media (max-width: 960px) {
    .hero-grid, .page-hero-grid, .intro-grid, .split, .offer { grid-template-columns: 1fr; }
    .hero-photo, .page-hero-photo { max-width: 460px; }
    .team { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .team { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .lightbox-nav.prev { left: 6px; }
    .lightbox-nav.next { right: 6px; }
    .lightbox-close { top: 6px; right: 6px; }
}

/* ==========================================================================
   NMED Gabinety – elementy specyficzne dla przychodni
   ========================================================================== */

.nav-phone { font-weight: 600; color: var(--pine); white-space: nowrap; font-size: .95rem; }
.nav-phone:hover { color: var(--leaf); }

.hero-degree { font-size: .3em; }

.section-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.section-head-row > div { max-width: 60ch; }
.section-head-row p { margin-bottom: 0; }

/* Indeks specjalizacji – typograficzna lista zamiast kafelków */
.spec-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(1.5rem, 4vw, 3rem); border-top: 1px solid var(--fern); }
.spec-index li { border-bottom: 1px solid var(--fern); }
.spec-index a {
    display: flex; flex-direction: column; gap: .2rem; padding: 1.3rem 2rem 1.3rem 0; position: relative;
    text-decoration: none; color: var(--ink);
}
.spec-index a::after {
    content: "›"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
    color: var(--fern); font-size: 1.6rem; transition: transform .2s, color .2s;
}
.spec-name { font: 500 var(--step-2)/1.15 var(--font-serif); color: var(--pine-deep); }
.spec-for { font-size: var(--step--1); color: var(--muted); }
.spec-index a:hover .spec-name { color: var(--leaf); }
.spec-index a:hover::after { color: var(--pine); transform: translate(4px, -50%); }

/* Zespół – wersja kompaktowa (karty-linki) */
.team-compact { grid-template-columns: repeat(4, 1fr); }
.person-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.team-compact .person-body { padding: 1.1rem 1.2rem 1.3rem; gap: .1rem; }
.team-compact .person-role { margin-bottom: .35rem; }
.team-compact .person-title { margin: 0; }
.person-name { font: 600 1.25rem/1.2 var(--font-serif); color: var(--pine-deep); }
.person-link:hover .person-name { color: var(--leaf); }
.person-link:hover .media { filter: saturate(1.05) brightness(.98); }

/* Sekcja ze zdjęciem i treścią */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature-reverse > :first-child { order: 0; }

/* Pas z oceną pacjentów */
.rating-band { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem clamp(2rem, 6vw, 5rem); }
.quote .rating-big { font: 400 clamp(4.5rem, 3rem + 7vw, 9rem)/.9 var(--font-serif); margin: 0; color: var(--white); letter-spacing: -.02em; }
.quote .rating-big span { font-size: .3em; color: var(--fern); letter-spacing: 0; }
.quote .rating-text { font: 400 italic var(--step-2)/1.3 var(--font-serif); max-width: 24ch; margin-bottom: 1.25rem; }

/* Kroki rezerwacji – faktyczna sekwencja, stąd numeracja */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.75rem 4rem; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: -.1rem;
    width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
    border: 1.5px solid var(--fern); color: var(--pine); font: 600 1.1rem var(--font-serif);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.3rem; top: 2.7rem; bottom: .3rem; width: 1.5px; background: var(--sage); }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--muted); }

/* Usługi */
.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.jump .chip { display: inline-flex; align-items: center; text-decoration: none; }
.spec-row {
    display: grid; grid-template-columns: 15rem 1fr 15rem; gap: 1.5rem clamp(2rem, 4vw, 3.5rem);
    padding: 2.25rem 0; border-top: 1px solid var(--fern);
}
.spec-row:last-child { border-bottom: 1px solid var(--fern); }
.spec-row h2 { font-size: var(--step-2); margin-bottom: .3rem; }
.spec-row.is-todo h2 { color: var(--muted); }
.spec-row.is-todo > div > p:first-child { font-style: italic; color: var(--muted); }
.spec-row:target { background: var(--mist); box-shadow: -1rem 0 0 var(--mist), 1rem 0 0 var(--mist); }
.spec-team > p { font-size: var(--step--1); margin-bottom: .4rem; }
.spec-team ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .3rem; }
.spec-team a:not(.btn) { color: var(--pine); font-weight: 500; }
.btn-small { min-height: 40px; padding: 0 1.1rem; }

.footer-address { font-style: normal; line-height: 1.9; }
.map-box { margin-top: 1.75rem; }

@media (max-width: 1180px) {
    .nav-phone { display: none; }
}
@media (max-width: 1080px) {
    .nav-phone { display: inline; align-self: flex-start; font-size: 1.15rem; }
}
@media (max-width: 960px) {
    .spec-index { grid-template-columns: 1fr 1fr; }
    .team-compact { grid-template-columns: repeat(2, 1fr); }
    .feature { grid-template-columns: 1fr; }
    .feature-reverse > :first-child { order: 0; }
    .spec-row { grid-template-columns: 1fr; gap: .75rem; }
}
@media (max-width: 620px) {
    .spec-index { grid-template-columns: 1fr; }
    .team-compact { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .team-compact .person-body { padding: .9rem; }
    .person-name { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

@media print {
    .site-header, .site-footer, .cta, .strata, .filters { display: none; }
}
