/*
Theme Name: NSI Church Theme v19
Theme URI: https://www.nsichurch.com
Author: NSI Church
Author URI: https://www.nsichurch.com
Description: NSI one-page home layout with Pastor & Leadership, photo gallery, Facebook emphasis, Midweek Boost, Giving, Ministry Leaders page, and Elementor-ready template.
Version: 26.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nsi-church
*/

:root {
  --nsi-purple: #5a2c83;
  --nsi-gold: #e4b54a;
  --nsi-dark: #1a1024;
  --nsi-light: #f7f4fb;
  --nsi-gray: #666;
  --max-width: 1100px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  background: #ffffff;
  line-height: 1.6;
}

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

a {
  color: var(--nsi-purple);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 16, 36, 0.97);
  color: #fff;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
}

.brand-logo-img,
.custom-logo {
  max-height: 52px;
  width: auto;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.brand-title-link {
  color: #f3e7ff;
  text-decoration: none;
}

.brand-text span:first-child {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #f3e7ff;
}

.brand-text span:last-child {
  font-size: 0.75rem;
  color: #cbb7ff;
}

.header-facebook .fb-top-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbd79a;
  margin-right: 1rem;
}

.header-facebook .fb-top-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: #f7f4fb;
  font-size: 0.85rem;
  font-weight: 500;
}

main {
  background: #fff;
}

section {
  padding: 3.4rem 1.25rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
}

.section-heading p {
  margin: 0;
  color: var(--nsi-gray);
  max-width: 34rem;
  font-size: 0.95rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--nsi-purple);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hero {
  background: radial-gradient(circle at top left, #7f4db8 0, #1a1024 45%, #000 100%);
  color: #fff;
}

.hero .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(247, 244, 251, 0.12);
  border: 1px solid rgba(247, 244, 251, 0.18);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5cf2a3;
}

.hero h1 {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.hero h1 span {
  color: #fbd79a;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #e4d5ff;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.8rem;
  color: #cbb7ff;
}

.hero-meta strong {
  color: #fff;
}

.hero-card {
  background: rgba(15, 9, 27, 0.9);
  border-radius: 1.5rem;
  padding: 1.4rem;
  border: 1px solid rgba(244, 227, 255, 0.16);
}

.hero-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.hero-card p {
  font-size: 0.9rem;
  color: #e4d5ff;
}

.hero-card-section {
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(117, 80, 170, 0.6);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
  font-size: 0.8rem;
}

.hero-note {
  font-size: 0.75rem;
  color: #b69cff;
}

.about-grid,
.service-grid,
.leadership-grid,
.gallery-grid,
.contact-grid,
.ministry-grid {
  display: grid;
  gap: 1.8rem;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.about-grid,
.contact-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.card,
.ministry-card {
  border-radius: 1.3rem;
  padding: 1.3rem 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  background: white;
}

.card h3,
.ministry-card h3 {
  margin-top: 0;
}

.card .muted {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nsi-gray);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.about-photo-box {
  margin: 1.5rem auto 0;
  border-radius: 1.3rem;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.leadership-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.leader-photo-box {
  border-radius: 1.1rem;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.leader-photo-box img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.gallery-item {
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.giving-card {
  text-align: left;
}

.giving-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  background: var(--nsi-purple);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.giving-button:hover {
  background: #7b42b2;
  color: #ffffff;
  text-decoration: none;
}

.giving-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--nsi-gray);
}

.contact-grid {
  align-items: flex-start;
}

/* Ministry Leaders Page */

.ministry-hero {
  background: radial-gradient(circle at top left, #7f4db8 0, #1a1024 50%, #08040d 100%);
  color: #fff;
}

.ministry-hero .section-heading p {
  color: #e4d5ff;
}

.ministry-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ministry-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ministry-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
}

.ministry-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: #ffffff;
}

.ministry-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f7f4fb, #e4d5ff);
  border: 1px dashed rgba(90,44,131,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nsi-purple);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

.ministry-facilitator {
  color: var(--nsi-purple);
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0.25rem 0 0.65rem;
}

.ministry-description {
  color: var(--nsi-gray);
  font-size: 0.92rem;
}

.site-footer {
  background: #0f0819;
  color: #c9badc;
  padding: 1.7rem 1.25rem 2.2rem;
  font-size: 0.8rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner a {
  color: #e4d5ff;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-social a {
  text-decoration: none;
}

@media (max-width: 800px) {
  .hero .section-inner,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  nav.main-nav ul {
    display: none;
  }
}


/* Mobile header fix for phones */
@media (max-width: 800px) {
  .site-header {
    position: relative;
  }

  .nav-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
  }

  .brand {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }

  .brand-logo-img,
  .custom-logo {
    max-height: 70px;
    width: auto;
  }

  .brand-text {
    display: flex;
    align-items: center;
    text-align: center;
  }

  .header-facebook {
    display: block;
    margin: 0.25rem 0;
  }

  .header-facebook .fb-top-link {
    display: inline-block;
    background: #e4b54a;
    color: #1a1024;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    margin-right: 0;
  }

  nav.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
  }

  nav.main-nav a {
    font-size: 0.78rem;
  }
}


/* V19 mobile header fix */
@media (max-width: 800px) {
  .site-header { position: relative; }
  .nav-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
  }
  .brand {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
  .brand-logo-img, .custom-logo {
    max-height: 70px;
    width: auto;
  }
  .brand-text { display: flex; align-items: center; text-align: center; }
  .header-facebook { display: block; margin: 0.25rem 0; }
  .header-facebook .fb-top-link {
    display: inline-block;
    background: #e4b54a;
    color: #1a1024;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    margin-right: 0;
  }
  nav.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
  }
  nav.main-nav a { font-size: 0.78rem; }
}


/* Staff Page */
.staff-hero {
  background: radial-gradient(circle at top left, #7f4db8 0, #1a1024 50%, #08040d 100%);
  color: #fff;
}

.staff-hero .section-heading p {
  color: #e4d5ff;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.staff-card {
  border-radius: 1.3rem;
  padding: 1.3rem 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.staff-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
}

.staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #ffffff;
}

.staff-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f7f4fb, #e4d5ff);
  border: 1px dashed rgba(90,44,131,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nsi-purple);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

.staff-role {
  color: var(--nsi-purple);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0.25rem 0 0.65rem;
}

.staff-card h3 {
  margin: 0;
}


/* Ministry page leader name emphasis */
.ministry-facilitator {
  color: var(--nsi-purple);
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 800;
  margin: 0.4rem 0 0.85rem;
  padding: 0.55rem 0.7rem;
  background: #f7f4fb;
  border-left: 5px solid var(--nsi-gold);
  border-radius: 0.55rem;
}

.ministry-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
