/* Upper Section */
footer .container.py-5 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Row flex for equal height columns */
footer .container.py-5 .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Columns - Equal Height */
footer .col-md-4.mb-4 {
    display: flex;
    flex-direction: column;
}

/* About Us Column */
footer .col-md-4.mb-4:first-child {
    justify-content: center; /* vertically center content */
}

footer .col-md-4.mb-4:first-child a img.mb-2 {
    max-height: 60px;
    margin-bottom: 0.75rem;
}

footer .col-md-4.mb-4:first-child p.small {
    margin-bottom: 0.75rem;
}

footer .col-md-4.mb-4:first-child .d-flex.gap-2 a {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 1.25rem;
}

footer .col-md-4.mb-4:first-child .d-flex.gap-2 a:hover {
    color: #0d6efd;
    transform: scale(1.2);
}

/* Recent Posts Column */
footer .col-md-4.mb-4:nth-child(2) .row {
    gap: 0.5rem;
    flex: 1;
}

footer .col-md-4.mb-4:nth-child(2) .row .col-6 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    margin-bottom: 0.5rem;
}

footer .footer-recent {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

footer a:hover .footer-recent {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

footer small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

footer a:hover small {
    color: #0d6efd;
}

/* Categories Column */
footer ul.list-unstyled li a {
    display: block;
    margin-bottom: 0.3rem;
    position: relative;
    transition: color 0.3s ease;
}

footer ul.list-unstyled li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -2px;
    background: #0d6efd;
    transition: width 0.3s ease;
}

footer ul.list-unstyled li a:hover {
    color: #0d6efd;
}

footer ul.list-unstyled li a:hover::after {
    width: 100%;
}

/* Upper Section Column Dividers for medium+ screens */
@media (min-width: 768px) {
    footer .col-md-4.mb-4:not(:last-child) {
        border-right: 1px solid #dee2e6;
        padding-right: 2rem;
    }
    footer .col-md-4.mb-4:not(:first-child) {
        padding-left: 2rem;
    }
}

/* Bottom Section */
footer .bg-secondary {
    background-color: #343a40 !important;
}

footer .bg-secondary p,
footer .bg-secondary a {
    color: #ffffff !important;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer .bg-secondary a:hover {
    color: #0d6efd !important;
    text-decoration: underline;
}

footer .list-inline-item {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

/* Responsive Bottom Section */
@media (max-width: 767.98px) {
    footer .d-flex.flex-md-row {
        flex-direction: column !important;
        text-align: center;
        gap: 0.5rem;
    }

    footer .list-inline-item {
        display: block;
        margin: 0.25rem 0;
    }
}