/* =================================================================
   Custom Footer Styles - Using CSS Variables
   ================================================================= */

/* Sticky Footer Setup */
html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-top: 84px;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }
}

/* Make header not flex-grow */
.header-area {
    flex-shrink: 0;
}

/* Make main content area flex to fill space */
.auth-container,
main,
body > section {
    flex: 1 0 auto;
}

/* Footer sticks to bottom */
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Footer Container */
.site-footer {
    background: var(--smx-footer-texture), var(--smx-footer-bg);
    background-size: var(--smx-footer-texture-size), auto;
    color: var(--smx-footer-text);
}

.footer-content {
    padding: 25px 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 20px;
}

/* Footer Column */
.footer-column {
    display: flex;
    flex-direction: column;
}

/* Company Logo & Description */
.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-logo img {
    max-height: 55px;
    width: auto;
}

.footer-description {
    color: var(--smx-footer-text);
    opacity: 0.8;
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: color-mix(in srgb, var(--smx-footer-text) 10%, transparent);
    border-radius: 50%;
    color: var(--smx-footer-text);
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--smx-btn-hover-bg);
    color: var(--smx-btn-hover-text);
    transform: translateY(-2px);
}

/* Footer Headings */
.footer-heading {
    color: var(--smx-footer-text);
    font-family: var(--smx-font-heading);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer-links li {
    margin-bottom: 6px;
}

.footer-links li a {
    color: var(--smx-footer-text);
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    opacity: 0.85;
}

.footer-links li a:hover {
    color: var(--smx-footer-text);
    text-decoration: underline;
}

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--smx-footer-text);
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 8px;
    opacity: 0.85;
}

.footer-contact li i {
    color: var(--smx-footer-text);
    font-size: 14px;
    flex-shrink: 0;
}

.footer-contact li a {
    color: var(--smx-footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.85;
}

.footer-contact li a:hover {
    color: var(--smx-footer-text);
    text-decoration: underline;
}

/* Footer Bottom */
.footer-bottom {
    background: transparent;
    padding: 12px 20px;
    border-top: none;
    text-align: center;
}

.footer-bottom p {
    color: var(--smx-footer-text);
    font-size: 13px;
    margin: 0;
}

.footer-bottom a {
    color: var(--smx-footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--smx-footer-text);
    text-decoration: underline;
}

.footer-divider {
    margin: 0 8px;
    color: var(--smx-footer-text);
    opacity: 0.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--smx-brand);
    color: var(--smx-on-brand);
    text-align: center;
    line-height: 45px;
    border-radius: 50%;
    font-size: 20px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

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

.back-to-top:hover {
    background: var(--smx-btn-hover-bg);
    color: var(--smx-btn-hover-text);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Tablet (2 columns) */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .footer-content {
        padding: 20px 15px 12px;
    }
}

/* Mobile (2 columns, logo & contact span full width) */
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 12px;
    }

    .footer-column--logo,
    .footer-column--contact {
        grid-column: span 2;
    }

    .footer-content {
        padding: 20px 15px 10px;
    }

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

    .footer-logo {
        margin: 0 auto 12px;
    }

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

    .footer-heading {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .footer-links li {
        margin-bottom: 5px;
    }

    .footer-contact li {
        justify-content: center;
        margin-bottom: 6px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-social a,
    .back-to-top {
        transition: none;
    }
}
