body, html {
    height: 100%;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: #0B5699;
}

/* Reduz altura do header no desktop */
header .navbar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}


.menu-desktop .nav-link {
    color: #fff !important;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mega menu */
.mega-menu {
    min-width: 700px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    display: block;
    visibility: hidden;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

.nav-item.dropdown.show .mega-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.mega-menu .dropdown-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    margin-bottom: 0.6rem;    
}

.mega-menu .dropdown-item {
    font-size: 0.85rem;
    padding: 6px 0;
    color: #555;
    transition: color 0.2s ease;
}

.mega-menu .dropdown-item:hover {
    color: #0B5699;
    background: transparent;
}

/* Mobile offcanvas */
.offcanvas-body .nav-link {
    color: #0B5699;
    font-weight: 500;
    padding: 12px 0;
    transition: color 0.2s;
}

.offcanvas-body .nav-link:hover {
    color: #03B5EB;
}

/* Subitens offcanvas: pretos e menores */
.offcanvas-body .ps-3 .nav-link {
    color: #000 !important;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 4px 0 4px 0;
}

.offcanvas-header {
  border-bottom: 1px solid #ddd;
}

/* Search */
.search-box {
    position: relative;
    width: 300px;
    max-width: 90%;
}

.search-box input {
    padding: 6px 40px 6px 12px;
    border-radius: 4px;
    border: none;
    font-size: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.search-box button {
    position: absolute;
    right: 2px;
    top: 2px;
    bottom: 2px;
    border: none;
    background: #0EB3ED;
    color: #fff;
    padding: 0 10px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.search-box button:hover {
    background: #1990EA;
}

/* Main */
main {
    flex: 1;
    padding: 15px 0;
}

.content-wrapper {
    background-color: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 10px;
}


/* Grid cards */
.col-5 {
    flex: 0 0 20%;
    max-width: 20%;
}

@media (max-width: 1199.98px) { .col-5 { flex: 0 0 25%; max-width: 25%; } }
@media (max-width: 991.98px)  { 
    .col-5 { 
        flex: 0 0 33.3333%; 
        max-width: 33.3333%; 
    } 

    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1030; /* acima do conteúdo */
        background: #0B5699; /* mantém a cor */
        padding: 10px 0;
    }

    main {
        margin-top: 80px; /* espaço para o header fixo + busca */
    }
}
@media (max-width: 767.98px)  { .col-5 { flex: 0 0 50%; max-width: 50%; } }
@media (max-width: 575.98px)  { .col-5 { flex: 0 0 100%; max-width: 100%; } }


/* Card styling */
.tool-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: #0B5699;
    transition: transform 0.25s, box-shadow 0.25s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.tool-card h3 { font-size: 1rem; margin: 0 0 6px 0; }
.tool-card p { font-size: 0.72rem; color: #555; margin: 0; }
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* Footer */
footer {
    background: #135FAD;
    color: white;
    font-size: 0.8rem;
    margin-top: auto;
}

footer a { color: white; text-decoration: none; font-weight: 600; }
footer a:hover { color: #FFD700; }

.tooltip-inner {
    font-size: 0.65rem !important; /* Ajuste o tamanho conforme preferir */
    padding: 2px 6px; /* Opcional: deixa mais compacto */
}

  .card--flat {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent;
  }
  .two-col-row { position: relative; }
  
@media (min-width: 768px) {
  .two-col-row::before{
    content:"";
    position:absolute;
    top: calc(0.2rem); /* ou outro valor */
    bottom:0;
    left:50%;
    width:1px;
    background:#cfd6e0;
  }
}


  /* ===== CPF - Controles (mobile fix) ===== */
@media (max-width: 575.98px) {
  /* Cada select ocupa 50% no mobile */
  .col-6.col-sm-auto {
    width: 50% !important;
    padding-right: 8px;
  }
  .col-6.col-sm-auto:last-child {
    padding-right: 0;
  }

  /* Reduz tamanho dos selects */
  #fmt-select,
  #uf-select {
    min-width: unset !important;
    width: 100% !important;
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    height: calc(1.5em + 0.5rem + 2px) !important; /* reduz altura */
  }

  /* Labels um pouco menores */
  label[for="fmt-select"],
  label[for="uf-select"] {
    font-size: 0.65rem !important;
  }

  /* Botão mobile já é w-100; só garante toque confortável */
  #btn-gerar-mobile {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Telas muito estreitas (ex.: 320–360px): reduz ainda mais a fonte */
@media (max-width: 360px) {
  #fmt-select,
  #uf-select {
    font-size: 0.7rem !important;
  }
  label[for="fmt-select"],
  label[for="uf-select"] {
    font-size: 0.62rem !important;
  }
}


/* ====== Home: categorias ====== */
.cat-card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius:10px;
  padding:12px 12px 8px;
  height:100%;
}
.cat-title{
  font-size:1rem;
  font-weight:700;
  color:#0B5699;
  margin:0 0 10px 0;
  padding-bottom:6px;
  border-bottom:2px solid #0B5699;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.cat-list{ display:flex; flex-direction:column; gap:6px; }
.cat-item{
  display:flex; align-items:center; gap:8px;
  padding:8px 8px; border-radius:8px;
  text-decoration:none; color:#0B5699; font-weight:600; font-size:0.9rem;
  border:1px solid transparent;
  transition:background .15s ease, border-color .15s ease, transform .1s ease;
}
.cat-item i{ width:18px; text-align:center; font-size:0.95rem; opacity:.9; }
.cat-item:hover{ background:#f7fbff; border-color:#d9e6f7; transform: translateY(-1px); }

@media (max-width: 575.98px){
  .cat-item{ font-size:0.88rem; padding:8px 10px; }
}

/* ====== Home: curiosidades ====== */
.info-card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius:10px;
  padding:12px;
  height:100%;
  box-shadow:0 2px 8px rgba(0,0,0,0.03);
}
.info-card h4{
  font-size:0.95rem; font-weight:700; color:#0B5699;
  margin:0 0 6px 0;
}
.info-card p{
  font-size:0.85rem; color:#555; margin:0;
}

/* ====== Home: em breve ====== */
.soon-card{
  background:#fff;
  border:1px dashed #cfd6e0;
  border-radius:10px;
  padding:12px;
  height:100%;
}
.soon-badge{
  display:inline-block;
  font-size:0.7rem;
  background:#FFF3CD;
  color:#8A6D3B;
  border:1px solid #F5E5A5;
  border-radius:999px;
  padding:2px 8px;
  margin-bottom:6px;
}
.soon-card h4{
  font-size:0.95rem; color:#0B5699; font-weight:700; margin:4px 0 6px;
}
.soon-card p{
  font-size:0.85rem; color:#555; margin:0;
}

/* ====== Home: CTA banner ====== */
.cta-bar{
  background:#EAF4FF;
  border:1px solid #cfe2ff;
  color:#0B5699;
  border-radius:10px;
  padding:10px 12px;
  display:flex; flex-direction:column; gap:4px;
  align-items:center; text-align:center;
}
.cta-bar strong{ font-size:0.95rem; }
.cta-bar span{ font-size:0.85rem; color:#245b93; }

.cat-title{
  font-weight:700;
  color:#333333;
  margin:0 0 10px 0;
  padding-bottom:6px;
  border-bottom:1px solid #0B5699; /* Linha mais forte */
  text-transform:uppercase;       /* Caixa alta opcional */
  letter-spacing:0.5px;           /* Dá mais impacto visual */
}


/* Ajustes mobile */
@media (max-width: 575.98px){
  .cat-item{ font-size:0.88rem; padding:8px 10px; }
}

/* ===== Footer responsivo ===== */
.site-footer .footer-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
}

.site-footer .footer-right{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;              /* espaço entre os links */
}

.site-footer .footer-right a{
  margin:0;                  /* remove os ms-3 do HTML */
  font-weight:600;           /* mantém coerente com seu estilo */
  font-size:0.85rem;
  line-height:1.3;
  white-space:nowrap;        /* evita quebra feia em nomes curtos */
}

/* Mobile: empilha logo + links e centraliza tudo */
@media (max-width: 575.98px){
  .site-footer .footer-wrap{
    flex-direction:column;
    text-align:center;
    gap:10px;
    padding:14px 0;
  }
  .site-footer .footer-left img{
    height:36px;             /* ligeiramente menor no mobile */
  }
  .site-footer .footer-right{
    justify-content:center;  /* centraliza os links */
    gap:6px 12px;            /* um pouco menos de espaço */
  }
  .site-footer .footer-right a{
    font-size:0.8rem;        /* reduz a fonte para caber melhor */
    padding:4px 0;
  }
}

/* Tablets: ainda compacto, mas em linha quando couber */
@media (min-width: 576px) and (max-width: 991.98px){
  .site-footer .footer-right{
    justify-content:flex-end;
    gap:8px 14px;
  }
}



