/* ============================================================
   Youth Ministry Planner — theme tokens
   These variables mirror theme.csv (group,token,value).
   Edit theme.csv as the reference, then update values here.
   ============================================================ */
:root {
  /* brand */
  --brand-navy: #16294f;
  --brand-blue: #5b5bd6;
  --brand-cyan: #2fb8d6;
  --brand-purple: #8a4fc9;
  --brand-green: #8dc63f;
  --brand-red: #f2594b;
  /* menu */
  --menu-bg: #ffffff;
  --menu-text: #16294f;
  --menu-hover: #5b5bd6;
  --menu-login-bg: #7b7bdc;
  --menu-login-bg2: #5b5bd6;
  --menu-login-text: #ffffff;
  --menu-logo-badge-bg: rgba(255, 255, 255, 0.85);
  --menu-logo-badge-shadow: 0 2px 10px rgba(22, 41, 79, 0.18);
  /* hero */
  --hero-grad-1: #ecdcef;
  --hero-grad-2: #dde6f4;
  --hero-grad-3: #d9efe6;
  --hero-grad-4: #f6ecdd;
  --hero-heading: #111827;
  --hero-accent: #5b5bd6;
  /* buttons */
  --btn-primary-bg: #7b7bdc;
  --btn-primary-bg2: #5b5bd6;
  --btn-primary-text: #ffffff;
  --btn-radius: 999px;
  /* carousel */
  --carousel-bg: #f4f6fb;
  --carousel-dot: #c3c9dd;
  --carousel-dot-active: #5b5bd6;
  /* footer */
  --footer-bg: #383c44;
  --footer-text: #dfe5f2;
  --footer-link: #9fd8e8;
  /* page */
  --page-bg: #ffffff;
  --page-text: #1f2937;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(22, 41, 79, 0.12);
  /* showcase (gif cards section) */
  --showcase-grad-1: #111827;
  --showcase-grad-2: #172554;
  --showcase-grad-3: #3730a3;
  --showcase-gradient: linear-gradient(135deg, var(--showcase-grad-1), var(--showcase-grad-2) 58%, var(--showcase-grad-3));
  /* layout */
  --nav-height: 64px; /* real rendered navbar height: 0.6rem padding (19.2px) + 44px logo; matches the literal 64px used in .page-hero's min-height calc below */
  /* pricing */
  --pricing-bg: #172554;
  --price-card-border: #8dc63f;
  --price-heading-accent: #5b5bd6;
  --price-figure-accent: #6b7fcf;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--page-text);
  background: var(--page-bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-blue); }

/* ---------- Menu bar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: var(--menu-bg);
  box-shadow: 0 2px 10px rgba(22, 41, 79, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* On the landing page, the navbar floats transparently over the hero
   image until the user scrolls, then fades to solid white. */
body.home .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
}
body.home .navbar.scrolled {
  background: var(--menu-bg);
  box-shadow: 0 2px 10px rgba(22, 41, 79, 0.08);
}
body.home .navbar .nav-links a,
body.home .navbar .brand-text,
body.home .navbar .nav-toggle { text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6); }
body.home .navbar.scrolled .nav-links a,
body.home .navbar.scrolled .brand-text,
body.home .navbar.scrolled .nav-toggle { text-shadow: none; }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-brand img {
  height: 46px;
  width: 46px;
  padding: 5px;
  background: var(--menu-logo-badge-bg);
  border-radius: 10px;
  transition: box-shadow 0.3s ease;
}
/* The badge only needs its shadow to lift it off the photo/gradient hero
   behind the floating, transparent navbar. Once the navbar goes solid white
   (scrolled, or on any non-home page), the badge is white-on-white, so the
   shadow is dropped to avoid an orphaned shadow with no visible box. */
body.home .navbar:not(.scrolled) .nav-brand img {
  box-shadow: var(--menu-logo-badge-shadow);
}
.nav-brand .brand-text {
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--menu-text);
}
.nav-brand .brand-text span { color: var(--brand-blue); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--menu-text);
  font-weight: 700;
  font-size: 1.05rem;
}
.nav-links a:hover { color: var(--menu-hover); }
.nav-links a.btn-login {
  background: linear-gradient(180deg, var(--menu-login-bg), var(--menu-login-bg2));
  color: var(--menu-login-text);
  padding: 0.5rem 1.4rem;
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 12px rgba(91, 91, 214, 0.35);
}
.nav-links a.btn-login:hover { filter: brightness(1.08); color: var(--menu-login-text); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--menu-text);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    url("Images/photos/Backgrounds/Hero%20Background.jpg") center / cover no-repeat,
    linear-gradient(115deg, var(--hero-grad-1), var(--hero-grad-2) 35%, var(--hero-grad-3) 70%, var(--hero-grad-4));
  background-attachment: fixed, fixed;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}
.hero-copy { max-width: 480px; }
.hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--hero-heading);
  font-weight: 800;
}
.hero-copy h1 span { color: var(--hero-accent); }
.hero-copy p {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hero-heading);
  margin: 0 0 1.8rem;
}
.btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, var(--btn-primary-bg), var(--btn-primary-bg2));
  color: var(--btn-primary-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.85rem 3.2rem;
  border: none;
  border-radius: var(--btn-radius);
  box-shadow: 0 6px 18px rgba(91, 91, 214, 0.4);
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.hero-art { flex: 1; display: flex; justify-content: center; }
.hero-art img { max-height: 480px; width: auto; }

/* ---------- Sections ---------- */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brand-navy);
  margin: 0 0 0.5rem;
}
.section .section-sub {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 600px;
  color: #4b5563;
}

/* ---------- Showcase (animated GIF cards) ---------- */
.showcase-section {
  background: var(--showcase-gradient);
  color: #fff;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.showcase-section h2 { color: #fff; }
.showcase-section .section-sub { color: rgba(255, 255, 255, 0.75); }
.showcase-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.showcase-card {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
}
.showcase-card.reverse { flex-direction: row-reverse; }
.showcase-card .showcase-copy,
.showcase-card .showcase-media { flex: 1 1 50%; min-width: 0; }
.showcase-card h3 { margin: 0 0 0.6rem; font-size: 1.5rem; }
.showcase-card p { margin: 0; color: rgba(255, 255, 255, 0.8); }
.showcase-media {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.showcase-media img:hover { transform: scale(1.03); }
.showcase-media.missing { padding: 1.5rem; }
.showcase-media.missing span { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; line-height: 1.5; }
.showcase-media.missing code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* ---------- Carousel ---------- */
.carousel-section { background: var(--carousel-bg); }
.carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  background: var(--card-bg);
}
.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}
.carousel-slide {
  min-width: 100%;
  padding: 1.2rem 1.5rem;
  text-align: center;
}
.carousel-slide img {
  margin: 0 auto 1rem;
  max-height: 260px;
  width: auto;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.carousel-slide img:hover { transform: scale(1.03); }
.carousel-slide h3 { margin: 0 0 0.3rem; color: var(--brand-navy); }
.carousel-slide p { margin: 0; color: #4b5563; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--brand-navy);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(22, 41, 79, 0.2);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--carousel-dot);
  cursor: pointer;
  padding: 0;
}
.carousel-dots button.active { background: var(--carousel-dot-active); }

/* ---------- Lightbox (enlarged carousel image) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Feature cards ---------- */
/* Trims the section's own vertical padding so the whole destination
   (heading + card grid) fits within one screen without a residual scroll. */
#features { padding-top: 2rem; padding-bottom: 2rem; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}
.feature-card .dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
}
.feature-card h3 { margin: 0 0 0.4rem; color: var(--brand-navy); }
.feature-card p { margin: 0; color: #4b5563; font-size: 0.97rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer h4 { margin: 0 0 0.6rem; color: #fff; }
.footer a { color: var(--footer-link); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  text-align: center;
  color: #9aa7c4;
}

/* ---------- Auth / simple pages ---------- */
.page-hero {
  background:
    url("Images/photos/Backgrounds/Hero%20Background.jpg") center / cover no-repeat,
    linear-gradient(115deg, var(--hero-grad-1), var(--hero-grad-2) 35%, var(--hero-grad-3) 70%, var(--hero-grad-4));
  padding: 4rem 1.5rem;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 2.2rem 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.card h1 { margin: 0 0 0.4rem; font-size: 1.6rem; color: var(--brand-navy); }
.card p.sub { margin: 0 0 1.5rem; color: #4b5563; }
.card form { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
.card label { font-weight: 600; font-size: 0.9rem; color: var(--brand-navy); }
.card input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
}
.card input:focus { outline: 2px solid var(--brand-blue); border-color: transparent; }
.card .btn-primary { width: 100%; text-align: center; margin-top: 0.4rem; }
.card .small { font-size: 0.85rem; color: #6b7280; margin-top: 1rem; }

/* ---------- Legal / content pages (terms, privacy) ---------- */
.legal-page {
  background: var(--page-bg);
  padding: 3.5rem 1.5rem 4rem;
}
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content > a.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--brand-blue);
}
.legal-content h1 {
  margin: 0 0 0.3rem;
  font-size: 2.1rem;
  color: var(--brand-navy);
}
.legal-content .legal-meta {
  margin: 0 0 2rem;
  color: #6b7280;
  font-size: 0.95rem;
}
.legal-content h2 {
  margin: 2rem 0 0.7rem;
  font-size: 1.3rem;
  color: var(--brand-navy);
}
.legal-content h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--brand-navy);
}
.legal-content p { margin: 0 0 1rem; }
.legal-content ul,
.legal-content ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-content a { color: var(--brand-blue); }
.legal-content strong { color: var(--brand-navy); }
.legal-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.93rem;
}
.legal-content th,
.legal-content td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e5e7eb;
}
.legal-content th {
  background: #f4f6fb;
  color: var(--brand-navy);
}

/* ---------- Pricing ---------- */
#pricing {
  padding-top: 2rem;
  background: var(--pricing-bg);
}
#pricing h2 { color: #fff; }
#pricing h2 .accent { color: var(--price-heading-accent); }
#pricing .section-sub { color: rgba(255, 255, 255, 0.75); }
#pricing .section-sub a { color: var(--footer-link); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
/* Frosted-glass cards (same visual language as the app's own dashboard
   tiles) but noticeably more opaque/solid than a typical glass effect so
   they still stand out clearly against the dark section background. Each
   tier gets a progressively lighter/more solid grey so Starter, Ministry,
   and Church read as a visual scale, not three identical boxes. */
.price-card {
  position: relative;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 2rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.pricing-grid .price-card:nth-child(1) { background: rgba(203, 213, 225, 0.12); }
.pricing-grid .price-card:nth-child(2) { background: rgba(203, 213, 225, 0.20); }
.pricing-grid .price-card:nth-child(3) { background: rgba(123, 132, 179, 0.3); }
.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(91, 91, 214, 0.4), 0 16px 36px rgba(91, 91, 214, 0.35), var(--card-shadow);
}
.price-card.featured {
  border: 2px solid var(--price-card-border);
  box-shadow: 0 0 0 1px var(--price-card-border), 0 16px 36px rgba(141, 198, 63, 0.25), var(--card-shadow);
}
.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--price-card-border);
  color: #16294f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.price-card .plan { font-weight: 800; color: #fff; font-size: 1.2rem; }
.price-card .price { font-size: 2.4rem; font-weight: 800; color: var(--price-figure-accent); margin: 0.5rem 0 0; }
.price-card .per { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; margin-bottom: 1.2rem; }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}
.price-card ul li { padding: 0.35rem 0 0.35rem 1.5rem; position: relative; }
.price-card ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--brand-green);
  font-weight: 800;
}

/* ---------- Tablet & Mobile: collapsed nav ---------- */
/* Wider than the mobile breakpoint below on purpose — at in-between widths
   (large phones landscape, portrait tablets) the full "Pricing / Contact /
   Log in" row plus the logo no longer fit and was clipping off-screen. */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--menu-bg);
    padding: 1rem 1.5rem 1.4rem;
    box-shadow: 0 10px 20px rgba(22, 41, 79, 0.12);
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  /* Pricing cards stack instead of squeezing into narrow columns. */
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; }
  .price-badge { font-size: 0.68rem; padding: 0.3rem 0.85rem; }
}

/* ---------- Mobile only ---------- */
@media (max-width: 760px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-copy { max-width: 100%; }
  .hero-art img { max-height: 320px; }
  .carousel-btn { width: 36px; height: 36px; }
  .showcase-card,
  .showcase-card.reverse { flex-direction: column; text-align: center; }
}

/* Fixed backgrounds are unreliable on mobile browsers (esp. iOS Safari) */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .hero { background-attachment: scroll, scroll; }
}
