/*-- -------------------------- -->
<---           Hero             -->
<--- -------------------------- -*/
@media only screen and (min-width: 0rem) {
  #hero-01 {
    display: flex;
    align-items: flex-end;
    /* positions .container at the bottom edge */
    min-height: 100dvh;
    /* top pad (for nav overlap) | sides | bottom pad (safe-area aware) */
    padding: clamp(12.5rem, 12vw, 18.75rem) 1rem calc(clamp(5rem, 12vw, 12rem) + env(safe-area-inset-bottom));
    position: relative;
    z-index: 1;
  }

  #hero-01 .container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    /* mobile: stack */
    /* New: ensure the container can consume available height for bottom pinning at desktop */
    min-height: 0;
  }

  #hero-01 .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.2vw, 2rem);
  }

  /* topper */
  #hero-01 .topper {
    color: var(--bodyTextColorWhite);
  }

  #hero-01 .title {
    color: var(--bodyTextColorWhite);
    font-size: clamp(2.4375rem, 5vw, 3.2rem);
    margin: 0;
  }

  #hero-01 .text {
    color: var(--bodyTextColorWhite);
    margin-bottom: 1.25rem;
  }

  #hero-01 .flex-group {
    max-width: 32.8125rem;
  }

  /* CTA Group */
  #hero-01 .cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0 .5rem 0;
  }

  /* Buttons */

  /* Outline (Secondary) */
  #hero-01 .button-outline {
    background: transparent;
    color: var(--bodyTextColorWhite);
    border: 2px solid rgba(255, 255, 255, .8);
  }

  #hero-01 .button-outline:hover {
    background: rgba(255, 255, 255, .12);
  }

  #hero-01 .button-outline:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
  }

  /* Reassurance line */
  #hero-01 .reassure {
    color: var(--bodyTextColorWhite);
    opacity: .85;
    margin-top: .5rem;
    font-size: .95rem;
  }

  #hero-01 .background {
    display: block;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: -2;
  }

  #hero-01 .background img {
    left: 0;
    object-fit: cover;
    position: relative;
    top: 90px;
    width: 100%;
  }

  #hero-01 .background {
    background-image: url("https://picsum.photos/2000/2000");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 0px;
    background-attachment: fixed;
    /* parallax */
    will-change: background-position;
    pointer-events: none;
  }

  #hero-01 .background img {
    display: none;
  }

  /* bottom vignette */
  #hero-01 .background:before {
    background: 
  /* Top fade (starts transparent at top, darker downward) */
  linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0) 40%,
    rgba(26, 26, 26, 0.5) 55%,
    rgba(26, 26, 26, 0.92) 75%
  ),
  
  /* Bottom fade (starts transparent at bottom, darker upward) */
  linear-gradient(
    to top,
    rgba(26, 26, 26, 0) 40%,
    rgba(26, 26, 26, 0.5) 55%,
    rgba(26, 26, 26, 0.92) 75%
  );

    content: "";
    display: block;
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
  }
}

@media only screen and (min-width: 48rem) {
  #hero-01 .container {
    max-width: 80rem;
    height: 100%;
    display: flex;
  }

  #hero-01 .content {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  #hero-01 .welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 39.375rem;
  }

  #hero-01 .title {
    margin-bottom: 0;
    width: 100%;
  }

  /* Strengthen bottom vignette so white text stays legible */
  #hero-01 .background:before {
    background: linear-gradient(180deg,
        rgba(26, 26, 26, .95) 12.79%,
        rgba(26, 26, 26, 0) 48.32%,
        rgba(26, 26, 26, .92) 82.84%);
  }
}

/* parallax on big screens */
@media only screen and (min-width: 100rem) {
  #hero-01 .background {
    background-position: center -12 0px;
  }
}

/*--------------------------------------
  optional - touch-friendly gap + motion-respect
--------------------------------------*/
@media (pointer: coarse) and (min-width: 48rem) {
  #hero-01 .content {
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}

/*-- -------------------------- -->
<--- About                      -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #about-01 {
    padding: var(--sectionPadding);
    /* clips the red box from causing overflow issues */
    overflow: hidden;
  }

  #about-01 .container {
    width: 100%;
    /* changes to 1280px at tablet */
    margin: auto;
    display: flex;
    flex-direction: column;
    /* 48px - 64px */
  }

  #about-01 .text {
    margin-bottom: 1rem;
  }

  #about-01 .text:last-of-type {
    margin-bottom: 2rem;
  }

  #about-01 .picture {
    width: 100%;
    height: 10rem;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    margin: clamp(2rem, 5vw, 3rem) 0;
  }

  #about-01 .picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
    transform-origin: center;
  }
}

/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #about-01 .container {
    align-items: center;
    max-width: 80rem;
  }

  #about-01 .flex {
    display: flex;
    gap: clamp(3rem, 6vw, 4rem);
    align-items: center;
  }

  #about-01 .title {
    margin-bottom: 3rem;
    text-align: center;
  }

  #about-01 .picture {
    height: 20rem;
    margin: 0;
  }


}

/* ============================================
   Upcoming Service  
   ============================================ */

/* Mobile */
@media only screen and (min-width: 0rem) {
  #upcoming-service {
    width: 100%;
    padding: var(--sectionPadding);
    background: var(--primaryLight);
  }

  #upcoming-service .container {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
  }

  /* Card */
  #upcoming-service .next-service {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
  }

  /* Media */
  #upcoming-service .service-media {
    position: relative;
    height: 240px;
    overflow: hidden;
    margin: 0;
  }

  #upcoming-service .service-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
  }

  #upcoming-service .service-card:hover .service-media img {
    transform: scale(1.04);
  }

  #upcoming-service .badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: var(--secondary);
    color: var(--bodyTextColorWhite);
    padding: .5rem .875rem;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
  }

  /* Body */
  #upcoming-service .service-subtitle {
    font-size: .875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--primary);
  }

  #upcoming-service .service-title {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    line-height: 1.2;
    color: var(--headerColor);
  }

  #upcoming-service .service-desc {
    color: var(--bodyTextColor);
  }

  /* Info list */
  #upcoming-service .service-info {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #upcoming-service .service-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    align-items: start;
  }

  #upcoming-service .icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primaryLight);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #upcoming-service .service-text {
    display: grid;
    gap: .125rem;
  }

  #upcoming-service .label {
    font-size: .875rem;
    color: var(--bodyTextColor);
    opacity: .9;
  }

  #upcoming-service .value {
    color: var(--headerColor);
  }

  /* Actions */
  #upcoming-service .button-solid {
    display: flex;
  }

  /* Countdown */
  #upcoming-service .countdown {
    padding: 1rem;
    border-bottom: 1px solid black;
  }

  #upcoming-service .countdown-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: .5rem;
    color: var(--headerColor);
  }

  #upcoming-service .countdown-row {
    display: grid;
    grid-auto-flow: column;
    gap: .75rem;
    align-items: center;
    justify-content: start;
  }

  #upcoming-service .countdown-item {
    display: grid;
    justify-items: center;
    gap: .25rem;
  }

  #upcoming-service .countdown-value {
    min-width: 56px;
    padding: .5rem .5rem;
    border-radius: .5rem;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
    font-size: 1.25rem;
    box-shadow: 0 6px 12px rgba(0,0,0,.06);
    text-align: center;
  }

  #upcoming-service .countdown-label {
    font-size: .75rem;
    color: var(--bodyTextColor);
    opacity: .9;
  }
}

/* Tablet */
@media only screen and (min-width: 48rem) {
  #upcoming-service .service-card {
    display: grid;
    grid-template-columns: 45% 1fr;
    align-items: stretch;
    gap: clamp(1rem, 2vw, 2rem);
  }
  #upcoming-service .service-media {
    height: auto;
    min-height: 100%;
  }
  #upcoming-service .actions {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* Large Desktop */
@media only screen and (min-width: 81.25rem) {
  #upcoming-service .service-title {
    font-size: 2rem;
  }
}

/*-- -------------------------- -->
<--- Ministries -->
<--- -------------------------- -*/

#ministry-01 {
  padding: var(--sectionPadding);
}

#ministry-01 .container {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
  margin: 0 auto;
  max-width: 80rem;
  width: 100%;
}

#ministry-01 .content {
  align-self: stretch;
  display: grid;
  gap: 1.5rem 1.5rem;
  grid-template-columns: 1fr;
}

#ministry-01 .title {
  max-width: 20ch;
  margin: 0;
}

#ministry-01 .text {
  max-width: 45rem;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 1.5rem;
  /* keeps the same spacing you had via margin-top on ::after */
}

/* Track: horizontal scroll (mobile), grid (desktop) */
#ministry-01 .card-group {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.25rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  list-style: none;
  width: 100%;
}

#ministry-01 .card-group::-webkit-scrollbar {
  display: none;
}

/* Card item sizing for snap */
#ministry-01 .item {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

/* Card */
#ministry-01 .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  outline: none;
}

#ministry-01 .card:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 60%, white 40%);
  border-radius: .5rem;
}

/* Image */
#ministry-01 .picture {
  height: clamp(14rem, 30vw, 20rem);
  width: 100%;
  overflow: hidden;
  margin: 0 0 1rem;
  border-radius: .75rem;
}

#ministry-01 .picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}

#ministry-01 .card:hover .picture img {
  transform: scale(1.06);
  opacity: .95;
}

/* Text */
#ministry-01 .h3 {
  color: var(--headerColor);
  font-size: 1.125rem;
  line-height: 1.2;
  margin: 0 0 .5rem;
}

#ministry-01 .item-text {
  color: var(--bodyTextColor);
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* Section CTA */
#ministry-01 .actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: .5rem;
}

#ministry-01 .btn:hover {
  transform: translateY(-1px);
  opacity: .95;
}

@media (min-width: 48rem) {
  #ministry-01 .content {
    align-items: end;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #ministry-01 .item {
    flex: 0 0 45%;
  }
}

@media (min-width: 81.25rem) {

  /* switch to grid on large screens for better scanability */
  #ministry-01 .card-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }

  #ministry-01 .item {
    flex: unset;
  }
}

/*-- -------------------------- -->
<--- Giving                     -->
<--- -------------------------- -*/

/* Base (mobile) — keep your current picture background */
@media (min-width: 0rem) {
  #giving-01 {
    padding: var(--sectionPadding);
    position: relative;
    overflow: hidden;
    /* keeps layers tidy */
    background-color: var(--primaryLight);
  }

  /* Content sits above the bg+overlay */
  #giving-01 .container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3rem, 6vw, 4rem);
    position: relative;
    z-index: 2;
  }

  #giving-01 .content {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #giving-01 .text {
    margin: 2rem 0;
    opacity: .8;
  }

  /* Don’t use the <picture> as a background anymore */
  #giving-01 .picture {
    display: none !important;
  }


}


/*-- -------------------------- -->
<--- CTA                        -->
<--- -------------------------- -*/

/* Base (mobile) — keep your current picture background */
@media (min-width: 0rem) {
  #cta-01 {
    padding: var(--sectionPadding);
    position: relative;
    overflow: hidden;
    /* keeps layers tidy */
  }

  /* Content sits above the bg+overlay */
  #cta-01 .container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3rem, 6vw, 4rem);
    position: relative;
    z-index: 2;
  }

  #cta-01 .content {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #cta-01 .topper,
  #cta-01 .title,
  #cta-01 .text {
    color: var(--bodyTextColorWhite);
  }

  #cta-01 .text {
    margin: 2rem 0;
    opacity: .8;
  }

  /* Don’t use the <picture> as a background anymore */
  #cta-01 .picture {
    display: none !important;
  }

  /* Parallax layer (always on) */
  #cta-01::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("/assets/img/winding-road-4.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* parallax */
    will-change: background-position;
    pointer-events: none;
  }

  /* Dark overlay above the image, below content */
  #cta-01::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #323232;
    z-index: 1;
    pointer-events: none;
  }
}

/* Accessibility: prefer no parallax if user requests reduced motion */
@media (prefers-reduced-motion: reduce) {
  #cta-01::before {
    background-attachment: scroll;
  }
}

/* Tablet/desktop — swap to fixed-attachment parallax */
@media (min-width: 48rem) {

  /* Parallax layer */
  #cta-01::before {
    background-position: center 25%;
  }
}