/* ════════════════════════════════════════════════════════════════════
   KABEX — footer.css
   Stopka V1 mass-market klasyk (wybrany 2026-05-20)

   Struktura:
   1. Newsletter strip (ciemny niebieski)
   2. Main footer (5 kolumn, dark navy)
   3. Oddziały row (4 karty CPT 'oddzial')
   4. Payment + courier logos
   5. Trust badges
   6. Bottom (copyright + legal + Klikon)
   ════════════════════════════════════════════════════════════════════ */

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 1. NEWSLETTER STRIP                                              ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer-newsletter {
    background: var(--color-primary);            /* #1E5BA8 */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding-block: var(--sp-5);
}
.footer-newsletter__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--sp-6);
}
.footer-newsletter__copy {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.footer-newsletter__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.footer-newsletter__icon svg { width: 24px; height: 24px; }

.footer-newsletter__text { line-height: 1.3; }

.footer-newsletter__heading {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1.1;
}
.footer-newsletter__subtitle {
    margin: 0;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.footer-newsletter__form {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 420px;
    max-width: 520px;
}
.footer-newsletter__input {
    flex: 1;
    padding: 0 var(--sp-4);
    height: 48px;
    background: #fff;
    color: var(--color-dark);
    border: 0;
    font-size: var(--fs-base);
    font-family: var(--font-sans);
}
.footer-newsletter__input::placeholder { color: var(--color-text-muted); }
.footer-newsletter__input:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}
.footer-newsletter__btn {
    padding: 0 var(--sp-6);
    height: 48px;
    background: var(--color-accent);             /* żółty */
    color: var(--color-dark);
    border: 0;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--t-fast);
    white-space: nowrap;
}
.footer-newsletter__btn:hover { background: var(--color-accent-dark); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 2. MAIN FOOTER (5 kolumn — dark)                                 ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer {
    background: var(--color-bg-dark);            /* #131C2A */
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-sm);
}

.footer__main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
    gap: var(--sp-6);
    padding-block: var(--sp-12);
}

.footer__col {
    min-width: 0;
}

/* ── Col 1: brand ─────────────────────────────────────────────── */
.footer__col--brand .footer__logo { display: inline-block; margin-bottom: var(--sp-5); }
.footer__col--brand .footer__logo img,
.footer__col--brand .footer__logo svg { max-height: 72px; width: auto; height: auto; }
.footer__about {
    margin: 0 0 var(--sp-5);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

/* Social icons — round, wyróżnione (jak na screenie) */
.footer__socials {
    display: flex;
    gap: var(--sp-2);
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer__socials__item { list-style: none; }
.footer__socials__link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--r-full);                /* round */
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
}
.footer__socials__link:hover {
    background: var(--color-accent);
    color: var(--color-dark);
}
.footer__socials__icon { width: 18px; height: 18px; }

/* ── Col 2-4: menu lists ──────────────────────────────────────── */
.footer__heading {
    margin: 0 0 var(--sp-4);
    font-family: var(--font-display);
    font-size: var(--fs-sm);                     /* 14px */
    font-weight: 800;
    color: var(--color-accent);                  /* żółty heading (jak na screenie) */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.footer__menu li { line-height: 1.2; }
.footer__menu a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--t-fast);
}
.footer__menu a:hover { color: var(--color-accent); }

/* ── Col 5: kontakt ──────────────────────────────────────────── */
.footer__col--contact .footer__contact-phone {
    margin: 0 0 var(--sp-3);
    font-family: var(--font-sans);
    font-size: var(--fs-lg);                     /* 20px duży telefon */
    font-weight: 700;
    line-height: 1.1;
}
.footer__col--contact .footer__contact-phone a {
    color: #fff;
    text-decoration: none;
}
.footer__col--contact .footer__contact-phone a:hover { color: var(--color-accent); }

.footer__contact-item {
    margin: 0 0 var(--sp-2);
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    font-style: normal;
}
.footer__contact-item a { color: rgba(255, 255, 255, 0.75); text-decoration: none; transition: color var(--t-fast); }
.footer__contact-item a:hover { color: var(--color-accent); }

.footer__contact-hours {
    margin-top: var(--sp-3);
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--fs-xs);
}

.footer__chat-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-accent);
    color: var(--color-dark);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-xs);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background var(--t-fast);
}
.footer__chat-btn:hover { background: var(--color-accent-dark); color: var(--color-dark); }
.footer__chat-btn svg { width: 14px; height: 14px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 3. ODDZIAŁY ROW (4 karty z CPT 'oddzial')                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer__branches-wrap {
    padding-block: var(--sp-6);
}

.footer__branches {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-3);
}

.footer__branch {
    position: relative;
    background: #1a2638;
    border-left: 3px solid var(--color-accent);
    overflow: hidden;
    transition: transform var(--t-base), border-color var(--t-fast);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}
.footer__branch:hover {
    transform: translateY(-2px);
    border-left-color: #fff;
}
.footer__branch--main {
    border-left-color: var(--color-accent);
    border-left-width: 4px;
}

/* Zdjęcie oddziału po prawej z gradientem fade do navy po lewej.
   Tło "znika" pod kolorem granatowym żeby tekst (po lewej) był czytelny. */
.footer__branch.has-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--kbx-branch-photo, none);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.85;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.85) 70%, black 100%);
            mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.85) 70%, black 100%);
}
/* Dodatkowy gradient overlay od lewej (navy) → transparent po prawej, dla pewności kontrastu tekstu */
.footer__branch.has-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1a2638 0%, rgba(26,38,56,0.92) 35%, rgba(26,38,56,0.55) 60%, rgba(26,38,56,0.15) 90%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

/* Mapa jako tło banera (góra karty) */
/* Mapowy pasek na górze karty oddziału — wyłączony (chowamy ciemny element) */
.footer__branch-map { display: none; }

/* Content card */
.footer__branch-content {
    padding: var(--sp-3) var(--sp-4);
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__branch-ribbon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-accent);
    color: var(--color-dark);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    letter-spacing: 0.1em;
    z-index: 2;
}

.footer__branch-title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 800;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.footer__branch-address {
    margin: 0 0 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-xs);
    line-height: 1.4;
}

.footer__branch-phone {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-xs);
    font-weight: 500;
}
.footer__branch-phone a {
    color: inherit;
    text-decoration: none;
}
.footer__branch-phone a:hover { color: var(--color-accent); }

.footer__branch-link {
    display: inline-block;
    margin-top: auto;
    padding-top: var(--sp-2);
    color: var(--color-accent);
    text-decoration: none;
    font-size: var(--fs-xs);
    font-weight: 600;
    transition: color var(--t-fast);
}
.footer__branch-link:hover {
    color: #fff;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 4. PAYMENT + COURIER LOGOS                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer__logos {
    padding-block: var(--sp-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__logos-row {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}
.footer__logo-img {
    height: 24px;
    width: auto;
    opacity: 0.55;
    filter: brightness(2) saturate(0);
    transition: opacity var(--t-fast), filter var(--t-fast);
}
.footer__logo-img:hover {
    opacity: 1;
    filter: none;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 5. TRUST BADGES                                                  ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer__trust {
    padding-block: var(--sp-3);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
}
.footer__trust-item {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-xs);
    font-weight: 500;
}
.footer__trust-icon {
    color: var(--color-accent);
    display: inline-flex;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 6. BOTTOM (copyright + legal + Klikon)                           ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.footer__bottom {
    background: #0a1220;                         /* jeszcze ciemniejsze */
    padding-block: var(--sp-4);
    color: rgba(255, 255, 255, 0.45);
    font-size: var(--fs-xs);
}
.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.footer__copyright {
    margin: 0;
}

.footer__legal {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-5);
}
.footer__legal li { line-height: 1; }
.footer__legal a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color var(--t-fast);
}
.footer__legal a:hover { color: var(--color-accent); }

.footer__made-by {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease, opacity 0.2s ease;
}
.footer__made-by:hover { color: #fff; }
.footer__made-by-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.footer__made-by-logo {
    height: 22px;
    width: auto;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.footer__made-by:hover .footer__made-by-logo { opacity: 1; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║ RESPONSIVE                                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@media (max-width: 1199px) {
    .footer__main {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-8);
    }
    .footer__col--brand { grid-column: 1 / -1; }
    .footer__branches { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    /* Newsletter — stack vertical */
    .footer-newsletter__inner {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
    }
    .footer-newsletter__form { min-width: 0; }

    /* Main footer — single column */
    .footer__main {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
        padding-block: var(--sp-8);
    }

    /* Branches — single column */
    .footer__branches { grid-template-columns: 1fr; }

    /* Logos — center stack */
    .footer__logos {
        flex-direction: column;
        text-align: center;
    }

    /* Bottom — stack */
    .footer__bottom-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--sp-3);
    }
    .footer__legal { justify-content: center; }
}
