/* =========================================================
   DIM – podstrona „Nekrologi online” (wersja 3)
   Te same zasady co reszta strony: jasne tło, ciemne panele,
   Poppins w nagłówkach. Lora tylko w podglądach klepsydry i nekrologu.
   ========================================================= */

.nk { --serif: 'Lora', Georgia, 'Times New Roman', serif; }

/* --- HERO (ciemny panel) --- */
.nk-hero { padding-block: clamp(8px, 2vw, 24px) clamp(56px, 8vw, 104px); }
.nk-hero-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 6vw, 80px); }
.nk-hero h1 { font-size: clamp(2.2rem, 4.3vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 22px; }
.nk-hero .lead { margin-bottom: 32px; max-width: 54ch; }
.nk-hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; list-style: none; font-size: .92rem; color: var(--on-night-muted); }
.nk-hero-facts li { display: flex; gap: 8px; align-items: center; }
.nk-hero-facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--candle); box-shadow: 0 0 10px 2px rgba(243, 194, 122, .55); }

/* Kompozycja: klepsydra + telefon */
.nk-stage { position: relative; min-height: 540px; margin-bottom: 40px; }
.nk-stage .klepsydra { position: absolute; width: min(310px, 68%); left: 0; top: 24px; transform: rotate(-4deg); }
.phone { position: absolute; right: 0; bottom: 0; width: min(285px, 63%); background: #0d0910; border-radius: 38px; padding: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 0 0 1.5px rgba(255, 255, 255, .1); }
.phone-screen { background: #fff; color: #1f1a17; border-radius: 30px; overflow: hidden; }
.phone-bar { height: 30px; display: flex; justify-content: center; align-items: center; background: #f4f1ec; }
.phone-bar span { width: 70px; height: 6px; border-radius: 6px; background: #d6cfc6; }
.ph-site { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: .68rem; color: #6b625c; border-bottom: 1px solid #ece6df; }
.ph-site b { font-family: var(--serif); font-size: .82rem; color: #1f1a17; font-weight: 600; }
.ph-body { padding: 18px 16px 16px; text-align: center; font-family: var(--serif); }
.ph-body p { margin: 0; color: inherit; }
.ph-photo { width: 74px; height: 92px; margin: 0 auto 12px; border-radius: 40px 40px 6px 6px; background: linear-gradient(180deg, #d8d0c6, #bfb4a8); position: relative; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 1px #d9d2c9; }
.ph-photo::before { content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%; background: #a99c8f; left: 50%; top: 20px; transform: translateX(-50%); }
.ph-photo::after { content: ''; position: absolute; width: 58px; height: 40px; border-radius: 30px 30px 0 0; background: #a99c8f; left: 50%; bottom: -6px; transform: translateX(-50%); }
.ph-body .ph-sp { font-size: .7rem; letter-spacing: .08em; color: #6b625c; }
.ph-body .ph-name { font-size: 1.2rem; font-weight: 600; line-height: 1.2; margin: 2px 0; color: #1f1a17; }
.ph-body .ph-dates { font-size: .76rem; color: #6b625c; margin-bottom: 12px; }
.ph-body .ph-info { text-align: left; font-family: 'Poppins', sans-serif; font-size: .7rem; line-height: 1.5; background: #f7f4ef; border-radius: 10px; padding: 10px 12px; color: #3b332e; margin-bottom: 12px; }
.ph-info strong { color: #1f1a17; }
.ph-actions { display: grid; gap: 7px; font-family: 'Poppins', sans-serif; }
.ph-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border-radius: 10px; font-size: .74rem; font-weight: 600; border: 1px solid #e3dcd3; background: #fff; color: #1f1a17; }
.ph-btn svg { width: 16px; height: 16px; }

/* Interaktywny znicz */
.candle-btn { cursor: pointer; background: #1f1a17; color: #fff; border-color: #1f1a17; transition: background-color .3s, color .3s, box-shadow .4s; }
.candle-btn .flame { transform-origin: 50% 90%; opacity: .55; transition: opacity .3s; }
.candle-btn:hover { background: #3a302a; }
.candle-btn.lit { background: #fff6e8; color: #6b4a14; border-color: var(--candle); box-shadow: 0 0 0 4px rgba(243, 194, 122, .25), 0 0 26px rgba(243, 194, 122, .55); }
.candle-btn.lit .flame { opacity: 1; fill: #f3a43a; animation: flicker 1.8s ease-in-out infinite; }
.candle-btn .count { font-weight: 500; opacity: .8; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08, .94) rotate(-3deg); } 60% { transform: scale(.95, 1.06) rotate(2deg); } }
.nk-try { position: absolute; right: 0; width: min(285px, 63%); bottom: -40px; color: var(--candle); font-size: .92rem; font-weight: 500; text-align: center; margin: 0; }
.panel-dark .nk-try { color: var(--candle); }
.nk-try svg { display: inline-block; width: 16px; height: 20px; margin-right: 6px; vertical-align: -4px; }

/* --- PRZED / PO --- */
.nk-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.nk-compare > div { padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-m); }
.nk-compare h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 20px; }
.nk-compare ul { list-style: none; display: grid; gap: 14px; }
.nk-compare li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.nk-compare li svg { width: 20px; height: 20px; margin-top: 3px; }
.nk-before { background: var(--soft); color: var(--muted); }
.nk-before svg { color: #b0a6ba; }
.nk-after.panel-dark { color: var(--on-night); }
.nk-after svg { color: var(--mint); }

/* --- KROKI --- */
.nk-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: krok; }
.nk-steps li { counter-increment: krok; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px 26px 30px; }
.nk-steps li::before { content: counter(krok); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; margin-bottom: 22px; }
.nk-steps h3 { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.nk-steps p { color: var(--muted); font-size: .97rem; }

/* --- MATERIAŁY --- */
.nk-materials { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.nk-print { position: sticky; top: 110px; margin: 0; background: var(--soft); border-radius: var(--radius-l); padding: clamp(28px, 4vw, 44px); display: grid; place-items: center; }
.nk-print .klepsydra { width: 100%; max-width: 330px; }
.nk-print figcaption { margin-top: 18px; font-size: .9rem; color: var(--muted); text-align: center; }
.nk-list { list-style: none; border-top: 1px solid var(--line); }
.nk-list li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.nk-list .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); color: var(--primary-ink); display: grid; place-items: center; }
.nk-list .ic svg { width: 24px; height: 24px; }
.nk-list h3 { font-size: 1.15rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.nk-list p { color: var(--muted); font-size: .97rem; }

/* --- DLA RODZINY (ciemny panel) --- */
.nk-family .page-head { margin-bottom: 0; }
.nk-family-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.nk-family-grid div { grid-column: span 2; }
.nk-family-grid div:nth-child(n+4) { grid-column: span 3; }
.nk-family-grid div { background: rgba(255, 255, 255, .04); border: 1px solid var(--night-line); border-radius: var(--radius-m); padding: 24px 20px; }
.nk-family-grid svg { width: 26px; height: 26px; color: var(--candle); margin-bottom: 16px; }
.nk-family-grid h3 { font-size: 1.08rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.nk-family-grid p { font-size: .93rem; }
.nk-quote { margin-top: 40px; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.55rem); max-width: 40ch; line-height: 1.45; }
.panel-dark .nk-quote { color: #f1e6d4; }

/* --- INTEGRACJA --- */
.nk-ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.nk-way { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(26px, 3.5vw, 40px); background: #fff; }
.nk-way h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.nk-way p { color: var(--muted); }
.nk-code { margin-top: 18px; background: var(--night); color: #e9dcf2; border-radius: 12px; padding: 16px 18px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.nk-code .t { color: #ff8cc6; }
.nk-code .a { color: #c7a6ff; }
.nk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; list-style: none; }
.nk-tags li { font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); }

.nk-safe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; margin-top: 56px; list-style: none; }
.nk-safe li { border-top: 2px solid var(--ink); padding-top: 16px; }
.nk-safe strong { display: block; font-size: 1.02rem; margin-bottom: 6px; }
.nk-safe span { color: var(--muted); font-size: .95rem; }

/* --- FAQ --- */
.nk-faq { max-width: 840px; margin-inline: auto; display: grid; gap: 10px; }
.nk-faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); transition: border-color .2s; }
.nk-faq details[open] { border-color: rgba(162, 0, 255, .3); }
.nk-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.nk-faq summary::-webkit-details-marker { display: none; }
.nk-faq summary::after { content: ''; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--soft) no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%2317101c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); transition: transform .3s var(--ease); }
.nk-faq details[open] summary::after { transform: rotate(45deg); }
.nk-faq details p { color: var(--muted); padding: 0 22px 22px; max-width: 68ch; }

/* --- RWD --- */
@media (max-width: 1100px) {
    .nk-family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nk-family-grid div, .nk-family-grid div:nth-child(n+4) { grid-column: auto; }
    .nk-family-grid div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
    .nk-hero-panel, .nk-materials { grid-template-columns: 1fr; }
    .nk-stage { min-height: 590px; max-width: 540px; width: 100%; margin-inline: auto; }
    .nk-print { position: static; }
    .nk-safe { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nk-compare, .nk-ways, .nk-steps { grid-template-columns: minmax(0, 1fr); }
    .nk-try { display: none; }
    .nk-stage { margin-bottom: 0; }
}
@media (max-width: 520px) {
    .nk-hero-panel { padding-inline: 20px; }
    .nk-stage { min-height: 540px; }
    .nk-stage .klepsydra { width: 76%; }
    .nk-stage .klepsydra .k-text { display: none; }
    .phone { width: 68%; }
    .nk-safe, .nk-family-grid { grid-template-columns: 1fr; }
    .nk-hero .hero-actions .btn { width: 100%; }
}

/* Cena w hero */
.nk-price { margin: 26px 0 30px; display: grid; gap: 6px; }
.panel-dark .nk-price-big { font-family: var(--font-display, 'Poppins', sans-serif); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.03em; color: var(--candle); text-shadow: 0 0 34px rgba(243, 194, 122, .35); }
.nk-price-from, .nk-price-per { font-size: .38em; font-weight: 600; letter-spacing: 0; color: var(--on-night); text-shadow: none; }
.nk-price-note { font-size: .92rem; color: var(--on-night-muted); max-width: 44ch; }
