/* ============================================================
   CRC-HEADER — Menu moderno CRECI-MG (child theme)
   ------------------------------------------------------------
   Estiliza SOMENTE classes .crc-* geradas pelo header.php +
   Crc_Menu_Walker. Não depende de nada do tema pai e nada do
   tema pai interfere aqui (classes diferentes). Cores da marca:
   azul #00619c, laranja #f28b00.
   ============================================================ */

/* ---------- BARRA DO HEADER ---------- */
.crc-header{
  position:relative;
  z-index:100;
  background:#fff;
  box-shadow:0 1px 0 #e6ebf0;
}
.crc-bar{
  max-width:1180px;
  margin:0 auto;
  padding:0 24px;
  height:84px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.crc-logo{display:flex;align-items:center;flex:0 0 auto;text-decoration:none}
.crc-logo img{max-height:58px;width:auto;height:auto;display:block}
.crc-logo-txt{color:#00619c;font-weight:800;font-size:20px}

/* ---------- MENU (nível 1) ---------- */
.crc-nav{display:flex;align-items:center}
.crc-menu{display:flex;list-style:none;margin:0;padding:0;align-items:center}
.crc-item{position:relative;display:flex;align-items:center}
.crc-link{
  display:flex;align-items:center;gap:6px;
  height:84px;padding:0 16px;
  color:#1e2a33;text-decoration:none;
  font-weight:600;font-size:13.5px;text-transform:uppercase;letter-spacing:.5px;
  position:relative;transition:color .18s ease;
}
.crc-chev{width:9px;height:9px;fill:currentColor;opacity:.5;transition:transform .2s ease;flex:0 0 auto}
.crc-item:hover > .crc-link{color:#00619c}
.crc-item:hover > .crc-link .crc-chev{transform:rotate(180deg);opacity:.9}
/* indicador laranja (cresce no hover) */
.crc-link::after{
  content:"";position:absolute;left:16px;right:16px;bottom:22px;height:3px;
  background:#f28b00;border-radius:2px;
  transform:scaleX(0);transform-origin:center;transition:transform .22s ease;
}
.crc-item:hover > .crc-link::after{transform:scaleX(1)}

/* ---------- DROPDOWN comum (nível 1) ---------- */
.crc-sub{
  position:absolute;top:100%;left:0;
  min-width:260px;margin:0;padding:8px;list-style:none;
  background:#fff;border:1px solid #e6ebf0;border-top:3px solid #00619c;
  border-radius:0 0 10px 10px;box-shadow:0 14px 34px rgba(10,63,102,.14);
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
  z-index:100;
}
@media (min-width:992px){
  .crc-item:hover > .crc-sub,
  .crc-item:focus-within > .crc-sub{opacity:1;visibility:visible;transform:none}
}
/* ponte invisível para não fechar ao descer o mouse */
.crc-sub::before{content:"";position:absolute;top:-12px;left:0;right:0;height:12px;background:transparent}

.crc-subitem{list-style:none}
.crc-sublink{
  display:block;padding:10px 14px;border-radius:7px;position:relative;
  color:#1e2a33;text-decoration:none;font-size:14px;font-weight:500;line-height:1.35;
  transition:background .15s ease,color .15s ease,padding .15s ease;
}
.crc-sublink::before{
  content:"";position:absolute;left:6px;top:50%;transform:translateY(-50%);
  width:3px;height:0;background:#f28b00;border-radius:2px;transition:height .18s ease;
}
.crc-sublink:hover{background:#f4f7fa;color:#00619c;padding-left:20px}
.crc-sublink:hover::before{height:18px}

/* ---------- MEGA-MENU (Área do Corretor) ---------- */
.crc-mega > .crc-sub{ left:0; }
@media (min-width:992px){
  .crc-mega > .crc-sub{
    display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:2px 30px;
    min-width:720px;padding:26px 30px;
  }
}
/* cabeçalho de cada coluna (item de nível 1 da mega) */
.crc-mega > .crc-sub > .crc-subitem > .crc-sublink{
  padding:0 0 10px;margin-bottom:10px;border-bottom:2px solid #e6ebf0;border-radius:0;
  color:#00619c;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1px;
  cursor:default;
}
.crc-mega > .crc-sub > .crc-subitem > .crc-sublink::before{display:none}
.crc-mega > .crc-sub > .crc-subitem > .crc-sublink:hover{background:transparent;color:#00619c;padding-left:0}
/* lista de links da coluna (nível 2) */
.crc-sub3{list-style:none;margin:0;padding:0}
.crc-subitem3{list-style:none}
.crc-sublink3{
  display:block;padding:7px 8px;border-radius:6px;
  color:#1e2a33;text-decoration:none;font-size:13.5px;font-weight:500;line-height:1.35;
  transition:background .15s ease,color .15s ease;
}
.crc-sublink3:hover{background:#f4f7fa;color:#00619c}

/* ---------- HAMBÚRGUER (só mobile) ---------- */
.crc-burger{
  display:none;flex:0 0 auto;width:46px;height:46px;border:none;
  background:#f4f7fa;border-radius:10px;cursor:pointer;padding:0;position:relative;
}
.crc-burger span,.crc-burger span::before,.crc-burger span::after{
  position:absolute;left:50%;width:22px;height:2.5px;background:#00619c;border-radius:2px;
  transition:transform .25s ease,opacity .2s ease;
}
.crc-burger span{top:50%;transform:translate(-50%,-50%)}
.crc-burger span::before{content:"";transform:translateX(-50%) translateY(-7px)}
.crc-burger span::after{content:"";transform:translateX(-50%) translateY(7px)}
.crc-header.crc-open .crc-burger span{background:transparent}
.crc-header.crc-open .crc-burger span::before{transform:translateX(-50%) rotate(45deg)}
.crc-header.crc-open .crc-burger span::after{transform:translateX(-50%) rotate(-45deg)}

/* ============================================================
   RESPONSIVO — tablet + celular (<=991px): gaveta + acordeão
   ============================================================ */
@media (max-width:991px){
  .crc-bar{height:72px}
  .crc-burger{display:block}

  .crc-nav{
    position:absolute;top:100%;left:0;right:0;
    background:#fff;box-shadow:0 14px 34px rgba(10,63,102,.14);
    border-top:1px solid #e6ebf0;
    max-height:0;overflow:hidden;transition:max-height .32s ease;
  }
  .crc-header.crc-open .crc-nav{max-height:calc(100vh - 72px);overflow-y:auto}

  .crc-menu{flex-direction:column;align-items:stretch;width:100%}
  .crc-item{flex-direction:column;align-items:stretch}
  .crc-link{
    height:auto;padding:16px 22px;justify-content:space-between;
    border-bottom:1px solid #e6ebf0;font-size:14px;
  }
  .crc-link::after{display:none}
  .crc-chev{width:13px;height:13px;opacity:.6}
  .crc-item.open > .crc-link{color:#00619c;background:#f4f7fa}
  .crc-item.open > .crc-link .crc-chev{transform:rotate(180deg)}

  /* submenus viram acordeão empilhado */
  .crc-sub{
    position:static;opacity:1;visibility:visible;transform:none;
    box-shadow:none;border:none;border-radius:0;min-width:0;width:auto;
    display:none;padding:6px 0;background:#f4f7fa;
  }
  .crc-sub::before{display:none}
  .crc-item.open > .crc-sub{display:block}
  .crc-mega.open > .crc-sub{display:block}      /* mega empilha em 1 coluna */

  .crc-sublink{padding:12px 30px;border-radius:0}
  .crc-sublink:hover{padding-left:34px}

  /* mega no mobile: cabeçalho + lista empilhados */
  .crc-mega > .crc-sub > .crc-subitem > .crc-sublink{
    padding:14px 22px 8px;margin:0;border-bottom:none;
  }
  .crc-sublink3{padding:11px 34px;border-radius:0}
}

@media (prefers-reduced-motion:reduce){.crc-header *{transition:none !important}}