/* ============================================================
   FOOTER — Multi-Column Professional Footer
   ============================================================ */

.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding-top: var(--space-20);
    padding-bottom: 0;
}

.footer .container {
    max-width: 1800px; /* Give the footer more space to fit long links */
}

/* ---- Footer Top (Main Content) ---- */
.footer__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    padding-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .footer__top {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--space-8);
    }
}

@media (min-width: 1200px) {
    .footer__top {
        grid-template-columns: 320px 1.2fr 2.2fr 1.0fr 0.8fr 0.8fr 0.8fr;
        gap: var(--space-8);
    }
}

/* ---- Brand Column ---- */
.footer__brand {
    max-width: 320px;
}

.footer__logo {
    display: inline-block;
    margin-bottom: var(--space-5);
}

.footer__logo img {
    height: 64px;
    width: auto;
}

.footer__tagline {
    font-size: var(--text-base);
    color: rgba(6, 24, 61, 0.72);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

/* Contact info in footer */
.footer__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-base);
    color: rgba(6, 24, 61, 0.72);
    text-decoration: none;
    transition: color var(--transition-fast);
    line-height: 1.6;
}

.footer__contact-item:hover {
    color: var(--blue-primary);
}

.footer__contact-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--orange-cta);
}

/* ---- Link Columns ---- */
.footer__column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer__column-title {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 900;
    color: var(--blue-primary);
    margin-bottom: var(--space-2);
}

.footer__link {
    font-size: var(--text-base);
    color: rgba(6, 24, 61, 0.72);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-block;
    position: relative;
    width: fit-content;
    overflow: hidden;
    padding-bottom: 2px;
}

.footer__link:hover {
    color: var(--blue-primary);
}

/* Animated underline on hover */
.footer__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--orange-cta);
    transition: width 0.3s ease;
}

.footer__link:hover::after {
    width: 100%;
}

/* ---- Social Icons ---- */
.footer__social {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: rgba(6, 24, 61, 0.08);
    color: rgba(6, 24, 61, 0.72);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}

.footer__social-link:hover {
    background-color: var(--orange-cta);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}

/* ---- Footer Bottom (Copyright Bar) ---- */
.footer__bottom {
    border-top: 1px solid rgba(6, 24, 61, 0.08);
    padding: var(--space-8) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

@media (min-width: 768px) {
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer__copyright {
    font-size: var(--text-sm);
    color: rgba(6, 24, 61, 0.55);
}

.footer__powered {
    font-size: var(--text-xs);
    color: rgba(6, 24, 61, 0.45);
}

.footer__powered a {
    color: rgba(6, 24, 61, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__powered a:hover {
    color: var(--blue-primary);
}

/* ---- Back to Top Button ---- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blue-primary);
    color: var(--blue-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--orange-cta);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-orange);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Links column layout for columns taking too much vertical space */
.footer__links-grid {
    display: block;
    column-count: 1;
    column-gap: var(--space-8);
}

.footer__links-grid .footer__link {
    display: block;
    width: fit-content;
    margin-bottom: var(--space-3);
    break-inside: avoid;
}

@media (min-width: 576px) {
    .footer__links-grid {
        column-count: 2;
    }
}
