/* Footer Responsive Styles - Ensures footer visibility on all devices */

/* Base footer styles */
footer.bg-dark {
    display: block !important;
    background-color: #212529 !important;
    color: white !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 2rem 0 1rem !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Mobile footer styles */
@media (max-width: 767.98px) {
    footer.bg-dark {
        margin-bottom: 70px !important; /* Space for bottom navigation */
        padding: 1.5rem 0 1rem !important;
    }
    
    footer .container {
        padding: 0 1rem !important;
    }
    
    footer .row {
        text-align: center !important;
    }
    
    footer .col-lg-3 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Make Quick Links and Policies stack horizontally on mobile (first row) */
    footer .row:first-child .col-lg-3:nth-child(1),
    footer .row:first-child .col-lg-3:nth-child(2) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 1rem !important;
        padding: 0 0.5rem !important;
        text-align: left !important;
    }
    
    /* Make Contact Info and Follow Us stack horizontally on mobile (second pair) */
    footer .row:first-child .col-lg-3:nth-child(3),
    footer .row:first-child .col-lg-3:nth-child(4) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 1rem !important;
        padding: 0 0.5rem !important;
        text-align: left !important;
    }
    
    /* Align headings to the left for all sections on mobile */
    footer .row:first-child .col-lg-3 h5 {
        text-align: left !important;
        margin-bottom: 0.8rem !important;
    }
    
    footer h5 {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    footer p {
        font-size: 0.85rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .footer-links {
        text-align: left !important;
    }
    
    .footer-links li {
        margin-bottom: 4px !important;
    }
    
    .footer-links a {
        font-size: 0.8rem !important;
    }
    
    .social-links a {
        font-size: 1.2rem !important;
        margin: 0 0.5rem !important;
    }
}

/* Tablet footer styles */
@media (min-width: 768px) and (max-width: 991.98px) {
    footer.bg-dark {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    footer h5 {
        font-size: 1.2rem !important;
    }
    
    footer p {
        font-size: 0.95rem !important;
    }
}

/* Desktop footer styles */
@media (min-width: 992px) {
    footer.bg-dark {
        padding: 3rem 0 2rem !important;
        margin-bottom: 0 !important;
    }
    
    footer h5 {
        font-size: 1.3rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    footer p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    .social-links a {
        font-size: 1.3rem !important;
        margin: 0 0.75rem !important;
        transition: color 0.3s ease !important;
    }
    
    .social-links a:hover {
        color: #ff6b35 !important;
    }
}

/* Footer links styling */
.footer-links {
    margin: 0;
    padding: 0;
}

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

.footer-links a {
    color: #ccc !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-links a:hover {
    color: #ff6b35 !important;
    text-decoration: none !important;
    padding-left: 5px;
}

/* Ensure footer links are styled properly */
footer a {
    color: #ccc !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

footer a:hover {
    color: #ff6b35 !important;
    text-decoration: none !important;
}

/* Override any hiding rules */
footer.bg-dark {
    visibility: visible !important;
    opacity: 1 !important;
    max-width: none !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
}

/* Ensure main content has proper spacing above footer */
.main-content {
    margin-bottom: 0 !important;
}

/* Fix any layout conflicts on mobile */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 0 !important;
    }
    
    .mobile-app-container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Ensure bottom navigation doesn't overlap footer */
    .bottom-navigation {
        z-index: 1000 !important;
    }
    
    footer.bg-dark {
        z-index: 10 !important;
    }
}

/* Responsive text sizing and enhanced mobile layout */
@media (max-width: 480px) {
    footer h5 {
        font-size: 0.95rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    footer p {
        font-size: 0.8rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    footer .text-center p {
        font-size: 0.75rem !important;
    }
    
    /* Ensure all sections remain side by side on very small screens */
    footer .row:first-child .col-lg-3:nth-child(1),
    footer .row:first-child .col-lg-3:nth-child(2),
    footer .row:first-child .col-lg-3:nth-child(3),
    footer .row:first-child .col-lg-3:nth-child(4) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 0.25rem !important;
        text-align: left !important;
    }
    
    /* Keep headings aligned left on very small screens */
    footer .row:first-child .col-lg-3 h5 {
        text-align: left !important;
    }
    
    .footer-links a {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    .footer-links li {
        margin-bottom: 3px !important;
    }
}