/* ==========================================================================
   GENBYTE PRESS — FOOTER & RETENTION STYLES
   4 Colunas Editoriais, Exit Intent Popup & Botão Voltar ao Topo
   ========================================================================== */

.gbp-site-footer,
.site-footer {
    background-color: var(--gbp-color-surface, #f8fafc);
    border-top: 1px solid var(--gbp-color-border, rgba(15, 23, 42, 0.08));
    color: var(--gbp-color-text);
    margin-top: auto;
    transition: background-color var(--gbp-transition);
}

.footer-top {
    padding: 60px 20px 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

.gbp-footer-widgets-grid,
.fwx-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .gbp-footer-widgets-grid,
    .fwx-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .gbp-footer-widgets-grid,
    .fwx-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-col,
.gbp-footer-col,
.fwx-footer-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--gbp-color-heading, var(--gbp-color-text));
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background-color: var(--gbp-color-primary);
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gbp-color-text-muted);
}

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

.footer-links a {
    color: var(--gbp-color-text);
    font-size: 0.925rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--gbp-transition);
}

.footer-links a:hover {
    color: var(--gbp-color-primary);
    transform: translateX(3px);
}

/* Redes Sociais no Rodapé */
.footer-col .gbp-author-socials,
.footer-col .fwx-author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.footer-col .gbp-social-link,
.footer-col .fwx-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--gbp-rad-8);
    background: var(--gbp-color-bg);
    color: var(--gbp-color-text);
    border: 1px solid var(--gbp-color-border);
    transition: var(--gbp-transition);
}

.footer-col .gbp-social-link:hover,
.footer-col .fwx-social-link:hover {
    background: var(--gbp-color-primary);
    color: #ffffff !important;
    border-color: var(--gbp-color-primary);
    transform: translateY(-2px);
}

/* Linha Inferior do Rodapé */
.footer-bottom {
    border-top: 1px solid var(--gbp-color-border);
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--gbp-color-text-muted);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright a {
    color: inherit;
    font-weight: 600;
}

.footer-copyright a:hover {
    color: var(--gbp-color-primary);
}

/* =============================================================================
   BOTÃO VOLTAR AO TOPO (BACK TO TOP)
   ============================================================================= */

.gbp-back-to-top,
.fwx-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--gbp-color-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gbp-back-to-top.visible,
.fwx-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gbp-back-to-top:hover,
.fwx-back-to-top:hover {
    background: var(--gbp-color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* =============================================================================
   EXIT INTENT POPUP (MODAL DE RETENÇÃO NA SAÍDA)
   ============================================================================= */

.gbp-exit-popup,
.fwx-exit-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.gbp-exit-popup.active,
.fwx-exit-popup.active {
    opacity: 1;
    visibility: visible;
}

.gbp-exit-popup-overlay,
.fwx-exit-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
}

.gbp-exit-popup-content,
.fwx-exit-popup-content {
    position: relative;
    background: var(--gbp-color-bg, #ffffff);
    border-radius: var(--gbp-rad-16);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 2;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.gbp-exit-popup.active .gbp-exit-popup-content,
.fwx-exit-popup.active .fwx-exit-popup-content {
    transform: scale(1);
}

.gbp-exit-popup-close,
.fwx-exit-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gbp-color-text-muted);
    cursor: pointer;
    transition: var(--gbp-transition);
}

.gbp-exit-popup-close:hover,
.fwx-exit-popup-close:hover {
    color: var(--gbp-color-primary);
    transform: scale(1.1);
}

.gbp-exit-popup-title,
.fwx-exit-popup-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.gbp-exit-popup-desc,
.fwx-exit-popup-desc {
    color: var(--gbp-color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* LGPD Banner */
.gbp-lgpd-banner,
.fwx-lgpd-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gbp-color-surface, #ffffff);
    border-top: 1px solid var(--gbp-color-border, #e2e8f0);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    padding: 16px 0;
}

[data-theme="dark"] .gbp-lgpd-banner,
[data-theme="dark"] .fwx-lgpd-banner {
    background: var(--gbp-color-surface-card, #1e293b);
    border-color: var(--gbp-color-border-dark, #334155);
}

.gbp-lgpd-content,
.fwx-lgpd-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.gbp-lgpd-content p,
.fwx-lgpd-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gbp-color-text, #334155);
    flex: 1;
    min-width: 260px;
}

.gbp-lgpd-actions,
.fwx-lgpd-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gbp-lgpd-policy-btn,
.fwx-lgpd-policy-btn {
    font-size: 0.85rem;
    color: var(--gbp-color-primary, #0066cc);
    text-decoration: underline;
}

.gbp-lgpd-btn,
.fwx-lgpd-btn {
    background: var(--gbp-color-primary, #0066cc);
    color: #ffffff;
    border: none;
    border-radius: var(--gbp-rad-6, 6px);
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gbp-transition);
}

.gbp-lgpd-btn:hover,
.fwx-lgpd-btn:hover {
    filter: brightness(1.1);
}
