/* ==========================================================
   ALINHAMENTO GLOBAL DO SITE
   Mantém todas as páginas e blocos no mesmo eixo central.
   ========================================================== */

:root{
  --scj-layout-max:1100px;
  --scj-layout-gutter:16px;
}

body.scj-imported-page{
  overflow-x:hidden;
}

/* Containers padrão das páginas institucionais */
body.scj-imported-page .container{
  width:min(var(--scj-layout-max), calc(100% - 32px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Páginas das capelas usam .wrap em vez de .container */
body.scj-imported-page .wrap{
  width:min(var(--scj-layout-max), calc(100% - 32px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Evita que conteúdo interno ultrapasse o eixo principal */
body.scj-imported-page main,
body.scj-imported-page section,
body.scj-imported-page article,
body.scj-imported-page .block-card{
  min-width:0;
}

/* Página inicial: títulos principais sempre no mesmo eixo */
body.scj-imported-page.home .section > .container > h2,
body.scj-imported-page.home #clero h2,
body.scj-imported-page.home .scj-news-heading,
body.scj-imported-page.home .scj-banner-section-title,
body.scj-imported-page.home .scj-youtube-live-section h2,
body.scj-imported-page.home .scj-daily-liturgy-section h2{
  text-align:center;
}

/* ==========================================================
   CLERO
   ========================================================== */
body.scj-imported-page #clero .container{
  display:block;
}

body.scj-imported-page #clero .clero-grid{
  width:100%;
  max-width:1040px;
  margin-left:auto;
  margin-right:auto;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  justify-content:center;
  justify-items:stretch;
}

body.scj-imported-page #clero .clero-card{
  width:100%;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}

/* ==========================================================
   BLOCOS PRINCIPAIS DA HOME
   Mantém todos com o mesmo centro visual.
   ========================================================== */
body.scj-imported-page .special-images,
body.scj-imported-page .scj-banner-toolbar,
body.scj-imported-page .scj-banner-carousel,
body.scj-imported-page .scj-banner-empty{
  margin-left:auto !important;
  margin-right:auto !important;
}

body.scj-imported-page .scj-news-grid{
  width:100%;
  margin-left:auto;
  margin-right:auto;
}

body.scj-imported-page .video-shell,
body.scj-imported-page .calendar,
body.scj-imported-page .banner-card,
body.scj-imported-page .missa-card,
body.scj-imported-page .scj-youtube-live-card,
body.scj-imported-page .scj-daily-liturgy-card{
  margin-left:auto;
  margin-right:auto;
}

/* Imagens e embeds nunca podem escapar da largura disponível */
body.scj-imported-page img,
body.scj-imported-page iframe,
body.scj-imported-page video{
  max-width:100%;
}

/* Páginas de biografia, história e pastorais */
body.scj-imported-page .profile-shell,
body.scj-imported-page .history-grid,
body.scj-imported-page .pastorais-grid,
body.scj-imported-page .scj-pastorais-manager{
  margin-left:auto;
  margin-right:auto;
}

/* Responsividade */
@media (max-width:980px){
  body.scj-imported-page #clero .clero-grid{
    grid-template-columns:1fr;
    max-width:500px;
  }

  body.scj-imported-page #clero .clero-card{
    max-width:500px;
  }
}

@media (max-width:620px){
  :root{
    --scj-layout-gutter:12px;
  }

  body.scj-imported-page .container,
  body.scj-imported-page .wrap{
    width:calc(100% - 24px) !important;
  }

  body.scj-imported-page #clero .clero-grid,
  body.scj-imported-page #clero .clero-card{
    max-width:100%;
  }
}
