/* =========================================================
   SEO Cards Widget – fixed (light by default, opt-in dark)
   ========================================================= */

:root {
    --scw-ink: #0f172a;
    --scw-ink-70: #334155;
    --scw-radius: 18px;
    --scw-shadow: 0 10px 30px rgba(2, 6, 23, .08);

    /* Kolory motywów (mogą być nadpisane z panelu) */
    --scw-blue: #1d4ed8;
    --scw-red: #ef4444;
    --scw-light: #eef2ff;
}

/* Reset na wszelki wypadek: nic nie „przydymia” wrappera */
.scw-widget {
    opacity: 1 !important;
    filter: none !important;
}

/* ---------- Tytuł bloku ---------- */
.scw-title {
    font-size: clamp(28px, 2.6vw, 42px);
    line-height: 1.1;
    margin: 0 0 24px;
    color: var(--scw-ink);
    font-weight: 800;
}

/* ---------- Grid ---------- */
.scw-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
    align-items: stretch;
}

/* ---------- Karta ---------- */
.scw-card {
    position: relative;
    /* dla ::before */
    grid-column: span 6;
    background: #fff;
    border-radius: var(--scw-radius);
    box-shadow: var(--scw-shadow);
    border: 1px solid rgba(2, 6, 23, .06);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    will-change: transform;
}

/* Pasek u góry (nie ucinany) */
.scw-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 48px;
    background: var(--scw-bar);
    border-top-left-radius: var(--scw-radius);
    border-top-right-radius: var(--scw-radius);
    z-index: 0;
    /* pod treścią */
}

/* Hover/focus */
.scw-card:hover,
.scw-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, .12);
}

/* ---------- Główka karty ---------- */
.scw-head {
    position: relative;
    z-index: 1;
    /* nad paskiem */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
}

.scw-ico {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.scw-ico svg {
    width: 24px;
    height: 24px;
    fill: var(--scw-bar-ink);
}

.scw-head h3 {
    margin: 0;
    font-size: clamp(18px, 1.5vw, 22px);
    color: #fff;
    font-weight: 800;
}

/* ---------- Lista (strzałki) ---------- */
/* WYŁĄCZ domyślne markery motywu (kwadraciki) */
.scw-list {
    list-style: none !important;
    margin: 0;
    padding: 12px 18px 20px 18px;
}

.scw-list li {
    list-style: none !important;
}

.scw-list li::marker {
    /* Safari/Chromium – znacznik listy */
    content: "" !important;
}

/* (jeśli masz gdzieś .elementor-widget-text-editor ustawiający markery) */
.elementor .scw-list,
.elementor .scw-list li {
    list-style: none !important;
}

/* Nasza strzałka (mask-svg) – zostaje bez zmian; dla pewności przypinam kolor i rozmiar) */
.scw-list {
    --arrow-size: 14px;
    --arrow-shift: 2px;
}

.scw-list li {
    position: relative;
    padding-left: calc(var(--arrow-size) + .8rem);
}

.scw-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--arrow-size);
    height: var(--arrow-size);
    transform: translateY(-50%);
    background: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M3 2l4 4-4 4" fill="none" stroke="%23000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center/contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M3 2l4 4-4 4" fill="none" stroke="%23000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center/contain;
    opacity: .95;
    transition: transform .15s ease;
}

.scw-list li:hover::before {
    transform: translateY(-50%) translateX(var(--arrow-shift));
}

/* Fallback (gdyby mask nie był wspierany) */
@supports not ((mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000))) {
    .scw-list li::before {
        width: 10px;
        height: 10px;
        background: none;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-50%) rotate(-45deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .scw-card,
    .scw-list li::before {
        transition: none;
    }
}

/* ---------- Motywy ---------- */
.scw-theme-blue {
    --scw-bar: var(--scw-blue);
    --scw-bar-ink: #fff;
}

.scw-theme-red {
    --scw-bar: var(--scw-red);
    --scw-bar-ink: #fff;
}

.scw-theme-light {
    --scw-bar: var(--scw-light);
    --scw-bar-ink: var(--scw-blue);
}

.scw-theme-light .scw-head h3 {
    color: var(--scw-ink);
}

.scw-theme-light .scw-ico {
    background: #fff;
}

/* ---------- Responsywność ---------- */
@media (max-width:1024px) {
    .scw-card {
        grid-column: span 12;
    }
}

/* =========================================================
   OPCJONALNY TRYB CIEMNY — tylko gdy dodasz klasę .scw-dark
   do wrappera: <section class="scw-widget scw-dark">…</section>
   ========================================================= */
.scw-dark {
    --scw-ink: #e5e7eb;
    --scw-ink-70: #cbd5e1;
    --scw-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.scw-dark .scw-card {
    background: #0b1220;
    border-color: rgba(255, 255, 255, .08);
}

.scw-dark .scw-title {
    color: var(--scw-ink);
}

.scw-dark .scw-theme-light {
    --scw-bar: #1f2937;
    --scw-bar-ink: #93c5fd;
}

.scw-dark .scw-ico {
    background: rgba(255, 255, 255, .08);
}

.scw-dark .scw-head h3 {
    color: #fff;
}
/* Pasek u góry – z twardym fallbackiem koloru */
.scw-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 48px;
    /* jeśli --scw-bar nie istnieje -> użyj --scw-blue, a jeśli i jej brak -> #1d4ed8 */
    background: var(--scw-bar, var(--scw-blue, #1d4ed8));
    border-top-left-radius: var(--scw-radius);
    border-top-right-radius: var(--scw-radius);
    z-index: 0;
}

/* Kolor tytułu oparty o zmienną z fallbackiem */
.scw-head h3 {
    margin: 0;
    font-size: clamp(18px, 1.5vw, 22px);
    color: var(--scw-head-color, #fff);
    font-weight: 800;
}

/* Motywy – większa specyficzność + ustawiamy też kolor tytułu */
.scw-card.scw-theme-blue {
    --scw-bar: var(--scw-blue, #1d4ed8);
    --scw-bar-ink: #fff;
    --scw-head-color: #fff;
}

.scw-card.scw-theme-red {
    --scw-bar: var(--scw-red, #ef4444);
    --scw-bar-ink: #fff;
    --scw-head-color: #fff;
}

.scw-card.scw-theme-light {
    --scw-bar: var(--scw-light, #eef2ff);
    --scw-bar-ink: var(--scw-blue, #1d4ed8);
    --scw-head-color: var(--scw-ink, #0f172a);
}

/* Ikona bierze kolor z bar-ink (bez zmian) */
.scw-ico svg {
    fill: var(--scw-bar-ink, #fff);
}
/* Pasek – można zostawić jak jest; tylko kosmetyka wysokości */
.scw-card::before {
    height: 52px;
    /* było 48 – lepiej „przykrywa” zaokrąglenie */
}

/* Ikona na pasku nie zasłania już koloru */
.scw-ico {
    background: rgba(255, 255, 255, .18);
    /* było .85 – teraz subtelne szkło */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

/* W jasnym motywie zostawiamy białe tło ikony (bo pasek jest jasny) */
.scw-card.scw-theme-light .scw-ico {
    background: #fff;
    box-shadow: none;
}

/* (opcjonalnie) jeśli chcesz zero wypełnienia ikony na pasku */
.scw-card.scw-theme-blue .scw-ico,
.scw-card.scw-theme-red .scw-ico {
    /* alternatywa:
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45);
  */
}
/* Ikona: wymuś idealne koło i nie pozwól flexowi jej rozciągać */
.scw-ico {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    /* stała szer./wys. w flex */
    border-radius: 50%;
    /* KOŁO zamiast zaokrąglonego kwadratu */
    line-height: 0;
    /* brak „dodatkowej wysokości” od linii */
}

/* Zabezpieczenie przed stylami motywu */
.scw-ico svg {
    width: 24px !important;
    height: 24px !important;
    aspect-ratio: 1 / 1;
    /* zachowaj proporcje */
    display: block;
}

/* Jasny motyw – białe koło (bez jajowatego efektu) */
.scw-card.scw-theme-light .scw-ico {
    background: #fff;
    box-shadow: none;
}

/* (Masz już) pasek – jeśli chcesz, zostaw 78px */
.scw-card::before {
    height: 78px;
}