/* Chaintum Custom Footer - Using Theme Fonts and Colors */

/* Post page heading colors */
.single-post h1,
.single-post h2,
.single-post h3,
.single h1,
.single h2,
.single h3,
.post h1,
.post h2,
.post h3,
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3,
.single .entry-content h1,
.single .entry-content h2,
.single .entry-content h3,
.single-post article h1,
.single-post article h2,
.single-post article h3,
.single article h1,
.single article h2,
.single article h3 {
    color: #FFFFFF !important;
}

/* Hide default footer */
.site-footer,
#colophon,
.ast-footer,
footer[role="contentinfo"] {
    display: none !important;
}

.chaintum-custom-footer {
    background-color: #070B21;
    width: 100%;
    padding: 60px 40px 30px 40px;
    margin-top: 0;
    clear: both;
}

/* Remove comment section and post navigation from post pages */
.comments-area,
#comments,
.ast-comment-section,
.comment-respond,
#respond,
.ast-comment-form,
.comment-form,
.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-cookies-consent,
.post-navigation,
.navigation,
.nav-links,
.ast-single-post-nav,
.ast-prev-next-wrapper,
.ast-post-navigation,
.ast-single-post-navigation,
.post-navigation-wrapper,
[class*="comment"],
[class*="nav-links"],
[class*="post-navigation"],
[class*="prev-next"],
[class*="table-of-contents"],
.toc,
#toc,
.scroll-to-top,
[class*="scroll-to-top"],
[class*="scroll-top"],
.ast-scroll-top,
#ast-scroll-top,
[class*="toc"],
[class*="table-of-contents"],
.entry-footer,
.ast-entry-footer,
.ast-separate-container .ast-comment-section {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Remove related posts and recent posts sections */
.related-posts,
.ast-related-posts,
.ast-related-posts-container,
.related-posts-wrapper,
.recent-posts,
.recent-posts-section,
.ast-recent-posts,
[class*="related-posts"],
[class*="related-post"],
[class*="recent-posts"],
[class*="recent-post"],
[class*="similar-posts"],
[class*="similar-post"],
.ast-related-posts-wrap,
.related-posts-container,
.recent-posts-container,
.elementor-widget[class*="related"],
.elementor-widget[class*="recent"],
[class*="post-related"],
[class*="posts-related"],
[class*="more-posts"],
[class*="you-may-like"],
[class*="recommended-posts"],
/* Jetpack Related Posts */
#jp-relatedposts,
.jp-relatedposts,
.jp-relatedposts-items,
.jp-relatedposts-items-minimal,
.jp-relatedposts-grid,
.jp-relatedposts-post,
[class*="jp-relatedposts"],
[id*="jp-relatedposts"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Remove any white space/margin between subscribe section and footer */
.chaintum-custom-footer {
    margin-top: 0 !important;
}

/* Aggressive removal of white space - hide empty containers and white background sections */
.single-post [class*="subscribe"] ~ div:empty,
.single-post [class*="newsletter"] ~ div:empty,
.single [class*="subscribe"] ~ div:empty,
.single [class*="newsletter"] ~ div:empty,
.single-post [class*="subscribe"] ~ section:empty,
.single-post [class*="newsletter"] ~ section:empty,
.single [class*="subscribe"] ~ section:empty,
.single [class*="newsletter"] ~ section:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove white background sections between subscribe and footer */
.single-post [class*="subscribe"] ~ [style*="background"]:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single-post [class*="newsletter"] ~ [style*="background"]:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single-post [class*="subscribe"] ~ [class*="container"]:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single-post [class*="newsletter"] ~ [class*="container"]:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

/* Pull footer up to eliminate any gap */
.single-post .chaintum-custom-footer,
.single .chaintum-custom-footer {
    margin-top: 0 !important;
    position: relative;
}

/* Ultimate white space removal - target any element between subscribe and footer */
.single-post [class*="subscribe"]:last-of-type ~ *:not(.chaintum-custom-footer),
.single-post [class*="newsletter"]:last-of-type ~ *:not(.chaintum-custom-footer),
.single [class*="subscribe"]:last-of-type ~ *:not(.chaintum-custom-footer),
.single [class*="newsletter"]:last-of-type ~ *:not(.chaintum-custom-footer) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Remove any white background elements between subscribe and footer */
.single-post [class*="subscribe"] ~ [style*="background-color: rgb(255"],
.single-post [class*="subscribe"] ~ [style*="background-color:#fff"],
.single-post [class*="subscribe"] ~ [style*="background-color:#ffffff"],
.single-post [class*="subscribe"] ~ [style*="background: rgb(255"],
.single-post [class*="subscribe"] ~ [style*="background:#fff"],
.single-post [class*="subscribe"] ~ [style*="background:#ffffff"],
.single-post [class*="newsletter"] ~ [style*="background-color: rgb(255"],
.single-post [class*="newsletter"] ~ [style*="background-color:#fff"],
.single-post [class*="newsletter"] ~ [style*="background-color:#ffffff"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove white space from elements immediately before footer */
.chaintum-custom-footer + *,
* + .chaintum-custom-footer {
    margin-top: 0 !important;
}

/* Remove margin/padding from content areas before footer */
#content,
.ast-container,
.site-content,
.entry-content,
main,
article {
    margin-bottom: 0 !important;
}

/* Remove white space from subscribe/newsletter containers */
.chaintum-subscribe-container,
.subscribe-container,
.newsletter-container,
[class*="subscribe"],
[class*="newsletter"],
.elementor-widget[class*="subscribe"],
.elementor-widget[class*="newsletter"],
[class*="newsletter-section"],
[class*="subscribe-section"],
[class*="newsletter-wrapper"],
[class*="subscribe-wrapper"] {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove ALL white space between subscribe and footer on post pages */
.single-post .chaintum-subscribe-container + *,
.single-post .subscribe-container + *,
.single-post .newsletter-container + *,
.single-post [class*="subscribe"] + *,
.single-post [class*="newsletter"] + *,
.single .chaintum-subscribe-container + *,
.single .subscribe-container + *,
.single .newsletter-container + *,
.single [class*="subscribe"] + *,
.single [class*="newsletter"] + *,
.post .chaintum-subscribe-container + *,
.post .subscribe-container + *,
.post .newsletter-container + *,
.post [class*="subscribe"] + *,
.post [class*="newsletter"] + *,
.single-post [class*="subscribe"] ~ *:not(.chaintum-custom-footer),
.single-post [class*="newsletter"] ~ *:not(.chaintum-custom-footer),
.single [class*="subscribe"] ~ *:not(.chaintum-custom-footer),
.single [class*="newsletter"] ~ *:not(.chaintum-custom-footer) {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove any white background or spacing */
body > *:last-child:not(.chaintum-custom-footer),
.single-post > *:last-child:not(.chaintum-custom-footer),
.single > *:last-child:not(.chaintum-custom-footer),
.post > *:last-child:not(.chaintum-custom-footer),
#page > *:last-child:not(.chaintum-custom-footer),
.site > *:last-child:not(.chaintum-custom-footer) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove white space from content containers on post pages */
.single-post .entry-content,
.single-post .ast-container,
.single-post .site-content,
.single-post #content,
.single-post .ast-separate-container,
.single-post .ast-article-single,
.single .entry-content,
.single .ast-container,
.single .site-content,
.single #content,
.single .ast-separate-container,
.single .ast-article-single {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove spacing from all wrapper divs on post pages */
.single-post .ast-container > *:last-child,
.single-post .site-content > *:last-child,
.single-post #content > *:last-child,
.single .ast-container > *:last-child,
.single .site-content > *:last-child,
.single #content > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure no white space between any element and footer on post pages */
.single-post *:last-child:not(.chaintum-custom-footer):not([class*="subscribe"]):not([class*="newsletter"]),
.single *:last-child:not(.chaintum-custom-footer):not([class*="subscribe"]):not([class*="newsletter"]),
.single-post [class*="subscribe"] ~ .chaintum-custom-footer,
.single-post [class*="newsletter"] ~ .chaintum-custom-footer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove spacing from any section or div between subscribe and footer */
.single-post section:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single-post div:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single section:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer),
.single div:not([class*="subscribe"]):not([class*="newsletter"]):not(.chaintum-custom-footer) {
    margin-bottom: 0 !important;
}

/* Target any white background sections */
.single-post .ast-separate-container:not([class*="subscribe"]):not([class*="newsletter"]),
.single .ast-separate-container:not([class*="subscribe"]):not([class*="newsletter"]) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.chaintum-footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.chaintum-footer-top {
    margin-bottom: 50px;
}

.chaintum-footer-logo a {
    display: inline-block;
    text-decoration: none;
}

.chaintum-footer-logo img {
    height: 50px;
    width: auto;
}

.chaintum-logo-text {
    font-family: var(--ast-global-font-family, Montserrat, "Helvetica Neue", sans-serif);
    font-size: var(--ast-global-font-size-xxl, 1.5rem);
    font-weight: var(--ast-global-font-weight-semibold, 600);
    color: var(--ast-global-color-5, #FFFFFF);
}

.chaintum-footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.chaintum-footer-column {
    display: flex;
    flex-direction: column;
}

.chaintum-footer-heading {
    font-family: var(--ast-global-font-family, Montserrat, "Helvetica Neue", sans-serif);
    font-size: var(--ast-global-font-size-base, 1rem);
    font-weight: var(--ast-global-font-weight-semibold, 600);
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chaintum-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chaintum-footer-links li {
    margin: 0;
}

.chaintum-footer-links a {
    font-family: var(--ast-global-font-family, Montserrat, "Helvetica Neue", sans-serif);
    font-size: var(--ast-global-font-size-base, 1rem);
    font-weight: var(--ast-global-font-weight-normal, 400);
    color: var(--ast-global-color-5, #FFFFFF);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.chaintum-footer-links a:hover {
    color: #08f5f8;
    text-decoration: underline;
    text-decoration-color: #08f5f8;
    text-underline-offset: 4px;
}

.chaintum-footer-links a:focus {
    outline: 2px solid #08f5f8;
    outline-offset: 2px;
    border-radius: 2px;
}

.chaintum-footer-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chaintum-social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ast-global-color-5, #FFFFFF);
    border-radius: 4px;
    color: var(--ast-global-color-5, #FFFFFF);
    text-decoration: none;
    transition: all 0.3s ease;
}

.chaintum-social-icon:hover {
    color: #08f5f8;
    border-color: #08f5f8;
    background-color: rgba(8, 245, 248, 0.1);
    transform: translateY(-2px);
}

.chaintum-social-icon:focus {
    outline: 2px solid #08f5f8;
    outline-offset: 2px;
}

.chaintum-social-icon svg {
    width: 20px;
    height: 20px;
}

.chaintum-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chaintum-footer-copyright {
    font-family: var(--ast-global-font-family, Montserrat, "Helvetica Neue", sans-serif);
    font-size: var(--ast-global-font-size-sm, 0.875rem);
    font-weight: var(--ast-global-font-weight-normal, 400);
    color: rgba(255, 255, 255, 0.6);
}

.chaintum-footer-copyright p {
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .chaintum-footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }
}

@media (max-width: 768px) {
    .chaintum-custom-footer {
        padding: 40px 20px 20px 20px;
    }
    
    .chaintum-footer-top {
        margin-bottom: 40px;
    }
    
    .chaintum-footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .chaintum-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-top: 20px;
    }
    
    .chaintum-footer-social {
        gap: 12px;
    }
    
    .chaintum-social-icon {
        width: 36px;
        height: 36px;
    }
    
    .chaintum-social-icon svg {
        width: 18px;
        height: 18px;
    }
}

