/* ===========================================================================
   DuoRegio — profil firmy (design „dm")
   Jedno źródło stylu dla /katalog-firm/{slug} i /profil-demo/{slug}.

   Zasada: żaden kolor nie jest wpisany na sztywno w regułach układu.
   Wszystko idzie przez tokeny --pf-*, a tryb ciemny podmienia WYŁĄCZNIE
   tokeny — dzięki temu nie trzeba dublować reguł „html[data-theme=dark] .x".
   =========================================================================== */

:root {
  --pf-r: 18px;
  --pf-r-sm: 12px;

  --pf-surface: #ffffff;
  --pf-surface-2: var(--gray-50, #f9fafb);
  --pf-surface-3: #ffffff;
  --pf-border: var(--gray-100, #f3f4f6);
  --pf-border-2: var(--gray-200, #e5e7eb);

  --pf-text: var(--gray-900, #111827);
  --pf-text-2: var(--gray-600, #4b5563);
  --pf-text-3: var(--gray-400, #9ca3af);

  --pf-brand: var(--green, #2db55d);
  --pf-brand-dark: var(--green-dark, #047857);
  --pf-ink: #0f172a;

  --pf-ok-bg: #ecfdf5;   --pf-ok-bd: #a7f3d0;   --pf-ok-tx: #047857;
  --pf-warn-bg: #fffbeb; --pf-warn-bd: #fde68a; --pf-warn-tx: #92400e;
  --pf-bad-bg: #fef2f2;  --pf-bad-bd: #fecaca;  --pf-bad-tx: #b91c1c;

  --pf-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --pf-shadow-lg: 0 6px 26px rgba(15, 23, 42, .06);
  --pf-bar-bg: rgba(255, 255, 255, .97);
}

html[data-theme="dark"] {
  --pf-surface: #0f172a;
  --pf-surface-2: #111c33;
  --pf-surface-3: #131f38;
  --pf-border: #1e293b;
  --pf-border-2: #26354c;

  --pf-text: #e2e8f0;
  --pf-text-2: #cbd5e1;
  --pf-text-3: #7c8ba1;

  --pf-ink: #e2e8f0;

  --pf-ok-bg: #06281c;   --pf-ok-bd: #12513a;   --pf-ok-tx: #6ee7a3;
  --pf-warn-bg: #2a2008; --pf-warn-bd: #5c440d; --pf-warn-tx: #fcd34d;
  --pf-bad-bg: #2a1114;  --pf-bad-bd: #5c1d24;  --pf-bad-tx: #fca5a5;

  --pf-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --pf-shadow-lg: 0 6px 26px rgba(0, 0, 0, .45);
  --pf-bar-bg: rgba(15, 23, 42, .97);
}

/* ---------- układ ---------- */
.dm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.dm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 18px 0 40px; }
@media (min-width: 1000px) {
  .dm-grid { grid-template-columns: minmax(0, 1fr) 372px; gap: 32px; align-items: start; }
}
.dm-main { min-width: 0; }
.dm-side { min-width: 0; position: relative; }

/* Okruszki */
.dm-bread { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 18px; font-size: .8rem; color: var(--pf-text-3); }
.dm-bread a { color: var(--pf-text-3); text-decoration: none; }
.dm-bread a:hover { color: var(--pf-brand-dark); text-decoration: underline; }
.dm-bread b { font-weight: 700; color: var(--pf-text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* ---------- pasek zaufania ---------- */
.dm-trust { background: var(--pf-ink); color: #fff; overflow: hidden; }
html[data-theme="dark"] .dm-trust { background: #060c18; }
.dm-trust-track { display: flex; gap: 34px; padding: 9px 0; white-space: nowrap; animation: dm-marq 32s linear infinite; width: max-content; }
.dm-trust span { font-size: .74rem; font-weight: 700; letter-spacing: .3px; opacity: .92; display: inline-flex; align-items: center; gap: 7px; }
@keyframes dm-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .dm-trust-track { animation: none; flex-wrap: wrap; white-space: normal; width: auto; justify-content: center; }
}

/* ---------- okładka ---------- */
.dm-cover { position: relative; border-radius: var(--pf-r); overflow: hidden; margin-bottom: 14px; background: var(--pf-border); }
.dm-cover-img { width: 100%; height: 190px; object-fit: cover; object-position: center 35%; display: block; }
@media (min-width: 700px) { .dm-cover-img { height: 250px; } }
.dm-cover-grad { background: linear-gradient(135deg, var(--dm-brand, #2db55d), #0f172a); }
.dm-cover-fade { position: absolute; inset: auto 0 0 0; height: 82%; background: linear-gradient(to top, rgba(8, 12, 22, .93) 12%, rgba(8, 12, 22, .48) 54%, rgba(8, 12, 22, 0)); }
.dm-cover-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; display: flex; align-items: flex-end; gap: 14px; }
.dm-cover-in .dm-name { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.dm-cover-in .dm-sub { color: rgba(255, 255, 255, .92); }

.dm-logo { width: 76px; height: 76px; border-radius: 20px; flex-shrink: 0; object-fit: contain; background: #fff; border: 1px solid var(--pf-border); }
.dm-logo-ph { width: 76px; height: 76px; border-radius: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.5rem; color: #fff; }
@media (max-width: 520px) {
  .dm-logo, .dm-logo-ph { width: 58px; height: 58px; border-radius: 16px; font-size: 1.15rem; }
  .dm-cover-in { padding: 14px; gap: 11px; }
}

.dm-name { font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; line-height: 1.15; color: var(--pf-text); margin: 0 0 5px; letter-spacing: -.015em; text-wrap: balance; }
@media (max-width: 520px) { .dm-name { font-size: 1.2rem; } }
.dm-sub { font-size: .86rem; color: var(--pf-text-3); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 520px) { .dm-sub { font-size: .76rem; gap: 6px; } }

/* ---------- sygnały (chipy) ---------- */
.dm-signals { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.dm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--pf-surface-2); border: 1px solid var(--pf-border); font-size: .74rem; font-weight: 700; color: var(--pf-text-2); }
.dm-chip.ok { background: var(--pf-ok-bg); border-color: var(--pf-ok-bd); color: var(--pf-ok-tx); }
.dm-chip.warn { background: var(--pf-warn-bg); border-color: var(--pf-warn-bd); color: var(--pf-warn-tx); }
.dm-chip.zamk { background: var(--pf-bad-bg); border-color: var(--pf-bad-bd); color: var(--pf-bad-tx); }
a.dm-chip { text-decoration: none; }
a.dm-chip:hover { border-color: var(--pf-brand); }

/* ---------- karty ---------- */
.dm-card { background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: var(--pf-r); padding: 20px; margin-bottom: 18px; box-shadow: var(--pf-shadow); }
@media (max-width: 600px) { .dm-card { padding: 15px; border-radius: 14px; margin-bottom: 14px; } }
.dm-card > h2, .dm-h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.06rem; margin: 0 0 12px; color: var(--pf-text); letter-spacing: -.01em; }
.dm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dm-card-head > h2, .dm-card-head > .dm-h2 { margin: 0; }
.dm-more-link { font-size: .75rem; color: var(--pf-brand); font-weight: 800; text-decoration: none; white-space: nowrap; }
.dm-empty { border: 1px dashed var(--pf-border-2); border-radius: var(--pf-r-sm); padding: 18px; text-align: center; color: var(--pf-text-3); font-size: .84rem; }
.dm-licz { font-family: var(--font-body); font-weight: 800; font-size: .72rem; color: var(--pf-text-3); background: var(--pf-surface-2); border: 1px solid var(--pf-border); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }

/* ---------- cennik / karta dań ---------- */
.dm-price-r { display: flex; gap: 16px; align-items: baseline; justify-content: space-between; padding: 13px 2px; border-bottom: 1px solid var(--pf-border); }
.dm-price-r:last-child { border-bottom: none; }
.dm-price-l { min-width: 0; }
.dm-price-n { font-weight: 700; font-size: .92rem; color: var(--pf-text); line-height: 1.35; }
.dm-price-o { font-size: .79rem; color: var(--pf-text-3); line-height: 1.55; margin-top: 3px; max-width: 52ch; }
.dm-price-c { font-weight: 800; font-size: .95rem; color: var(--pf-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-price-c.eur { color: #1d4ed8; }
html[data-theme="dark"] .dm-price-c.eur { color: #93c5fd; }
.dm-menu-kat { font-family: var(--font-display); font-weight: 900; font-size: .74rem; text-transform: uppercase; letter-spacing: 1.1px; color: var(--pf-brand-dark); margin: 20px 0 4px; padding-top: 14px; border-top: 2px solid var(--pf-border); }
html[data-theme="dark"] .dm-menu-kat { color: #6ee7a3; }
.dm-price > .dm-menu-kat:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------- polecane ---------- */
.dm-prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .dm-prod { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; } }
.dm-prod-i { border: 1px solid var(--pf-border); border-radius: 14px; overflow: hidden; background: var(--pf-surface); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.dm-prod-i:hover { transform: translateY(-2px); box-shadow: var(--pf-shadow-lg); }
.dm-prod-i img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.dm-prod-b { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 5px; }
.dm-prod-t { font-weight: 800; font-size: .88rem; color: var(--pf-text); line-height: 1.3; }
.dm-prod-o { font-size: .78rem; color: var(--pf-text-3); line-height: 1.5; }
.dm-prod-c { font-weight: 900; font-size: .9rem; color: var(--pf-brand-dark); }
html[data-theme="dark"] .dm-prod-c { color: #6ee7a3; }
.dm-badge { align-self: flex-start; background: var(--pf-warn-bg); color: var(--pf-warn-tx); border: 1px solid var(--pf-warn-bd); font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; padding: 2px 7px; border-radius: 5px; }

/* ---------- galeria ---------- */
.dm-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
@media (max-width: 520px) { .dm-gal { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; } }
.dm-gal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: transform .15s; background: var(--pf-surface-2); }
.dm-gal img:hover { transform: scale(1.02); }

/* ---------- rolki 9:16 ---------- */
.dm-reels { margin: 2px 0 18px; }
.dm-reels-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dm-reels-head h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; margin: 0; color: var(--pf-text); }
.dm-reels-head p { margin: 2px 0 0; font-size: .8rem; color: var(--pf-text-3); }
.dm-reels-nav { display: flex; gap: 7px; }
@media (max-width: 600px) { .dm-reels-nav { display: none; } }
.dm-reels-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--pf-border-2); background: var(--pf-surface); cursor: pointer; font-size: 1rem; line-height: 1; color: var(--pf-text-2); transition: background .15s, transform .15s; }
.dm-reels-nav button:hover { background: var(--pf-surface-2); transform: translateY(-1px); }
.dm-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 2px 12px; scrollbar-width: thin; }
.dm-rail::-webkit-scrollbar { height: 6px; }
.dm-rail::-webkit-scrollbar-thumb { background: var(--pf-border-2); border-radius: 99px; }
.dm-reel { position: relative; flex: 0 0 auto; width: 158px; aspect-ratio: 9/16; border-radius: var(--pf-r); overflow: hidden; scroll-snap-align: start; background: #0f172a; cursor: pointer; border: none; padding: 0; display: block; }
@media (min-width: 700px) { .dm-reel { width: 208px; } }
.dm-reel img, .dm-reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-reel.kb img { animation: dm-kb 14s ease-in-out infinite alternate; }
@keyframes dm-kb { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.16) translateY(-2%); } }
@media (prefers-reduced-motion: reduce) { .dm-reel.kb img { animation: none; } }
.dm-reel-grad { position: absolute; inset: auto 0 0 0; height: 58%; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, 0)); pointer-events: none; }
.dm-reel-cap { position: absolute; left: 11px; right: 11px; bottom: 11px; color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.dm-reel-play { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; font-size: .7rem; color: #111; }

/* podgląd pełnoekranowy */
.dm-viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .94); z-index: 10000; display: none; align-items: center; justify-content: center; }
.dm-viewer.on { display: flex; }
.dm-viewer-inner { position: relative; width: min(94vw, 430px); aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; background: #000; }
.dm-viewer-inner img, .dm-viewer-inner video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.dm-viewer button { position: absolute; background: rgba(255, 255, 255, .14); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem; cursor: pointer; backdrop-filter: blur(6px); }
.dm-viewer .dm-x { top: 14px; right: 14px; }
.dm-viewer .dm-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.dm-viewer .dm-next { right: 12px; top: 50%; transform: translateY(-50%); }
.dm-viewer-cap { position: absolute; left: 14px; right: 64px; bottom: 16px; color: #fff; font-size: .9rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }

/* ---------- panel boczny ----------
   Kolumna NIE jest sticky. Przy karcie wyższej niż ekran jej dół (mapa, udostępnianie)
   stawał się nieosiągalny — trzeba było zjechać do 80% zoomu. Do tego Leaflet rysuje
   swoje warstwy z z-index 400+, więc przyklejona mapa malowała się NA przyciskach. */
.dm-buy { background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: var(--pf-r); padding: 18px; box-shadow: var(--pf-shadow-lg); margin-bottom: 14px; }
@media (max-width: 600px) { .dm-buy { padding: 15px; border-radius: 14px; } }
.dm-buy:last-child { margin-bottom: 0; }
.dm-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 800; color: var(--pf-text-3); margin-bottom: 10px; }
.dm-buy-cta { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 14px; border-radius: 13px; font-weight: 800; font-size: .95rem; text-decoration: none; margin-bottom: 9px; border: none; font-family: inherit; cursor: pointer; text-align: center; }
.dm-cta-1 { background: var(--pf-brand); color: #fff; }
.dm-cta-2 { background: var(--pf-surface-2); color: var(--pf-text); border: 1px solid var(--pf-border-2); }
.dm-cta-3 { background: var(--pf-ink); color: #fff; }
html[data-theme="dark"] .dm-cta-3 { background: #1d2b45; color: #e2e8f0; }
.dm-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pf-border); font-size: .84rem; align-items: baseline; }
.dm-row:last-child { border-bottom: none; }
.dm-row b { color: var(--pf-text-3); font-weight: 700; flex-shrink: 0; }
.dm-row > span, .dm-row > a { color: var(--pf-text); font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.dm-row > a { color: var(--pf-brand-dark); text-decoration: none; }
html[data-theme="dark"] .dm-row > a { color: #6ee7a3; }
.dm-sep { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--pf-border); }
.dm-note { font-size: .76rem; color: var(--pf-text-3); line-height: 1.6; }
.dm-reveal { font-weight: 700; color: var(--pf-brand-dark); background: none; border: 1px solid var(--pf-border-2); border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: .82rem; font-family: inherit; }
html[data-theme="dark"] .dm-reveal { color: #6ee7a3; }

/* ---------- social w barwach marek ---------- */
.dm-social { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-top: 12px; }
.dm-soc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 11px 4px; border-radius: 13px; text-decoration: none; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .2px; transition: transform .14s, filter .14s; border: none; font-family: inherit; cursor: pointer; }
.dm-soc:hover { transform: translateY(-2px); filter: brightness(1.06); }
.dm-soc svg { width: 19px; height: 19px; fill: currentColor; }
.dm-fb { background: #1877F2; }
.dm-ig { background: linear-gradient(45deg, #F58529, #DD2A7B 45%, #8134AF 75%, #515BD4); }
.dm-wa { background: #25D366; }
.dm-li { background: #0A66C2; }
.dm-bk { background: #0F1B4C; }
.dm-cal { background: #006BFF; }
.dm-ml { background: #0F172A; }
.dm-cp { background: #4B5563; }
html[data-theme="dark"] .dm-ml { background: #1d2b45; }

/* ---------- dostępność ---------- */
.dm-soc:focus-visible, .dm-buy-cta:focus-visible, .dm-gal img:focus-visible,
.dm-reel:focus-visible, .dm-reels-nav button:focus-visible, .dm-reveal:focus-visible {
  outline: 3px solid var(--pf-brand); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .dm-soc, .dm-gal img, .dm-buy-cta, .dm-prod-i { transition: none; }
  .dm-rail { scroll-behavior: auto; }
}

/* ---------- sekcje odziedziczone ----------
   Starsze bloki profilu (aktualności, artykuły, karta menu, wizytówka) mają własne
   ramki wpisane w atrybut style. Wewnątrz .dm-card dawało to kartę w karcie,
   więc chrom wewnętrznego kontenera jest tutaj zdejmowany. */
.dm-card > .dm-legacy { background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
.dm-card > .dm-legacy > h2:first-child, .dm-card > .dm-legacy > div:first-child > h2 { margin-top: 0; }

/* Odziedziczone kafelki wewnątrz kart — dopasowanie tła do trybu ciemnego */
html[data-theme="dark"] .dm-card [style*="background: white"],
html[data-theme="dark"] .dm-card [style*="background:white"],
html[data-theme="dark"] .dm-card [style*="background: #fff"],
html[data-theme="dark"] .dm-card [style*="background:#fff"] { background: var(--pf-surface-3) !important; }
html[data-theme="dark"] .dm-card [style*="border: 1px solid var(--gray-100)"],
html[data-theme="dark"] .dm-card [style*="border:1px solid var(--gray-100)"] { border-color: var(--pf-border) !important; }

/* Mobile: odziedziczone bloki miały padding:2rem wpisany w style — za dużo na telefonie */
@media (max-width: 600px) {
  .dm-card [style*="padding: 1.5rem"], .dm-card [style*="padding:1.5rem"] { padding: 1rem !important; }
  .dm-card [style*="padding: 2rem"], .dm-card [style*="padding:2rem"] { padding: 1rem !important; }
}

/* ---------- druk ---------- */
@media print {
  .dm-trust, .dm-side, .dm-reels, .dm-viewer, .no-print { display: none !important; }
  .dm-grid { grid-template-columns: 1fr !important; }
  .dm-card { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
}

/* ---------- kolejność na telefonie ----------
   Na telefonie liczy się inna kolejność niż na monitorze: najpierw czym firma się
   zajmuje, potem rolki, dopiero potem kontakt. Wizytówka z kodem QR na sam koniec.
   display:contents rozpuszcza obie kolumny, żeby ich karty dały się przemieszać
   jedną listą — inaczej cały panel boczny lądowałby hurtem pod całą treścią. */
@media (max-width: 999px) {
  .dm-grid { display: flex; flex-direction: column; gap: 0; }
  .dm-main, .dm-side { display: contents; }
  .dm-main > * { order: 50; }
  .dm-side > * { order: 60; margin-bottom: 14px; }
  .dm-o-opis { order: 10; }
  .dm-o-rolki { order: 20; }
  .dm-o-kontakt { order: 30; }
  .dm-o-wizytowka { order: 90; }
}

/* Zabezpieczenie kafelka logo. Ustawienia wyglądu logo firmy potrafią dokleić
   `padding:20%`, a procent w wyściółce liczy się od szerokości bloku zawierającego
   (czyli okładki), nie od kafelka — logo rozdymało się przez to do 428 px. */
.dm-logo { box-sizing: border-box; max-width: 76px; max-height: 76px; }
@media (max-width: 520px) { .dm-logo { max-width: 58px; max-height: 58px; } }
.dm-cover-in { max-height: 100%; }

/* ===========================================================================
   NAGŁÓWEK PROFILU (mozaika zdjęć + tożsamość + chipy + fakty)
   =========================================================================== */
.dm-hero { background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: 14px; overflow: hidden; box-shadow: var(--pf-shadow); margin-bottom: 4px; }

/* Mozaika: duże zdjęcie po lewej, cztery mniejsze po prawej. Przy mniejszej
   liczbie zdjęć układ się kurczy, żeby nie zostawały puste kratki. */
.dm-mosaic { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 256px; background: var(--pf-border); }
.dm-mosaic-t { position: relative; overflow: hidden; background: var(--pf-surface-2); display: block; padding: 0; border: none; cursor: zoom-in; }
.dm-mosaic-t img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.dm-mosaic-t:hover img { transform: scale(1.03); }
.dm-mosaic > .dm-mosaic-t:first-child { grid-row: 1 / span 2; }
.dm-mosaic.solo { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.dm-mosaic.solo > .dm-mosaic-t:first-child { grid-row: auto; }
.dm-mosaic.trzy { grid-template-columns: 2fr 1fr; }
@media (max-width: 700px) {
  .dm-mosaic { height: 200px; grid-template-columns: 2fr 1fr; }
  .dm-mosaic > .dm-mosaic-t:nth-child(n+4) { display: none; }
}
@media (max-width: 460px) {
  .dm-mosaic { height: 190px; grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .dm-mosaic > .dm-mosaic-t:nth-child(n+2) { display: none; }
  .dm-mosaic > .dm-mosaic-t:first-child { grid-row: auto; }
}
.dm-mosaic-grad { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(8,12,22,.45), rgba(8,12,22,0)); pointer-events: none; }
.dm-mosaic-all { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 8px; background: var(--pf-surface); color: var(--pf-text); border: 1px solid var(--pf-border-2); font-size: .78rem; font-weight: 700; text-decoration: none; box-shadow: 0 2px 10px rgba(16,24,40,.15); }
.dm-mosaic-all b { font-weight: 800; color: var(--pf-text-3); }
.dm-mosaic-all:hover { border-color: var(--pf-brand); }

/* Tożsamość firmy */
.dm-ident { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px 0; }
.dm-ident-logo { width: 54px; height: 54px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--pf-surface); border: 1px solid var(--pf-border); font-weight: 800; font-size: 1rem; color: var(--pf-text-2); letter-spacing: .5px; }
.dm-ident-logo img { width: 100%; height: 100%; }
.dm-ident-txt { flex: 1; min-width: 0; }
.dm-ident .dm-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.2; color: var(--pf-text); margin: 0 0 3px; letter-spacing: -.02em; text-shadow: none; }
.dm-ident .dm-sub { font-size: .82rem; color: var(--pf-text-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dm-ident .dm-sub a { color: inherit; text-decoration: none; }
.dm-ident .dm-sub a:hover { color: var(--pf-brand-dark); text-decoration: underline; }
.dm-verified { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--pf-brand-dark); }
.dm-ident-acts { display: flex; gap: 8px; flex-shrink: 0; }
.dm-ghost { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--pf-border-2); background: var(--pf-surface); color: var(--pf-text-2); font-size: .8rem; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.dm-ghost:hover { border-color: var(--pf-brand); color: var(--pf-brand-dark); }
.dm-ghost.on { border-color: var(--pf-brand); color: var(--pf-brand-dark); background: var(--pf-ok-bg); }
@media (max-width: 640px) {
  .dm-ident { flex-wrap: wrap; padding: 14px 14px 0; }
  .dm-ident-acts { order: 3; width: 100%; }
  .dm-ident-acts .dm-ghost { flex: 1; justify-content: center; }
  .dm-ident .dm-name { font-size: 1.2rem; }
}

/* Chipy nagłówka */
.dm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 16px; }
@media (max-width: 640px) { .dm-chips { padding: 12px 14px 14px; gap: 6px; } }
.dm-chips .dm-chip { padding: 7px 12px; border-radius: 8px; font-size: .78rem; font-weight: 600; background: var(--pf-surface); border: 1px solid var(--pf-border); color: var(--pf-text-2); }
.dm-chips .dm-chip.ok { background: var(--pf-ok-bg); border-color: var(--pf-ok-bd); color: var(--pf-ok-tx); }
.dm-chips .dm-chip.warn { background: var(--pf-warn-bg); border-color: var(--pf-warn-bd); color: var(--pf-warn-tx); }
.dm-chips .dm-chip.zamk { background: var(--pf-bad-bg); border-color: var(--pf-bad-bd); color: var(--pf-bad-tx); }
.dm-chips a.dm-chip:hover { border-color: var(--pf-brand); }

/* Pasek faktów */
.dm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid var(--pf-border); }
.dm-fact { padding: 13px 18px; border-left: 1px solid var(--pf-border); min-width: 0; }
.dm-fact:first-child { border-left: none; }
.dm-fact b { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .09em; color: var(--pf-text-3); font-weight: 700; margin-bottom: 6px; }
.dm-fact span { font-size: .88rem; font-weight: 600; color: var(--pf-text); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .dm-facts { grid-template-columns: 1fr 1fr; }
  .dm-fact { padding: 11px 14px; }
  .dm-fact:nth-child(odd) { border-left: none; }
  .dm-fact:nth-child(n+3) { border-top: 1px solid var(--pf-border); }
}

/* ---------- rolki: strzałki także na telefonie ----------
   Były chowane poniżej 600 px i nic nie mówiło użytkownikowi, że pasek da się
   przewinąć w bok. Zostają na każdej szerokości, tylko mniejsze. */
@media (max-width: 600px) {
  .dm-reels-nav { display: flex !important; gap: 6px; }
  .dm-reels-nav button { width: 30px; height: 30px; font-size: .9rem; }
  .dm-reels-head { align-items: center; }
  .dm-reels-head p { font-size: .74rem; }
}
/* Prawa krawędź paska ścieniona — widać, że treść leci dalej. */
.dm-rail { -webkit-mask-image: linear-gradient(to right, #000 90%, rgba(0,0,0,.15) 100%); mask-image: linear-gradient(to right, #000 90%, rgba(0,0,0,.15) 100%); }
.dm-rail.koniec { -webkit-mask-image: none; mask-image: none; }

/* Znacznik „tłumaczenie automatyczne" — treść firmy pokazujemy w języku odwiedzającego,
   więc trzeba powiedzieć wprost, że to nie są słowa firmy tylko maszyny. */
.dm-tlum { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 600; color: var(--pf-text-3); background: var(--pf-surface-2); border: 1px solid var(--pf-border); border-radius: 999px; padding: 3px 10px; }
/* Ikonowe guziki udostępniania mieszczą teraz siedem opcji — zawijamy w dwa rzędy. */
/* Udostępnianie — siedem kwadratowych kafelków w barwach serwisów.
   Wcześniej były tu tylko dwie reguły dopasowujące, bez stylu bazowego: ikony
   wychodziły gołe, bez ramek i bez odstępów. */
/* Siatka zamiast zawijanego rzędu — siedem kafelków układa się w równe 4 + 3,
   a nie 6 + 1 z osieroconą ikoną w drugim wierszu. */
.dm-share { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dm-share a, .dm-share button {
  width: 100%; max-width: 52px; aspect-ratio: 1; height: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--pf-border-2);
  background: var(--pf-surface-2); color: var(--pf-text-2);
  font-size: 1rem; text-decoration: none; cursor: pointer; font-family: inherit;
  transition: transform .15s, filter .15s;
}
.dm-share a:hover, .dm-share button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.dm-share a[style*="background"] { color: #fff; }
@media (max-width: 400px) { .dm-share a, .dm-share button { width: 40px; height: 40px; } }
