/* Sistema 123 - cabeçalho e rodapé padrão (desktop e celular). Carregar DEPOIS de style1.css/responsive1.css. */
:root { --sn-azul:#0b5cd5; --sn-azul-esc:#0a3f94; --sn-tinta:#0f172a; --sn-cinza:#64748b; --sn-borda:#e2e8f0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

.header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.97); padding: .7rem 0; box-shadow: 0 2px 12px rgba(15,23,42,.08); }
.header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 1rem; position: relative; }
.header .logo { flex: 0 0 auto; }
.header .logo a { display: flex; align-items: center; }
.header .logo-img { height: 42px; width: auto; max-height: 42px; display: block; }
.header .nav { display: flex; align-items: center; margin-left: auto; }
.header .nav-menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.header .nav-menu > li { position: relative; list-style: none; }
.header .nav-menu > li > a { display: inline-flex; align-items: center; gap: 6px; padding: .5rem .7rem; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--sn-tinta); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.header .nav-menu > li > a:hover { background: #eef4ff; color: var(--sn-azul); }
.header .nav-menu > li > a.active, .header .nav-menu > li.active > a { color: var(--sn-azul); background: #eef4ff; }
.header .nav-menu a.btn-outline { border: 2px solid var(--sn-azul); color: var(--sn-azul); background: transparent; padding: .42rem .95rem; }
.header .nav-menu a.btn-outline:hover { background: var(--sn-azul); color: #fff; }
.header .nav-menu a.btn-primary { background: linear-gradient(135deg,#0b5cd5,#2f7bf0); color: #fff; padding: .45rem 1rem; box-shadow: 0 6px 14px rgba(11,92,213,.25); }
.header .nav-menu a.btn-primary:hover { color: #fff; filter: brightness(1.06); }
.nav-selo { background: #ff7b00; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .64rem; font-weight: 800; }

.submenu-toggle { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0 0 0 2px; color: inherit; cursor: pointer; font-size: .7rem; line-height: 1; }
.submenu-toggle .caret { transition: transform .2s ease; }
.nav-menu > li.has-sub.open .submenu-toggle .caret, .nav-menu > li.has-sub:hover .submenu-toggle .caret { transform: rotate(180deg); }
.header .submenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; background: #fff; border: 1px solid var(--sn-borda); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,60,130,.16); padding: 8px; list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 1100; }
.nav-menu > li.has-sub:hover .submenu, .nav-menu > li.has-sub.open .submenu { opacity: 1; visibility: visible; transform: none; }
.header .submenu li { list-style: none; }
.header .submenu li a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--sn-tinta); font-weight: 600; font-size: .9rem; text-decoration: none; }
.header .submenu li a i { width: 20px; text-align: center; color: var(--sn-azul); }
.header .submenu li a:hover { background: #f0f5fe; color: var(--sn-azul-esc); }
.header .submenu .sub-desc { display: block; font-size: .74rem; color: var(--sn-cinza); font-weight: 500; margin-top: 2px; }

.hamburger { display: none; }

/* ---- celular / tablet: menu vira gaveta ---- */
@media (max-width: 1060px) {
    .header .nav { margin-left: auto; }
    .hamburger { display: flex !important; flex-direction: column; justify-content: center; cursor: pointer; padding: 10px; border-radius: 10px; min-width: 44px; min-height: 44px; align-items: center; }
    .hamburger span { width: 24px; height: 3px; background: var(--sn-tinta); margin: 3px 0; border-radius: 2px; transition: .25s; }
    .header .nav-menu { display: none; position: absolute; top: calc(100% + .7rem); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; background: #fff; padding: .75rem 1rem 1rem; box-shadow: 0 14px 24px rgba(15,23,42,.14); max-height: calc(100vh - 80px); overflow-y: auto; border-top: 1px solid var(--sn-borda); }
    .header .nav-menu.active { display: flex; }
    .header .nav-menu > li > a { padding: .85rem .9rem; font-size: 1rem; justify-content: space-between; }
    .header .nav-menu > li > a { display: flex; }
    .header .nav-menu a.btn-outline, .header .nav-menu a.btn-primary { justify-content: center; margin-top: 6px; }
    .header .submenu { position: static; min-width: 0; width: 100%; background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; opacity: 1; visibility: visible; transform: none; max-height: 0; overflow: hidden; transition: max-height .28s ease, margin .28s ease; }
    .nav-menu > li.has-sub.open .submenu { max-height: 520px; margin: 4px 0 8px; }
    .nav-menu > li.has-sub:hover .submenu { max-height: 0; margin: 0; }
    .nav-menu > li.has-sub.open:hover .submenu { max-height: 520px; margin: 4px 0 8px; }
    .header .submenu li a { padding: 11px 14px 11px 22px; background: #f8fafd; margin-bottom: 4px; }
}
@media (max-width: 480px) { .header .logo-img { height: 36px; max-height: 36px; } .container { padding-left: 1rem; padding-right: 1rem; } }

/* ---- rodapé ---- */
.footer { background: #0f172a; color: #cbd5e1; padding: 3rem 0 1.2rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.footer .logo-img { height: 42px; width: auto; max-height: 42px; background: #fff; border-radius: 10px; padding: 4px 8px; }
.footer-about p { color: #94a3b8; font-size: .9rem; line-height: 1.6; margin: 12px 0; max-width: 360px; }
.footer h4 { color: #fff; font-size: .95rem; margin: 0 0 .9rem; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer a { color: #cbd5e1; text-decoration: none; font-size: .9rem; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-contact p { margin: 0 0 .55rem; }
.footer-contact i, .footer .social i { width: 18px; text-align: center; }
.footer .social { display: flex; gap: 10px; }
.footer .social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; }
.footer .social a:hover { background: var(--sn-azul); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; text-align: center; font-size: .82rem; color: #94a3b8; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } .footer { padding-top: 2rem; } }
