/* Footer - Wide Single Row Layout */
footer.footer {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 60px 0;
    overflow: hidden;
    background: #0a1628;
    box-sizing: border-box;
}

/* Full-bleed background image with Ken Burns zoom */
footer.footer .footer-bg-wrapper {
    position: absolute;
    inset: -10%;
    z-index: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transform-origin: center;
    will-change: transform;
    animation: footerKenBurns 6.5s ease-in-out infinite alternate;
}

@keyframes footerKenBurns {
    from { transform: scale(1.2); }
    to   { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    footer.footer .footer-bg-wrapper {
        animation: none !important;
    }
}

/* Page-specific footer background images */
.home-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/Index-footer.png');
}

.membership-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/updatedrobotics.png');
}

.about-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/aboutfooternew.png');
}

.services-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/aifordealroom.png');
    background-position: right center;
}

.insights-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/Index-footer.png');
}

.request-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/Index-footer.png');
}

.whynow-page footer.footer .footer-bg-wrapper {
    background-image: url('../img/footerwhynow.png');
}

/* Darker overlay for bright Why Now footer image */
.whynow-page footer.footer .footer-gradient {
    background:
        linear-gradient(180deg,
            rgba(71, 85, 105, 0.65) 0%,
            rgba(71, 85, 105, 0.78) 25%,
            rgba(71, 85, 105, 0.90) 50%,
            rgba(71, 85, 105, 0.97) 75%,
            rgba(71, 85, 105, 0.99) 100%);
}

/* Overlay */
footer.footer .footer-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg,
            rgba(71, 85, 105, 0.45) 0%,
            rgba(71, 85, 105, 0.60) 25%,
            rgba(71, 85, 105, 0.80) 50%,
            rgba(71, 85, 105, 0.93) 75%,
            rgba(71, 85, 105, 0.98) 100%);
    z-index: 1;
}

/* Content container */
footer.footer .footer-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    z-index: 2;
    box-sizing: border-box;
    opacity: 1;
    transform: translateY(0);
}

/* Animation */
footer.footer .footer-container.animate-ready {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: transform;
}

footer.footer .footer-container.animate-ready.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Main row: logo left, nav center, contact right */
footer.footer .footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Brand - left */
footer.footer .footer-brand {
    flex-shrink: 0;
}

footer.footer .footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

footer.footer .footer-logo-mark {
    height: 1.5em;
    width: auto;
    margin-right: 0.75rem;
}

footer.footer .footer-tagline {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Navigation - center */
footer.footer .footer-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

footer.footer .footer-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

footer.footer .footer-nav a:hover {
    color: #FF0000;
}

/* Contact - right */
footer.footer .footer-contact {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

footer.footer .footer-email {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

footer.footer .footer-email:hover {
    color: #FF0000;
}

/* Social icons */
footer.footer .footer-social {
    display: flex;
    gap: 0.75rem;
}

footer.footer .footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

footer.footer .footer-social a:hover,
footer.footer .footer-social a:active {
    background: #FF0000;
    color: #fff;
}

/* Tap feedback for mobile (touch devices) */
@media (hover: none) {
    footer.footer .footer-social a:active {
        background: #FF0000;
        color: #fff;
        transform: scale(0.95);
    }
    footer.footer .footer-nav a:active {
        color: #FF0000;
    }
    footer.footer .footer-email:active {
        color: #FF0000;
    }
}

/* Bottom bar - copyright */
footer.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
}

footer.footer .footer-copyright {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
    footer.footer {
        min-height: 100vh;
        padding: 0 0 40px 0;
    }
    footer.footer .footer-container {
        padding: 0 24px;
    }
    footer.footer .footer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    footer.footer .footer-brand {
        text-align: center;
    }
    footer.footer .footer-logo {
        justify-content: center;
        font-size: 1.5rem;
    }
    footer.footer .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
    footer.footer .footer-contact {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
