/* ==========================================================================
   TBS SAN JUAN — FOOTER, SPONSORS & ADS
   ========================================================================== */

/* SPONSORS SECTION */
.sponsors-section {
    width: 100%;
    background: #0d0d11;
    padding: 72px 0 88px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sponsors-heading {
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 36px;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 26px;
    align-items: stretch;
}

.sponsors-grid .widget,
.sponsors-grid .wp-block-image,
.sponsors-grid .image,
.sponsors-grid .custom-html-widget,
.sponsors-grid .textwidget,
.sponsor-placeholder {
    min-height: 88px;
    padding: 22px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sponsors-grid .widget {
    margin: 0;
}

.sponsors-grid .widget-title {
    display: none;
}

.sponsors-grid img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 58px;
    object-fit: contain;
    margin: 0 auto;
}

.sponsors-grid a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsors-grid p,
.sponsors-grid figure {
    margin: 0;
}

.sponsor-placeholder {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* FOOTER BASE */
footer,
.tbs-footer {
    background-color: var(--bg-base);
    padding: 64px 0 0;
    border-top: 1px solid var(--border-subtle);
}

.tbs-footer__cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-subtle);
}

.tbs-footer__col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tbs-footer__col .footer-col-widget__title,
.tbs-footer__col .widget-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.tbs-footer__col .footer-logo,
.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px;
    text-align: left;
}

.tbs-footer__col .footer-logo span,
.footer-logo span {
    color: var(--primary-red);
}

.tbs-footer__col .footer-links,
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    justify-content: flex-start;
    align-items: flex-start;
}

.tbs-footer__col .footer-links a,
.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

.tbs-footer__col .footer-links a:hover,
.footer-links a:hover {
    color: var(--accent-gold);
}

.tbs-footer__col p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 8px;
}

.tbs-footer__col a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.tbs-footer__col a:hover {
    color: var(--accent-gold);
}

.tbs-footer__col img {
    max-width: 160px;
    height: auto;
    display: block;
}

.tbs-footer__bottom,
.copyright-wrap {
    padding: 20px 0;
    text-align: center;
}

.tbs-footer__bottom .copyright-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #555;
    font-size: 0.85rem;
}

.tbs-footer__bottom .credits,
.credits {
    font-size: 0.78rem;
    color: #444;
}

.tbs-footer__bottom .footer-bottom-widget {
    color: #555;
    font-size: 0.85rem;
}

.tbs-footer__bottom .footer-bottom-widget p {
    margin: 0 0 4px;
    color: #555;
}

.tbs-footer__bottom .footer-bottom-widget__title {
    display: none;
}

/* GLOBAL ADS */
.global-top-ad-wrap {
    width: 100%;
    background: #e5e5e5;
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.global-top-ad {
    width: min(100%, 1280px);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tbs-top-ad-widget,
.global-ad-widget {
    width: 100%;
    max-width: 1180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tbs-top-ad-widget img,
.tbs-top-ad-widget iframe,
.tbs-top-ad-widget ins,
.global-ad-widget img {
    max-width: 100% !important;
    width: 100%;
    max-width: 1200px;
    height: 90px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.global-ad-widget iframe,
.global-ad-widget ins {
    max-width: 100%;
}

.global-ad-widget-title {
    display: none;
}

.tbs-top-ad {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e5e5;
    overflow: hidden;
    box-sizing: border-box;
}

.tbs-top-ad--desktop {
    min-height: 90px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tbs-top-ad--desktop:empty {
    display: none !important;
}

.tbs-top-ad--mobile {
    min-height: 50px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tbs-top-ad--mobile:empty {
    display: none !important;
}

/* GLOBAL FOOTER ADS STRIP */
.global-footer-ads-strip {
    width: 100%;
    background: #dcdcdc;
    padding: 34px 20px;
}

.global-footer-ads-inner {
    width: min(100%, 1320px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: center;
}

.global-footer-ad-slot,
.global-footer-ad-widget {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.global-footer-ad-widget img {
    width: 100%;
    max-width: 360px;
    height: 120px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 6px;
}

.global-footer-ad-widget iframe,
.global-footer-ad-widget ins {
    max-width: 100%;
}

/* RESPONSIVE FOOTER & ADS */
@media (max-width: 980px) {
    .sponsors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .global-footer-ads-inner {
        grid-template-columns: 1fr 1fr;
    }

    .tbs-footer__cols {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .tbs-footer__col:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .sponsors-section {
        padding: 48px 0 56px;
    }

    .sponsors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .sponsors-grid .widget,
    .sponsors-grid .wp-block-image,
    .sponsors-grid .image,
    .sponsors-grid .custom-html-widget,
    .sponsors-grid .textwidget,
    .sponsor-placeholder {
        min-height: 82px;
        padding: 18px;
    }

    .sponsors-grid img {
        max-height: 52px;
    }

    footer,
    .tbs-footer {
        padding: 40px 0 0;
    }

    .tbs-footer__cols {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 32px;
    }

    .tbs-footer__col:last-child {
        grid-column: auto;
    }

    .tbs-footer__col .footer-logo,
    .footer-logo {
        font-size: 1.6rem;
        text-align: center;
    }

    .tbs-footer__col .footer-links,
    .footer-links {
        align-items: center;
        flex-direction: column;
    }

    .tbs-footer__col {
        align-items: center;
        text-align: center;
    }

    .tbs-footer__col img {
        margin: 0 auto;
    }

    .tbs-footer__bottom {
        padding: 16px 0;
    }

    .tbs-top-ad--desktop {
        display: none !important;
    }
}

@media (max-width: 720px) {
    .global-top-ad-wrap {
        padding: 10px 12px;
    }

    .global-top-ad {
        min-height: 80px;
    }

    .global-ad-widget img {
        height: 80px;
    }
}

@media (max-width: 640px) {
    .global-footer-ads-strip {
        padding: 24px 14px;
    }

    .global-footer-ads-inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .global-footer-ad-widget img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .sponsors-grid {
        grid-template-columns: 1fr;
    }

    .tbs-footer__cols {
        gap: 20px;
        padding-bottom: 24px;
    }

    .tbs-footer__col .footer-logo {
        font-size: 1.4rem;
    }

    .global-top-ad-wrap {
        padding: 8px;
    }

    .global-top-ad {
        min-height: 70px;
    }

    .global-ad-widget img {
        height: 70px;
    }
}