/* Shared layouts, aligned with the supplied LTPE mockups. */
:root {
  --primary-gold: #b69036;
  --text-dark: #202631;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: 130px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #866415;
  outline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
img {
  max-width: 100%;
}
.header-container {
  grid-template-columns: 125px 1fr auto;
  gap: 24px;
  padding: 0;
}
.logo img {
  width: 125px;
}
.main-nav {
  gap: clamp(12px, 1.6vw, 26px);
  font-size: 0.88rem;
}
.donate-btn {
  padding: 0.7rem 1.2rem;
  min-width: 100px;
}
h2 {
  font-weight: 800;
  letter-spacing: -0.7px;
}
section {
  padding: 48px 20px;
}
.container {
  max-width: 1120px;
  padding: 0 20px;
}
.hero {
  min-height: 510px;
}
.hero-about {
  background-image: url('../images/Aboutp.jpg');
  background-position: center 40%;
}
.hero.hero-teachings {
  --teachings-banner-height: clamp(380px, 30vw, 500px);

  display: flex;
  background: #1a2332;
  min-height: 0;
  height: var(--teachings-banner-height);
  padding: 40px 20px;
  text-align: center;
}

.hero-teachings::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: url('../images/teachings-banner-2.png') center / cover no-repeat;
  filter: blur(18px);
  pointer-events: none;
}

.hero-teachings::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.teachings-hero-frame {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: calc(var(--teachings-banner-height) * 1.55);
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.teachings-hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-teachings .hero-content {
  padding: 0;
}

.teachings-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-outline {
  border: 2px solid #795a18;
  border-radius: 999px;
  color: #795a18;
  background: white;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline:hover {
  background: #f4f0e6;
}

.search-help {
  font-size: 0.9rem;
  margin-top: -12px;
}

@media (max-width: 760px) {
  .hero.hero-teachings {
    --teachings-banner-height: 360px;
  }

  .hero-teachings .hero-content {
    padding: 0 8px;
  }
}
.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 4rem);
}
.schedule-section,
.ministries-section,
.contact-wrapper {
  background: #f4f4f2;
}
.section-cta {
  text-align: center;
  margin-top: 28px;
}
.schedule-card p.schedule-time {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
}
.gold-icon {
  color: var(--primary-gold);
  font-size: 3rem;
  line-height: 1;
}
.pastor-section {
  grid-template-columns: 300px 1fr;
  background: white;
  padding: 0;
}
.pastor-image img {
  min-height: 0;
  height: 300px;
  object-position: center 25%;
}
.welcome-image img {
  min-height: 0;
  height: 280px;
}
.history-grid,
.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.history-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.history-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
}
.history-gallery img:first-child {
  grid-column: 1 / -1;
  height: 210px;
}
.history-gallery img:last-child {
  object-fit: contain;
}
.vision-mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.values-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.vision-card,
.mission-card,
.value-card,
.team-member {
  background: white;
  border-radius: 14px;
  box-shadow: 0 5px 16px #20263118;
  text-align: center;
  overflow: hidden;
}
.vision-card,
.mission-card,
.value-card {
  padding: 26px 18px;
}
.vision-card h3,
.mission-card h3,
.team-member-role {
  color: #947124;
}
.vision-icon,
.mission-icon,
.value-icon {
  font-size: 2.8rem;
  color: var(--primary-gold);
}
.value-card h3,
.team-member h3 {
  font-size: 1.05rem;
}
.team-member-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 25%;
}
.team-member-info {
  padding: 18px 12px;
}
.team-member-info p,
.value-card p {
  font-size: 0.87rem;
}
.affiliation-mark {
  color: var(--primary-gold);
  font-size: 5rem;
  padding: 20px;
}
.cta-section {
  background: linear-gradient(110deg, #a77f2b, #d3b45f);
  text-align: center;
}
.cta-section h2,
.cta-section p {
  color: white;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cta-btn-primary,
.cta-btn-secondary {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
}
.cta-btn-primary {
  background: white;
  color: #654b14;
}
.cta-btn-secondary {
  border: 2px solid white;
  color: white;
}
.ministry-card {
  scroll-margin-top: 140px;
}
.ministry-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}
.ministry-card h3 {
  font-size: 1.1rem;
  margin-top: 12px;
}
.filter-field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
  min-width: 180px;
}
.filter-field select {
  background: white;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.sermon-card {
  box-shadow: none;
}
.sermon-card:hover {
  transform: translateY(-3px);
}
.sermon-thumbnail {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}
.play-button {
  border-radius: 14px;
  background: #e62117;
  color: white;
  width: 66px;
  height: 46px;
  pointer-events: none;
}
.play-button:hover {
  background: #e62117;
}
.sermon-info {
  padding: 15px 0;
}
.sermon-info a {
  color: var(--text-dark);
  text-decoration: none;
}
.sermon-info a:hover {
  text-decoration: underline;
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #111d;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}
.video-status {
  grid-column: 1 / -1;
  background: #f5f4ef;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
}
.video-status a {
  color: #765816;
}
.latest-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #17253c, #27364b);
}
.latest-placeholder a {
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.donation {
  text-align: center;
}
.footer-section h3 {
  font-size: 1.3rem;
}
.menu-toggle {
  display: none;
}
.language-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d8d8d4;
  border-radius: 24px;
  background: white;
  flex-shrink: 0;
}
.language-switch a {
  border: 0;
  border-radius: 20px;
  color: #374151;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
  min-height: 34px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.language-switch a[aria-current='page'] {
  background: #795a18;
  color: white;
}
.language-switch a:hover {
  background: #eee9dc;
  color: #473710;
}
.main-nav {
  flex-wrap: wrap;
  row-gap: 12px;
}
.event-announcement {
  background: #15263d;
  color: white;
  padding: 12px 20px;
}
.announcement-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  gap: 22px;
  align-items: center;
}
.announcement-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f3d68b;
  white-space: nowrap;
}
.announcement-viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.announcement-track {
  display: flex;
  gap: 65px;
  width: max-content;
  animation: announcement-scroll 26s linear infinite;
}
.announcement-track a {
  color: white;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px;
}
.announcement-track a:hover {
  text-decoration: underline;
}
.announcement-pause {
  border: 1px solid #ffffff60;
  background: transparent;
  color: white;
  border-radius: 8px;
  width: 38px;
  min-height: 38px;
  cursor: pointer;
  flex-shrink: 0;
}
.event-announcement:hover .announcement-track,
.event-announcement:focus-within .announcement-track,
.event-announcement.is-paused .announcement-track {
  animation-play-state: paused;
}
@keyframes announcement-scroll {
  0%,
  15% {
    transform: translateX(0);
  }
  85%,
  100% {
    transform: translateX(var(--announcement-distance, 0px));
  }
}
.event-detail {
  padding: 12px 0 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
  scroll-margin-top: 180px;
}
.event-copy {
  max-width: 800px;
  margin: 0 auto 35px;
}
.event-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.event-copy h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
}
.event-sessions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}
.event-sessions li {
  border-left: 3px solid var(--primary-gold);
  background: #f4f4f2;
  padding: 18px;
  border-radius: 0 12px 12px 0;
}
.event-sessions time,
.event-sessions strong {
  display: block;
}
.event-sessions time {
  text-transform: capitalize;
  margin-bottom: 5px;
}
.event-programme {
  padding-left: 22px;
  line-height: 2;
}
.event-posters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  max-width: 960px;
  margin: auto;
}
.event-posters img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px #20263118;
}
.event-posters figcaption {
  margin: 12px 0;
  text-align: center;
  font-weight: 600;
}
.poster-note {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
}
@media (min-width: 761px) and (max-width: 1380px) {
  .header-container {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .header-actions {
    grid-column: 2;
    justify-self: center;
  }
  .logo {
    grid-row: 1 / 3;
  }
}
@media (max-width: 760px) {
  .js-ready .header-actions {
    display: flex;
  }
  .header-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-actions .social-icons {
    display: none;
  }
  .js-ready.menu-open .header-actions .social-icons {
    display: flex;
  }
  .announcement-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .announcement-label {
    flex-basis: 100%;
  }
  .event-posters,
  .event-sessions {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    gap: 12px;
  }
  .announcement-track a {
    white-space: normal;
  }
  .announcement-pause {
    display: none;
  }
}
.section-icon {
  width: 52px;
  height: 52px;
  display: block;
  color: var(--primary-gold);
}
.schedule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.schedule-card {
  padding: 26px 18px;
}
.schedule-card h3 {
  font-size: 1.15rem;
}
.schedule-event {
  display: block;
  text-decoration: none;
  border: 1px solid #b6903650;
  color: var(--text-dark);
}
.card-link-label {
  display: inline-block;
  margin-top: 10px;
  color: #795a18;
  font-weight: 700;
  font-size: 0.9rem;
}
.schedule-event:hover .card-link-label,
.ministry-card:hover .card-link-label {
  text-decoration: underline;
}
a.ministry-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}
.donation p a,
.text-link,
.bank-card a,
.book-panel a:not(.btn-primary) {
  color: #795a18;
  text-underline-offset: 4px;
}
.page-intro {
  padding: 64px 20px;
  background: #f4f4f2;
  text-align: center;
  border-bottom: 1px solid #e9e7e0;
}
.page-intro h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 1000px;
  margin: 0 auto 16px;
  line-height: 1.2;
  font-weight: 800;
}
.page-intro p {
  max-width: 680px;
  margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  font-weight: 700;
  color: #795a18;
  margin-bottom: 16px !important;
}
.giving-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: center;
}
.giving-message h2,
.bank-card h2,
.profile-copy h2,
.ministry-detail h2 {
  text-align: left;
}
.giving-symbol {
  font-size: 4rem;
  line-height: 1;
  color: var(--primary-gold);
}
.scripture {
  border-left: 3px solid var(--primary-gold);
  padding: 6px 0 6px 22px;
}
.scripture p {
  font-size: 1.2rem;
  color: var(--text-dark);
  line-height: 1.85;
}
.scripture cite {
  font-style: normal;
  font-weight: 700;
  color: #795a18;
}
.bank-card {
  background: white;
  border: 1px solid #e5dfd1;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 40px #2026310d;
}
.bank-card h2 {
  font-size: 1.5rem;
}
.bank-details > div {
  padding: 18px 0;
  border-top: 1px solid #ece8df;
}
dt {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
dd {
  margin: 0;
  font-weight: 600;
}
.iban {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.thank-you {
  max-width: 760px;
  text-align: center;
}
.thank-you p {
  margin-bottom: 24px;
}
.pastor-profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: start;
}
.pastor-portrait {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}
.pastor-profile figcaption {
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  padding-top: 12px;
}
.profile-copy p {
  line-height: 1.9;
}
.book-panel {
  max-width: 850px;
  text-align: center;
}
.book-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 50px;
  margin: 28px 0;
}
.coming-soon {
  max-width: 780px;
  text-align: center;
  padding-top: 12px;
  padding-bottom: 30px;
}
.feature-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.coming-soon .page-actions {
  justify-content: center;
}
.ministry-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.ministry-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
}
.ministry-detail .feature-icon {
  justify-content: flex-start;
}
@media (min-width: 761px) and (max-width: 1100px) {
  .schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .schedule-grid,
  .giving-layout,
  .pastor-profile,
  .ministry-detail {
    grid-template-columns: 1fr;
  }
  .giving-layout,
  .pastor-profile,
  .ministry-detail {
    gap: 30px;
  }
  .page-intro {
    padding: 44px 16px;
  }
  .bank-card {
    padding: 24px 18px;
  }
  .pastor-profile figure {
    max-width: 300px;
    margin: 0 auto;
  }
  .page-actions {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}
@media (max-width: 1190px) {
  .header-container {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .header-actions {
    grid-column: 2;
    justify-self: center;
  }
  .logo {
    grid-row: 1 / 3;
  }
  .main-nav {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 12px 18px;
  }
  .header-container {
    grid-template-columns: 1fr auto;
    text-align: left;
  }
  .logo {
    grid-row: auto;
    justify-content: start;
  }
  .logo img {
    width: 88px;
  }
  .menu-toggle {
    display: block;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
  }
  .main-nav {
    grid-column: 1 / -1;
    align-items: stretch;
    gap: 0;
  }
  .main-nav a {
    padding: 12px;
  }
  .main-nav a.active::after {
    bottom: 3px;
  }
  .header-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
  }
  .js-ready .main-nav,
  .js-ready .header-actions {
    display: none;
  }
  .js-ready.menu-open .main-nav {
    display: flex;
    flex-direction: column;
  }
  .js-ready.menu-open .header-actions {
    display: flex;
  }
  section {
    padding: 36px 16px;
  }
  .container {
    padding: 0;
  }
  .hero {
    min-height: 420px;
  }
  .history-grid,
  .latest-grid,
  .vision-mission-grid,
  .pastor-section,
  .values-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  .departments-grid,
  .schedule-grid,
  .sermons-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .contact-section {
    gap: 24px;
  }
  .team-member-image {
    height: 160px;
  }
  .hero-buttons > a {
    width: 100%;
  }
  h2 {
    font-size: 1.65rem;
  }
  .footer-container {
    gap: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep language choices available even while the mobile menu is closed. */
@media (max-width: 760px) {
  .js-ready .header-actions {
    display: flex;
  }
  .header-actions .social-icons {
    display: none;
  }
  .js-ready.menu-open .header-actions .social-icons {
    display: flex;
  }
}

/* About page: protect faces in wide hero images and ministry photographs. */
.hero:not(.hero-teachings) {
  min-height: clamp(460px, 35vw, 760px);
  background-position: center 12%;
}

.hero.hero-about {
  background-position: center 16%;
}

.history-grid {
  align-items: start;
}

.history-timeline {
  position: relative;
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: #d6bd82;
}

.history-timeline li {
  position: relative;
  width: calc(50% - 22px);
  margin-bottom: 24px;
}

.history-timeline li:nth-child(even) {
  margin-left: calc(50% + 22px);
}

.history-timeline li::before {
  content: '';
  position: absolute;
  top: 10px;
  right: -29px;
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--primary-gold);
  box-sizing: content-box;
}

.history-timeline li:nth-child(even)::before {
  right: auto;
  left: -30px;
}

.history-date {
  display: block;
  color: #795a18;
  font-weight: 800;
  margin-bottom: 8px;
}

.history-stop {
  background: #f5f5f3;
  border: 1px solid #e7e3d8;
  border-radius: 12px;
  padding: 16px;
}

.history-stop h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.history-stop p {
  font-size: 0.9rem;
  margin: 0;
}

.history-note {
  font-size: 0.875rem;
  border-left: 2px solid #d6bd82;
  padding-left: 14px;
  margin-top: 20px;
}

.affiliation-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 38px;
}

.affiliation-logo {
  display: block;
  width: 100%;
  height: auto;
}

.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 980px;
  margin: 30px auto 0;
}

.team-member-image {
  height: 260px;
}

.departments-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.ministry-card img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  object-position: center 25%;
}

.ministry-card img.ministry-photo-full,
.ministry-cover {
  object-fit: contain;
  background: #f4f4f2;
  max-height: none;
}

.ministry-illustration {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #f4f0e6;
  border-radius: 12px;
}

.ministry-placeholder {
  min-height: 300px;
  display: grid;
  place-items: center;
  background: #f4f0e6;
  border-radius: 16px;
}

.ministry-placeholder .section-icon {
  width: 130px;
  height: 130px;
}

/* Seven departments: four cards, then three centred cards. */
.departments-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.departments-grid > * {
  grid-column: span 3;
}

.departments-grid > :nth-child(5) {
  grid-column: 2 / span 3;
}

.departments-grid > :nth-child(6) {
  grid-column: 5 / span 3;
}

.departments-grid > :nth-child(7) {
  grid-column: 8 / span 3;
}

@media (max-width: 1100px) {
  .departments-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .departments-grid > *,
  .departments-grid > :nth-child(5),
  .departments-grid > :nth-child(6) {
    grid-column: span 2;
  }

  .departments-grid > :nth-child(7) {
    grid-column: 3 / span 2;
  }
}

@media (max-width: 760px) {
  .hero:not(.hero-teachings) {
    min-height: 420px;
  }

  .team-grid,
  .departments-grid,
  .affiliation-section {
    grid-template-columns: 1fr;
  }

  .departments-grid > *,
  .departments-grid > :nth-child(5),
  .departments-grid > :nth-child(6),
  .departments-grid > :nth-child(7) {
    grid-column: auto;
  }

  .affiliation-logo {
    max-width: 240px;
    margin: auto;
  }
}
