/* ==================== FOOTER FIXES - COMPREHENSIVE ==================== */
/* Fix for social icons alignment, contact details, and logo display */

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

.footer .logo-container .footer-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.footer .logo-container img {
    height: 50px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    /* Apply bright white filter for visibility on dark footer */
    filter: brightness(0) invert(1) brightness(2);
    transition: var(--transition);
    display: block; /* Ensure image displays properly */
}

.footer .logo-container .footer-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

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

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

/* Fallback icon styling if image doesn't load */
.footer .logo-container .fallback-icon {
    font-size: 2rem;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== SOCIAL LINKS FIX - PERFECT CENTERING ==================== */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: inline-flex; /* Changed from flex to inline-flex */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-800);
    color: var(--white) !important;
    transition: var(--transition);
    text-decoration: none;
    margin: 0; /* Reset any margin */
    padding: 0; /* Reset any padding */
    position: relative;
}

.social-link i {
    font-size: 1.125rem; /* 18px - perfect size for 45px circle */
    line-height: 1;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

/* Ensure icons stay centered on hover */
.social-link:hover i {
    transform: translate(-50%, -50%);
}

/* ==================== GET IN TOUCH - CONTACT INFO ALIGNMENT ==================== */
.footer .col-lg-3.col-md-6:last-child .mb-3,
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem !important;
    line-height: 1.6;
}

.footer .col-lg-3.col-md-6:last-child i {
    color: var(--primary-light) !important;
    font-size: 1.125rem;
    min-width: 20px;
    flex-shrink: 0;
    margin-top: 0.25rem; /* Slight offset to align with text */
    display: inline-block;
    text-align: center;
}

.footer .col-lg-3.col-md-6:last-child span,
.footer .col-lg-3.col-md-6:last-child a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin: 0 !important;
    line-height: 1.6;
    flex: 1;
}

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

/* Override the default footer link styling for contact section */
.footer .col-lg-3.col-md-6:last-child a {
    display: inline !important;
    margin-bottom: 0 !important;
}

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

/* ==================== FOOTER HEADINGS ==================== */
.footer h5 {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

/* ==================== FOOTER LINKS - GENERAL ==================== */
.footer a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

/* Services links with icons */
.footer .col-lg-3:nth-child(3) a {
    display: flex;
    align-items: center;
}

.footer .col-lg-3:nth-child(3) a i {
    color: var(--primary-light);
    font-size: 1rem;
}

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

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

.footer-bottom a:hover {
    color: var(--primary-light);
    transform: translateX(0);
}

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

@media (max-width: 767px) {
    .footer {
        padding: 3rem 0 1.5rem;
        text-align: center;
    }
    
    .footer .logo-container {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Center contact info on mobile */
    .footer .col-lg-3.col-md-6:last-child .mb-3 {
        justify-content: center;
        text-align: left;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer a {
        display: inline-block;
        margin-bottom: 0.5rem;
    }
    
    .footer .col-lg-3:nth-child(3) a {
        justify-content: center;
    }
    
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .footer-bottom .col-md-6 {
        margin-bottom: 1rem;
        text-align: center !important;
    }
}

@media (max-width: 575px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer h5 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .footer .logo-container img {
        height: 40px;
        max-width: 130px;
    }
    
    .footer .logo-container h5 {
        font-size: 1.25rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link i {
        font-size: 1rem;
    }
    
    .footer a {
        font-size: 0.9rem;
    }
    
    .footer .col-lg-3.col-md-6:last-child i {
        font-size: 1rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
    }
    
    .footer-bottom a {
        display: block;
        margin-bottom: 0.5rem;
    }
}

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

.footer a:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

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

/* ==================== HIGH DPI DISPLAYS ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .footer .logo-container img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
