/**
 * @version     2.4.0
 * @package     com_bancocases
 * @subpackage  mod_bancocases
 * @author      Hirlei Carlos Pereira de Araújo <hirlei.ths@ths.inf.br>
 */

/* ===========================
   TOKENS / NORMALIZAÇÃO
   =========================== */
:root {
    --bp-azul-escuro: #00166B;
    --bp-azul: #5883D0;
    --bp-azul-ui: #171C66;
    --bp-cinza-900: #0C1249;
    --bp-cinza-700: #4D4D4D;
    --bp-cinza-600: #4D4D4D;
    --bp-cinza-500: #B3B3B3;
    --bp-cinza-400: #BFBFBF;
    --bp-cinza-200: #F5F5F5;
    --bp-cinza-150: #F0E8E8;
    --bp-azul-claro: #26C2FF;

    --bp-radius-lg: 20px;
    --bp-radius-md: 10px;
    --bp-shadow-fab: 8px 8px 8px #00000029;
    --bp-font-ui: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Escopo do módulo */
.bp-home { font-family: var(--bp-font-ui); }

/* ===========================
   CATEGORIAS (DESKTOP)
   =========================== */
.bp-home .bp-home-categorias{
    display:flex;
    flex-direction:row;
    justify-content:center;
    margin-bottom:43px;
}

.bp-home .bp-home-categorias .categorias-item{
    padding:0 30px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    border-right:1px solid var(--bp-cinza-400);
    cursor:pointer;
}

.bp-home .bp-home-categorias .categorias-item:first-child{ padding-left:0; }
.bp-home .bp-home-categorias .categorias-item:last-child{
    padding-right:0; border-right:0;
}

/* Tamanhos originais (desktop) */
.bp-home .bp-home-categorias .img-tamanho0{ width:157px !important; }
.bp-home .bp-home-categorias .img-tamanho1{ width:213px !important; height:35px !important; }
.bp-home .bp-home-categorias .img-tamanho2{ width:128px !important; }
.bp-home .bp-home-categorias .img-tamanho3{ height:59px !important; }
.bp-home .bp-home-categorias .img-tamanho4,
.bp-home .bp-home-categorias .img-tamanho5{ width:72px !important; height:59px !important; }

/* ===========================
   DESTAQUE / CAROUSEL (DESKTOP)
   =========================== */
.bp-home .bp-home-destaque{ margin-bottom:30px; }
.bp-home .bp-home-destaque,
.bp-home .bp-home-destaque .carousel{
    height:375px; max-height:375px;
}
.bp-home .bp-home-destaque .carousel{ position:relative; }

.bp-home .bp-home-destaque .carousel .carousel-inner{
    height:310px; max-height:310px; padding:0 70px; margin-bottom:15px;
}
.bp-home .bp-home-destaque .destaque-corpo{
    display:flex; flex-direction:row; gap:29px; background-color:var(--bp-cinza-200);
}
/* Destaque sempre maior, mas com mesma proporção dos cards */
.bp-home .bp-home-destaque .destaque-img,
.bp-home .bp-home-destaque .destaque-img img {
    width: 100%;
    max-width: 445px;         /* controla a largura máxima no desktop */
    aspect-ratio: 255 / 178;  /* mesma proporção dos cards */
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}
.bp-home .bp-home-destaque .destaque-img img,
.bp-home .bp-home-resultado .case-item .case-item-img img{ object-fit:cover; }

.bp-home .bp-home-destaque .destaque-textos{ display:flex; flex-direction:column; width:100%; }
.bp-home .bp-home-destaque .destaque-categoria{
    color:#000; font-weight:600; font-size:14px; line-height:19px; margin-bottom:10px;
}

/* Selo “premiado” (reuso nos cards) */
.bp-home .bp-home-destaque .destaque-premiado,
.bp-home .bp-home-resultado .case-item .item-text-premiado{
    background-color:var(--bp-azul); border-radius:100px; color:#FFF;
    width:100px; height:25px; display:flex; justify-content:center; align-items:center;
    position:absolute; bottom:0;
}
.bp-home .bp-home-destaque .destaque-premiado span,
.bp-home .bp-home-resultado .case-item .item-text-premiado span{
    font-weight:400; font-size:12px; line-height:17px; margin-left:6px;
}

/* Controles do carousel (ícones custom) */
.bp-home .bp-home-destaque .carousel .carousel-control-prev,
.bp-home .bp-home-destaque .carousel .carousel-control-next{
    top:50%; bottom:auto; transform:translateY(-50%);
    width:56px !important; height:56px !important; /* área clicável maior */
    display:flex; align-items:center; justify-content:center;
    border-radius:50%; background:transparent !important;
    padding:6px; box-sizing:content-box; opacity:1; z-index:5;
    transition:background-color .2s ease;
}
.bp-home .bp-home-destaque .carousel .carousel-control-prev:hover,
.bp-home .bp-home-destaque .carousel .carousel-control-prev:focus,
.bp-home .bp-home-destaque .carousel .carousel-control-next:hover,
.bp-home .bp-home-destaque .carousel .carousel-control-next:focus{
    background-color:rgba(88,131,208,.15);
}
.bp-home .bp-home-destaque .carousel .carousel-control-prev:active,
.bp-home .bp-home-destaque .carousel .carousel-control-next:active{
    background-color:rgba(88,131,208,.3);
}

/* Ícones (stroke, sem fill branco) */
.bp-home .bp-home-destaque .carousel .carousel-control-prev .carousel-control-prev-icon{
    width:36px; height:36px; background-size:36px 36px;
    background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'>\
<circle cx='18' cy='18' r='17' fill='none' stroke='%235080b9' stroke-width='1.2'/>\
<polyline points='20,10 12,18 20,26' fill='none' stroke='%235080b9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/>\
</svg>");
}
.bp-home .bp-home-destaque .carousel .carousel-control-next .carousel-control-next-icon{
    width:36px; height:36px; background-size:36px 36px;
    background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'>\
<circle cx='18' cy='18' r='17' fill='none' stroke='%235080b9' stroke-width='1.2'/>\
<polyline points='16,10 24,18 16,26' fill='none' stroke='%235080b9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/>\
</svg>");
}

/* Indicadores */
.bp-home .bp-home-destaque .carousel .carousel-indicators [data-bs-target]{
    width:15px; height:15px; background-color:var(--bp-cinza-150); border-radius:50%; margin-right:10px;
}
.bp-home .bp-home-destaque .carousel .carousel-indicators .active{ background-color:var(--bp-azul-claro); }

/* ===========================
   FILTRO / OFFCANVAS (DESKTOP)
   =========================== */
.bp-home .bp-home-filtro{
    display:flex; flex-direction:row; justify-content:center; align-items:center; margin-bottom:26px;
}

/* ícones dos ramos (sprites) */
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-agropecuario,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-consumo,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-credito,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-infraestrutura,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-tpbs,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-transporte,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-saude,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-agropecuario-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-consumo-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-credito-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-infraestrutura-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-tpbs-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-transporte-color,
.bp-home .bp-home-filtro .offcanvas .ramo-img .img-saude-color{
    background-repeat:no-repeat; background-position:center; background-size:55px;
}

/* Busca */
.bp-home .bp-home-filtro .filtro-busca{ position:relative; }
.bp-home .bp-home-filtro .filtro-busca svg{
    position:absolute; z-index:10; margin:5px 10px; width:32px; height:32px;
}
.bp-home .bp-home-filtro .filtro-busca input.busca{
    width:857px; height:40px; background:#FFF; border:1px solid var(--bp-cinza-500);
    border-radius:20px; color:var(--bp-cinza-500);
    padding-left:52px; padding-right:52px; display:flex; align-items:center;
}
.bp-home .bp-home-filtro .filtro-busca input.busca::placeholder{
    font-weight:400; font-size:12px; line-height:16px; color:var(--bp-cinza-500); opacity:.8;
}

/* Botão de filtro */
.bp-home .bp-home-filtro .filtro-btn .btn-link{
    font-weight:400; font-size:16px; line-height:20px; color:#18186A; text-decoration:none;
    display:flex; align-items:center; justify-content:center;
}
.bp-home .bp-home-filtro .filtro-btn .btn-link svg{ margin:0 10px; }

/* FAB histórico */
.bp-home .bp-home-filtro .history-btn-fixed{
    width:54px; height:54px; background:var(--bp-azul); box-shadow:var(--bp-shadow-fab);
    border-radius:27px; color:#FFF; border:0; position:fixed; right:30px; bottom:150px; z-index:2147483647;
    font-size:25px; overflow:hidden; transition:width .3s ease; display:flex; align-items:center; justify-content:flex-end; padding:0 10px;
}
.bp-home .bp-home-filtro .history-btn-fixed:hover{ width:200px; }
.bp-home .bp-home-filtro .history-btn-fixed .text-btn{
    display:inline-block; opacity:0; transition:opacity .3s ease, transform .3s ease;
    transform:translateX(-100%); margin-left:10px; white-space:nowrap; font-weight:400; font-size:16px; line-height:21px;
}
.bp-home .bp-home-filtro .history-btn-fixed:hover .text-btn{ opacity:1; transform:translateX(0); }
.bp-home .bp-home-filtro .history-btn-fixed i{ margin-left:auto; margin-right:3px; }

/* Offcanvas */
.bp-home .bp-home-filtro .offcanvas{
    position:fixed; top:70px; right:0; bottom:0; z-index:214748394578; width:470px; background:#fff;
    border-radius:0 0 var(--bp-radius-md) var(--bp-radius-md); animation:slide-in .5s ease-in-out;
}
.bp-home .bp-home-filtro .offcanvas-header{ padding:15px 35px 15px 20px; }
.bp-home .bp-home-filtro .offcanvas-title{
    font-family:"Intro Regular", var(--bp-font-ui);
    font-weight:400; font-size:18px; line-height:21px; color:var(--bp-azul); margin:0;
}
.bp-home .bp-home-filtro .btn-close{
    position:absolute; top:20px; right:70px; font-size:8px; font-weight:bold; color:#8A8098; padding:8px;
    border:1px solid #8A8098; border-radius:50%; box-shadow:none; animation:slide-out .5s ease-in-out;
}

/* Conteúdo do offcanvas */
.bp-home .bp-home-filtro .offcanvas .offcanvas-body{ padding:20px 40px 20px 20px; }
.bp-home .bp-home-filtro .offcanvas .accordion-item{ border-bottom:2px solid #dee2e6; }
.bp-home .bp-home-filtro .offcanvas .accordion-item:last-child{ margin-bottom:30px; }
.bp-home .bp-home-filtro .offcanvas .accordion-button,
.bp-home .bp-home-filtro .offcanvas .accordion-button:focus,
.bp-home .bp-home-filtro .offcanvas .accordion-button:not(.collapsed){
    font-weight:400; font-size:14px; line-height:18px; color:var(--bp-azul-escuro);
    background:transparent; box-shadow:none;
}
.bp-home .bp-home-filtro .offcanvas .accordion-button::after{ background-size:15px; margin-top:10px; }
.bp-home .bp-home-filtro .offcanvas .accordion-collapse{ padding:15px 0; }

/* Grid de ramos */
.bp-home .bp-home-filtro .offcanvas .bp-ramos{
    width:100%; display:flex; justify-content:space-between; flex-wrap:wrap; gap:15px;
}
.bp-home .bp-home-filtro .offcanvas .bp-ramo-item{
    width:120px; border:1px solid var(--bp-cinza-500); border-radius:var(--bp-radius-lg);
    display:flex; align-items:center; justify-content:center; flex-direction:column; padding:10px; cursor:pointer;
}
.bp-home .bp-home-filtro .offcanvas .bp-ramo-item-color{ border-color:var(--bp-azul); }
.bp-home .bp-home-filtro .offcanvas .bp-ramo-item .ramo-img div{
    width:55px; height:55px; background-position:center; background-size:70px;
}
.bp-home .bp-home-filtro .offcanvas .bp-ramo-item .ramo-titulo{
    text-align:center; font-weight:400; font-size:10px; line-height:12px; color:#B3B3B3;
}
.bp-home .bp-home-filtro .offcanvas .bp-ramo-item .ramo-titulo-color{ color:var(--bp-azul); }

/* Inputs de data */
.bp-home .bp-home-filtro .offcanvas .input-group{ max-width:150px; }
.bp-home .bp-home-filtro .offcanvas .input-group input.datepicker{
    width:100px; max-width:150px; height:40px; background:transparent; border:1px solid var(--bp-cinza-500);
    border-radius:5px; color:var(--bp-cinza-500); padding-left:45px; padding-right:20px; position:relative; z-index:2;
}
.bp-home .bp-home-filtro .offcanvas .input-group i{
    color:var(--bp-azul-ui); position:absolute; z-index:1; margin:10px 15px; left:0; top:0; font-size:20px;
}

/* Footer do offcanvas */
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao{
    display:flex; flex-direction:row; gap:15px; justify-content:flex-end;
}
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao button{
    border-radius:20px; font-weight:500; font-size:12px; line-height:16px; width:50%; padding:12px 30px;
}
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao .btn-azul-branco,
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao .btn-branco-azul:hover{
    background-color:var(--bp-azul-ui); color:#FFF;
}
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao .btn-branco-azul,
.bp-home .bp-home-filtro .offcanvas .offcanvas-botao .btn-azul-branco:hover{
    background-color:#FFF; color:var(--bp-azul-ui); border:1px solid var(--bp-azul-ui);
}

/* Histórico (form) */
.bp-home .bp-home-filtro #offhistory .offcanvas-body p{
    font-weight:400; font-size:14px; line-height:17px; color:var(--bp-azul-escuro);
}
.bp-home .bp-home-filtro #offhistory .offcanvas-body .form-label{
    font-weight:400; font-size:12px; line-height:17px; color:var(--bp-azul);
    margin-bottom:5px;
}
.bp-home .bp-home-filtro #offhistory .offcanvas-body .form-control{
    background:#FFF; border:1px solid var(--bp-cinza-700); border-radius:5px; margin-bottom:10px;
}
.bp-home .bp-home-filtro #offhistory .offcanvas-body .form-control::placeholder{
    font-weight:400; font-size:12px; line-height:17px; color:var(--bp-cinza-500);
}
.bp-home .bp-home-filtro #offhistory .offcanvas-body #mensagem{ height:100px; }

/* ===========================
   LISTA DE CASES (DESKTOP)
   =========================== */
.bp-home .bp-home-resultado .case-title{
    color:var(--bp-cinza-900); font-family:"Intro Regular", var(--bp-font-ui);
    font-weight:400; font-size:28px; line-height:21px; margin-bottom:16px; text-align:left;
}
.bp-home .bp-home-resultado .case-itens{
    width:100%; display:flex; justify-content:space-between; flex-wrap:wrap; gap:2%;
}
.bp-home .bp-home-resultado .case-item{
    flex:49%; display:flex; flex-direction:row; gap:15px; margin-bottom:50px;
}
.bp-home .bp-home-resultado .case-item .case-item-img,
.bp-home .bp-home-resultado .case-item .case-item-img img{
    width:255px; max-width:255px; height:178px; border-radius:var(--bp-radius-md);
}
.bp-home .bp-home-resultado .case-item .case-item-text{ position:relative; }

.bp-home .bp-home-resultado .case-item .item-text-categoria{
    font-weight:600; font-size:10px; line-height:12px; color:var(--bp-cinza-900);
    text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; max-height:12px; margin-bottom:5px;
}
.bp-home .bp-home-resultado .case-item .item-text-title{ margin-bottom:5px; }
.bp-home .bp-home-resultado .case-item .item-text-title h2{
    opacity:1; width:100%; overflow:hidden; text-overflow:ellipsis;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; min-height:40px;
}
.bp-home .bp-home-resultado .case-item .item-text-texto{
    width:100%; overflow:hidden; text-overflow:ellipsis;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; min-height:36px; font-size:14px;
}

/* Resumo destaque */
.destaque-resumo{
    width:100%; overflow:hidden; text-overflow:ellipsis;
    display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical;
    min-height:110px; margin-bottom:10px;
}

/* Botão “carregar mais” */
.bp-home .bp-home-btn{ display:flex; justify-content:center; align-items:center; }
.bp-home .bp-home-btn .btn-load-case{
    border:1px solid var(--bp-azul-escuro); border-radius:30px; color:var(--bp-azul-escuro);
    width:204px; height:60px; display:flex; align-items:center; justify-content:center;
    font-weight:500; font-size:16px; line-height:20px;
}

.bp-home .bp-home-filtro .offcanvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 8000;
}

.menu-acessibilidade {
    position: fixed;
    z-index: 9999; /* valor padrão */
}

/* Quando o filtro está aberto, menu de acessibilidade fica por baixo */
.bp-home .bp-home-filtro .offcanvas.show ~ .menu-acessibilidade,
.offcanvas.show + .menu-acessibilidade {
    z-index: 100 !important; /* baixo só enquanto filtro estiver aberto */
}


/* offcanvas backdrop controlada por classe */
.offcanvas-backdrop.hidden { display: none !important; }

/* Espaço entre o ícone (SVG) e o texto "Filtros" */
.bp-home .bp-home-filtro .filtro-btn .btn-offcanvas{
    display: inline-flex;           /* alinha ícone + texto na mesma linha */
    align-items: center;            /* centraliza verticalmente */
    gap: 8px;                       /* espaço entre o SVG e o texto */
}

/* (opcional) garante que o SVG não deforme */
.bp-home .bp-home-filtro .filtro-btn .btn-offcanvas svg{
    flex: 0 0 auto;
    display: block;                 /* evita espaçamento estranho de inline SVG */
}


/* Fallback para browsers sem support de gap em flex (bem raro hoje) */
@supports not (gap: 8px){
    .bp-home .bp-home-filtro .filtro-btn .btn-offcanvas svg{ margin-right: 8px; }
}

/* ===========================
   MODAIS / ACESSIBILIDADE
   =========================== */
.bp-home .bp-home-btn #loadingModal{ z-index:2000 !important; }
.modal-backdrop{ z-index:0 !important; } /* fix do !important */

.bp-home .bp-home-btn #loadingModal .modal-body{
    text-align:center !important; font-size:18px !important; line-height:16px !important; color:var(--bp-azul-escuro);
    display:flex !important; flex-wrap:wrap !important; justify-content:center; align-items:center;
}
.bp-home .bp-home-btn #loadingModal .modal-body img{ width:150px !important; margin-bottom:50px; }
.bp-home .bp-home-btn #loadingModal .modal-body p{ flex:100% !important; }

/* Animações */
@keyframes slide-in{ from{ transform:translateX(-100%);} to{ transform:translateX(0);} }
@keyframes slide-out{ from{ transform:translateX(0);} to{ transform:translateX(-100%);} }

/* Preferência por menos movimento */
@media (prefers-reduced-motion: reduce){
    .bp-home .bp-home-filtro .history-btn-fixed,
    .bp-home .bp-home-categorias,
    .bp-home .bp-home-destaque .carousel .carousel-inner,
    .bp-home .bp-home-destaque .carousel .carousel-control-next,
    .bp-home .bp-home-destaque .carousel .carousel-control-prev{
        transition:none !important; animation:none !important;
    }
}

/* ===========================
   RESPONSIVO (TABLET/PHONE)
   =========================== */
@media (max-width: 991px){
    /* Categorias: grade com separador “|” e tamanhos iguais */
    .bp-home .bp-home-categorias{
        flex-wrap:wrap; justify-content:center; gap:0; padding:0 12px; margin-bottom:20px;
    }
    .bp-home .bp-home-categorias .categorias-item{
        flex:1 0 33%; max-width:33%;
        display:flex; align-items:center; justify-content:center; padding:10px; position:relative; box-sizing:border-box; border-right:0;
    }
    .bp-home .bp-home-categorias .categorias-item:not(:last-child)::after{
        content:"|"; position:absolute; right:0; top:50%; transform:translateY(-50%);
        color:var(--bp-cinza-400); font-size:18px; line-height:1; pointer-events:none;
    }
    .bp-home .bp-home-categorias [class^="img-tamanho"]{
        width:auto !important; height:auto !important; max-height:40px !important; max-width:80% !important; object-fit:contain;
    }
    .bp-home .bp-home-categorias .categorias-item:first-child,
    .bp-home .bp-home-categorias .categorias-item:last-child{ padding-left:10px; padding-right:10px; }

    /* Destaque empilhado */
    .bp-home .bp-home-destaque,
    .bp-home .bp-home-destaque .carousel{ height:auto; max-height:none; }
    .bp-home .bp-home-destaque .carousel .carousel-inner{ height:auto; max-height:none; padding:0 16px; margin-bottom:12px; }
    .bp-home .bp-home-destaque .destaque-corpo{ flex-direction:column; gap:12px; padding:12px; border-radius:var(--bp-radius-md); }
    .bp-home .bp-home-destaque .destaque-img,
    .bp-home .bp-home-destaque .destaque-img img{ width:100%; max-width:100%; height:220px; }
    .bp-home .bp-home-destaque .carousel .carousel-indicators [data-bs-target]{ width:10px; height:10px; margin-right:6px; }
    .bp-home .bp-home-destaque .carousel .carousel-control-prev{ left:8px; }
    .bp-home .bp-home-destaque .carousel .carousel-control-next{ right:8px; }

    /* Filtro */
    .bp-home .bp-home-filtro{ flex-direction:column; gap:12px; padding:0 16px; align-items:stretch; }
    .bp-home .bp-home-filtro .filtro-busca svg{ margin:6px 10px; width:24px; height:24px; }
    .bp-home .bp-home-filtro .filtro-busca input.busca{
        width:100%; max-width:100%; height:44px; padding-left:44px; padding-right:16px;
    }
    .bp-home .bp-home-filtro .filtro-btn .btn-link{ justify-content:flex-start; font-size:14px; }

    /* FAB histórico (mobile) */
    .bp-home .bp-home-filtro .history-btn-fixed{
        right:16px; bottom:16px; width:56px; height:56px; border-radius:28px; box-shadow:0 6px 12px rgba(0,0,0,.18);
    }
    .bp-home .bp-home-filtro .history-btn-fixed:hover{ width:56px; }
    .bp-home .bp-home-filtro .history-btn-fixed .text-btn{ display:none; }

    /* Offcanvas full width */
    .bp-home .bp-home-filtro .offcanvas{ top:65px; width: 100%; border-radius:var(--bp-radius-md) var(--bp-radius-md) 0 0; }
    .bp-home .bp-home-filtro .offcanvas-header{ padding:12px 16px; }
    .bp-home .bp-home-filtro .btn-close{ right:40px; top:14px; }
    .bp-home .bp-home-filtro .offcanvas .offcanvas-body{ padding:16px; }

    /* Grid de ramos responsivo */
    .bp-home .bp-home-filtro .offcanvas .bp-ramos{ gap:10px; }
    .bp-home .bp-home-filtro .offcanvas .bp-ramo-item{ width:calc(50% - 5px); border-radius:14px; padding:10px 8px; }
    .bp-home .bp-home-filtro .offcanvas .bp-ramo-item .ramo-img div{ width:48px; height:48px; background-size:60px; }

    /* Inputs */
    .bp-home .bp-home-filtro .offcanvas .input-group{ max-width:100%; width:100%; }
    .bp-home .bp-home-filtro .offcanvas .input-group input.datepicker{ width:100%; padding-left:40px; }

    /* Ações offcanvas */
    .bp-home .bp-home-filtro .offcanvas .offcanvas-botao{ flex-direction:column; gap:10px; }
    .bp-home .bp-home-filtro .offcanvas .offcanvas-botao button{ width:100%; height:44px; padding:10px 16px; border-radius:24px; }

    /* Lista de cases 1 coluna */
    .bp-home .bp-home-resultado .case-title{ font-size:22px; line-height:1.2; padding:0 16px; }
    .bp-home .bp-home-resultado .case-itens{ gap:16px; padding:0 16px; }
    .bp-home .bp-home-resultado .case-item{
        flex:100%; flex-direction:column; gap:10px; margin-bottom:40px;
    }
    .bp-home .bp-home-resultado .case-item .case-item-img,
    .bp-home .bp-home-resultado .case-item .case-item-img img{
        width:100%; max-width:100%; height:200px;
    }
    .bp-home .bp-home-resultado .case-item .item-text-title h3{
        font-size:16px; line-height:1.25; min-height:auto; -webkit-line-clamp:3; -webkit-box-orient: vertical;
    }
    .bp-home .bp-home-resultado .case-item .item-text-texto{ -webkit-line-clamp:3; min-height:auto; }
    .bp-home .bp-home-resultado .case-item .item-text-premiado{ position:static; margin-top:8px; }

    /* Botão carregar mais */
    .bp-home .bp-home-btn .btn-load-case{
        width:100%; max-width:320px; height:52px; font-size:15px; border-radius:26px; margin:0 16px 24px;
    }

    #page-case h1 {
        font-size: 32px;
        color: #00166B;
    }
}

/* Telas muito pequenas */
@media (max-width: 480px){
    .bp-home .bp-home-categorias .categorias-item{ flex:1 0 50%; max-width:50%; }
    .bp-home .bp-home-categorias [class^="img-tamanho"]{ max-height:34px !important; }
}

/* iOS: evita zoom em inputs com fonte <16px */
@supports (-webkit-touch-callout: none){
    .bp-home .bp-home-filtro .filtro-busca input.busca,
    .bp-home .bp-home-filtro .offcanvas .offcanvas-body input,
    .bp-home .bp-home-filtro .offcanvas .offcanvas-body .form-control{ font-size:16px; }
}

/* ====== CARROSSEL: âncoras fixas e dots fora do conteúdo ====== */

/* 1) defina a altura de referência da imagem */
.bp-home .bp-home-destaque { --destaque-img-h: 310px; }      /* desktop */
@media (max-width: 991px){
    .bp-home .bp-home-destaque { --destaque-img-h: 220px; }    /* mobile/tablet */
}

/* 2) garante contexto e espaço para os dots */
.bp-home .bp-home-destaque .carousel{
    position: relative;
    padding-bottom: 40px;         /* reserva espaço p/ dots; ajuste se quiser mais/menos folga */
}

/* 3) dots fixos no rodapé do carrossel (não sobrepõem texto) */
.bp-home .bp-home-destaque .carousel .carousel-indicators{
    position: absolute;
    left: 0; right: 0;
    bottom: 8px;                  /* posição vertical dos dots */
    margin: 0;
    z-index: 6;
}
.bp-home .bp-home-destaque .carousel .carousel-indicators [data-bs-target]{
    width: 10px; height: 10px; margin: 0 5px;
}

/* 4) imagem com altura travada (base para o alinhamento das setas) */
.bp-home .bp-home-destaque .destaque-img,
.bp-home .bp-home-destaque .destaque-img img{
    height: var(--destaque-img-h);
    max-height: var(--destaque-img-h);
    width: 100%;
    max-width: 445px;
    border-radius: 10px;
    object-fit: cover;
}

/* 5) setas: linha de centro fixa = metade da altura da imagem (+ offset do padding interno) */
.bp-home .bp-home-destaque .carousel .carousel-control-prev,
.bp-home .bp-home-destaque .carousel .carousel-control-next{
    position: absolute;
    top: calc(var(--destaque-img-h) / 2 + 0px); /* ajuste fino do +0px se quiser subir/descer a linha */
    transform: translateY(-50%);
    bottom: auto;                /* evita “esticar” */
    width: 56px !important;
    height: 56px !important;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: transparent !important;
    padding: 10px;
    box-sizing: content-box;
    z-index: 7;                  /* acima de imagem/texto */
}

/* 6) mantém os ícones sem fundo “branco” (stroke only) */
.bp-home .bp-home-destaque .carousel .carousel-control-prev .carousel-control-prev-icon,
.bp-home .bp-home-destaque .carousel .carousel-control-next .carousel-control-next-icon{
    width: 36px; height: 36px; background-size: 36px 36px;
}

/* 7) feedback visual (hover/focus/active) – reaproveita suas regras anteriores */
.bp-home .bp-home-destaque .carousel .carousel-control-prev:hover,
.bp-home .bp-home-destaque .carousel .carousel-control-prev:focus,
.bp-home .bp-home-destaque .carousel .carousel-control-next:hover,
.bp-home .bp-home-destaque .carousel .carousel-control-next:focus{ background-color: rgba(88,131,208,.15); }
.bp-home .bp-home-destaque .carousel .carousel-control-prev:active,
.bp-home .bp-home-destaque .carousel .carousel-control-next:active{ background-color: rgba(88,131,208,.30); }

/* 8) título/resumo com clamp para não “empurrar” o conjunto */
.bp-home .bp-home-destaque .destaque-titulo h2{
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; text-overflow: ellipsis; margin: 0 0 10px 0;
}
.bp-home .bp-home-destaque .destaque-resumo p{
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
    overflow: hidden; text-overflow: ellipsis; margin: 0;
}

/* =======================
   BUSCA + FILTRO LADO A LADO
   ======================= */

/* Contêiner em grid: 1 coluna elástica (busca) + 1 coluna do botão (filtro) */
.bp-home .bp-home-filtro {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    justify-content: center;
    padding: 0 16px;
    margin-bottom: 26px;
}

/* Blocos explícitos para clareza (não depende de ordem no DOM) */
.bp-home .bp-home-filtro .filtro-busca { grid-column: 1; }
.bp-home .bp-home-filtro .filtro-btn   { grid-column: 2; }

/* Busca ocupa toda a coluna elástica */
.bp-home .bp-home-filtro .filtro-busca { position: relative; width: 100%; }
.bp-home .bp-home-filtro .filtro-busca svg {
    position: absolute; z-index: 1; left: 10px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; margin: 0;
}
.bp-home .bp-home-filtro .filtro-busca input.busca {
    width: 100% !important;
    max-width: 100% !important;
    height: 44px;
    padding-left: 44px;           /* espaço pro ícone */
    padding-right: 12px;
    border-radius: 20px;
    display: block;               /* evita “flex” esticar vertical */
}

/* Botão/Link do filtro fica colado à direita, com alvo de toque confortável */
.bp-home .bp-home-filtro .filtro-btn .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    white-space: nowrap;
    border-radius: 22px;
    text-decoration: none;
    border: none !important;       /* remove a borda */
    background: transparent;       /* fundo transparente */
    color: #18186A;                /* mantém o texto/ícone azul */
    padding: 0;                    /* tira espaço extra se quiser estilo link */
}
.bp-home .bp-home-filtro .filtro-btn .btn-link svg {
    margin: 0 0 0 8px;            /* ícone à direita do texto */
    width: 18px; height: 18px;
}

/* Responsivo fino: em telas muito estreitas o botão tem largura mínima estável */
@media (max-width: 400px) {
    .bp-home .bp-home-filtro {
        grid-template-columns: minmax(0, 1fr) 110px; /* busca cresce; filtro fixa ~110px */
    }
    .bp-home .bp-home-filtro .filtro-btn .btn-link {
        padding: 0 10px; font-size: 14px;
    }
}

/* Acessibilidade: evita jumps de layout quando teclado aparece no mobile */
@supports (-webkit-touch-callout: none) {
    .bp-home .bp-home-filtro .filtro-busca input.busca { font-size: 16px; }
}

.form-check {
    display: flex !important;
    align-items: center;
    margin-top: 5px;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    font-family: Inter;
    letter-spacing: 0;
    color: #00166B;
}

.form-check .form-check-input {
    float: left;
    margin-left: 0px !important;
    width: 40px !important;
    height: 20px !important;
}

.form-check .form-check-label {
    margin-left: 10px;
}

.no-overlay {
    position: relative !important;
    z-index: 0 !important;
}
