/* ============================================
   FOOTER STYLING
   ============================================ */

/* CRITICAL FIX - Override GeneratePress footer-widgets background */
.footer-widgets,
body .footer-widgets,
.site .footer-widgets,
div.footer-widgets {
    background-color: transparent !important;
    background: transparent !important;
}

/* Override GeneratePress base-3 variable for footer */
footer.site-footer .footer-widgets {
    background: #2d3748 !important;
    background-color: #2d3748 !important;
}

/* AGGRESSIVELY hide ALL GeneratePress footer elements - FIXED */
body .site-footer:not(footer.site-footer),
body > .site-footer,
.footer-widgets-container,
.inside-site-info,
div.site-info {
    display: none !important;
    visibility: hidden !important;
    overflow: hidden !important;
}

/* Make ABSOLUTELY SURE our custom footer is visible */
.site > footer.site-footer {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

/* Remove white backgrounds from ALL parent containers */
body,
.site,
.site-content,
#page,
#content,
.grid-container,
.container {
    background: transparent !important;
    background-color: transparent !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Our custom footer - make it prominent and full width */
footer.site-footer {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    margin-top: 80px !important;
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

footer.site-footer * {
    color: inherit !important;
}

footer.site-footer .footer-widgets {
    display: grid !important;
    visibility: visible !important;
    background: transparent !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 30px;
    width: 100%;
}

/* Footer Widgets Grid - 20%, 40%, 40% */
footer.site-footer .footer-widgets {
    display: grid !important;
    grid-template-columns: 1fr 2fr 2fr !important;
    gap: 50px !important;
    margin-bottom: 50px !important;
}

.footer-widget {
    color: #e2e8f0;
}

/* Categories Column - 2 sub-columns SIDE BY SIDE */
.footer-categories .category-columns {
    display: grid !important;
    grid-template-columns: 0.5fr 0.5fr !important;
    gap: 30px !important;
}

/* Ensure category lists don't stack */
.footer-categories .category-columns ul {
    display: block !important;
}

.footer-widget-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.footer-widget p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e0;
    margin-bottom: 15px;
}

/* Footer Menu */
.footer-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-menu li {
    margin-bottom: 12px !important;
}

.footer-menu a {
    color: #cbd5e0 !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.footer-menu a:hover {
    color: #ffffff !important;
    transform: translateX(5px);
}

.footer-menu i {
    font-size: 0.85rem;
    color: #2c5282;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.footer-social a:hover {
    background: #2c5282;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

/* Footer Subscribe Button */
.footer-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #b90000;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 3px 10px rgba(255, 0, 0, 0.3);
}

.footer-subscribe-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: #cbd5e0;
    font-size: 0.9rem;
    margin: 0 !important;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-bottom-links a {
    color: #cbd5e0 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: color 0.3s ease !important;
}

.footer-bottom-links a:hover {
    color: #ffffff !important;
}

.footer-bottom-links .separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c5282;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1e3a5f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
    footer.site-footer .footer-widgets {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px 30px !important;
    }
    
    /* Categories span full width on second row */
    .footer-categories {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    footer.site-footer {
        margin-top: 60px !important;
    }

    .footer-container {
        padding: 40px 20px 20px;
    }

    /* FORCE single column layout on mobile */
    footer.site-footer .footer-widgets,
    .site-footer .footer-widgets,
    .footer-widgets {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 35px !important;
        margin-bottom: 40px !important;
    }
    
    /* Ensure each widget takes full width */
    .footer-widget,
    .footer-links,
    .footer-about,
    .footer-categories {
        width: 100% !important;
        grid-column: auto !important;
        max-width: 100% !important;
    }

    .footer-widget {
        text-align: center;
    }

    .footer-menu {
        text-align: center;
    }
    
    /* Keep category columns side by side on tablet/small desktop */
    .footer-categories .category-columns {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 30px 15px 15px;
    }

    .footer-widget-title {
        font-size: 1.1rem !important;
    }

    .footer-subscribe-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stack category columns on very small screens */
    .footer-categories .category-columns {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}
@media (max-width: 768px) {
    /* Comfortable tap height for stacked footer links. */
    .footer-menu a,
    .footer-bottom-links a {
        display: inline-flex !important;
        align-items: center !important;
        min-height: 32px;
    }
}
