/*
Theme Name: HORIZON SGE Theme
Author: NexHub
Description: Tema complementar do sistema HORIZON SGE 30.9. Compatível com instalações multi-institucionais WordPress Multisite, mantendo o visual interno do HORIZON sob controle exclusivo do sistema.
Version: 30.9
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: horizon-sge-theme
*/

:root{
  --horizon-blue-1:#004A99;
  --horizon-blue-2:#1A75D3;
  --horizon-bg:#F3F6FA;
  --horizon-text:#172B46;
  --horizon-border:#DCE5EF;
  --horizon-font:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
/* Apenas páginas públicas do tema. O app é administrado pelo HORIZON SGE. */
body:not(.horizon-sge-shell){
  margin:0;min-height:100vh;background:var(--horizon-bg);
  color:var(--horizon-text);font-family:var(--horizon-font);
}
body:not(.horizon-sge-shell) *,body:not(.horizon-sge-shell) *::before,body:not(.horizon-sge-shell) *::after {box-sizing:border-box}
.horizon-theme-page{width:min(1180px,calc(100% - 32px));margin:32px auto}
.horizon-theme-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;flex-wrap:wrap}
.horizon-theme-brand{display:flex;align-items:center;gap:14px;color:var(--horizon-blue-1);font-size:1.15rem;font-weight:800;text-decoration:none;min-width:0}
.horizon-theme-brand img,.horizon-theme-brand .custom-logo{display:block;max-height:66px;max-width:min(260px,52vw);height:auto;width:auto;object-fit:contain}
.horizon-theme-brand .horizon-theme-site-name{overflow-wrap:anywhere}
.horizon-theme-header nav{margin-left:auto}
.horizon-theme-header nav ul{display:flex;gap:18px;flex-wrap:wrap;list-style:none;margin:0;padding:0}
.horizon-theme-header nav a{color:var(--horizon-text);text-decoration:none;font-weight:600}
.horizon-theme-header nav a:hover,.horizon-theme-header nav a:focus-visible{color:var(--horizon-blue-1);text-decoration:underline}
.horizon-theme-content{background:#fff;border:1px solid var(--horizon-border);border-radius:18px;padding:30px;box-shadow:0 10px 28px rgba(23,43,70,.06)}
.horizon-theme-content h1,.horizon-theme-content h2{color:#123D6B}
.horizon-theme-content a{color:var(--horizon-blue-1)}
.horizon-theme-content a:hover{color:var(--horizon-blue-2)}
.horizon-theme-content img{max-width:100%;height:auto}
.horizon-theme-footer{padding:8px 0 28px;color:#64748B}
.horizon-theme-footer small{font-size:.82rem;line-height:1.6}
/* Área do sistema: sem cores, tipografia, links, tamanhos ou overflow forçados. */
html:has(body.horizon-sge-shell),body.horizon-sge-shell{margin:0;min-height:100%;padding:0}
body.horizon-sge-shell .horizon-theme-app{margin:0;padding:0;width:100%;min-height:100vh}
body.horizon-sge-shell .horizon-theme-app>:first-child{margin-top:0}
body.horizon-sge-shell .horizon-theme-app>:last-child{margin-bottom:0}
body.horizon-sge-shell.admin-bar .horizon-theme-app{min-height:calc(100vh - 32px)}
@media(max-width:782px){body.horizon-sge-shell.admin-bar .horizon-theme-app{min-height:calc(100vh - 46px)}}
@media(max-width:720px){
  .horizon-theme-page{width:min(100% - 20px,1180px);margin:20px auto}
  .horizon-theme-content{padding:20px}
  .horizon-theme-header{align-items:flex-start}
  .horizon-theme-header nav{margin:0;width:100%}
  .horizon-theme-brand img{max-height:55px}
}
@media print{
  .horizon-theme-header nav,.horizon-theme-footer{display:none!important}
  body:not(.horizon-sge-shell){background:#fff}
  body:not(.horizon-sge-shell) .horizon-theme-content{border:0;box-shadow:none;padding:0}
}
