/* Abrigo com Deus — Núcleo v0.10.21
 * Homologação em aparelho real (A30s) + refinamento específico de tablet.
 */

/* =========================================================
   TELEFONE — cabeçalho, alternância de tema e modal litúrgico
   ========================================================= */
@media (max-width:700px){
  /* Libera mais largura para a marca sem retirar funções do topo. */
  body.acd-core-responsive-v01021 .acd-header-inner{
    grid-template-columns:40px minmax(0,1fr) auto!important;
    gap:3px!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }
  body.acd-core-responsive-v01021 .acd-brand,
  body.acd-core-responsive-v01021 .acd-brand-lockup{
    max-width:146px!important;
    min-width:0!important;
  }
  body.acd-core-responsive-v01021 .acd-brand-symbol{
    width:34px!important;height:34px!important;flex:0 0 34px!important;
  }
  body.acd-core-responsive-v01021 .acd-brand-name{
    font-size:clamp(13px,3.72vw,15px)!important;
    letter-spacing:-.035em!important;
    gap:2px!important;
  }
  body.acd-core-responsive-v01021 .acd-header-actions{gap:3px!important}
  body.acd-core-responsive-v01021 .acd-header-circle-button{
    width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;
    border-radius:12px!important;
  }
  body.acd-core-responsive-v01021 .acd-header-circle-button svg{width:19px!important;height:19px!important}
  body.acd-core-responsive-v01021 .acd-theme-toggle{
    width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;
    padding:3px!important;border-radius:12px!important;
    display:grid!important;grid-template-columns:1fr!important;place-items:center!important;
  }
  body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-icon{
    width:30px!important;height:30px!important;
  }
  body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-icon svg{width:18px!important;height:18px!important}
  body.acd-core-responsive-v01021 .acd-pray-button{
    width:auto!important;min-width:72px!important;height:40px!important;min-height:40px!important;
    padding:0 6px!important;gap:4px!important;border-radius:12px!important;
    font-size:11px!important;line-height:1.02!important;
  }
  body.acd-core-responsive-v01021 .acd-pray-button span{
    display:inline-block!important;max-width:37px!important;white-space:normal!important;
  }
  body.acd-core-responsive-v01021 .acd-pray-button svg{width:16px!important;height:16px!important;flex:0 0 16px!important}

  /* O ícone mostra a AÇÃO disponível, não o estado atual:
     claro -> lua (ir para escuro); dark -> sol (ir para claro). */
  html:not([data-theme="dark"]) body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-sun{display:none!important}
  html:not([data-theme="dark"]) body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-moon{
    display:grid!important;background:#e3bb3d!important;color:#17283a!important;
  }
  html[data-theme="dark"] body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-moon{display:none!important}
  html[data-theme="dark"] body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-sun{
    display:grid!important;background:#e3bb3d!important;color:#352811!important;
  }

  /* O Hero continua rolando verticalmente, mas aceita gesto horizontal. */
  body.acd-core-responsive-v01021.acd-site .acd-hero-carousel{touch-action:pan-y pinch-zoom!important}

  /* Janela da cor litúrgica: card informativo compacto, não “segunda página”. */
  body.acd-core-responsive-v01021 .acd-core-liturgical-modal{
    padding:14px!important;
    align-items:center!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-dialog{
    width:min(430px,calc(100vw - 28px))!important;
    height:auto!important;
    max-height:82dvh!important;
    padding:10px!important;
    border-radius:22px!important;
    overflow:auto!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-layout{
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    gap:4px!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-visual{
    height:205px!important;min-height:205px!important;
    padding:2px 36px 0!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-vestment{
    width:100%!important;height:200px!important;min-height:0!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-vestment-img{
    width:100%!important;height:100%!important;max-height:200px!important;object-fit:contain!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-content{
    height:auto!important;min-height:0!important;
    padding:9px 14px 13px!important;
    justify-content:start!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-kicker{font-size:10px!important;margin-bottom:3px!important}
  body.acd-core-responsive-v01021 .acd-core-liturgical-dialog h2{
    font-size:38px!important;line-height:.98!important;margin:0 0 9px!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-today{
    padding:10px 12px!important;margin:0 0 9px!important;font-size:15px!important;line-height:1.25!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-rule{margin:4px 0 8px!important}
  body.acd-core-responsive-v01021 .acd-core-liturgical-explanation{
    margin:0 0 11px!important;font-size:14.5px!important;line-height:1.43!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-more{
    min-height:42px!important;width:auto!important;align-self:flex-start!important;
    padding:0 15px!important;border-radius:13px!important;font-size:13px!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-close{
    top:13px!important;right:13px!important;width:38px!important;height:38px!important;
  }
  body.acd-core-responsive-v01021 .acd-core-liturgical-close svg{width:18px!important;height:18px!important}
}

@media (max-width:370px){
  body.acd-core-responsive-v01021 .acd-brand,
  body.acd-core-responsive-v01021 .acd-brand-lockup{max-width:133px!important}
  body.acd-core-responsive-v01021 .acd-brand-name{font-size:12.6px!important}
  body.acd-core-responsive-v01021 .acd-pray-button{min-width:68px!important;padding:0 5px!important;font-size:10.5px!important}
}

/* =========================================================
   TABLET — 701–1180px. Mais próximo do desktop, sem controles pesados.
   ========================================================= */
@media (min-width:701px) and (max-width:1180px){
  /* CTA do cabeçalho volta a ter texto no tablet. */
  body.acd-core-responsive-v01021 .acd-pray-button{
    display:inline-flex!important;width:auto!important;min-width:112px!important;
    height:46px!important;min-height:46px!important;padding:0 12px!important;
    gap:7px!important;border-radius:14px!important;font-size:13px!important;
  }
  body.acd-core-responsive-v01021 .acd-pray-button span{display:inline-block!important;white-space:nowrap!important}

  /* Tema: também mostra a ação futura, não o estado atual. */
  html:not([data-theme="dark"]) body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-sun{display:none!important}
  html:not([data-theme="dark"]) body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-moon{
    display:grid!important;background:#e3bb3d!important;color:#17283a!important;
  }
  html[data-theme="dark"] body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-moon{display:none!important}
  html[data-theme="dark"] body.acd-core-responsive-v01021 .acd-theme-toggle .acd-theme-sun{
    display:grid!important;background:#e3bb3d!important;color:#352811!important;
  }

  /* Hero de tablet: apenas CTA editorial em texto + dots. */
  body.acd-core-responsive-v01021.acd-site .acd-hero-arrow,
  body.acd-core-responsive-v01021.acd-site .acd-hero-pause{display:none!important}
  body.acd-core-responsive-v01021.acd-site .acd-hero-carousel-controls{
    left:50%!important;right:auto!important;bottom:17px!important;
    transform:translateX(-50%)!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:auto!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-dots{
    display:flex!important;gap:7px!important;align-items:center!important;justify-content:center!important;
    width:auto!important;height:auto!important;min-width:0!important;padding:0!important;background:transparent!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-dots button{
    width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-dots button::before{
    content:""!important;display:block!important;width:8px!important;height:8px!important;border-radius:50%!important;
    background:rgba(255,255,255,.88)!important;border:1px solid rgba(13,28,39,.15)!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-dots button.is-active::before{
    width:9px!important;height:9px!important;background:#e5b83c!important;border-color:#ffe18a!important;
  }

  body.acd-core-responsive-v01021.acd-site .acd-hero-actions{
    display:flex!important;align-items:center!important;gap:0!important;
    margin-top:14px!important;padding:0!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-slide-institutional .acd-hero-actions .acd-button-primary{display:none!important}
  body.acd-core-responsive-v01021.acd-site .acd-hero-actions .acd-button{
    display:inline-flex!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
    color:#edc54d!important;font-family:var(--acd-font-serif,"Cormorant Garamond",Georgia,serif)!important;
    font-size:21px!important;line-height:1.15!important;font-weight:700!important;text-decoration:none!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-actions .acd-button span,
  body.acd-core-responsive-v01021.acd-site .acd-hero-actions .acd-button svg{
    color:#edc54d!important;stroke:#edc54d!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-hero-actions .acd-button svg{width:19px!important;height:19px!important;margin-left:8px!important}

  /* Destaque principal volta a respirar no tablet. */
  body.acd-core-responsive-v01021.acd-site .acd-weekly-card{grid-template-rows:auto auto!important}
  body.acd-core-responsive-v01021.acd-site .acd-weekly-image{
    height:clamp(290px,38vw,360px)!important;min-height:290px!important;
  }
  body.acd-core-responsive-v01021.acd-site .acd-weekly-image img{
    width:100%!important;height:100%!important;object-fit:cover!important;object-position:center 38%!important;
  }

  /* Santo do Dia: não fica comprimido quando há matéria própria. */
  body.acd-core-responsive-v01021.acd-site:not(.acd-core-saint-fallback):not(.acd-core-celebration-fallback) .acd-saint-feature{
    min-height:430px!important;
  }
  body.acd-core-responsive-v01021.acd-site:not(.acd-core-saint-fallback):not(.acd-core-celebration-fallback) #acd-saint-feature .acd-liturgical-stage{
    min-height:410px!important;
  }

  /* 8º atalho fecha a grade de tablet sem buraco. */
  body.acd-core-responsive-v01021.acd-site .acd-mobile-only-shortcut{display:flex!important}
  body.acd-core-responsive-v01021.acd-site .acd-mobile-only-shortcut svg{color:#8f6d2d!important}

  /* Rodapé de tablet: marca central e três colunas equilibradas. */
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-grid{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:30px 24px!important;text-align:center!important;align-items:start!important;
  }
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-brand{
    grid-column:1/-1!important;display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;
  }
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-brand p{max-width:48ch!important;margin-left:auto!important;margin-right:auto!important;text-align:center!important}
  body.acd-core-responsive-v01021 .acd-footer .acd-social-dots{justify-content:center!important}
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-grid>div:nth-child(2),
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-grid>div:nth-child(3),
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-grid>div:nth-child(4){grid-column:auto!important;text-align:center!important}
  body.acd-core-responsive-v01021 .acd-footer .acd-footer-grid>div:nth-child(5){grid-column:1/-1!important;text-align:center!important}
  body.acd-core-responsive-v01021 .acd-footer h3,
  body.acd-core-responsive-v01021 .acd-footer a{text-align:center!important}
  body.acd-core-responsive-v01021 .acd-footer .acd-newsletter{max-width:520px!important;margin:0 auto!important}
  body.acd-core-responsive-v01021 .acd-footer-bottom{text-align:center!important}
}
