footer {
    position: relative;
    isolation: isolate;
    width: 100%;
    align-self: stretch; /* body má align-items: center — bez toho footer zúží obsah */
    color: var(--footerText-color);
    background-image: linear-gradient(to top, var(--footerBackground-color), var(--footerBackground2-color), var(--footerBackground2-color), var(--footerBackground-color));
    box-shadow: 0 0 5px var(--footerBackground-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    margin: 0;
    padding: 22px 0 18px;
    box-sizing: border-box;
}

.footer-effects {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.footer-bubble {
    position: absolute;
    bottom: -28px;
    width: var(--bubble-size);
    height: var(--bubble-size);
    border: 1px solid rgba(255, 251, 0, 0.32);
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.34), rgba(255, 251, 0, 0.13) 38%, transparent 70%);
    box-shadow: 0 0 10px rgba(255, 251, 0, 0.15);
}
.footer-bubble--1 { --bubble-size: 13px; left: 12%; animation-delay: 0.2s; animation-duration: 4.9s; }
.footer-bubble--2 { --bubble-size: 22px; left: 31%; animation-delay: 1.4s; animation-duration: 6.1s; }
.footer-bubble--3 { --bubble-size: 10px; left: 56%; animation-delay: 0.8s; animation-duration: 4.3s; }
.footer-bubble--4 { --bubble-size: 17px; left: 74%; animation-delay: 2.2s; animation-duration: 5.4s; }
.footer-bubble--5 { --bubble-size: 9px; left: 90%; animation-delay: 3.1s; animation-duration: 4.7s; }
.footer-bubble--6 { --bubble-size: 15px; left: 7%; animation-delay: 2.6s; animation-duration: 5.8s; }
.footer-bubble--7 { --bubble-size: 8px; left: 22%; animation-delay: 3.7s; animation-duration: 4.1s; }
.footer-bubble--8 { --bubble-size: 27px; left: 42%; animation-delay: 0.9s; animation-duration: 7.2s; }
.footer-bubble--9 { --bubble-size: 12px; left: 50%; animation-delay: 4.4s; animation-duration: 5s; }
.footer-bubble--10 { --bubble-size: 19px; left: 65%; animation-delay: 1.8s; animation-duration: 6.5s; }
.footer-bubble--11 { --bubble-size: 7px; left: 82%; animation-delay: 3.3s; animation-duration: 3.9s; }
.footer-bubble--12 { --bubble-size: 24px; left: 95%; animation-delay: 4.8s; animation-duration: 7.5s; }
.footer-bubble--13 { --bubble-size: 11px; left: 37%; animation-delay: 5.4s; animation-duration: 4.6s; }

.footer-bubble {
    animation-name: footer-bubble-rise;
    animation-timing-function: ease-in;
    animation-iteration-count: infinite;
}

@keyframes footer-bubble-rise {
    0% { opacity: 0; transform: translate(0, 12px) scale(0.7); }
    14% { opacity: 0.78; }
    82% { opacity: 0.32; }
    100% { opacity: 0; transform: translate(14px, -110px) scale(1.1); }
}

.footer-info {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: stretch; /* NE center — jinak se nav smrští podle textu */
    align-items: start;
    column-gap: 24px;
    row-gap: 14px;
    box-sizing: border-box;
}

.footer nav {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

footer nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

footer nav ul li {
    list-style: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Obal řídí šířku — všechna tlačítka stejně */
.footer-btn-wrap {
    display: block;
    width: 80%;
    max-width: 280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.footer-btn-wrap a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-family: 'Baloo Paaji 2', cursive, 'Times New Roman', Times, serif;
    color: var(--footerText-color);
    margin: 0;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(250, 255, 183, 0.28);
    background: rgba(250, 255, 183, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    isolation: isolate;
    white-space: nowrap;
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
}

.footer-btn-wrap a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 251, 0, 0.22), transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
    z-index: 0;
}

.footer-btn-wrap a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
    pointer-events: none;
}

.footer-btn-wrap a:hover,
.footer-btn-wrap a:focus-visible {
    text-decoration: none;
    color: var(--text2-color);
    background: var(--primary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(255, 251, 0, 0.25);
    outline: none;
}

.footer-btn-wrap a:hover::before,
.footer-btn-wrap a:focus-visible::before {
    transform: translateX(120%);
}

.footer-btn-wrap a:hover::after,
.footer-btn-wrap a:focus-visible::after {
    transform: scaleX(1);
    background: var(--link-color);
}

.footer-btn-wrap a:active {
    transform: translateY(0);
}

.footer-credit {
    margin-top: 8px;
    width: 100%;
    text-align: center;
    color: var(--footerText-color);
    font-size: 13px;
    letter-spacing: 0.02em;
    opacity: 0.9;
    line-height: 1.45;
    font-family: 'Times New Roman', Times, serif;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    font-family: 'Baloo Paaji 2', cursive, 'Times New Roman', Times, serif;
    color: var(--footerText-color);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(250, 255, 183, 0.18);
    background: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
    color: var(--primary-color);
    background: rgba(255, 251, 0, 0.1);
    border-color: rgba(255, 251, 0, 0.45);
    outline: none;
}

@media screen and (max-width: 700px) {
    .footer-info {
        width: 100%;
        padding: 0 12px;
        grid-template-columns: 1fr;
        justify-items: stretch;
        row-gap: 10px;
    }

    .footer-btn-wrap {
        width: 80%;
        max-width: none; /* na mobilu nechat 80 % šířky */
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-bubble {
        animation: none;
    }
    .footer-btn-wrap a,
    .footer-btn-wrap a::before,
    .footer-btn-wrap a::after {
        transition: none;
    }
    .footer-btn-wrap a:hover,
    .footer-btn-wrap a:focus-visible {
        transform: none;
    }
    .footer-btn-wrap a:hover::before,
    .footer-btn-wrap a:focus-visible::before {
        transform: none;
    }
}
