/* ===================================
   FOOTER STYLES
   =================================== */

   .footer-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23374151" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23footerGrid)"/></svg>');
    z-index: 1;
}

.footer-section > * {
    position: relative;
    z-index: 2;
}

/* Main Footer Content */
.footer-main {
    padding: 50px 0 30px;
}

/* Footer Brand */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-brand-name {
    font-family: var(--font-secondary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xl);
    color: var(--brand-green);
    margin: 0;
    line-height: 1;
}

.footer-description {
    color: var(--gray-300);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    font-size: var(--fs-sm);
}

/* Footer Widgets */
.footer-widget {
    margin-bottom: var(--spacing-lg);
}

.footer-widget-title {
    font-family: var(--font-secondary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-lg);
    color: var(--white);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: 8px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Footer Menu - PROPERLY ALIGNED ICONS */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center; /* Changed from flex-start to center */
    gap: 10px; /* Increased gap for better spacing */
    font-size: var(--fs-sm);
    padding: 6px 0;
    line-height: 1.4;
}

.footer-menu a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.footer-menu a i {
    font-size: var(--fs-sm);
    color: var(--primary-color);
    transition: var(--transition-fast);
    width: 16px; /* Fixed width for consistent alignment */
    height: 16px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
}

.footer-menu a:hover i {
    color: var(--primary-light);
}

/* Footer Social Links */
.footer-social {
    margin-top: var(--spacing-lg);
}

.footer-social-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.footer-social .social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--white);
}

.footer-social .social-link.facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
}

.footer-social .social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-color: #e6683c;
}

.footer-social .social-link.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.footer-social .social-link.youtube:hover {
    background: #FF0000;
    border-color: #FF0000;
}

.footer-social .social-link i {
    font-size: var(--fs-sm);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    text-align: center;
}

.footer-copyright p {
    margin: 0;
    color: var(--gray-400);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

/* ===================================
   SCROLL TO TOP BUTTON ONLY
   =================================== */
.footer-scroll-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
}

.scroll-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, box-shadow 0.3s;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: var(--white);
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

/* ===================================
   RESPONSIVE DESIGN - PERFECTLY ALIGNED MOBILE FOOTER
   =================================== */

/* Large devices (desktops, 992px and up) */
@media (max-width: 991.98px) {
    .footer-main {
        padding: 40px 0 25px;
    }
    
    /* Start centering on tablets */
    .footer-widget {
        text-align: center;
    }
    
    .footer-widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-menu a {
        justify-content: flex-start; /* Keep left-aligned icon/text on tablets */
        max-width: 250px;
        width: 100%;
    }
    
    .footer-social .social-links {
        justify-content: center;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 767.98px) {
    .footer-main {
        padding: 35px 0 20px;
    }
    
    /* PERFECTLY ALIGNED MOBILE FOOTER */
    .footer-widget {
        text-align: center;
        margin-bottom: var(--spacing-2xl);
    }
    
    .footer-widget-title {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }
    
    .footer-widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .footer-menu li {
        margin-bottom: 0;
        width: 100%;
    }
    
    .footer-menu a {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Left-align the content within centered container */
        text-align: left;
        padding: 8px 0;
        font-size: var(--fs-sm);
        gap: 12px; /* Consistent gap */
        width: 100%;
    }
    
    .footer-menu a i {
        width: 18px; /* Slightly larger for mobile */
        height: 18px;
        font-size: var(--fs-base);
        margin-right: 0; /* Remove extra margin */
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .footer-menu a:hover {
        color: var(--primary-color);
        transform: translateX(0); /* Remove horizontal movement on mobile */
    }
    
    .footer-social {
        margin-top: var(--spacing-xl);
    }
    
    .footer-social .social-links {
        justify-content: center;
        gap: 12px;
    }
    
    .footer-social .social-link {
        width: 40px;
        height: 40px;
    }
    
    .footer-copyright {
        text-align: center;
        margin-top: var(--spacing-lg);
    }

    /* Improved scroll-to-top positioning for mobile */
    .footer-scroll-top {
        right: 20px;
        bottom: 20px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 575.98px) {
    .footer-main {
        padding: 30px 0 15px;
    }
    
    .footer-brand {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        margin-bottom: var(--spacing-xl);
    }
    
    .footer-logo {
        height: 35px;
    }
    
    .footer-brand-name {
        font-size: var(--fs-lg);
    }
    
    .footer-description {
        text-align: center;
        max-width: 300px;
        margin: 0 auto var(--spacing-lg);
    }
    
    /* ENHANCED MOBILE ALIGNMENT */
    .footer-widget {
        text-align: center;
        margin-bottom: var(--spacing-2xl);
        padding: 0 15px;
    }
    
    .footer-widget-title {
        font-size: var(--fs-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .footer-menu {
        max-width: 260px;
        gap: 10px;
    }
    
    .footer-menu a {
        font-size: var(--fs-sm);
        padding: 6px 0;
        gap: 10px;
    }
    
    .footer-menu a i {
        width: 16px;
        height: 16px;
        font-size: var(--fs-sm);
    }
    
    .footer-social .social-links {
        gap: 10px;
    }
    
    .footer-social .social-link {
        width: 38px;
        height: 38px;
    }
    
    /* Adjust scroll to top button for small devices */
    .footer-scroll-top {
        right: 15px;
        bottom: 15px;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .footer-main {
        padding: 25px 0 15px;
    }
    
    .footer-widget {
        margin-bottom: var(--spacing-xl);
        padding: 0 10px;
    }
    
    .footer-widget-title {
        font-size: var(--fs-base);
    }
    
    .footer-menu {
        max-width: 240px;
        gap: 8px;
    }
    
    .footer-menu a {
        font-size: var(--fs-xs);
        padding: 5px 0;
        gap: 8px;
    }
    
    .footer-menu a i {
        width: 14px;
        height: 14px;
        font-size: var(--fs-xs);
    }
    
    .footer-copyright p {
        font-size: var(--fs-xs);
    }
    
    .footer-description {
        font-size: var(--fs-xs);
        max-width: 280px;
    }
}

/* Extra responsive adjustments for very small screens */
@media (max-width: 375px) {
    .footer-widget {
        padding: 0 5px;
    }
    
    .footer-description {
        max-width: 260px;
    }
    
    .footer-menu {
        max-width: 220px;
        gap: 6px;
    }
    
    .footer-menu a {
        gap: 6px;
    }
    
    /* Adjust scroll-to-top for very small screens */
    .footer-scroll-top {
        right: 12px;
        bottom: 12px;
    }
    
    .scroll-to-top {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

/* Special fix for contact info items with long text */
.footer-contact .footer-menu a {
    align-items: flex-start; /* For multi-line contact items */
}

.footer-contact .footer-menu a i {
    margin-top: 2px; /* Slight adjustment for multi-line text */
}

/* Ensure proper line wrapping for long contact items */
@media (max-width: 767.98px) {
    .footer-contact .footer-menu a {
        white-space: normal;
        line-height: 1.5;
    }
}