/*
 * WordPress Migration CSS
 * Styles ported from kreator.legalgeek.pl (Elementor)
 * DO NOT merge into landing.css — this is a separate file for WP-migrated pages.
 */

/* Audyt wydajności 2026-10: Poppins jest SELF-HOSTED (layout landingu: preload 400/700 + @font-face
   z font-display: swap). Ten @font-face to metryczny zamiennik na czas, zanim Poppins się wczyta —
   łamanie tekstu i wysokość wierszy zbliżone do Poppins, więc podmiana (swap) prawie nie przesuwa
   layoutu. (Wcześniej, przy Google Fonts z display=optional, był tylko wyglądem pierwszego renderu.)
   ⚠️ src wg REALNIE dostępnych fontów (zmierzone harnessem cls-libsans.cjs): local("Liberation Sans")
   = host Linux/Lighthouse (Arial się NIE rozwiązuje, Liberation TAK), local("Arial") = Windows/macOS,
   local("Roboto") = Android. size-adjust 108% dobrane harnessem: Liberation łamie lead-akapit na 5
   wierszy przy 360/390/412 jak Poppins (bramka LH 412). */
@font-face {
    font-family: "Poppins Fallback";
    src: local("Liberation Sans"), local("Arial"), local("Roboto");
    size-adjust: 108%;
    ascent-override: 93.62%;
    descent-override: 31.21%;
    line-gap-override: 0%;
}

/* CRO perf (R3 CLS): rezerwacja wysokości lead-akapitu hero. Przy font-display: swap (self-hosted
   Poppins, 2026-10) to ona — razem z metrycznym zamiennikiem wyżej — trzyma box lead-akapitu stały,
   gdy Poppins podmienia zamiennik po pierwszym renderze. min-height =
   wysokość Poppinsem per pasmo (zmierzone harnessem cls-lead-harness.cjs; == docelowa wysokość, bez
   trwałej luki): <438px → 5 wierszy (145px), 438–560 → 4 (116px), ≥561 → 3 (brak). Tylko ≤lg. */
@media (max-width: 437px) {
    .hero-lead { min-height: 145px; }
}
@media (min-width: 438px) and (max-width: 560px) {
    .hero-lead { min-height: 116px; }
}

/* CRO perf (R3 CLS finisz): DETERMINISTYCZNA rezerwacja wysokości H1 hero (home). Winowajca 3/3
   przebiegów: h1.wp-heading-hero 120→160px (+40) przy późnej aplikacji Poppinsa (arkusz Google po
   FCP pod slow-4G) — fallback łamie H1 na mniej wierszy niż Poppins. min-height = wysokość Poppinsem
   per pasmo szerokości (mobile 28px/40px, zmierzone harnessem cls-h1-harness/cls-h1-trans):
     <347px → 6 wierszy (240px), 347–364 → 5 (200px), 365–442 → 4 (160px, bramka LH 412!),
     443–574 → 3 (120px), 575–767 → 2 (80px).
   Scoped do .hero-h1 (home) — inne strony mają inne copy H1. Powyżej 767px H1 zmienia rozmiar
   (36/50, 42/57) i nie był flagowany (bramka = mobile). == docelowa wysokość → bez trwałej luki. */
@media (max-width: 346px)                          { .hero-h1 { min-height: 240px; } }
@media (min-width: 347px) and (max-width: 364px)   { .hero-h1 { min-height: 200px; } }
@media (min-width: 365px) and (max-width: 442px)   { .hero-h1 { min-height: 160px; } }
@media (min-width: 443px) and (max-width: 574px)   { .hero-h1 { min-height: 120px; } }
@media (min-width: 575px) and (max-width: 767px)   { .hero-h1 { min-height: 80px; } }

/* ============================================
   ELEMENTOR DESIGN TOKENS (from Kit ID: 6)
   ============================================ */

:root {
    --wp-color-primary: #023353;
    --wp-color-secondary: #92979E;
    --wp-color-text: #222222;
    --wp-color-accent: #CC365C;
    --wp-color-white: #FFFFFF;
    --wp-color-light-bg: #F8F5EE; /* redesign krok 1: ciepły papier-alt zamiast chłodnej bieli */
    --wp-color-green: #36B86D;
    --wp-color-border: #E5EAEF;
    --wp-color-dark-red: #C91D48;
    --wp-color-yellow: #FFE500;

    /* CRO perf (R3): „Poppins Fallback" (size-adjust) w stacku eliminuje reflow przy swapie fontu. */
    --wp-font-primary: "Poppins", "Poppins Fallback", sans-serif;
    /* CRO perf: mapujemy akcenty (Roboto/Archivo) na Poppins — jedna rodzina fontów na landingu. */
    --wp-font-accent: "Poppins", "Poppins Fallback", sans-serif;
    --wp-font-archivo: "Poppins", "Poppins Fallback", sans-serif;

    --wp-container-max: 1480px;
    --wp-widget-spacing: 20px;
    --wp-btn-radius: 40px;
}

/* ============================================
   BASE TYPOGRAPHY (match WP global styles)
   ============================================ */

/* Body typography moved to _layout.scss (body.kreator) to avoid cascade conflicts */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--wp-font-primary);
    color: var(--wp-color-primary);
    margin: 0;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    line-height: 42px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 33px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 33px;
}

p {
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
    margin: 0 0 15px;
}

a {
    color: var(--wp-color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   WP SECTION LAYOUTS
   ============================================ */

.wp-section {
    padding: 60px 0;
}

.wp-container {
    max-width: var(--wp-container-max);
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   WP BUTTONS (Elementor style)
   ============================================ */

.wp-btn {
    display: inline-block;
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 15px 30px;
    border-radius: var(--wp-btn-radius);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.wp-btn--accent {
    background-color: var(--wp-color-accent);
    color: var(--wp-color-white);
}

.wp-btn--accent:hover {
    background-color: var(--wp-color-dark-red);
    color: var(--wp-color-white);
}

/* ============================================
   WP HOMEPAGE CTA
   ============================================ */

.wp-home-cta {
    margin: 60px 0;
    padding: 60px 0;
    background: var(--wp-color-primary);
}

.wp-home-cta__inner {
    max-width: 930px;
    margin: 0 auto;
    text-align: center;
}

.wp-home-cta__title {
    margin-bottom: 24px;
    color: var(--wp-color-white);
}

.wp-home-cta__body {
    max-width: 860px;
    margin: 0 auto 32px;
    color: rgba(255, 255, 255, 0.92);
}

.wp-home-cta__button:hover,
.wp-home-cta__button:focus-visible {
    text-decoration: none;
}

/* ============================================
   WP NAVBAR
   ============================================ */

#main-nav.wp-main-nav {
    min-height: 70px;
    border-bottom: 1px solid rgba(2, 51, 83, 0.06);
    box-shadow: 0 8px 24px rgba(2, 51, 83, 0.06);
}

.wp-main-nav a:hover,
.wp-main-nav button:hover {
    text-decoration: none;
}

.wp-main-nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    min-height: 70px;
    padding: 4px 40px;
}

.wp-main-nav__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    order: 1;
}

.wp-main-nav__logo {
    width: 55px;
    height: auto;
    display: block;
}

.wp-main-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--wp-color-primary);
    cursor: pointer;
}

.wp-main-nav__toggle-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.wp-main-nav__panel {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 24px;
    order: 2;
}

.wp-main-nav__menu-wrap {
    flex: 1;
}

.wp-main-nav__menu {
    display: flex;
    align-items: center;
    gap: 42px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-main-nav__item {
    position: relative;
    display: flex;
    align-items: center;
}

.wp-main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #CC3366;
    cursor: pointer;
}

.wp-main-nav__link:hover,
.wp-main-nav__link:focus-visible {
    color: var(--wp-color-accent);
    outline: none;
}

.wp-main-nav__chevron {
    display: inline-flex;
    width: 12px;
    height: 8px;
    color: currentColor;
}

.wp-main-nav__dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 420px;
    padding-top: 12px;
}

.wp-main-nav__dropdown[x-cloak],
.wp-main-nav__mobile-dropdown[x-cloak] {
    display: none !important;
}

.wp-main-nav__dropdown-grid,
.wp-main-nav__dropdown-list {
    background: #fff;
    border: 1px solid rgba(2, 51, 83, 0.08);
    border-radius: 20px;
    box-shadow: 0 24px 54px rgba(2, 51, 83, 0.14);
}

.wp-main-nav__dropdown-grid {
    display: grid;
    grid-template-columns: repeat(var(--wp-nav-columns, 1), minmax(220px, 1fr));
    gap: 18px;
    min-width: min(980px, calc(100vw - 80px));
    padding: 20px;
}

.wp-main-nav__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 100%;
    padding: 16px;
    border: 1px solid rgba(2, 51, 83, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #f9fbfc 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wp-main-nav__card:hover,
.wp-main-nav__card:focus-visible {
    border-color: rgba(204, 54, 92, 0.28);
    box-shadow: 0 18px 38px rgba(2, 51, 83, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.wp-main-nav__card-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 96px;
    padding: 12px;
    border-radius: 14px;
    background: #f7f9fa;
}

.wp-main-nav__card-image {
    display: block;
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.wp-main-nav__card-title {
    font-family: var(--wp-font-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--wp-color-primary);
}

.wp-main-nav__card-description {
    font-family: var(--wp-font-primary);
    font-size: 14px;
    font-weight: 300;
    line-height: 23px;
    color: var(--wp-color-text);
}

.wp-main-nav__card-cta {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    font-family: var(--wp-font-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--wp-color-accent);
}

.wp-main-nav__dropdown-list {
    min-width: 280px;
    padding: 10px;
    list-style: none;
    margin: 0;
}

.wp-main-nav__dropdown-list li {
    margin: 0;
}

.wp-main-nav__dropdown-list-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-family: var(--wp-font-primary);
    font-size: 15px;
    line-height: 22px;
    color: var(--wp-color-text);
}

.wp-main-nav__dropdown-list-link:hover,
.wp-main-nav__dropdown-list-link:focus-visible {
    background: #f7f9fa;
    color: var(--wp-color-accent);
    outline: none;
}

.wp-main-nav__dropdown-list-link--muted {
    color: var(--wp-color-secondary);
}

.wp-main-nav__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    order: 3;
}

.wp-main-nav__action,
.wp-main-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 40px;
    font-family: var(--wp-font-accent);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.wp-main-nav__action {
    color: var(--wp-color-accent);
    background: transparent;
}

.wp-main-nav__action:hover,
.wp-main-nav__action:focus-visible {
    color: var(--wp-color-dark-red);
    outline: none;
}

.wp-main-nav__cta {
    color: var(--wp-color-accent);
    background: rgba(204, 54, 92, 0.18);
    padding-inline: 24px;
}

.wp-main-nav__cta:hover,
.wp-main-nav__cta:focus-visible {
    background: rgba(204, 54, 92, 0.26);
    color: var(--wp-color-dark-red);
    outline: none;
}

.wp-main-nav__cart-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
}

.wp-main-nav__cart-icon svg {
    width: 14px;
    height: 14px;
}

.wp-main-nav__mobile-dropdown {
    display: none;
}

@media (max-width: 1023px) {
    .wp-main-nav__container {
        padding: 12px 16px;
        min-height: 76px;
        flex-wrap: wrap;
    }

    .wp-main-nav__brand {
        order: 1;
    }

    .wp-main-nav__toggle {
        order: 2;
    }

    .wp-main-nav__actions {
        order: 3;
        flex-direction: row;
        gap: 4px;
    }

    .wp-main-nav__logo {
        width: 72px;
    }

    .wp-main-nav__panel {
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 8px 0 18px;
    }

    .wp-main-nav__menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .wp-main-nav__item {
        display: block;
        border-bottom: 1px solid rgba(2, 51, 83, 0.08);
    }

    .wp-main-nav__link {
        width: 100%;
        justify-content: space-between;
        padding: 16px 0;
    }

    .wp-main-nav__dropdown {
        display: none !important;
    }

    .wp-main-nav__mobile-dropdown {
        display: block;
        padding: 0 0 14px;
    }

    .wp-main-nav__mobile-cards,
    .wp-main-nav__mobile-list {
        display: grid;
        gap: 12px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .wp-main-nav__mobile-card,
    .wp-main-nav__mobile-list-link {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 14px 16px;
        border: 1px solid rgba(2, 51, 83, 0.08);
        border-radius: 16px;
        background: #fff;
    }

    .wp-main-nav__mobile-card-title {
        font-family: var(--wp-font-primary);
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        color: var(--wp-color-primary);
    }

    .wp-main-nav__mobile-card-description {
        font-family: var(--wp-font-primary);
        font-size: 14px;
        font-weight: 300;
        line-height: 22px;
        color: var(--wp-color-text);
    }
}

@media (max-width: 639px) {
    .wp-main-nav__container {
        padding: 0;
        min-height: auto;
        gap: 0;
    }

    /* Top row: actions take full width, forcing a new flex line */
    .wp-main-nav__actions {
        order: 1;
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        gap: 4px;
        padding: 6px 16px;
        border-bottom: 1px solid rgba(2, 51, 83, 0.06);
    }

    /* Hide CTA on mobile */
    .wp-main-nav__cta {
        display: none;
    }

    /* Smaller action buttons on mobile */
    .wp-main-nav__action {
        font-size: 12px;
        min-height: 32px;
        padding: 4px 10px;
    }

    /* Second row: hamburger left, logo centered */
    .wp-main-nav__toggle {
        order: 2;
        margin-left: 16px;
    }

    .wp-main-nav__brand {
        order: 3;
        flex: 1;
        justify-content: center;
    }

    .wp-main-nav__logo {
        width: 48px;
    }

    /* Panel below both rows */
    .wp-main-nav__panel {
        order: 4;
        width: 100%;
        padding: 8px 16px 18px;
    }
}

/* ============================================
   WP FAQ ACCORDION
   ============================================ */

.wp-faq-item {
    border: 1px solid var(--wp-color-border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.wp-faq-item__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 500;
    color: var(--wp-color-primary);
    background: var(--wp-color-white);
    transition: background-color 0.2s;
}

.wp-faq-item__question:hover {
    background-color: var(--wp-color-light-bg);
}

.wp-faq-item__question::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: transform 0.3s;
    color: var(--wp-color-accent);
}

.wp-faq-item.is-open .wp-faq-item__question::after {
    transform: rotate(180deg);
}

.wp-faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.wp-faq-item.is-open .wp-faq-item__answer {
    max-height: 1000px;
    padding: 0 20px 20px;
}

.wp-faq-item__answer p {
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
    margin-bottom: 10px;
}

/* ============================================
   WP PRODUCT PAGE
   ============================================ */

.wp-product-feature-list {
    list-style: none;
    padding: 0;
}

.wp-product-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
}

.wp-product-feature-list li .wp-icon {
    color: var(--wp-color-green);
    font-size: 16px;
    margin-top: 6px;
    flex-shrink: 0;
}

/* ============================================
   WP LEGAL PAGE (Terms, Privacy, etc.)
   ============================================ */

.wp-legal {
    padding: 40px 0 80px;
}

.wp-legal h2 {
    font-family: var(--wp-font-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 33px;
    color: var(--wp-color-primary);
    margin: 30px 0 15px;
}

.wp-legal h3 {
    font-family: var(--wp-font-primary);
    font-size: 18px;
    font-weight: 600;
    color: var(--wp-color-primary);
    margin: 20px 0 10px;
}

.wp-legal h4 {
    font-family: var(--wp-font-primary);
    font-size: 17px;
    font-weight: 600;
    color: var(--wp-color-primary);
    margin: 25px 0 10px;
}

.wp-legal p {
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
    margin-bottom: 15px;
}

.wp-legal ol, .wp-legal ul {
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
    padding-left: 30px;
    margin-bottom: 15px;
}

.wp-legal ol li, .wp-legal ul li {
    margin-bottom: 5px;
}

.wp-legal a {
    color: var(--wp-color-accent);
    text-decoration: none;
}

.wp-legal a:hover {
    text-decoration: underline;
}

.wp-legal table {
    font-family: var(--wp-font-primary);
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: var(--wp-color-text);
}

.wp-legal table strong {
    font-weight: 600;
}

/* ============================================
   WP RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .wp-section {
        padding: 40px 0;
    }
}

@media (max-width: 767px) {
    .wp-section {
        padding: 30px 0;
    }

    .wp-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
