body, html {
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Base Styling */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f7fafd;
  color: #222;
}

/* Top Bar */
.top-bar {
  background-color: #1095cc;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  font-size: 14px;
  gap: 8px;
}

.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-right {
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.top-right span,
.top-right .icon {
  min-width: 0;
  flex-shrink: 1;
}

.icon {
  font-size: 16px;
  margin-right: 3px;
  vertical-align: middle;
}

/* Keep email icon, label, and address on single line */
.email-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  background: #fff;
  box-shadow: 0 1px 10px #d1e6f9ee;
  padding: 16px 40px 14px 32px;
  min-height: 70px;
  justify-content: flex-start;
}

.header-logo {
  height: 48px;
  width: auto;
  margin-right: 16px;
  display: block;
  flex-shrink: 0;
}

.header-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-title {
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  line-height: 1.08;
}

.header-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: #222;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Main Navigation */
.main-nav {
  background-color: #f3faff;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  padding: 11px 0;
  font-size: 17px;
  font-weight: 500;
  box-shadow: 0 2px 5px #e8f4fd;
}

.main-nav a {
  text-decoration: none;
  color: #1978a5;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: #02598d;
  border-bottom: 2px solid #1978a5;
}

/* Hero Section */
.hero-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-image {
  border-radius: 6px;
  width: 100%;
  max-width: 540px;
  min-width: 0;
  box-shadow: 0 3px 22px #d2eaf640;
  box-sizing: border-box;
}

.welcome-box {
  background: #0074c6;
  color: white;
  border-radius: 5px;
  padding: 34px 26px 24px 26px;
  width: 100%;
  max-width: 370px;
  min-width: 0;
  box-shadow: 0 4px 16px #b2c3d850;
  box-sizing: border-box;
}

.welcome-box h2 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 18px;
  font-weight: 600;
}

.welcome-box p {
  font-size: 1.06rem;
  line-height: 1.7;
  margin-bottom: 0;
  text-align: justify;
}

/* About Section */
.about-section {
  margin: 48px auto 26px auto;
  background: #fff;
  max-width: 940px;
  border-radius: 4px;
  padding: 35px 24px 30px 24px;
  box-shadow: 0 1px 12px #e5eefb60;
  text-align: center;
}

.about-section h2 {
  font-size: 2rem;
  margin: 0 0 18px 0;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.about-section .highlight {
  color: #ff7701;
  font-weight: 700;
  letter-spacing: 2px;
}

.about-section p {
  font-size: 1 rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 0;
 text-align: justify;
}

/* Clergy Section */
.clergy-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  max-width: 1100px;
  margin: 30px auto 0 auto;
  background: #fff;
  border-radius: 4px;
  padding: 25px 12px 28px 12px;
  box-shadow: 0 1px 12px #e5eefb33;
}

.clergy-card {
  flex: 1 1 0px;
  max-width: 290px;
  min-width: 210px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clergy-card img {
  width: 98%;
  max-width: 230px;
  height: 245px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px #b4c8e644;
}

.clergy-role {
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: #333;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.clergy-name {
  font-size: 1.01rem;
  margin-bottom: 9px;
  color: #333;
}

/* Footer */
.main-footer {
  background: #232323;
  color: #e0e0e0;
  padding: 36px 0 0 0;
  font-size: 16px;
  letter-spacing: 0.1px;
}

.footer-cols {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
  padding: 0 24px 16px 24px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1 1 170px;
  min-width: 180px;
  margin-bottom: 24px;
  padding-left: 10px;
  justify-content: left;
}

.footer-col h3 {
  margin: 0 0 15px 0;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ddd;
}

.footer-col a {
  color: #b7e3ff;
  text-decoration: none;
  font-size: 16px;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bar {
  background: #191919;
  color: #aaa;
  text-align: center;
  font-size: 15px;
  padding: 14px 0 14px 0;
  margin-top: 10px;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1050px) {
  .hero-welcome {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  .hero-image, .welcome-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .clergy-section {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
  }
  .clergy-card {
    max-width: 350px;
  }
  .footer-cols {
    flex-direction: column;
    gap: 0px;
    padding: 0 10px 16px 10px;
  }
  .footer-col {
    margin-bottom: 19px;
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    min-height: 0;
  }
  .header-text-block {
    align-items: flex-start;
    text-align: left;
    margin-top: 6px;
  }
  .header-title { font-size: 1.15rem; }
  .header-logo { height: 36px; margin: 0; }
  .main-nav { font-size: 15px; gap: 10px; }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
    padding: 10px 8px;
    gap: 5px;
    text-align: left;
  }
  .top-left, .top-right {
    width: 100%;
    margin-bottom: 2px;
    justify-content: flex-start;
    gap: 6px;
  }
  .top-right {
    flex-wrap: wrap;
    white-space: normal;
  }
  .email-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
  }
}

@media (max-width: 500px) {
  .about-section h2,
  .clergy-role,
  .footer-col h3 { font-size: 1.1rem; }
  .about-section p,
  .clergy-name { font-size: 1rem; }
}

@media (max-width: 700px) {
  .hero-welcome {
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 16px;
  }
  .hero-image, .welcome-box {
    width: 94vw;      /* Ensures they don't overflow */
    min-width: 0;     /* Remove any min-widths */
    max-width: 99vw;  /* Keeps within viewport */
    box-sizing: border-box;
  }
  .welcome-box {
    margin: 0 auto;
    padding: 20px 10px 16px 10px;
  }
}

@media (max-width: 480px) {
  .hero-welcome {
    padding: 7px 0;
  }
  .hero-image, .welcome-box {
    width: 99vw;
    max-width: 99vw;
  }
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;           /* smaller gap */
  max-width: 900px;
  margin: auto;
  padding: 0 8px 10px 8px;
}
.footer-col {
  flex: 1 1 170px;
  min-width: 180px;
  margin-bottom: 8px;  /* reduced */
  padding: 6px 0;      /* reduced */
}
@media (max-width: 1050px) {
  .footer-cols {
    flex-direction: column;
    gap: 6px;
    padding: 0 3px 7px 3px;
  }
  .footer-col {
    margin-bottom: 4px;
    padding: 3px 0;
  }
}
.hero-slideshow {
  position: relative;
  width: 100%;
  max-width: 540px;
  min-width: 0;
  height: auto;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 22px #d2eaf640;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
  display: block;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
  position: relative;
}

@media (max-width: 900px) {
  .footer-cols {
    flex-direction: column;
    align-items: flex-start; /* Stack columns, do not stretch vertically */
    gap: 0;
    padding: 0 8px 8px 8px;
    max-width: 100vw;
  }
  .footer-col {
    max-width: 100%;
    /* Remove flex: 1 or min-height for mobile */
    flex: unset;
    min-width: 0;
    margin-bottom: 16px;
    padding: 6px 0;
  }
}
