/*
 * K&M INVEST — STOPKA WSPÓLNA (WordPress)
 * Jeden wygląd: strona główna, podstrony, Budynek 1 i Budynek 2.
 * Wymiary i breakpointy przeniesione z zatwierdzonego assets/site.css.
 * Nie zawiera żadnych reguł formularza CF7, nagłówka, tabel ani rzutów.
 * Ten plik jest ładowany na końcu przez functions.php.
 */

/* Bazowe style identyczne na stronach z site.css i bez niego. */
.km-footer,
.km-footer *,
.km-footer *::before,
.km-footer *::after {
    box-sizing: border-box;
}
.km-footer {
    background: #f8f5f1;
    color: #111;
    font-family: "Century Gothic", CenturyGothic, AppleGothic, Arial, sans-serif;
    font-size: 16px;
    line-height: normal;
    padding: 0 0 28px;
}
.km-footer .km-shell {
    width: min(1620px, calc(100% - 48px));
    margin: 0 auto;
}
.km-footer a {
    color: inherit;
    text-decoration: none;
}
.km-footer img {
    display: block;
    max-width: 100%;
}
.km-footer__grid {
    border-top: 1px solid #a38b4b;
    padding: 55px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.2fr .8fr;
    gap: 50px;
}
.km-footer__logo {
    width: 319px;
}
.km-footer h3 {
    font-size: 18px;
    margin: 0 0 18px;
}
.km-footer p,
.km-footer li {
    font-size: 14px;
    line-height: 28px;
    margin-top: 0;
}
.km-footer ul {
    padding-left: 20px;
}
.km-footer__icon {
    display: inline-block;
    vertical-align: middle;
    width: 22px;
    height: 22px;
}
/* PHP renderuje ikonę jako <img>, nie <svg>. */
.km-footer__icon img,
.km-footer__icon svg {
    display: block;
    width: 22px;
    height: 22px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.km-footer__bottom {
    border-top: 1px solid #a38b4b;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

/* Desktop: oryginalny układ 1920 px ze strony głównej. */
@media (min-width: 1101px) {
    .km-footer {
        height: 464px;
        padding: 0;
    }
    .km-footer__grid {
        height: 407px;
        border-top: 1px solid #a38b4b;
        padding: 0;
        position: relative;
        display: block;
    }
    .km-footer__brand {
        position: absolute;
        left: -3px;
        top: 48px;
        width: 319px;
    }
    .km-footer__logo {
        width: 319px;
        height: 78px;
        object-fit: contain;
    }
    .km-footer__contact {
        position: absolute;
        left: 410px;
        top: 48px;
        width: 335px;
    }
    .km-footer__project {
        position: absolute;
        left: 825px;
        top: 48px;
        width: 342px;
    }
    .km-footer__links {
        position: absolute;
        left: 1238px;
        top: 48px;
        width: 232px;
    }
    .km-footer h3 {
        font-size: 18px;
        line-height: 20px;
        margin: 0 0 18px;
    }
    .km-footer p,
    .km-footer li {
        font-size: 14px;
        line-height: 28px;
        margin: 0;
    }
    .km-footer__contact .km-footer__line {
        height: 33px;
        display: flex;
        align-items: center;
        gap: 12px;
        white-space: nowrap;
    }
    .km-footer__icon {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        display: block;
    }
    .km-footer__hours-title {
        margin-top: 30px !important;
        margin-bottom: 14px !important;
    }
    .km-footer__project p {
        line-height: 25px;
        margin-bottom: 18px;
    }
    .km-footer__project h3:nth-of-type(2) {
        margin-top: 18px;
    }
    .km-footer__project ul {
        margin: 0;
        padding-left: 22px;
    }
    .km-footer__links p {
        line-height: 28px;
    }
    .km-footer__bottom {
        height: 57px;
        border-top: 1px solid #a38b4b;
        padding: 22px 0 0;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        font-size: 12px;
        line-height: 15px;
    }
}

/* Tablet i telefon: tak jak na głównej (tablet 2 kolumny). */
@media (max-width: 1100px) {
    .km-footer {
        height: auto;
        padding-bottom: 28px;
    }
    .km-footer__grid {
        height: auto;
        padding: 50px 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 45px;
    }
    .km-footer__brand,
    .km-footer__contact,
    .km-footer__project,
    .km-footer__links {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
    }
    .km-footer__bottom {
        height: auto;
        padding-top: 22px;
    }
    .km-footer__contact .km-footer__line {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .km-footer__icon {
        flex: 0 0 22px;
    }
}

@media (max-width: 820px) {
    .km-footer .km-shell {
        width: min(calc(100% - 30px), 720px);
    }
    .km-footer__grid {
        grid-template-columns: 1fr;
    }
    .km-footer__bottom {
        gap: 20px;
        flex-direction: column;
    }
}

/* Laptopy 1101–1600 px: elastyczne kolumny zatwierdzonego site.css. */
@media (min-width: 1101px) and (max-width: 1600px) {
    .km-footer {
        height: auto;
        padding-bottom: 24px;
    }
    .km-footer__grid {
        height: auto;
        padding: 42px 0;
        display: grid;
        grid-template-columns: 1.1fr 1fr 1.2fr .8fr;
        gap: 32px;
    }
    .km-footer__brand,
    .km-footer__contact,
    .km-footer__project,
    .km-footer__links {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
    }
    .km-footer__logo {
        width: min(100%, 240px);
        height: auto;
    }
    .km-footer__contact .km-footer__line {
        white-space: normal;
    }
    .km-footer__bottom {
        height: auto;
        padding-top: 20px;
    }
}
