/* =========================================================================
   footer.css - stopka (+ sekcje doklejane przez footer.php)
   ========================================================================= */

/* === Stopka === */
.footer {
    background: var(--c-bg-deep);
    color: var(--c-txt-soft);
    font-size: 14px;
    line-height: 1.65;
}
.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding-top: 88px;
    padding-bottom: 40px;
}
/* górny pas: marka | kontakt */
.footer__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(245, 242, 236, .1);
}
.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    max-width: 100%;
    width: 460px;
}
.footer__logo img {
    display: block;
    width: auto;
    height: 84px;
}
.footer__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}
.footer__phone {
    color: var(--c-light);
    font-family: var(--font-serif);
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -.01em;
}
.footer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 24px;
}
.footer__mail {
    color: var(--c-light);
    text-decoration: underline;
    text-decoration-color: rgba(245, 242, 236, .3);
    text-underline-offset: 4px;
}
.footer__social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-light);
}
.footer__social svg {
    width: 18px;
    height: 18px;
}
.footer__phone:hover,
.footer__mail:hover,
.footer__social:hover,
.footer__menu a:hover,
.footer__built a:hover {
    color: var(--c-accent-light);
}
/* kolumny linków */
.footer__top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 40px 48px;
}
.footer__col {
    display: flex;
    flex-direction: column;
}
.footer__title {
    margin-bottom: 18px;
    color: var(--c-light);
    font-weight: 600;
}
.footer__menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    line-height: normal;
}
.footer__menu .is-gap {
    margin-top: 12px;
}
.footer__menu .current-menu-item > a {
    color: var(--c-accent-light);
}
.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid rgba(245, 242, 236, .1);
    font-size: 13px;
}
.footer__built {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.footer__built img {
    display: block;
    width: 80px;
    height: auto;
}
.footer__built a:focus-visible {
    outline: 2px solid var(--c-accent-light);
    outline-offset: 3px;
}
.footer__built a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--c-light);
}

@media (max-width: 767px) {
    .footer__head,
    .footer__brand,
    .footer__contact,
    .footer__top,
    .footer__col {
        align-items: center;
        text-align: center;
    }
    .footer__head {
        flex-direction: column;
        justify-content: center;
    }
    .footer__meta {
        flex-direction: column;
        justify-content: center;
    }
    .footer__menu {
        align-items: center;
    }
    .footer__bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* === Profile społecznościowe (repeater social_items): ikona SVG z biblioteki jako maska → kolor i hover jak tekst linku === */
.footer__social-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

/* === Profile społecznościowe - osobny wiersz pod mailem i NIP (footer__socials) === */
.footer__socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 24px;
}
@media (max-width: 767px) {
    .footer__socials {
        justify-content: center;
    }
}

/* === Stopka - dopracowanie: hover linków (kreska wysuwana od lewej), górny pas, dolny pasek z polityką === */
.footer__head {
    align-items: center;
}
.footer__brand {
    gap: 24px;
}
.footer__phone {
    transition: color var(--t) var(--ease);
}
.footer__phone .mikan-phone-icon {
    transition: transform var(--t) var(--ease);
}
.footer__phone:hover .mikan-phone-icon {
    transform: rotate(-12deg) scale(1.08);
}
.footer__mail {
    transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}
.footer__mail:hover {
    text-decoration-color: currentColor;
}
.footer__meta {
    gap: 8px 28px;
}
.footer__socials {
    gap: 10px;
}
.footer__social {
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(245, 242, 236, .14);
    border-radius: 999px;
    line-height: 1.2;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.footer__social:hover {
    border-color: var(--c-accent);
    background: rgba(70, 167, 255, .08);
}
.footer__title {
    position: relative;
    padding-bottom: 14px;
}
.footer__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-accent);
}
.footer__menu a,
.footer__privacy,
.footer__built a {
    background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
    padding-bottom: 2px;
    transition: color var(--t) var(--ease), background-size .4s var(--ease-out);
}
.footer__menu a:hover,
.footer__privacy:hover,
.footer__built a:hover {
    background-size: 100% 1px;
}
.footer__menu .current-menu-item > a {
    background-size: 100% 1px;
}
.footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
}
.footer__privacy {
    color: var(--c-txt-soft);
}
.footer__privacy:hover {
    color: var(--c-accent-light);
}
@media (max-width: 767px) {
    .footer__title::after {
        left: 50%;
        translate: -50% 0;
    }
    .footer__legal {
        flex-direction: column;
        justify-content: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .footer__menu a,
    .footer__privacy,
    .footer__built a,
    .footer__phone .mikan-phone-icon {
        transition: none;
    }
}

/* === Stopka - nowocześniej: zaokrąglona góra, kontakt w karcie, wielki napis z logo, przycisk „do góry” === */
.footer {
    position: relative;
    border-radius: 40px 40px 0 0;
    overflow: clip;
}
.footer__inner {
    padding-bottom: 0;
}
.footer__head {
    align-items: stretch;
}
.footer__brand {
    justify-content: center;
}
.footer__contact {
    justify-content: center;
    padding: 36px 40px;
    border: 1px solid rgba(245, 242, 236, .1);
    border-radius: 28px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(70, 167, 255, .16), transparent 60%),
        rgba(245, 242, 236, .025);
}
.footer__end {
    display: flex;
    align-items: center;
    gap: 20px;
}
.footer__totop {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(245, 242, 236, .2);
    border-radius: 50%;
    color: var(--c-light);
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.footer__totop svg {
    width: 18px;
    height: 18px;
    transition: transform var(--t) var(--ease);
}
.footer__totop:hover {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: var(--c-dark);
}
.footer__totop:hover svg {
    transform: translateY(-2px);
}
.footer__bottom {
    align-items: center;
}
/* wielki napis MIKAN (litery z logo) - dekoracja, dół ucięty krawędzią strony */
.footer__word {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 8px;
    margin-bottom: -12%;
    fill: var(--c-light);
    opacity: .07;
    -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 62%);
    mask-image: linear-gradient(to bottom, #000 10%, transparent 62%);
    pointer-events: none;
}
@media (max-width: 767px) {
    .footer {
        border-radius: 28px 28px 0 0;
    }
    .footer__contact {
        align-self: stretch;
        padding: 28px 20px;
        border-radius: 22px;
    }
    .footer__end {
        flex-direction: column;
        gap: 16px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .footer__totop,
    .footer__totop svg {
        transition: none;
    }
}

button[data-analytics-settings] { background: transparent; color: inherit; border: 0; cursor: pointer; text-decoration: underline; }
#mikan-analytics:not([hidden]) { display: block; position: fixed; z-index: 11000; left: 1rem; bottom: 1rem; width: min(25rem, calc(100vw - 2rem)); padding: 1rem; color: #202020; background: white; border: 1px solid #ccc; border-radius: .5rem; box-shadow: 0 3px 16px #0003; }
#mikan-analytics p { margin: .5rem 0 .8rem; font-size: .9rem; }
#mikan-analytics button { cursor: pointer; background: #fff; color: #222; border: 1px solid #444; border-radius: .25rem; padding: .5rem .85rem; }
