/* ============================================================
 * CVB Home - CSS que neutraliza invasão do tema
 * ============================================================ */

body.cvbfh-home {
    background: #0d1b2a !important;
    color: #fff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
}

/* Neutraliza background/image invasivos do tema */
body.cvbfh-home::before,
body.cvbfh-home::after {
    display: none !important;
}

/* Tipografia responsiva — nunca deixa estourar */
body.cvbfh-home h1,
body.cvbfh-home .cvb-landing-title,
body.cvbfh-home [class*="hero"] h1,
body.cvbfh-home [class*="title"] {
    font-size: clamp(24px, 6vw, 48px) !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    margin: 0 0 15px 0 !important;
    color: #fff !important;
    text-align: center !important;
}

body.cvbfh-home h2,
body.cvbfh-home [class*="hero"] h2,
body.cvbfh-home [class*="subtitle"] {
    font-size: clamp(16px, 4vw, 22px) !important;
    line-height: 1.4 !important;
    color: rgba(255,255,255,0.85) !important;
}

body.cvbfh-home p {
    line-height: 1.6 !important;
    color: rgba(255,255,255,0.8) !important;
}

/* Remove backgrounds translúcidos/"marca d'água" que causam o efeito de texto fantasma */
body.cvbfh-home [class*="hero"],
body.cvbfh-home [class*="banner"],
body.cvbfh-home [class*="landing"] {
    background-image: none !important;
    background-color: transparent !important;
    color: #fff !important;
}

/* Container principal — evita overflow */
body.cvbfh-home .site,
body.cvbfh-home .site-content,
body.cvbfh-home .content-area,
body.cvbfh-home main,
body.cvbfh-home article,
body.cvbfh-home .entry-content {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Esconde header/menu/footer do tema na home se existir */
body.cvbfh-home > header:not([class*="cvb"]),
body.cvbfh-home > nav:not([class*="cvb"]),
body.cvbfh-home > footer:not([class*="cvb"]),
body.cvbfh-home .site-header:not([class*="cvb"]),
body.cvbfh-home .site-navigation:not([class*="cvb"]),
body.cvbfh-home .site-footer:not([class*="cvb"]) {
    /* Descomente se quiser esconder completamente o header/footer do tema:
    display: none !important;
    */
}

/* ============ MOBILE (≤ 782px) ============ */
@media screen and (max-width: 782px) {

    body.cvbfh-home h1,
    body.cvbfh-home .cvb-landing-title,
    body.cvbfh-home [class*="hero"] h1 {
        font-size: clamp(22px, 7vw, 34px) !important;
        padding: 0 10px !important;
    }

    body.cvbfh-home [class*="hero"],
    body.cvbfh-home [class*="banner"],
    body.cvbfh-home [class*="landing"] {
        padding: 30px 15px !important;
        min-height: auto !important;
    }

    /* Logo centralizado no mobile */
    body.cvbfh-home [class*="logo"],
    body.cvbfh-home [class*="brand"] {
        margin: 0 auto 20px auto !important;
        display: block !important;
        max-width: 120px !important;
        height: auto !important;
    }

    /* Botão "Acessar Sistema" grande, centralizado */
    body.cvbfh-home a.button,
    body.cvbfh-home button.button,
    body.cvbfh-home [class*="btn-login"],
    body.cvbfh-home [class*="btn-acessar"],
    body.cvbfh-home a[href*="login"],
    body.cvbfh-home a[href*="wp-admin"] {
        display: block !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 20px auto !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        text-align: center !important;
        border-radius: 8px !important;
        background: #fff !important;
        color: #0d1b2a !important;
        box-sizing: border-box !important;
    }

    /* Form de login: largura ajustada */
    body.cvbfh-home form {
        width: 100% !important;
        max-width: 380px !important;
        margin: 20px auto !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }

    body.cvbfh-home input[type="text"],
    body.cvbfh-home input[type="email"],
    body.cvbfh-home input[type="password"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        border: 1px solid #d1d5db !important;
    }
}

/* ============ VERY SMALL (≤ 480px) ============ */
@media screen and (max-width: 480px) {
    body.cvbfh-home h1,
    body.cvbfh-home [class*="hero"] h1 {
        font-size: 22px !important;
    }
}

/* ============ PWA / STANDALONE ============ */
@media (display-mode: standalone) {
    body.cvbfh-home {
        padding-top: env(safe-area-inset-top, 0) !important;
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
    }
}
