/* Self-hosted fonts (replaces Google Fonts CDN) */
@font-face {
  font-family: 'Oswald';
  src: url('fonts/oswald-v57-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('fonts/oswald-v57-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('fonts/oswald-v57-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('fonts/oswald-v57-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-v31-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-v31-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-v31-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-v31-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-v31-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #9BCB6C; /* Green accent from the original site */
  --text-dark: #1D1E21;
  --text-light: #FFFFFF;
  --bg-light: #FFFFFF;
  --bg-gray: #F5F7FA;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-dark);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

header.scrolled {
  padding: 10px 5%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-links li a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
}

.nav-links li a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links li a:not(.btn):hover::after {
  width: 100%;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: inherit;
  padding: 8px 4px;
  line-height: 1;
  position: relative;
}

.dropdown-arrow {
  font-size: 0.7em;
  transition: var(--transition);
}

.dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.dropdown-toggle:hover::after,
.dropdown-toggle.section-active::after {
  width: 100%;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-light);
  min-width: 200px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  padding: 10px 0;
  border-radius: 4px;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu li a {
  display: block !important;
  padding: 10px 20px !important;
  font-size: 0.95rem !important;
  font-family: var(--font-body) !important;
  text-transform: none;
}

.dropdown-menu li a::after {
  display: none !important;
}

.dropdown-menu li a:hover {
  background-color: var(--bg-gray);
  color: var(--primary-color) !important;
}

/* Current page indicator */
.nav-links li a.current-page::after {
  width: 100%;
}

.dropdown-menu li a.current-page {
  background-color: var(--bg-gray);
  color: var(--primary-color) !important;
  font-weight: 600;
}

.nav-links li a.btn.current-page::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  /* min-height: 100vh is a fallback for browsers that don't support the
     newer viewport units below. On iOS Safari specifically, 100vh is
     measured as the *tallest* possible viewport (address bar hidden),
     which is taller than what's actually visible on load — that's what
     was clipping the top of the heading and the bottom button. 100svh
     ("small" viewport height) always matches the *shortest*/most
     conservative visible area, so centered content never overflows
     past what the visitor can actually see. */
  min-height: 100vh;
  min-height: 100svh;
  background: linear-gradient(rgba(29, 30, 33, 0.7), rgba(29, 30, 33, 0.7)), url('images/hero.webp') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--text-light);
  padding: 130px 20px 60px;
  position: relative;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  animation: fadeUp 1s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

/* For hero banners using a people-photo background where faces sit near
   the top of the crop, push the title down to the lower third instead
   of dead-center, so it doesn't sit over anyone's face. */
.hero-bottom-align {
  justify-content: flex-end;
  padding-bottom: 50px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin-bottom: 40px;
  animation: fadeUp 1s ease 0.3s forwards;
  opacity: 0;
  transform: translateY(30px);
  font-weight: 300;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  animation: fadeUp 1s ease 0.6s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-btns a.btn-outline:hover {
  background-color: white;
  color: var(--text-dark) !important;
}

/* Sections */
section {
  padding: 100px 5%;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.section-header .divider, .divider {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
}

/* Service Times */
.service-times {
  background-color: var(--bg-gray);
  text-align: center;
}

.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.time-card {
  background-color: var(--bg-light);
  padding: 50px 30px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.time-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.time-card h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.time-card p {
  font-size: 1.1rem;
  font-weight: 600;
}

.time-card span {
  display: block;
  font-size: 0.95rem;
  color: #666;
  margin-top: 15px;
  font-weight: 400;
}

/* Equipping & Serving */
.equipping {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.equipping-img {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.equipping-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s ease;
}

.equipping-img:hover img {
  transform: scale(1.05);
}

.equipping-content {
  flex: 1;
}

.equipping-content h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.equipping-content p {
  margin-bottom: 25px;
  font-size: 1.1rem;
  color: #444;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.watch-card .btn-group {
  flex-direction: column;
  align-items: center;
}

.equipping-content .btn-group {
  display: flex;
  gap: 15px;
}

/* CTA Section */
.cta {
  background: linear-gradient(rgba(29, 30, 33, 0.85), rgba(29, 30, 33, 0.85)), url('images/hero.webp') no-repeat center center/cover;
  background-attachment: fixed;
  text-align: center;
  color: var(--text-light);
  padding: 120px 20px;
}

.cta h2 {
  font-size: 3.5rem;
  margin-bottom: 25px;
}

.cta p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 700px;
  margin-inline: auto;
  font-weight: 300;
}

.cta .btn:hover {
  background-color: white;
  color: var(--text-dark);
  border-color: white;
}

/* Visit Form */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--bg-gray);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background-color: var(--bg-gray);
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-light);
}

.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--bg-gray);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background-color: var(--bg-gray);
  transition: var(--transition);
}

.form-group textarea {
  resize: vertical;
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-light);
}

/* Sunday School Class Cards */
.class-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.class-card {
  display: block;
  flex: 0 0 280px;
  width: 280px;
  background-color: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.class-card:hover {
  transform: translateY(-8px);
  border-bottom-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.class-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.class-card-body {
  padding: 18px 20px;
}

.class-card-body h3 {
  font-size: 1.15rem;
  color: var(--text-dark);
}

/* Footer */
footer {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 80px 5% 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto 50px;
}

.footer-col h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-col p, .footer-col a {
  color: #ccc;
  margin-bottom: 12px;
  display: block;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #999999;
  font-size: 0.9rem;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (min-width: 993px) {
  .equipping-reverse {
    flex-direction: row-reverse;
  }
}

@media (max-width: 992px) {
  .equipping {
    flex-direction: column;
    text-align: center;
  }
  
  .equipping-content .divider {
    margin: 0 auto 20px !important;
  }
  
  .equipping-content .btn-group {
    justify-content: center;
  }
}

/* Nav switches to the hamburger menu earlier (1100px) so the links never
   get squished in the mid-size/tablet range before hitting true mobile. */
@media (max-width: 1100px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    background-color: var(--bg-light);
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background-color: rgba(0,0,0,0.03);
    padding: 0;
    margin-top: 10px;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-toggle {
    padding: 12px 16px;
    font-size: 1.2rem;
  }
  
  .dropdown-menu li a {
    text-align: center;
    padding: 15px !important;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
  
  .hero-btns .btn {
    width: 100%;
  }
  
  .section-header h2 {
    font-size: 2.2rem;
  }
  
  .cta h2 {
    font-size: 2.5rem;
  }
}

/* Tighter fit for small phones (iPhone SE/mini, small Android devices)
   so the hero and section stacking don't feel oversized on short,
   narrow screens. */
@media (max-width: 480px) {
  .hero {
    padding: 110px 16px 50px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  section {
    padding: 60px 5%;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.9rem;
  }
}
