/* ========================================
   FOOTER STYLES
   ======================================== */

.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    border-top: 3px solid var(--accent-color);
}

/* ----------------------------------------
   Footer Main Content
   ---------------------------------------- */
.footer-main {
    padding: 1.5rem 0 1rem;
}

.footer-col {
    margin-bottom: 1rem;
}

/* ----------------------------------------
   Footer Headers with Accent Line
   ---------------------------------------- */
.footer-header {
    color: var(--accent-color-light);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent-color);
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    text-align: left;
    width: 100%;
    cursor: default;
}

/* Hide toggle icon on desktop */
.footer-header .toggle-icon {
    display: none;
}

/* ----------------------------------------
   Logo & Contact Section
   ---------------------------------------- */
.footer-contact .footer-header {
    display: none;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 65px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-logo:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.footer-address {
    font-style: normal;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    line-height: 1.5;
}

.footer-phone {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-phone a {
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-phone a:hover,
.footer-phone a:focus {
    color: var(--accent-color-light);
}

.footer-phone i {
    margin-right: 0.35rem;
    font-size: 0.85rem;
}

/* ----------------------------------------
   Social Media Links
   ---------------------------------------- */
.footer-social {
    display: flex;
    gap: 0.6rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

/* Inverts to white-on-navy rather than going to --accent-color-dark, which left the
   white glyph at 3.45:1. This is also the hover idiom the rest of the site already
   uses (.btn-hero-primary, .spaceport-btn): white fill, primary-coloured mark, 9:1. */
.footer-social a:hover,
.footer-social a:focus {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-social a:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* ----------------------------------------
   Footer Links
   ---------------------------------------- */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--accent-color-light);
    padding-left: 4px;
}

.footer-links a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* External link icon */
.external-icon {
    font-size: 0.7rem;
    margin-left: 0.4rem;
    opacity: 0.7;
}

/* ----------------------------------------
   Footer Bottom Bar
   ---------------------------------------- */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 0.75rem 0;
    text-align: center;
}

.footer-bottom .row {
    align-items: center;
    justify-content: center;
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
}

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

.copyright {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal li a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-legal li a:hover,
.footer-legal li a:focus {
    color: var(--accent-color-light);
}

.footer-legal li a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ----------------------------------------
   Back to Top Button
   ---------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.back-to-top:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    .footer-main {
        padding: 1.25rem 0 0.75rem;
    }
    
    .footer-col {
        margin-bottom: 1rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .footer-main {
        padding: 1.5rem 0 0.5rem;
    }
    
    /* Hide logo on mobile */
    .footer-logo {
        display: none;
    }
    
    .footer-contact {
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin-bottom: 0.5rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-address,
    .footer-phone {
        text-align: center;
    }
    
    /* Accordion-style headers */
    .footer-header {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        padding-left: 0.75rem;
        margin-bottom: 0;
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
        border-left: 3px solid var(--accent-color);
    }
    
    .footer-header:hover,
    .footer-header:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .footer-header:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
    
    .footer-header .toggle-icon {
        display: block;
        transition: transform var(--transition-normal);
    }
    
    .footer-header[aria-expanded="true"] .toggle-icon {
        transform: rotate(180deg);
    }
    
    /* Hidden by default on mobile */
    .footer-links {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0 0.75rem;
    }
    
    .footer-links.show {
        max-height: 300px;
        padding: 0.75rem;
        padding-top: 0.5rem;
    }
    
    .footer-col {
        margin-bottom: 0.5rem;
    }
    
    /* Footer Bottom */
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .copyright {
        margin-bottom: 0.5rem;
    }
    
    /* Back to top button */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}