/* =========================================
   STOPKA
   ========================================= */

.footer-wrapper {
    background-color: #f2f2f2;      /* cała stopka poza czarnym banerem */
    margin-top: 40px;
    font-family: "Montserrat", sans-serif;
    white-space: normal;
    --footer-side-gap: clamp(16px, 2.5vw, 24px);
}

/* ---------- CZARNY BANNER (CTA) ---------- */

.footer-cta {
    background: transparent;
    padding: 32px 0 24px;
}

.footer-cta-inner {
    max-width: 1296px;
    width: min(1296px, calc(100% - (var(--footer-side-gap) * 2)));
    margin: 0 auto;
    background-color: #000000;
    border-radius: 24px;
    box-sizing: border-box;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: visible;   /* obrazek może lekko wystawać */
}

.footer-cta-text {
    flex: 0 0 50%;
    max-width: 50%;
    color: #ffffff;
}

.footer-cta-title {
    font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 8px;
}

/* elementy z text-wrap mają korzystać z pełnej szerokości kolumny */
.footer-cta-title.text-wrap,
.footer-desc-title.text-wrap,
.footer-desc-textmain.text-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-cta-desc {
    margin: 0 0 16px;
    font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    font-weight: 300;
}

.footer-cta-btn {
    font-weight: 700;
}

.footer-cta-image {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-cta-image img {
    max-width: 320px;
    width: 100%;
    display: block;
    position: absolute;
}

/* mobile */

@media (max-width: 767.98px) {
    .footer-cta-inner {
        flex-direction: column;
        padding: 20px 18px;           /* odstęp od krawędzi ekranu */
    }

    .footer-cta-text {
        flex: 1 1 auto;
        max-width: 100%;
        text-align: center;
    }
    .footer-cta-btn {
        margin: 0 auto;
        display: block;
        width: fit-content;
    }

    .footer-cta-image {
        flex: 1 1 auto;
        max-width: 100%;
        justify-content: flex-start;
        display: none;                /* na razie chowamy obrazek na mobile */
    }

    .footer-cta-image img {
        position: static;
        max-width: 260px;
        transform: translateY(-6%);
    }
}

/* ---------- GŁÓWNA CZĘŚĆ STOPKI ---------- */

.footer-main {
    padding-top: 5px;
}

.footer-main-inner {
    max-width: 1296px;
    width: min(1296px, calc(100% - (var(--footer-side-gap) * 2)));
    margin: 0 auto;
    background-color: #f2f2f2;
    border-radius: 24px;
    box-sizing: border-box;
}

.footer-main-top {
    text-align: left;
}

.footer-logo {
    max-width: 260px;
    height: auto;
    display: block;
    margin-bottom: 16px;
}

.footer-desc-title,
.footer-desc-textmain {
    max-width: 960px;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    color: #111111;
}

.footer-desc-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-desc-textmain {
    font-weight: 400;
}

.footer-separator {
    margin: 20px 0 16px;
    border: none;
    border-top: 1px solid #d4d4d4;
}

/* linki po lewej + panel konta po prawej */

.footer-links-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 8px;
    margin-bottom: 10px;
}

.footer-links-left {
    flex: 2;
    font-weight: 300!important;
    color: #000;
}

.footer-links-right {
    flex: 1;
    max-width: 320px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 18px;
    padding: 16px 18px 18px;
    font-weight: 300!important;
}

.footer-links-right h3 {
    margin: 0 0 8px;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
    font-weight: 700;
}

.footer-links-left ul,
.footer-links-right ul {
    list-style: disc;
    margin: 0;
    padding-left: 18px;
}

/* nadpisujemy globalne <a> tylko w stopce */

.footer-links-left a,
.footer-links-right a {
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 300!important;
}

.footer-links-left a:hover,
.footer-links-right a:hover {
    text-decoration: underline;
}

/* przycisk wylogowania */

.logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.logout-btn {
    padding: 0;
    border: none;
    background: none;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
}

.logout-btn:hover {
    text-decoration: underline;
}

/* Wyloguj się w stopce – identyczny styl jak inne linki */
.footer-logout-btn {
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 300;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline;
}

.footer-logout-btn:hover {
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .footer-main-inner {
        padding: 20px 16px 24px;      /* mniejszy, ale nadal bezpieczny margines */
    }

    .footer-links-row {
        flex-direction: column;
        gap: 16px;
    }

    .footer-links-right {
        max-width: 100%;
    }
}

/* ---------- DÓŁ STOPKI ---------- */

.footer-bottom {
    padding: 10px 0 16px;
    background-color: #fff;
}

.footer-bottom-inner {
    max-width: 1296px;
    width: min(1296px, calc(100% - (var(--footer-side-gap) * 2)));
    margin: 0 auto;
    padding: 0 0;                  /* marginesy poziome również tutaj */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.85rem;
    color: #4b5563;
}

.footer-bottom-logo {
    max-width: 160px;
    height: auto;
    display: block;
}

@media (max-width: 575.98px) {
    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 16px;
    }

    .footer-bottom-logo {
        max-width: 130px;
    }
}

/* Usunięcie bootstrapowego border-top z <footer> w layoutach */
footer.border-top.footer,
footer.footer.border-top {
    border-top: none !important;
}

.logout-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.logout-btn:hover {
    text-decoration: underline;
}
