/* ID Federal Halloween v3.8.8
 * Reducao de 25% do bloco inteiro da Central em desktop/notebook.
 * Sem zoom, sem transform:scale e sem deformacao de texto/imagens.
 */

:root{
  /* 1120px da v3.8.7 x 0,75 = 840px */
  --idf-v388-shell-max:840px;
  --idf-v388-sidebar:170px;
  --idf-v388-gap:12px;
  --idf-v388-pad-x:12px;
  --idf-v388-pad-y:10px;
  --idf-v388-card-gap:10px;
}

body.idf-halloween-active.idf-hw-central-v33 :is(
  .idf-v385-shell,
  .central-wrap,
  .central-wrapper,
  .marketing-dashboard,
  .marketing-wrapper,
  .portal-container,
  .portal-main,
  .marketing-main
){
  width:min(var(--idf-v388-shell-max),calc(100vw - 32px)) !important;
  max-width:min(var(--idf-v388-shell-max),calc(100vw - 32px)) !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}

body.idf-halloween-active.idf-hw-central-v33 .idf-v385-shell{
  padding:var(--idf-v388-pad-y) var(--idf-v388-pad-x) !important;
}

body.idf-halloween-active.idf-hw-central-v33 .idf-v385-layout{
  display:grid !important;
  grid-template-columns:minmax(160px,var(--idf-v388-sidebar)) minmax(0,1fr) !important;
  gap:var(--idf-v388-gap) !important;
  align-items:start !important;
  width:100% !important;
  min-width:0 !important;
}

body.idf-halloween-active.idf-hw-central-v33 .idf-v385-sidebar{
  width:100% !important;
  min-width:160px !important;
  max-width:var(--idf-v388-sidebar) !important;
  padding:9px !important;
  box-sizing:border-box !important;
}

/* Preserva fonte; reduz somente espacamentos e altura dos controles. */
body.idf-halloween-active.idf-hw-central-v33 .idf-v385-sidebar :is(p,label){
  margin-top:4px !important;
  margin-bottom:3px !important;
}
body.idf-halloween-active.idf-hw-central-v33 .idf-v385-sidebar :is(input,select,textarea){
  min-height:30px !important;
  padding:5px 7px !important;
}
body.idf-halloween-active.idf-hw-central-v33 .idf-v385-sidebar button{
  min-height:30px !important;
  padding-top:5px !important;
  padding-bottom:5px !important;
}

body.idf-halloween-active.idf-hw-central-v33 .idf-v385-main{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}

/* Mantem duas artes lado a lado e reduz proporcionalmente o conjunto. */
body.idf-halloween-active.idf-hw-central-v33 .idf-v385-gallery{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:var(--idf-v388-card-gap) !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  align-items:start !important;
}

body.idf-halloween-active.idf-hw-central-v33 .idf-v385-art-card{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  padding:7px !important;
  box-sizing:border-box !important;
}

body.idf-halloween-active.idf-hw-central-v33 :is(
  .idf-v385-art-image,
  .idf-v385-art-card > img,
  .idf-v385-art-card picture > img
){
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-width:100% !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  object-fit:contain !important;
  object-position:center top !important;
}

/* Notebook menor: usa o espaco disponivel sem ultrapassar a tela. */
@media (max-width:900px){
  body.idf-halloween-active.idf-hw-central-v33 :is(
    .idf-v385-shell,
    .central-wrap,
    .central-wrapper,
    .marketing-dashboard,
    .marketing-wrapper,
    .portal-container,
    .portal-main,
    .marketing-main
  ){
    width:calc(100vw - 24px) !important;
    max-width:calc(100vw - 24px) !important;
  }
}

/* Tablet/mobile: nao aplicar a reducao de 25% para nao apertar o conteudo. */
@media (max-width:700px){
  body.idf-halloween-active.idf-hw-central-v33 :is(
    .idf-v385-shell,
    .central-wrap,
    .central-wrapper,
    .marketing-dashboard,
    .marketing-wrapper,
    .portal-container,
    .portal-main,
    .marketing-main
  ){
    width:calc(100vw - 16px) !important;
    max-width:calc(100vw - 16px) !important;
  }

  body.idf-halloween-active.idf-hw-central-v33 .idf-v385-layout{
    grid-template-columns:1fr !important;
  }
  body.idf-halloween-active.idf-hw-central-v33 .idf-v385-sidebar{
    min-width:0 !important;
    max-width:none !important;
  }
  body.idf-halloween-active.idf-hw-central-v33 .idf-v385-gallery{
    grid-template-columns:1fr !important;
  }
}
