.footer {
    background: white;
    padding: 16px 0 40px;
    border-top: 1px solid #000;
    position: relative;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 74px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-disclaimer {
    font-size: calc(14px * var(--base-font-scale, 1));
    line-height: 21px;
    color: #63666A;
    font-weight: 500;
    max-width: 300px;
}

.company-logo {
    width: 55%; 
    height: 100%;
    object-fit: contain;
}

.footer-center {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 25px;
    font-size: calc(15px * var(--base-font-scale, 1));
}

.footer-nav {
    display: flex;
    justify-content: flex-start;
    gap: 50px;
    margin-bottom: 0;
    font-size: calc(15px * var(--base-font-scale, 1));
}

.footer-privacy {
    color: #5C068C;
}

.footer-contact {
    color: #5C068C;
}

/* Ensure .footer-residents responds to font scaling on all viewports */
.footer-residents {
    font-size: calc(13px * var(--base-font-scale, 1));
}

.footer-link {
    font-size: calc(14px * var(--base-font-scale, 1));
    line-height: 21px;
    color: #5C068C;
    font-weight: 500;
    text-decoration: underline;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.footer-link:hover {
    text-decoration: none;
    color: #4A0568;
    transform: translateY(-1px);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #5C068C;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-copyright {
    font-size: calc(12px * var(--base-font-scale, 1));
    line-height: 21px;
    color: #63666A;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.footer-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-logo {
    width: 73px;
    height: 77px;
    object-fit: contain;
}

/* Show/hide footer-nav based on screen size */
.footer-nav-desktop {
    display: flex;
}

.footer-nav-mobile {
    display: none;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-nav-desktop {
        flex-direction: row;
        justify-content: center;
    }

    .footer-copyright {
        text-align: center;
    }

    .footer-left {
        align-items: center;
    }

    .footer-right {
        justify-content: center;
    }

    .company-logo {
        width: 25%; 
    }

    /* Keep mobile nav hidden at 768px */
    .footer-nav-mobile {
        display: none;
    }
}

/* Footer Responsive Design */
@media (max-width: 480px) {
    .footer {
        padding: 30px 0 80px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 30px;
        padding: 0 20px;
    }

    .footer-left {
        align-items: flex-start;
        gap: 20px;
    }

    .footer-residents {
        font-size: calc(14px * var(--base-font-scale, 1));
    }

    .footer-nav-desktop {
        display: none; /* Hide desktop nav */
    }

    .footer-nav-mobile {
        display: flex; /* Show mobile nav */
        flex-direction: row;        
        justify-content: left;
        gap: 20px;
        width: 90%;
        font-size: calc(15px * var(--base-font-scale, 1));
    }

    .footer-privacy {
        flex: 1;
    }

    .company-logo {
        width: 50%; 
        height: auto;
    }

    .footer-copyright {
        font-size: calc(14px * var(--base-font-scale, 1));
        line-height: 22px;
        max-width: 100%;
        text-align: left;
    }

    .footer-right {
        justify-content: flex-start;
    }
}
