footer {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

/* First Row: Company Info + 3 Link Columns */
.footer-first-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* Second Row: Same 4-column structure as first row for perfect alignment */
.footer-second-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 70px;
}

/* Service Areas takes normal column width */
.footer-service-areas {
    /* No special spanning needed */
}

/* Empty column styling */
.footer-empty {
    /* Empty column - no content needed */
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
}

.footer-about p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Contact Information Styles */
.footer-contact {
    margin: 20px 0;
    font-style: normal;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    width: 16px;
    color: var(--accent-color);
}

.contact-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Footer Bottom Improvements */
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--accent-color);
}

/* Call to Action Button */
.footer-cta {
    margin: 20px 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 30, 0.3);
}

.cta-button i {
    font-size: 14px;
}

/* Social Media Improvements */
.social-heading {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.social-icons {
    display: flex;
    gap: 15px;
}

/* Footer Links Improvements */
.footer-links ul {
    /* Removed scrollable functionality */
}

/* Mobile-specific footer fixes */
@media (max-width: 768px) {
    /* Ensure footer is always visible */
    body {
        padding-bottom: 0;
    }
    
    /* Fix any viewport issues */
    html, body {
        height: auto;
        min-height: 100vh;
    }
    
    /* Ensure footer doesn't get cut off */
    footer {
        position: relative;
        z-index: 10;
        background: var(--dark-bg);
    }
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.social-link i {
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: white;
    transform: translateY(-5px);
}

.social-link:hover::before {
    opacity: 1;
}

.footer-heading {
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.footer-links ul {
    list-style: none;
}

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

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}


.footer-bottom {
    text-align: center;
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 99;
    border: 1px solid rgba(196, 30, 30, 0.3);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .footer-first-row {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 30px;
    }
    
    .footer-second-row {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .footer-first-row {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-second-row {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-first-row {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: left;
        margin-bottom: 40px;
    }
    
    .footer-about {
        text-align: left;
    }
    
    .footer-second-row {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: left;
        gap: 15px;
    }
    
    .contact-item {
        justify-content: flex-start;
    }
    
    .social-icons {
        justify-content: flex-start;
    }
    
    /* Ensure footer is visible on mobile */
    footer {
        min-height: auto;
        padding: 20px 0;
    }
    
    .container {
        padding: 0 15px;
    }

    .social-links {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-first-row,
    .footer-second-row {
        gap: 25px;
        margin-bottom: 30px;
    }
    
    .footer-about p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .contact-item {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .footer-links ul li a {
        font-size: 0.9rem;
        padding: 5px 0;
    }
    
    .footer-heading {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Ensure footer content is fully visible */
    footer {
        padding: 15px 0;
        margin-top: 20px;
    }
    
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    /* Fix any potential overflow issues */
    .footer-content {
        overflow: visible;
    }
    
    /* Ensure copyright text is fully visible */
    .footer-bottom {
        padding: 15px 0;
        margin-top: 10px;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}
