/* Main Footer Styling */
.main-footer {
    background-color: #1e1e1e;
    color: #ccc;
    padding: 60px 20px 40px; /* Increased bottom padding for animation space */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative; /* For potential absolute positioning of animated elements */
    overflow: hidden; /* Clip any overflowing animations */
}

/* Footer Container */
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Needed for absolute positioning within */
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3 {
    text-align: center;
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5rem;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    position: relative; /* For potential pseudo-element animations */
}

/* Subtle underline animation on heading hover */
.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease-in-out;
}

.footer-section h3:hover::after {
    width: 100%;
}

.footer-section p,
.footer-section ul,
.footer-section a {
    text-align: center;;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9; /* Slightly less prominent initially */
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out; /* Added transform for potential hover effects */
}

/* Fade in effect for text and links */
.footer-section > * {
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: calc(0.1s * var(--index)); /* Staggered appearance */
}

/* Apply index variable for staggering */
.footer-section > p { --index: 1; }
.footer-section > ul { --index: 2; }
.footer-section > a { --index: 3; }
.footer-section.social > div { --index: 1; }
.footer-section.social a { --index: 2; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Links */
.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: #4CAF50;
    transform: translateX(5px); /* Subtle slide on hover */
    opacity: 1;
}

/* List Styling */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

/* Quicklinks - Centering */
.footer-section.quicklinks ul {
    display: flex;
    flex-direction: column; /* Ensure items stack vertically */
    align-items: flex-start; /* Default alignment */
}

@media (min-width: 601px) { /* Center on larger screens */
    .footer-section.quicklinks {
        display: flex;
        justify-content: center; /* Center the entire section content */
    }
    .footer-section.quicklinks ul {
        align-items: center; /* Center the list items horizontally */
        text-align: center; /* Center the text within the list items */
    }
}

/* Social Icons */
.footer-section.social div {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-section.social a {
    display: inline-block; /* Allows setting width/height and margins */
}

.footer-section.social a svg {
    fill: #ccc;
    width: 24px; /* Adjust size as needed */
    height: 24px;
    transition: fill 0.3s, transform 0.3s ease-in-out; /* Added transform */
}

.footer-section.social a:hover svg {
    fill: #4CAF50;
    transform: scale(1.1); /* Subtle scale on hover */
}

/* Copyright */
.copyright-bar {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
    border-top: 1px solid #333;
    opacity: 0.8;
    animation: fadeIn 0.5s ease-out 0.6s forwards; /* Fade in with a slight delay */
}

/* Responsive Tweaks */
@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section.social div {
        justify-content: center;
    }
    /* Center Quicklinks on small screens as well */
    .footer-section.quicklinks {
        display: flex;
        justify-content: center;
    }
    .footer-section.quicklinks ul {
        align-items: center;
        text-align: center;
    }
}

.follow-us {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}