:root {
  --olive: #999c7c;
  --olive-dark: #82855f;
  --cream: #f3ede0;
  --navy: #2f4157;
  --mauve: #a97c93;
  --salmon: #d9917f;
  --tan: #eab876;
  --rust: #c1734a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--olive);
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
}

/* ---------- Hero ---------- */
.hero {
  line-height: 0;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Layout ---------- */
.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 760px) {
  .content {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    padding-bottom: 2rem;
  }
}

/* ---------- Card ---------- */
.card {
  background: var(--cream);
  border-radius: 18px;
  padding: 2.25rem 1.85rem;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
}

.script-heading {
  font-family: 'Alex Brush', cursive;
  color: var(--mauve);
  font-size: 2.75rem;
  text-align: center;
  margin: 0 0 1.5rem;
}

.gather-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  flex: 1;
}

.gather-list li {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.icon-circle {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-circle svg { width: 36px; height: 36px; }

.icon-mauve { background: var(--mauve); }
.icon-salmon { background: var(--salmon); }
.icon-tan { background: var(--tan); }

.gather-text h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 .15rem;
  color: var(--navy);
}
.gather-text p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
  opacity: .85;
}

/* ---------- Gallery ---------- */
.gallery {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #999c7c;
  min-height: 320px;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform .4s ease;
}

.gallery-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(.9);
  transform: scale(1.15);
}

.gallery-slide img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  display: block;
}

/* Only ever shown if banner/gallery-default.jpg has gone missing too --
   normally the default image fills this slot instead (see index.html's
   buildGallery()). */
.gallery-slide.placeholder {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #d8d9c3, #d8d9c3 10px, #cfd0b8 10px, #cfd0b8 20px);
}
.gallery-slide.placeholder img { display: none; }
.gallery-slide.placeholder::after {
  content: "Add photos to images/ (see images/README.txt)";
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  color: var(--navy);
  padding: 1rem;
  text-align: center;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(47,65,87,.65);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.gallery-nav svg { width: 20px; height: 20px; display: block; }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-nav:hover { background: rgba(47,65,87,.85); }

.gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: none;
  justify-content: center;
  gap: 8px;
}
.gallery-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 0;
}
.gallery-dots .dot.active { background: #fff; }

/* ---------- Shared pill buttons (Facebook / address) ---------- */
.pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--olive-dark);
  border-radius: 999px;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  transition: background .2s ease;
}
.pill:hover { background: #767955; }

.pill-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pill-icon svg { width: 20px; height: 20px; }

.pill-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .9rem;
  line-height: 1.4;
}
.pill-text small {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  font-size: .8rem;
  opacity: .85;
}

/* ---------- Connect footer (photo / buttons / temple) ---------- */
.connect {
  background: var(--navy);
  padding: 3rem 1.25rem;
  margin-top: 2rem;
}

.connect-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

/* Mobile stacking order: buttons, then temple, then photo */
.connect-buttons { order: 1; }
.connect-temple { order: 2; }
.connect-photo { order: 3; }

@media (min-width: 760px) {
  .connect { margin-top: 0; }
}

@media (min-width: 820px) {
  .connect-inner {
    max-width: 1320px;
    /* Left (empty) and right (temple) columns are equal width,
       so the buttons in the middle sit at the true center of the screen. */
    grid-template-columns: 1fr auto 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .connect-photo,
  .connect-buttons,
  .connect-temple {
    order: 0;
  }
  /* Push the temple to the right edge of its column */
  .connect-temple {
    justify-self: end;
    width: 100%;
    max-width: 410px;
  }
}

.connect-photo {
  /* Empty for now -- reserved for an approved Church-symbol image once the
     ward hears back from the Visual Identity Office. Until then it's just
     the same navy as the rest of the footer. */
  background: var(--navy);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.connect-photo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.connect-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.connect .pill {
  background: var(--cream);
  color: var(--navy);
}
.connect .pill:hover { background: #fff; }
.connect .pill-icon { background: var(--navy); }

.connect-temple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-align: center;
}

.temple-art {
  width: 100%;
  max-width: 340px;
  height: auto;
}

@media (min-width: 820px) {
  .temple-art {
    max-width: 410px;
  }
}

.temple-caption {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .75rem;
  margin: .75rem 0 0;
  color: var(--cream);
  opacity: .85;
}

a.connect-temple {
  text-decoration: none;
  cursor: pointer;
}
a.connect-temple .temple-art {
  transition: transform .2s ease;
}
a.connect-temple:hover .temple-art {
  transform: scale(1.03);
}
a.connect-temple:hover .temple-caption {
  opacity: 1;
  text-decoration: underline;
}
