footer {
    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-info {
    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-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;
    }
}
