/* ============================================================
   Willow Ave Church of Christ — Clean Theme (replaces Mobirise)
   ============================================================ */

:root {
  --primary:   #437d9f;
  --mission:   #689ebe;
  --white:     #ffffff;
  --black:     #000000;
  --near-white:#f7f7f7;
  --light-bg:  #f5f5f5;
  --fafafa:    #fafafa;
  --text:      #1e293b;
  --muted:     #64748b;
  --border:    #e1e1e1;

  --font-display: 'Noto Sans Thai', sans-serif;
  --font-heading: 'Archivo', sans-serif;
  --font-body:    'Poppins', sans-serif;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

a { text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Typography scale (mirrors Mobirise display-N classes) ---- */
.display-1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.3vw, 5.3rem);
  line-height: 1.05;
  font-weight: 700;
}
.display-2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 4.375rem);
  line-height: 1.15;
  font-weight: 700;
}
.display-5 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  line-height: 1.25;
  font-weight: 700;
}
.display-7 {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  line-height: 1.4;
}
.display-4 {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  line-height: 1.65;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  background: rgba(255,255,255,0.9) !important;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-nav .navbar-brand img {
  height: 48px;
  width: auto;
  border-radius: 0 !important;
}
.site-nav .nav-link {
  color: var(--primary) !important;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.9rem !important;
  transition: box-shadow 0.5s ease-out, color 0.5s ease-out;
}
.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
  box-shadow: inset 200px 0 0 0 var(--black);
  color: #f0f0f0 !important;
}
.site-nav .dropdown-menu {
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  padding: 18px 34px 22px;
  min-width: 250px;
}
@media (min-width: 992px) {
  .site-nav .dropdown-menu {
    top: auto !important;
    left: -40px !important;
  }
}
.site-nav .dropdown-item {
  color: var(--primary) !important;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
.site-nav .dropdown-item:hover {
  background: transparent;
  color: var(--black) !important;
}
.site-nav .navbar-toggler { border-color: rgba(67,125,159,0.4); }
.site-nav .btn-nav-cta {
  background: var(--primary);
  color: #fff !important;
  border-radius: 0;
  padding: 0.5rem 1.25rem !important;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.site-nav .btn-nav-cta:hover { background: #2d6a8a; }

/* Offcanvas — black bg, 35% wide on desktop */
.offcanvas {
  background: var(--black);
  color: rgba(255,255,255,0.88);
}
@media (min-width: 992px) {
  .offcanvas { width: 35% !important; }
}
.offcanvas .offcanvas-header { padding-top: 3rem; }
.offcanvas .btn-close { filter: invert(1) opacity(0.7); }
.offcanvas h3 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.offcanvas p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
}
.offcanvas .offcanvas-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
}

/* ============================================================
   HERO — full-screen Vimeo video background
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.hero-video iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);
  border: none;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.08);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  width: 100%;
  padding: 2rem 1rem;
}

/* ============================================================
   SERVICE TIMES
   ============================================================ */
.service-times {
  background: var(--light-bg);
  text-align: center;
  padding: 5rem 0;
}
.service-times-heading {
  background: linear-gradient(90deg, var(--primary) 0%, var(--mission) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: 1rem;
}
.service-times-text {
  color: var(--text);
  font-family: var(--font-heading);
}

/* ============================================================
   HAPPENING AT WILLOW
   ============================================================ */
.happening {
  background: var(--primary);
  padding: 5rem 0;
}
.happening-title {
  color: #fff;
  margin-bottom: 2rem;
}
.happening-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 991px) {
  .happening-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .happening-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

/* Card: image fills 450px tall, title overlaid, button hidden until hover */
.happening-card {
  position: relative;
  overflow: hidden;        /* clip the button that slides up */
  border-radius: 0 !important;
  display: block;
}
.happening-card-img {
  display: block;
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 0 !important;
  transition: transform 0.4s ease;
}
@media (max-width: 991px) {
  .happening-card-img { height: 300px; }
}
@media (max-width: 575px) {
  .happening-card-img { height: 200px; }
}
.happening-card:hover .happening-card-img { transform: scale(1.05); }

/* Dark gradient overlay — always present, anchored to bottom of image */
.happening-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
/* Title sits inside the gradient at the bottom */
.happening-card-title {
  position: absolute;
  bottom: 3rem; left: 0; right: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  padding: 0 1rem;
  margin: 0;
  transition: transform 0.3s ease;
  z-index: 2;
}
/* LEARN MORE button slides up from below on hover */
.happening-card-btn {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--black);
  color: #fff !important;
  text-align: center;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 3;
}
.happening-card:hover .happening-card-title {
  transform: translateY(-0.6rem);
}
.happening-card:hover .happening-card-btn {
  transform: translateY(0);
}

/* ============================================================
   BACKPACK FUNDRAISER
   ============================================================ */
.backpack-section {
  background: var(--white);
  padding: 5rem 0;
}
.wa-wrap {
  max-width: 920px;
  margin: 0 auto;
  border-radius: 0;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  background: #fff;
}
.wa-head h2 {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
}
.wa-head p { margin: 0 0 1.25rem; font-size: 1.1rem; opacity: 0.85; }
.wa-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  overflow: visible;
  background: rgba(0,0,0,0.08);
}
.wa-fill {
  height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d7ff9, #31c7a0);
  transition: width 900ms cubic-bezier(.2,.8,.2,1);
}
.wa-buddy {
  position: absolute;
  top: -10px;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6b73c, #f19000);
  box-shadow: 0 12px 22px rgba(0,0,0,.22);
  transition: left 900ms cubic-bezier(.2,.8,.2,1);
  animation: wa-bounce 2s ease-in-out infinite;
  z-index: 5;
}
.wa-buddy::before, .wa-buddy::after {
  content: ""; position: absolute; top: 6px;
  width: 6px; height: 22px; border-radius: 6px; background: rgba(0,0,0,.18);
}
.wa-buddy::before { left: -2px; }
.wa-buddy::after  { right: -2px; }
.wa-face { position: absolute; left: 8px; top: 10px; width: 18px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.55); }
.wa-face::before, .wa-face::after { content: ""; position: absolute; top: 4px; width: 3px; height: 3px; border-radius: 50%; background: rgba(0,0,0,.55); }
.wa-face::before { left: 4px; }
.wa-face::after  { right: 4px; }
.wa-mline, .wa-subline { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 0.9rem; }
.wa-subline { opacity: .85; }
.wa-cta p { font-size: 1rem; line-height: 1.65; margin-top: 1rem; }
@keyframes wa-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-5px); }
}
@media (max-width: 520px) {
  .wa-mline, .wa-subline { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   UPCOMING EVENTS
   ============================================================ */
.events-section {
  background: var(--white);
  padding: 5rem 0;
}
.events-section .section-title {
  color: var(--text);
  margin-bottom: 2.5rem;
}

/* Each event: horizontal row, separated by borders */
.event-row {
  display: flex;
  align-items: flex-start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.event-row:first-child { border-top: 1px solid var(--border); }

.event-row-img {
  flex-shrink: 0;
  width: 330px;
  height: 200px;
  object-fit: cover;
  border-radius: 0 !important;
  display: block;
  transition: transform 0.3s ease;
}
.event-row:hover .event-row-img {
  transform: translateX(8px);
}
@media (max-width: 767px) {
  .event-row { flex-direction: column; }
  .event-row-img { width: 100%; height: 200px; }
}

.event-row-body { padding-left: 40px; }
@media (max-width: 767px) {
  .event-row-body { padding-left: 0; padding-top: 1rem; }
}

/* Event name as a gray pill/badge */
.event-row-title {
  display: inline-block;
  background: var(--near-white);
  padding: 0 10px;
  letter-spacing: .05em;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.event-row-desc {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.event-row-date {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   OUR MISSION
   ============================================================ */
.mission-section {
  background: var(--mission);
  padding: 5rem 0;
}
.mission-section .section-title {
  color: #fff;
}
.mission-left-label {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
/* 2-col CSS grid for the 4 mission items */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 65px;
  column-gap: 2rem;
}
@media (max-width: 767px) {
  .mission-grid { grid-template-columns: 1fr; row-gap: 40px; }
}
.mission-item-icon {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
  color: #fff;
  fill: #fff;
  line-height: 1;
}
.mission-item-title {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}
.mission-item-text {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
}

/* ============================================================
   LEADERSHIP
   ============================================================ */
.leadership-section {
  background: var(--fafafa);
  padding: 5rem 0;
}
.leadership-section .section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-family: var(--font-display);
  color: var(--text);
}
.leader-card { display: block; }
.leader-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 0.974;
  object-fit: cover;
  border-radius: 0 !important;
}
.leader-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  text-align: left;
  padding: 25px 0 0;
}

/* ============================================================
   PRAYER REQUEST MODAL
   ============================================================ */
.modal-content { border-radius: 0; border: none; }
.modal-header { border-bottom: 1px solid #e2e8f0; }
.modal-title { font-family: var(--font-heading); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 1.5rem;
}
.site-footer h3 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.site-footer p, .site-footer li { font-size: 0.9rem; line-height: 1.7; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: rgba(255,255,255,0.65); }
.site-footer a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1.5rem; }
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.4); }
.footer-social { display: flex; gap: 1rem; align-items: center; }
.footer-icon-link {
  color: rgba(255,255,255,0.75);
  transition: color 0.15s;
  display: inline-flex;
}
.footer-icon-link:hover { color: #fff; }

/* ============================================================
   SLOT TYPEWRITER (hero animation)
   ============================================================ */
.slot-type {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-inline: 16px;
  font: 300 clamp(28px, 6vw, 72px)/1.1 var(--font-display), system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 2px 2px 5px #808080;
}
.slot-line {
  display: inline-flex;
  align-items: center;
}
.slot-prefix { margin-right: 0.25em; }
.slot-word {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
  opacity: 0;           /* JS sets to 1 after measuring */
}
@media (max-width: 480px) {
  .slot-type { font-size: clamp(22px, 8vw, 40px); }
}

/* ============================================================
   YOUTH PAGE
   ============================================================ */
.youth-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  padding: 9rem 0 5rem;
}
.youth-highlight { margin-bottom: 3rem; }
.youth-highlight img { width: 100%; object-fit: cover; border-radius: 0 !important; }
.youth-highlight-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}
.youth-highlight-body { font-size: 1rem; line-height: 1.75; color: var(--muted); }

.nav-tabs { border-bottom: 2px solid #e2e8f0; gap: 0.25rem; }
.nav-tabs .nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.75rem 1.25rem;
  border-radius: 0;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-tabs .nav-link:hover { color: var(--text); }
.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
.youth-tab-panel { display: none; }
.youth-tab-panel.active { display: block; }
.youth-tab-img-wrap { position: relative; overflow: hidden; }
.youth-tab-img-wrap img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 0 !important;
  display: block;
}
.youth-tab-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4rem 2rem 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  color: #fff;
}
.youth-tab-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.youth-tab-content-text {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.65;
  white-space: pre-line;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-width: 2px;
  border-radius: 0;
  background-size: 200% 100%;
  background-position: right center;
  transition: background-position 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}
.btn-primary {
  /* right half = normal blue; left half = white fill that slides in */
  background-image: linear-gradient(to right, #fff 50%, var(--primary) 50%);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background-position: left center;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-secondary {
  /* right half = translucent; left half = white fill */
  background-image: linear-gradient(to right, #fff 50%, rgba(255,255,255,0.15) 50%);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background-position: left center;
  border-color: #fff;
  color: var(--black);
}
.btn-warning {
  /* right half = amber; left half = dark fill */
  background-image: linear-gradient(to right, #92400e 50%, #f59e0b 50%);
  border-color: #f59e0b;
  color: #000;
}
.btn-warning:hover, .btn-warning:focus-visible {
  background-position: left center;
  border-color: #92400e;
  color: #fff;
}
.btn-white {
  /* right half = white; left half = dark fill */
  background-image: linear-gradient(to right, var(--black) 50%, #fff 50%);
  border-color: #fff;
  color: var(--black);
}
.btn-white:hover, .btn-white:focus-visible {
  background-position: left center;
  border-color: var(--black);
  color: #fff;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.pt-nav { padding-top: 80px; }
