/* ===== FOOTER ===== */
.footer {
    background: white; /* Changed to white */
    color: var(--text-dark, #1f2937); /* Changed to dark text */
    padding: 4rem 0 2rem;
    font-family: var(--font-primary, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    border: 1px solid var(--border-light, #e5e7eb); /* Added subtle border */
}

.footer-content {
    max-width: 1300px; /* Slightly wider content area */
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* 2 columns: first wider for logo/desc */
    gap: 2.5rem; /* Adjusted gap */
}

.footer-logo {
    display: flex;
    margin-bottom: 1.2rem; /* Adjusted margin */
}

.footer-logo .logo-text {
    font-size: 1.35rem; /* Adjusted font size slightly larger for standalone text */
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark, #1f2937); /* Changed to dark text */
}

.footer-description {
    color: var(--text-light, #6b7280); /* Softer text color */
    margin-bottom: 1.8rem; /* Adjusted margin */
    line-height: 1.7; /* Increased line height for readability */
}

.footer-social {
    display: flex;
    gap: 0.8rem; /* Adjusted gap */
}

.social-icon {
    color: var(--text-light, #6b7280); /* Changed to light dark text */
    transition: color 0.2s ease, transform 0.2s ease; /* Faster and smoother transition */
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-light, #e5e7eb); /* Light border */
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: var(--primary-blue, #3662e3); /* Changed to primary blue on hover */
    background-color: var(--background-light, #f8f9fa); /* Light background on hover */
    transform: translateY(-3px);
    border-color: var(--primary-blue, #3662e3); /* Primary blue border on hover */
}

.footer-column-title {
    font-size: 1.15rem; /* Slightly larger */
    font-weight: 600;
    margin-bottom: 1.6rem; /* Adjusted margin */
    color: var(--text-dark, #1f2937); /* Changed to dark text */
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem; /* Adjusted margin */
}

.footer-links a {
    color: var(--text-light, #6b7280); /* Changed to light dark text */
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.footer-links a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-light, #6a8ee6);
    visibility: hidden;
    transition: all 0.2s ease-in-out;
}

.footer-links a:hover {
    color: var(--primary-blue, #3662e3); /* Changed to primary blue on hover */
}

.footer-newsletter-text {
    color: var(--text-light, #6b7280); /* Changed to light dark text */
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column; /* Stack input and button */
    gap: 0.8rem; /* Adjusted gap */
}

.newsletter-input {
    width: 100%;
    padding: 0.85rem; /* Adjusted padding */
    border: 1px solid var(--border-light, #e5e7eb); /* Light border */
    border-radius: var(--border-radius-sm, 8px); /* Use variable */
    background: var(--background-light, #f8fafc); /* Light background */
    color: var(--text-dark, #1f2937); /* Dark text */
    font-size: 0.95rem;
}

.newsletter-input::placeholder {
    color: var(--text-light, #6b7280); /* Light dark placeholder */
}

.newsletter-button {
    width: 100%;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--primary-blue, #3662e3), var(--primary-dark, #2a4baa));
    color: white;
    border: none;
    border-radius: var(--border-radius-sm, 8px);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.footer-bottom {
    max-width: 1300px; /* Match content width */
    margin: 2.5rem auto 0; /* Adjusted top margin */
    padding: 1.5rem 1.5rem 0; /* Adjusted padding */
    border-top: 1px solid var(--border-light, #e5e7eb); /* Light border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light, #6b7280); /* Light dark text */
    font-size: 0.85rem; /* Slightly smaller font */
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem; /* Adjusted gap */
}

.footer-bottom-links a {
    color: var(--text-light, #6b7280); /* Light dark text */
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-blue, #3662e3); /* Primary blue on hover */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr; /* 2 columns on medium-large screens */
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr; /* Single column on tablets */
        gap: 2rem;
    }
    .footer-content > div:nth-child(1) { /* Logo/Desc takes full width */
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 2rem;
    }
    
    .footer-content > div {
        grid-column: span 1 !important; /* Ensure all take full width */
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom p {
        white-space: normal;
    }
}

@media (max-width: 576px) {
    .footer-newsletter-form {
        flex-direction: column; /* Stack again on very small screens */
    }
}

/* Adjust specific list for horizontal display */
.services-horizontal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem; /* Vertical and horizontal gap */
}

.services-horizontal-list li {
    margin-bottom: 0; /* Remove vertical margin */
}

.services-horizontal-list li a {
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Quick Links Grouping Styles */
.footer-quick-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem; /* Space between each group (row) */
}

.footer-quick-links-group {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Make links within a group horizontal */
    flex-wrap: wrap; /* Allow links to wrap if space is constrained */
    gap: 0.8rem 1.2rem; /* Vertical and horizontal gap between links */
}

.footer-quick-links-group li {
    margin-bottom: 0; /* Override default margin-bottom from .footer-links li */
}

.footer-quick-links-group li a {
    white-space: nowrap; /* Prevent text from wrapping within a link */
}

/* On smaller screens, stack the groups vertically */
@media (max-width: 768px) {
    .footer-quick-links-group {
        flex-direction: column; /* Stack links vertically within a group on mobile */
        gap: 0.5rem; /* Smaller gap for stacked links */
    }
}