/* FOOTER PREMIUM REDESIGN - 2024 */

#main-footer {
    background-color: #080808; /* Deep black */
    position: relative;
    padding: 120px 0 40px 0;
    overflow: hidden;
    color: var(--color-white);
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Background Typography Animation --- */
.footer-bg-text-container {
    position: absolute;
    bottom: -5%; /* Slightly cut off at the bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.footer-bg-text {
    width: 90%; /* Occupy most of the width */
    max-width: 1600px;
    opacity: 0.08; /* Slightly more visible */
    filter: blur(0px);
    transition: transform 0.5s ease-out;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

/* --- Content Wrapper --- */
.footer-content-wrapper {
    position: relative;
    z-index: 5;
}

/* --- Grid Layout --- */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr; /* Brand, Nav, Services, Contact */
    gap: 4rem;
    margin-bottom: 80px;
}

/* Brand Column */
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-logo-img {
    height: 140px; /* Increased height for vertical logo */
    opacity: 1;
}

.footer-desc {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 320px;
}

/* Social Icons Row */
.footer-social-row {
    display: flex;
    gap: 1rem;
}

.social-icon-box {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-icon-box:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

/* Headings */
.footer-heading {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links li a {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--color-primary);
}

/* Link Hover Underline Animation */
.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* CTA Column */
.footer-cta-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: transparent;
    transition: background 0.4s ease, transform 0.4s ease;
}

.footer-cta-col:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-5px);
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-label {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value.highlight {
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-value:not(.highlight):hover {
    color: var(--color-primary);
}

/* Divider */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    margin-bottom: 2rem;
}

/* Bottom Bar */
.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyright-text {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

.developer-credit {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.developer-credit span {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mallin-logo-link {
    transition: transform 0.3s ease;
    display: block;
}

.mallin-logo-link:hover {
    transform: scale(1.1);
}

.dev-logo {
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.mallin-logo-link:hover .dev-logo {
    opacity: 1;
}

/* --- Mobile Responsiveness --- */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer-brand-col {
        grid-column: span 2;
        align-items: center;
        text-align: center;
    }

    .footer-cta-col {
        grid-column: span 2;
        align-items: center;
        text-align: center;
        background: rgba(255, 255, 255, 0.02);
        padding: 2rem;
        border-radius: 16px;
    }

    .contact-info-block {
        align-items: center;
    }

    .footer-desc {
        max-width: 500px;
    }

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

@media (max-width: 768px) {
    #main-footer {
        padding: 80px 0 30px 0;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 3.5rem;
        text-align: center;
        margin-bottom: 50px;
    }

    .footer-brand-col {
        align-items: center;
    }

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

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

    .footer-cta-col {
        align-items: center;
        background: rgba(255, 255, 255, 0.05); /* Slightly lighter for better visibility */
        padding: 2.5rem 1.5rem; /* More padding */
        border-radius: 20px;
        margin-top: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle border */
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Glass shadow */
        backdrop-filter: blur(5px);
    }

    .footer-cta-col .contact-value.highlight {
        font-size: 1.5rem; /* Larger phone number */
        margin-top: 0.5rem;
        display: inline-block;
        padding: 0.5rem 1rem;
        background: rgba(242, 192, 31, 0.1); /* Touch of brand color bg */
        border-radius: 8px;
    }

    .contact-info-block {
        align-items: center;
        gap: 0.5rem;
    }

    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-bg-text-container {
        bottom: 0;
    }
    
    .footer-bg-text {
        width: 120%; /* Make it overflow on mobile */
        opacity: 0.05;
    }
}
