/* Corrections from supplied visual references, vol. 1.3, 2026-10-12. */
[hidden] { display: none !important; }
.site-header, .site-header.is-scrolled { background: #fff; backdrop-filter: none; }
.site-header .site-brand img { width: 18rem; max-height: 5rem; }
.home-page .site-header__inner--home { grid-template-columns: 1fr; gap: .4rem; padding: 1rem 0 .55rem; width: min(calc(100% - 2rem), 90rem); }
.home-page .site-header__inner--home .site-brand img { width: 18rem; }
.home-page .primary-nav { justify-self: stretch; }
.home-page .primary-nav__list { justify-content: space-between; }
.home-page .nav-link, .home-page .submenu-toggle { font-size: .75rem; padding: .6rem .42rem; }
.home-page .submenu .nav-link, .home-page .submenu .submenu-toggle { font-size: .84rem; }
/* The painting and the footer must never be cropped. */
.home-hero { position: relative; overflow: hidden; aspect-ratio: 2048 / 585; background: #342715; }
.home-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; opacity: 0; transition: opacity 600ms ease; }
.home-hero > img:first-child, .home-hero > img.is-active { opacity: 1; }
.home-hero.is-initialized > img:not(.is-active) { opacity: 0; }
.hero-controls { position: absolute; right: .8rem; bottom: .65rem; z-index: 2; display: flex; align-items: center; gap: .15rem; padding: .12rem .35rem; border-radius: 999px; background: rgba(13,24,43,.66); color: white; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.hero-controls button { min-width: 44px; min-height: 44px; padding: .35rem; border: 0; border-radius: 999px; background: transparent; color: white; cursor: pointer; font-size: 1.05rem; line-height: 1; }
.hero-controls button:hover { background: rgba(255,255,255,.2); }
.hero-controls button:focus-visible { outline: 2px solid white; outline-offset: -3px; }
.hero-counter { font-size: .72rem; min-width: 2.55rem; text-align: center; font-variant-numeric: tabular-nums; }
.home-statue:first-of-type .home-statue__image img { height: 15rem; }
.home-content-columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(16rem,19rem); gap: 2rem; align-items: start; padding-block: 3.5rem; }
.home-content-columns .news-section-home { padding: 0; background: transparent; min-width: 0; }
.home-content-columns .section-head { flex-wrap: wrap; gap: 1rem; }
.home-content-columns .section-heading { font-size: clamp(1.8rem,3.3vw,3rem); }
.church-video-sidebar { padding: 0; min-width: 0; }
.church-video-sidebar .section-heading { font-size: 1.9rem; line-height: 1.15; }
.church-video-sidebar .church-video-grid { grid-template-columns: 1fr; gap: 1.2rem; }
.church-video-sidebar .church-video-card__label { font-size: .96rem; padding: .85rem; gap: .5rem; }
.church-video-sidebar .church-video-card__label small { flex-shrink: 0; }
.home-content-columns .cards-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.home-content-columns .news-card h3 { font-size: 1.25rem; }
.home-content-columns .news-card__body { padding: 1rem; }
.parish-posters__grid { display: block; max-width: 46rem; }
.poster-card--family { display: grid; grid-template-columns: minmax(0,15rem) minmax(0,1fr); align-items: center; gap: 2rem; padding: 1.25rem; }
.poster-card--family img { width: 100%; max-width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: .4rem; }
.poster-card--family strong { font-size: 1.55rem; }
.poster-card--family small { font-size: .95rem; }
/* Four visually equal card frames; original artwork (including all captions) stays uncropped. */
.legacy-resources__grid { align-items: stretch; gap: clamp(.75rem, 1.6vw, 1.4rem); }
.legacy-resource-card { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; aspect-ratio: 1.06; padding: clamp(.4rem, .9vw, .75rem); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; border: 1px solid #e5dfd5; border-radius: .6rem; background: #fffdf8; box-shadow: 0 3px 10px rgba(18,35,63,.04); }
.legacy-resource-card img { display: block; width: 100%; height: 100%; max-height: none; min-width: 0; object-fit: contain; object-position: center; filter: none; }
.legacy-resource-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(18,35,63,.10); }
.legacy-resource-card:focus-visible { outline: 3px solid #9b7740; outline-offset: 3px; }
.legacy-footer__banner { width: 100%; min-height: 0; height: auto; object-fit: contain; }
.legacy-footer__bottom { overflow-wrap: anywhere; }
.vatican-widget-fallback { display: block; padding: .8rem; text-align: center; }
.vatican-widget-frame { min-height: 5rem; }
.reveal { opacity: 1; transform: none; }
.content-error, .content-empty { padding: 1rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--ink); background: var(--ivory-50); }
.home-page .content-status.is-error { position: static; width: auto; height: auto; margin: .5rem 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1380px) and (min-width: 1181px) {
  .home-page .site-header__inner--home { grid-template-columns: 1fr; }
  .home-page .site-header__inner--home .site-brand img { width: 18rem; }
  .home-page .nav-link, .home-page .submenu-toggle { font-size: .69rem; padding-inline: .25rem; }
}
@media (max-width: 1180px) {
  .home-page .site-header__inner--home { grid-template-columns: minmax(0,1fr) auto; padding: .75rem 0; min-height: 5rem; }
  .home-page .site-header__inner--home .site-brand img { width: min(17rem,100%); }
  .home-page .nav-link, .home-page .submenu-toggle { padding: .75rem .85rem; font-size: .95rem; }
  .home-content-columns { grid-template-columns: minmax(0,1fr) 16rem; gap: 1.4rem; }
  .home-content-columns .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 940px) {
  .home-content-columns { grid-template-columns: 1fr; }
  .church-video-sidebar { padding-top: 1.5rem; border-top: 1px solid var(--border); }
  .church-video-sidebar .church-video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .legacy-footer__banner { min-height: 0; height: auto; }
  /* Dyskretny, półprzezroczysty panel: nie zajmuje już całej szerokości telefonu. */
  .hero-controls { position: absolute; top: calc(100% + .35rem); right: auto; bottom: auto; left: 50%; width: max-content; max-width: calc(100vw - 2rem); justify-content: center; border-radius: 999px; transform: translateX(-50%); box-shadow: 0 2px 9px rgba(13,24,43,.12); }
  .hero-controls button { min-width: 44px; min-height: 44px; }
  .home-hero.has-slider-controls { overflow: visible; margin-bottom: 3.6rem; }

}
@media (max-width: 640px) {
  .home-content-columns .cards-grid { grid-template-columns: 1fr; }
  .church-video-sidebar .church-video-grid { grid-template-columns: 1fr; }
  .home-overview__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-mass, .home-announcements { grid-column: 1 / -1; }
  .home-statue { grid-column: auto; }
  .home-statue__image img { height: 12rem; }
  .home-statue:first-of-type .home-statue__image img { height: 13rem; }
  .home-statue figcaption { font-size: .9rem; }
  .home-content-columns { padding-block: 2.5rem; }
  .poster-card--family { grid-template-columns: minmax(0,1fr); max-width: 22rem; gap: 1rem; }
  .poster-card--family img { height: auto; max-height: none; width: 100%; }
  .legacy-resources__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .legacy-resource-card { padding: .25rem; min-height: 0; aspect-ratio: 1.06; }
  .legacy-resource-card img { height: 100%; }
  .site-header .site-brand img { width: min(14rem,100%); }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero > img, .legacy-resource-card { transition: none; }
}

@media (max-width: 1180px) {
  .primary-nav { top: var(--header-bottom,5rem); }
  .no-js .primary-nav { position: static; width: 100%; grid-column: 1 / -1; opacity: 1; visibility: visible; pointer-events: auto; }
  .no-js .submenu, .no-js .submenu .submenu { display: block; }
  .no-js .menu-toggle { display: none; }
  .no-js .site-header { position: static; }
}
/* A blocked third-party widget must not leave a large empty panel. */
vaticannews-widget:empty { min-height: 0; }
