.footer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 10.5dvh;
    max-height: 10.5dvh;
    min-height: 10.5dvh;
    border-top: 0.3dvw solid var(--border-color);
    padding: 0;
    margin: 0;
    gap: 0;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: 0;
}

.footer-topbar {
    height: 8dvh;
    width: 100%;
    background-color: var(--background-color2);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    order: 1;
}

/* footer is split into three sections: left, middle, and right, links are stacked vertically but aligned center */

.footer-topbar-left {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}   

.footer-topbar-middle {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-topbar-right {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-link {
    text-decoration: none;
    color: var(--text-color4);
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    transition: color 0.25s ease;
}

.footer-link:hover {
    color: var(--text-color3);
}


.footer-bottom-row {
    height: 2.5dvh;
    width: 100%;
    background-color: var(--background-color2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    order: 2;
}

.footer-bottom-row p {
    margin: 0;
    padding: 0;
}

/* ============================================================
   RESPONSIVE: Galaxy S23 and similar (360px - 480px)
   ============================================================ */

@media (max-width: 480px) {
    .footer {
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 0.75rem 0.375rem;
    }

    .footer-topbar {
        height: auto;
        min-height: auto;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 0.375rem;
    }

    .footer-topbar-left,
    .footer-topbar-middle,
    .footer-topbar-right {
        width: 100%;
        align-items: center;
        gap: 0.375rem;
    }

    .footer-link {
        padding: 0.625rem 0.875rem;
        font-size: 1.1025rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .footer-bottom-row {
        height: auto;
        min-height: 2dvh;
        padding: 0.625rem 0.375rem;
        text-align: center;
    }

    .footer-bottom-row p {
        font-size: 0.945rem;
        line-height: 1.4;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE BREAKPOINT (< 768px)
   ============================================================ */

@media (max-width: 768px) and (min-width: 481px) {
    .footer {
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 1rem 0.5rem;
    }

    .footer-topbar {
        height: auto;
        min-height: 8dvh;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0.5rem;
    }

    .footer-topbar-left,
    .footer-topbar-middle,
    .footer-topbar-right {
        width: 100%;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-link {
        padding: 0.75rem 1rem;
        font-size: 1.1025rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .footer-bottom-row {
        height: auto;
        min-height: 2.5dvh;
        padding: 0.75rem 0.5rem;
        text-align: center;
    }

    .footer-bottom-row p {
        font-size: 0.945rem;
        line-height: 1.4;
    }
}

/* ============================================================
   RESPONSIVE: TABLET BREAKPOINT (768px - 1024px)
   ============================================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    .footer {
        padding: 0.75rem;
    }

    .footer-topbar {
        padding: 0.75rem;
    }

    .footer-link {
        font-size: 1.134rem;
        padding: 0.5rem 0.75rem;
    }
}