:root {
  --vinho: #842f35;
  --azul: #23364d;
  --dourado: #b59658;
  --marfim: #f1e5cb;
  --bege: #d8c29b;
  --texto: #2c2530;
  --sombra: 0 8px 24px rgba(35, 54, 77, 0.12);
  --title-font: "Thecastel", Georgia, serif;
  --body-font: "Popping", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--marfim); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--texto);
  background:
    linear-gradient(rgba(241, 229, 203, 0.94), rgba(241, 229, 203, 0.98)),
    radial-gradient(circle at top right, rgba(181, 150, 88, 0.24), transparent 35%);
  font: 16px/1.55 var(--body-font);
}

a { color: inherit; }

.page-shell,
.home-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 118px;
}

.home-page {
  background:
    linear-gradient(rgba(241, 229, 203, 0.93), rgba(241, 229, 203, 0.97)),
    radial-gradient(circle at 20% 0%, rgba(181, 150, 88, 0.25), transparent 36%);
}

.home-page--approved {
  background: var(--marfim);
}

.approved-home-screen {
  width: min(100%, 640px);
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  position: relative;
  background: var(--marfim);
}

.approved-home-screen > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.approved-home-links {
  position: absolute;
  inset: 0;
}

.approved-home-link {
  display: block;
  position: absolute;
  border-radius: 12%;
  outline: 0 solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.approved-home-link:focus-visible {
  outline: 3px solid var(--dourado);
  outline-offset: -5px;
}

.approved-home-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.approved-home-link--history {
  top: 59.4%;
  left: 3.8%;
  width: 45%;
  height: 14.6%;
}

.approved-home-link--programming {
  top: 59.4%;
  left: 51.2%;
  width: 45%;
  height: 14.6%;
}

.approved-home-link--community {
  top: 75.7%;
  left: 3.8%;
  width: 45%;
  height: 14.6%;
}

.approved-home-link--festa {
  top: 75.7%;
  left: 51.2%;
  width: 45%;
  height: 14.6%;
}

@media (min-width: 641px) {
  .home-page--approved {
    padding: 24px;
  }

  .approved-home-screen {
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(35, 54, 77, 0.16);
  }
}

.home-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding-bottom: 42px;
}

.brand-art {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
}

.brand-art--home { max-width: 620px; }

.site-header {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.history-page {
  background:
    radial-gradient(circle at 10% 25%, rgba(181, 150, 88, 0.22), transparent 28%),
    var(--marfim);
}

.history-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 96px;
}

.history-masthead {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 22px 18px 15px;
  background:
    radial-gradient(circle at 10% 15%, rgba(181, 150, 88, 0.18), transparent 27%),
    radial-gradient(circle at 90% 18%, rgba(181, 150, 88, 0.18), transparent 27%),
    var(--vinho);
}

.history-brand-art {
  width: min(96%, 490px);
  height: auto;
  filter: brightness(0) invert(1);
}

.history-panel {
  min-height: calc(100vh - 132px);
  margin-top: -10px;
  padding: 26px 16px 28px;
  border-top: 3px solid var(--dourado);
  border-radius: 38px 38px 0 0;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.57), transparent 40%),
    var(--marfim);
}

.history-intro {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 0 auto 19px;
  color: var(--azul);
  text-align: center;
}

.history-cross { color: var(--dourado); font-size: 1.5rem; line-height: 1; }

.history-intro h1 {
  color: var(--vinho);
  font-size: clamp(2.45rem, 11vw, 4rem);
}

.history-intro p {
  max-width: 500px;
  margin: 0;
  color: var(--azul);
  font-family: var(--title-font);
  font-size: clamp(1.16rem, 4.8vw, 1.55rem);
  font-style: italic;
  line-height: 1.22;
}

.history-ornament {
  margin-top: 8px;
  color: var(--dourado);
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 0.7;
}

.history-accordions { gap: 10px; }

.history-accordions .accordion {
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
}

.history-accordions .accordion > summary {
  min-height: 62px;
  padding: 12px 20px;
  border: 1px solid rgba(181, 150, 88, 0.75);
  border-radius: 20px;
  color: #fffaf0;
  background:
    linear-gradient(105deg, #8c0611 0%, #b30b1a 52%, #81000b 100%);
  box-shadow: 0 5px 12px rgba(132, 47, 53, 0.2);
  font-size: clamp(1.35rem, 6vw, 1.85rem);
}

.history-accordions .accordion > summary .accordion-title {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--title-font);
}

.history-accordions .accordion > summary b {
  color: var(--marfim);
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.history-accordions .accordion > summary i {
  color: var(--marfim);
  font-family: Arial, sans-serif;
  font-size: 2.1rem;
  font-style: normal;
  line-height: 0.8;
  transition: transform 160ms ease;
}

.history-accordions .accordion[open] > summary i {
  transform: rotate(180deg);
}

.history-accordions .accordion[open] > summary {
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
}

.history-accordions .accordion-content {
  gap: 0;
  margin-top: 10px;
  padding: 0;
}

.history-accordions .story {
  overflow: hidden;
  border: 1px solid rgba(181, 150, 88, 0.62);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.48);
  box-shadow: 0 7px 17px rgba(35, 54, 77, 0.08);
}

.history-accordions .story h2 {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 16px 9px;
  color: var(--vinho);
  font-size: clamp(1.65rem, 7.5vw, 2.4rem);
  text-align: center;
}

.history-accordions .story h2::before,
.history-accordions .story h2::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 2px;
  background: var(--dourado);
}

.history-accordions .story p {
  margin: 10px 18px 0;
  color: #28211f;
  font-family: Georgia, serif;
  font-size: clamp(1rem, 4.2vw, 1.13rem);
  line-height: 1.34;
}

.history-accordions .story .source-line {
  margin: 17px 18px 18px;
  padding: 9px 12px;
  border: 1px solid rgba(181, 150, 88, 0.55);
  border-radius: 999px;
  color: var(--vinho);
  background: rgba(216, 194, 155, 0.34);
  font-family: var(--title-font);
  font-size: 1.05rem;
  text-align: center;
}

.history-accordions .story .source-line a {
  text-decoration-color: var(--dourado);
  text-underline-offset: 3px;
}

.history-accordions .story-image {
  border-radius: 0;
}

.padroeira-image {
  display: block;
  width: 100%;
  height: auto;
}

h1, h2, h3 {
  margin: 0;
  color: var(--azul);
  font-family: var(--title-font);
  line-height: 1.16;
}

h1 {
  text-align: center;
  font-size: clamp(2rem, 9vw, 3rem);
}

h2 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 12px; }

.home-hero {
  overflow: hidden;
  border: 1px solid rgba(132, 47, 53, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: var(--sombra);
}

.image-pending {
  display: grid;
  min-height: 210px;
  place-content: center;
  gap: 5px;
  padding: 24px;
  color: var(--azul);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(181, 150, 88, 0.17), rgba(255, 255, 255, 0.52)),
    repeating-linear-gradient(-45deg, rgba(132, 47, 53, 0.045), rgba(132, 47, 53, 0.045) 12px, transparent 12px, transparent 24px);
}

.image-pending span {
  max-width: 260px;
  font-family: var(--title-font);
  font-size: 1.35rem;
  line-height: 1.2;
}

.image-pending small { color: var(--vinho); }
.image-pending--hero { min-height: min(84vw, 490px); }
.image-pending--card { min-height: 175px; border-radius: 15px; }
.image-pending--story { min-height: 270px; border-radius: 15px; }

.home-actions {
  display: grid;
  gap: 12px;
}

.home-actions a {
  display: block;
  min-height: 54px;
  padding: 14px 20px;
  border: 1px solid rgba(132, 47, 53, 0.38);
  border-radius: 18px;
  color: #fffaf0;
  background: var(--vinho);
  box-shadow: 0 5px 10px rgba(132, 47, 53, 0.14);
  font-family: var(--title-font);
  font-size: 1.3rem;
  text-align: center;
  text-decoration: none;
}

.home-actions a:focus-visible,
.home-actions a:hover { background: #6d242b; }

.accordion-list {
  display: grid;
  gap: 12px;
}

.accordion {
  overflow: hidden;
  border: 1px solid rgba(132, 47, 53, 0.22);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--sombra);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--vinho);
  font-family: var(--title-font);
  font-size: 1.5rem;
  list-style: none;
}

.accordion summary::-webkit-details-marker { display: none; }
.accordion summary span { font-family: Arial, sans-serif; font-size: 1.8rem; }
.accordion[open] summary > span[aria-hidden="true"] { transform: rotate(45deg); }

.accordion-content {
  display: grid;
  gap: 18px;
  padding: 4px 14px 16px;
}

.church-card,
.office-card {
  overflow: hidden;
  border: 1px solid rgba(181, 150, 88, 0.38);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.church-card > img {
  display: block;
  width: 100%;
  max-height: 290px;
  object-fit: cover;
}

.church-card h2,
.church-card .schedule,
.church-card > p,
.church-card .address { margin-left: 16px; margin-right: 16px; }

.church-card h2 { margin-top: 17px; }

.schedule {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}

.schedule li { padding-left: 15px; position: relative; }
.schedule li::before { content: "•"; position: absolute; left: 0; color: var(--dourado); }

.address {
  display: block;
  margin-bottom: 20px;
  color: var(--vinho);
  font-weight: 700;
  text-decoration-color: rgba(132, 47, 53, 0.45);
  text-underline-offset: 3px;
}

.office-card { padding: 14px; }

.office-hours {
  display: grid;
  gap: 0;
  margin: 0;
}

.office-hours div {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(132, 47, 53, 0.13);
}

.office-hours dt { color: var(--azul); font-weight: 700; }
.office-hours dd { margin: 0; }

.official-contacts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.official-contacts a {
  padding: 11px 12px;
  border-left: 3px solid var(--dourado);
  color: var(--vinho);
  background: rgba(241, 229, 203, 0.72);
  font-weight: 700;
  text-decoration: none;
}

.story { padding: 4px 16px 20px; }

.story-image,
.festa-art,
.altar-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.story h2 { margin-top: 18px; }
.story p { margin-top: 13px; }
.source-line { color: var(--vinho); font-size: 0.94rem; }

.community-list {
  display: grid;
  gap: 12px;
}

.community-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(132, 47, 53, 0.19);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 5px 16px rgba(35, 54, 77, 0.08);
}

.community-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(181, 150, 88, 0.65);
  border-radius: 50%;
  color: var(--vinho);
  background: var(--marfim);
  font-size: 1.1rem;
}

.community-card h2 { font-size: 1.35rem; }
.community-card p { margin-top: 5px; margin-bottom: 0; }

.festa-page { padding-left: 12px; padding-right: 12px; }

.festa-art {
  margin-bottom: 20px;
  border: 1px solid rgba(181, 150, 88, 0.44);
  box-shadow: var(--sombra);
}

.festa-section {
  margin-bottom: 22px;
  padding: 20px 16px;
  border: 1px solid rgba(181, 150, 88, 0.36);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--sombra);
}

.festa-section h2 { text-align: center; }
.festa-intro { margin-top: 13px; text-align: center; }

.novena-list {
  display: grid;
  gap: 10px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: novena;
}

.novena-list li {
  display: grid;
  gap: 2px;
  padding: 13px 13px 13px 47px;
  position: relative;
  border-left: 2px solid var(--dourado);
  background: rgba(241, 229, 203, 0.5);
}

.novena-list li::before {
  content: counter(novena);
  counter-increment: novena;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  position: absolute;
  left: 11px;
  top: 14px;
  border-radius: 50%;
  color: white;
  background: var(--vinho);
  font-weight: 700;
  font-size: 0.8rem;
}

.novena-list strong { color: var(--vinho); }
.novena-list small { color: var(--azul); font-size: 0.92rem; }

.final-days { display: grid; gap: 13px; margin-top: 16px; }
.final-days article { padding: 15px; border: 1px solid rgba(132, 47, 53, 0.16); border-radius: 13px; background: rgba(241, 229, 203, 0.5); }
.final-days h3 { margin-bottom: 9px; color: var(--vinho); }
.final-days p { margin-bottom: 5px; }
.altar-image { margin-top: 5px; box-shadow: var(--sombra); }

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 680px);
  min-height: 88px;
  padding: 4px 0 6px;
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-top: 3px solid var(--dourado);
  border-radius: 26px 26px 0 0;
  background:
    linear-gradient(105deg, #81000b, #aa0714 55%, #720008);
  box-shadow: 0 -8px 25px rgba(132, 47, 53, 0.22);
}

.bottom-nav a {
  display: grid;
  place-content: center;
  gap: 5px;
  min-width: 0;
  min-width: 44px;
  min-height: 76px;
  padding: 5px 3px 9px;
  position: relative;
  color: var(--marfim);
  font-family: var(--title-font);
  font-size: clamp(0.56rem, 2.55vw, 0.88rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.bottom-nav a + a::before {
  content: "";
  width: 1px;
  height: 55px;
  position: absolute;
  top: 9px;
  left: 0;
  background: linear-gradient(transparent, var(--dourado), transparent);
}

.bottom-nav .nav-icon {
  width: 27px;
  height: 27px;
  margin: 0 auto;
  fill: none;
  stroke: var(--marfim);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bottom-nav a.is-current { color: var(--dourado); background: transparent; }
.bottom-nav a.is-current .nav-icon { stroke: var(--dourado); }

.bottom-nav a.is-current::after {
  content: "";
  width: 54%;
  height: 4px;
  position: absolute;
  bottom: 3px;
  left: 23%;
  border-radius: 999px;
  background: var(--dourado);
}

@media (min-width: 560px) {
  .page-shell { padding-top: 32px; }
  .community-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A página de História segue a composição mobile da arte de referência. */
.history-intro h1 {
  color: var(--vinho);
  font-size: clamp(2.5rem, 10.5vw, 4rem);
  line-height: 1.05;
}

.history-accordions .accordion > summary .accordion-title {
  min-width: 0;
  color: #fffaf0;
  font-family: var(--title-font);
  font-size: clamp(1.3rem, 5.3vw, 1.85rem);
  line-height: 1.1;
}

.history-accordions .accordion[open] > summary .accordion-title {
  transform: none;
}

.history-accordions .accordion > summary {
  gap: 10px;
  padding: 12px 16px;
}

.history-accordions .accordion > summary i {
  flex: none;
}

.history-accordions .story h2 {
  color: var(--vinho);
  font-size: clamp(1.55rem, 6.4vw, 2.4rem);
}

.history-accordions .story .source-line {
  overflow-wrap: anywhere;
}

.history-shell {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.bottom-nav {
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}

@media (max-width: 380px) {
  .history-panel { padding-inline: 11px; }
  .history-masthead { min-height: 110px; }
  .history-accordions .accordion > summary { padding-inline: 12px; }
  .history-accordions .accordion > summary .accordion-title { gap: 8px; }
  .history-accordions .story p { margin-inline: 14px; }
  .bottom-nav .nav-icon { width: 23px; height: 23px; }
}

/* Acabamento da História inspirado no modelo aprovado. */
.history-page {
  --vinho: #79000d;
  --marfim: #fff0cb;
  --dourado: #d7a83c;
  --azul: #18273c;
  background: #f8e5b7;
}

.history-shell {
  background: linear-gradient(to bottom, var(--vinho) 0 150px, var(--marfim) 150px);
}

.history-masthead {
  height: clamp(104px, 14vw, 136px);
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(ellipse at 50% -60%, #a70c1a, transparent 70%),
    linear-gradient(105deg, #690009, #89000d 48%, #690009);
}

.history-masthead::before,
.history-masthead::after {
  content: "❦";
  position: absolute;
  top: 0;
  color: #bf3d3e;
  opacity: .2;
  font: 86px/1 Georgia, serif;
  pointer-events: none;
}

.history-masthead::before { left: 4%; transform: rotate(-29deg); }
.history-masthead::after { right: 4%; transform: scaleX(-1) rotate(-29deg); }

.history-brand-art {
  width: min(86%, 570px);
  max-height: none;
  height: auto;
  position: absolute;
  z-index: 1;
  top: 49%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: brightness(0) invert(1);
}

.history-panel {
  min-height: calc(100vh - 100px);
  margin-top: -17px;
  padding: 22px 14px 34px;
  position: relative;
  border-top: 4px solid #e1b959;
  border-radius: 50% 50% 0 0 / 30px 30px 0 0;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(255, 253, 239, .88), transparent 57%),
    radial-gradient(ellipse at 4% 48%, rgba(193, 137, 43, .18), transparent 25%),
    radial-gradient(ellipse at 96% 72%, rgba(193, 137, 43, .16), transparent 29%),
    repeating-linear-gradient(33deg, transparent 0 6px, rgba(126, 80, 22, .018) 6px 7px),
    linear-gradient(90deg, #f1d698, #fff0cb 16%, #fff2d4 50%, #fff0cb 84%, #f1d698),
    #fff0cb;
  box-shadow: 0 -3px 11px rgba(73, 25, 14, .13);
}

.history-intro {
  gap: 3px;
  margin-bottom: 16px;
}

.history-cross {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(64%, 285px);
  font-size: 1.25rem;
}

.history-cross::before,
.history-cross::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #cb9123);
}
.history-cross::after { transform: scaleX(-1); }

.history-intro h1 {
  font-size: clamp(2.55rem, 10vw, 4rem);
  letter-spacing: -.025em;
}

.history-intro p {
  max-width: 460px;
  font-size: clamp(1.1rem, 4.4vw, 1.52rem);
}

.history-ornament {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(64%, 280px);
  margin-top: 7px;
  font-size: 2rem;
  line-height: .7;
}

.history-ornament::before,
.history-ornament::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #cb9123);
}

.history-ornament::after {
  transform: scaleX(-1);
}

.history-accordions {
  gap: 10px;
}

.history-accordions .accordion > summary {
  min-height: 60px;
  border-color: #b47529;
  border-radius: 18px;
  background: linear-gradient(180deg, #a90416, #79000d 80%);
  box-shadow: 0 4px 8px rgba(76, 0, 7, .24);
}

.history-accordions .accordion > summary .accordion-title {
  font-size: clamp(1.25rem, 5vw, 1.85rem);
}

.history-accordions .accordion-content {
  margin-top: 8px;
}

.history-accordions .story {
  border-color: #d7a83c;
  background: #fff3d4;
  box-shadow: 0 4px 10px rgba(110, 61, 12, .13);
}

.history-accordions .story h2 {
  margin-top: 13px;
}

.history-accordions .story p {
  font-size: clamp(1rem, 3.8vw, 1.13rem);
  line-height: 1.42;
}

.history-accordions .story .source-line {
  background: #f9e2ae;
}

.history-page .bottom-nav {
  background: linear-gradient(180deg, #92000d, #6f0009);
}

@media (max-width: 380px) {
  .history-masthead { height: 94px; }
  .history-brand-art { width: 86%; }
  .history-panel { padding-inline: 11px; }
}
