/* ==================== FOOTER ENHANCEMENTS - FIX ALL ISSUES ==================== */
/* Fixes for: Social media icon alignment, Get in Touch alignment, Logo visibility */

/* ==================== LOGO SECTION FIX ==================== */
.footer .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer .logo-container img {
    height: 50px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    /* Make logo visible on dark background */
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.footer .logo-container:hover img {
    transform: scale(1.05);
}

.footer .logo-container h5 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

/* If logo fails to load, show icon fallback */
.footer .logo-container .logo-fallback {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-blue);
    border-radius: var(--radius-lg);
}

/* ==================== SOCIAL MEDIA ICONS - CENTER FIX ==================== */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex !important; /* Force flex display */
    align-items: center !important; /* Vertical centering */
    justify-content: center !important; /* Horizontal centering */
    border-radius: 50%;
    background: var(--gray-800);
    color: var(--white) !important;
    transition: var(--transition);
    text-decoration: none;
    margin: 0 !important; /* Remove any margin */
    padding: 0 !important; /* Remove any padding */
}

/* Icon inside the circle - ensure perfect centering */
.social-link i {
    font-size: 1.125rem; /* 18px for perfect sizing */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
}

.social-link:hover {
    background: var(--gradient-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    color: var(--white) !important;
}

/* Specific brand colors on hover (optional) */
.social-link:hover {
    background: var(--gradient-blue);
}

.social-link[aria-label="Facebook"]:hover {
    background: #1877f2;
}

.social-link[aria-label="Twitter"]:hover {
    background: #1da1f2;
}

.social-link[aria-label="LinkedIn"]:hover {
    background: #0a66c2;
}

.social-link[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ==================== GET IN TOUCH - ALIGNMENT FIX ==================== */
.footer .col-lg-3.col-md-6:last-child h5 {
    margin-bottom: 1.5rem;
}

/* Contact info items - perfect alignment */
.footer .col-lg-3.col-md-6:last-child > div {
    display: flex;
    align-items: flex-start; /* Align items to top for multi-line text */
    gap: 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Icons in Get In Touch */
.footer .col-lg-3.col-md-6:last-child i {
    font-size: 1.125rem;
    color: var(--primary-light);
    flex-shrink: 0; /* Prevent icon from shrinking */
    width: 20px; /* Fixed width for alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.2rem; /* Slight adjustment for better visual alignment */
}

/* Text content in Get In Touch */
.footer .col-lg-3.col-md-6:last-child span,
.footer .col-lg-3.col-md-6:last-child a {
    flex: 1;
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin: 0;
    line-height: 1.6;
}

.footer .col-lg-3.col-md-6:last-child a:hover {
    color: var(--primary-light);
    transform: translateX(0); /* Remove default translateX on hover */
}

/* Make links inline instead of block for better alignment */
.footer .col-lg-3.col-md-6:last-child a {
    display: inline;
}

/* ==================== QUICK LINKS & SERVICES ALIGNMENT ==================== */
.footer .col-lg-2 a,
.footer .col-lg-3:not(:last-child) a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
}

.footer .col-lg-2 a:hover,
.footer .col-lg-3:not(:last-child) a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

/* Icons in service links */
.footer .col-lg-3:not(:last-child) a i {
    color: var(--primary-light);
    font-size: 0.875rem;
}

/* ==================== FOOTER DESCRIPTION TEXT ==================== */
.footer .col-lg-4 p {
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ==================== FOOTER RESPONSIVE FIXES ==================== */
@media (max-width: 991px) {
    .footer .col-lg-4,
    .footer .col-lg-3,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    .footer .logo-container {
        justify-content: flex-start;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer .logo-container img {
        height: 40px;
        max-width: 140px;
    }
    
    .footer .logo-container h5 {
        font-size: 1.25rem;
    }
    
    .footer h5 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .social-links {
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link i {
        font-size: 1rem;
    }
    
    /* Get In Touch - Mobile adjustments */
    .footer .col-lg-3.col-md-6:last-child > div {
        gap: 0.5rem;
        margin-bottom: 0.875rem;
    }
    
    .footer .col-lg-3.col-md-6:last-child i {
        font-size: 1rem;
        width: 18px;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-3,
    .footer .col-lg-2 {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575px) {
    .footer {
        padding: 2.5rem 0 1.5rem;
    }
    
    .footer .logo-container {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    
    .footer .logo-container img {
        height: 36px;
        max-width: 120px;
    }
    
    .footer .logo-container h5 {
        font-size: 1.1rem;
    }
    
    .footer h5 {
        font-size: 1rem;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
    }
    
    .social-link i {
        font-size: 0.95rem;
    }
}

/* ==================== FOOTER BOTTOM SECTION ==================== */
.footer-bottom {
    border-top: 1px solid var(--gray-800);
    margin-top: 3rem;
    padding-top: 2rem;
    color: var(--gray-500);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--gray-500);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-bottom a:hover {
    color: var(--primary-light);
    transform: none !important;
}

@media (max-width: 767px) {
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 1.5rem;
        text-align: center;
    }
    
    .footer-bottom .row {
        text-align: center;
    }
    
    .footer-bottom .col-md-6 {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    
    .footer-bottom a {
        margin: 0 0.5rem !important;
    }
}

/* ==================== BACK TO TOP BUTTON FIX ==================== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 999;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTop i {
    font-size: 1.125rem;
    margin: 0;
}

@media (max-width: 767px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    #backToTop i {
        font-size: 1rem;
    }
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
.social-link:focus,
.footer a:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Ensure good contrast for all text */
.footer {
    color: var(--gray-300);
}

.footer a {
    color: var(--gray-400);
}

.footer h5 {
    color: var(--white);
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .footer {
        background: white;
        color: black;
    }
    
    .footer a {
        color: black;
    }
    
    .social-links,
    #backToTop {
        display: none;
    }
}
