/* ─── Footer (template part) ─────────────────
   Granatowy footer na primary navy (#0a1628), z 4 kolumnami:
   - brand: logo + opis + dane firmy (NIP/REGON/adres)
   - col 1: linki "Oferta"
   - col 2: linki "Firma"
   - col 3: kontakt (telefon, email, godziny, CTA)
   Pod kolumnami separator + bottom bar (copyright + linki prawne). */
footer {
    margin-top: 0 !important;
}


.kordit-footer {
    color: w
}

/* Likwiduje białą przerwę między sekcją poprzedzającą a footerem.
   wp:template-part wraper ma czasem domyślny margin, plus content area
   może mieć margin-bottom. Wymuszamy 0 margin na samym wraperze + na
   poprzedzającym siblingu jeżeli to alignfull section. */
.wp-block-template-part:has(> .kordit-footer) {
    margin: 0 !important;
}

.wp-site-blocks>*+.wp-block-template-part:has(.kordit-footer),
.wp-site-blocks>.wp-block-template-part:has(.kordit-footer) {
    margin-top: 0 !important;
}

.wp-site-blocks .wp-block-template-part:has(.kordit-footer) {
    margin-block-start: 0 !important;
}

.kordit-footer a {
    color: var(--wp--preset--color--background);
    text-decoration: none;
    transition: color 0.15s ease;
}

.kordit-footer a:hover {
    color: var(--wp--preset--color--accent-2);
}

/* ━━ TOP — 4 kolumny ━━━━━━━━━━━━━━━━━━━ */
.kordit-footer__top {
    display: grid !important;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
    margin: 0 0 var(--wp--preset--spacing--2-xl) 0 !important;
}

/* BRAND — logo + opis + dane firmy */
.kordit-footer__brand {
    display: flex !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--lg);
    margin: 0 !important;
}

.kordit-footer__logo {
    margin: 0 !important;
}

.kordit-footer__logo img {
    /* białe logo na ciemnym tle — jeśli logo ma dark stroke,
       odwracamy filtrem (user może podmienić na białe logo) */
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.kordit-footer__about {
    color: rgba(244, 241, 236, 0.7);
    line-height: 1.6;
    margin: 0 !important;
    max-width: 38ch;
}

.kordit-footer__company {
    display: flex !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--sm);
    margin: 0 !important;
}

.kordit-footer__company>p {
    margin: 0 !important;
    color: rgba(244, 241, 236, 0.7);
    line-height: 1.5;
}

.kordit-footer__company-name {
    color: var(--wp--preset--color--background) !important;
}

/* COL — heading + lista linków */
.kordit-footer__col {
    display: flex !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--md);
    margin: 0 !important;
}

.kordit-footer__heading {
    color: var(--wp--preset--color--background) !important;
    font-weight: 700;
    margin: 0 0 var(--wp--preset--spacing--sm) 0 !important;
    position: relative;
    padding-bottom: var(--wp--preset--spacing--sm);
}

.kordit-footer__heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    background: var(--wp--preset--color--accent-2);
    border-radius: 1px;
}

.kordit-footer__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kordit-footer__list li {
    margin: 0;
}

.kordit-footer__list a {
    color: rgba(244, 241, 236, 0.75);
    font-size: 0.9375rem;
}

.kordit-footer__list a:hover {
    color: var(--wp--preset--color--background);
}

/* CONTACT COL */
.kordit-footer__col--contact {
    gap: var(--wp--preset--spacing--md);
}

.kordit-footer__contact-line {
    margin: 0 !important;
    color: rgba(244, 241, 236, 0.85);
}

.kordit-footer__contact-line--phone a {
    color: var(--wp--preset--color--background) !important;
    font-weight: 700;
}

.kordit-footer__contact-line--phone a:hover {
    color: var(--wp--preset--color--accent-2) !important;
}

.kordit-footer__contact-hours {
    color: rgba(244, 241, 236, 0.6) !important;
    line-height: 1.5;
    margin: 0 !important;
}

.kordit-footer__cta {
    margin-top: var(--wp--preset--spacing--sm) !important;
}

/* ━━ Separator ━━━━━━━━━━━━━━━━━━━━━━━━ */
.kordit-footer__hr.wp-block-separator {
    border: 0;
    border-top: 1px solid rgba(244, 241, 236, 0.1);
    margin: var(--wp--preset--spacing--xl) 0 var(--wp--preset--spacing--lg) 0 !important;
    height: 0;
    background: transparent;
    opacity: 1;
}

/* ━━ BOTTOM — copyright + linki prawne ━━ */
.kordit-footer__bottom {
    align-items: center !important;
    gap: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg) !important;
    margin: 0 !important;
}

.kordit-footer__copy {
    color: rgba(244, 241, 236, 0.55) !important;
    margin: 0 !important;
}

.kordit-footer__legal {
    align-items: center !important;
    gap: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg) !important;
    margin: 0 !important;
}

.kordit-footer__legal-link {
    margin: 0 !important;
    color: rgba(244, 241, 236, 0.55);
}

.kordit-footer__legal-link a {
    color: rgba(244, 241, 236, 0.55);
}

.kordit-footer__legal-link a:hover {
    color: var(--wp--preset--color--background);
}

/* ━━ RESPONSIVE ━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1100px) {
    .kordit-footer__top {
        grid-template-columns: 1fr 1fr;
    }

    .kordit-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .kordit-footer__top {
        grid-template-columns: 1fr;
        /* mniejszy odstęp pod kolumnami na mobile (2XL → XL) */
        margin-bottom: var(--wp--preset--spacing--xl) !important;
    }

    .kordit-footer__brand {
        grid-column: auto;
    }
}

/* Mobile — redukcja pionowego paddingu footera.
   Inline-style z block attrs to 3XL/LG; na telefonie 3XL góra to za dużo.
   !important bije inline style. */
@media (max-width: 900px) {
    .kordit-footer {
        padding-top: var(--wp--preset--spacing--2-xl) !important;
        padding-bottom: var(--wp--preset--spacing--md) !important;
    }
}

@media (max-width: 640px) {
    .kordit-footer {
        padding-top: var(--wp--preset--spacing--xl) !important;
        padding-bottom: var(--wp--preset--spacing--md) !important;
    }
}