/* ==========================================================================
   Jesus Tent Revival — Phoenix
   Shared stylesheet for all 4 pages (EN/ES landing + EN/ES church directory)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
  /* English theme */
  --en-primary: #006BA8;
  --en-primary-light: #38B6FF;

  /* Spanish theme */
  --es-primary: #FF751F;
  --es-primary-light: #FF751F;

  --black: #0A0A0A;
  --tab-inactive: #333333;
  --white: #FFFFFF;
  --off-white: #F4F4F4;

  --font-display: 'Fjalla One', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --max-width: 560px;
}

/* Theme switches, set via body[data-theme] */
body[data-theme="en"] {
  --primary: var(--en-primary);
  --primary-light: var(--en-primary-light);
  --btn-text: var(--white);
}

body[data-theme="es"] {
  --primary: var(--es-primary);
  --primary-light: var(--es-primary-light);
  --btn-text: var(--white);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--black);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---------- Language nav tabs ---------- */
.lang-nav {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: var(--max-width);
  margin: 0 auto;
}

.lang-nav a {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: opacity 0.15s ease;
}

.lang-nav a:hover { opacity: 0.85; }

.lang-nav a.active {
  background: var(--primary);
  color: var(--white);
}

.lang-nav a.inactive {
  background: var(--tab-inactive);
  color: var(--white);
  opacity: 0.75;
}

/* ---------- Hero (map texture background) ---------- */
.hero {
  position: relative;
  background-image: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 100%), url('../img/map-texture.jpg');
  background-size: cover;
  background-position: center top;
  padding: 25px 10px 25px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-logo {
  width: 250px;
  max-width: 46%;
}

.hero-meta {
  text-align: center;
  flex: 1;
  min-width: 160px;
  margin: 35px 0 0;
}

.hero-datetime {
  font-family: var(--font-body);
  font-weight: 600;
  font-size:  clamp(18px, 5vw, 16px);
  line-height: 1.5;
}
.hero-datetime-2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size:  clamp(21px, 5vw, 20px);
  line-height: 1.5;
}

.hero-datetime .accent { color: var(--primary-light); }

.hero-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 24px 24px 24px 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 10px;
  text-align: left;
}

.hero-location-pill svg { flex-shrink: 0; width: 16px; height: 16px; }

.hero-eyebrow {
  font-family: var(--font-display);
  color: var(--primary-light);
  font-size: clamp(31px, 1vw, 43px);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-top: 15px;
  text-transform: uppercase;
  text-align: center;
}

.hero-headline {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(55px, 1vw, 75px);
  line-height: 0.98;
  text-align: center;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- Video hero ---------- */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 55%; /* portrait-ish crop to match mock */
 /* background: #000 url('../img/hero-photo.jpg') center center / cover no-repeat; */
  overflow: hidden;
}

.video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

/* curved divider under video, matching the mock's wave */
.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}

/* ---------- Form section ---------- */
.form-section {
  background: var(--primary);
  padding: 40px 28px 48px;
}

.form-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 30px);
  text-transform: lowercase;
  color: var(--white);
  margin-bottom: 28px;
  text-align: center;
}

body[data-theme="es"] .form-heading { text-transform: none; }

.form-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.form-row label {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--white);
  width: 84px;
  flex-shrink: 0;
  text-align: right;
}

.form-row input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--white);
  color: #222;
}

.form-row input:focus,
.tally-embed-frame:focus {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}

.form-submit-wrap {
  text-align: center;
  margin-top: 30px;
}

.btn-submit {
  display: inline-block;
  background: var(--primary-light);
  color: var(--btn-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-transform: lowercase;
  padding: 15px 40px;
  border-radius: 6px;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

body[data-theme="es"] .btn-submit {
  background: var(--black);
  text-transform: none;
}

.btn-submit:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-submit:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* Placeholder note shown until real Tally embed is added */
.tally-placeholder-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin-top: 14px;
  font-style: italic;
}

/* ---------- Footer address bar + map ---------- */
.address-bar {
  background: var(--primary);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.address-bar svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--primary-light); }

.map-embed-wrap {
  width: 100%;
  height: 320px;
  background: #1a1a1a;
}

.map-embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================================================================
   Church directory pages
   ========================================================================== */

.directory-hero {
  background: var(--black);
  background-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 100%), url('../img/map-texture.jpg');
  background-size: cover;
  background-position: center top;
  padding: 40px 24px 8px;
}

.directory-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 9.5vw, 48px);
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.directory-subtitle {
  font-family: var(--font-display);
  font-size: clamp(18px, 5vw, 24px);
  color: var(--primary-light);
  text-transform: uppercase;
  margin-top: 6px;
  line-height: 1.2;
}

.church-list {
  list-style: none;
  padding: 28px 24px 8px;
  background: var(--black);
}

.church-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.church-item:first-child { padding-top: 0; }

.church-pin {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--primary-light);
  margin-top: 2px;
}

.church-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  color: var(--white);
  margin-bottom: 3px;
}

.church-address {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 5px;
}

.church-links {
  font-size: 13px;
  font-weight: 600;
}

.church-links a {
  color: var(--primary-light);
}

.church-links a:hover { text-decoration: underline; }

.church-links .sep {
  color: rgba(255,255,255,0.4);
  margin: 0 6px;
}

.directory-cta-list {
  padding: 20px 24px 44px;
  background: var(--black);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.directory-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
}

.directory-cta .arrow {
  color: var(--primary-light);
  font-size: 18px;
  flex-shrink: 0;
}

.directory-cta.alt .arrow { color: var(--es-primary); }

.directory-cta:hover { text-decoration: underline; }

/* ---------- Focus visibility (accessibility floor) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-submit { transition: none; }
}

/* ---------- Small phones ---------- */
@media (max-width: 360px) {
  .form-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .form-row label { width: auto; text-align: left; }
}

/* ---------- Larger screens: keep the mobile layout centered as a card ---------- */
@media (min-width: 640px) {
  body { background: #050505; }
  .page { box-shadow: 0 0 60px rgba(0,0,0,0.6); }
}