/**
 * Footer styles
 */

/* Base footer styles */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 20px 0 10px;
    border-top: 1px solid #e9ecef;
    font-size: 15px;
    line-height: 1.6;
    color: #6c757d;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    max-height: 40vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Add padding to the bottom of the content to prevent it from being hidden behind the fixed footer */
.site-content {
    padding-bottom: 200px !important; /* Adjust this value based on your footer's height */
}

/* Adjust for admin bar */
.admin-bar .site-footer {
    margin-bottom: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-footer {
        margin-bottom: 46px;
    }
}

/* Footer widgets area */
.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
    box-sizing: border-box;
}

.footer-widget-title {
    color: #343a40;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

/* Footer menu */
.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Footer info */
.site-info {
    text-align: center;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.site-info a {
    color: #007bff;
    text-decoration: none;
}

.site-info a:hover {
    text-decoration: underline;
}

/* Social icons */
.social-links {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.social-links li {
    margin: 0 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-3px);
}

/* Back to top button */
.back-to-top {
    --button-size: 2.5rem;
    --transition-speed: 0.2s;
    
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: var(--button-size);
    height: var(--button-size);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease-in-out;
    z-index: 999;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.back-to-top:hover,
.back-to-top:focus {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-0.25rem);
    outline: none;
}

.back-to-top:active {
    transform: translateY(0);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive styles */
@media (max-width: 992px) {
    .footer-widget {
        flex: 0 0 50%;
    }
}

@media (max-width: 576px) {
    .footer-widget {
        flex: 0 0 100%;
    }
    
    .back-to-top {
        --button-size: 2.25rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
