/* =============================================
   Tent of Grace — Custom Styles
   ============================================= */

:root {
  --primary: #1D1F1E;      /* charcoal — sampled from logo */
  --primary-dark: #0f1010;
  --primary-light: #363938;
  --gold: #9E772F;         /* antique gold — sampled from logo */
  --gold-light: #c49a45;
  --cream: #FBF8F3;
  --text-dark: #1D1F1E;
  --text-muted: #6b7280;
  --section-padding: 80px 0;

  /* Brand fonts. Jost lacks Malayalam, Tamil and Devanagari, so those fall through
     to Anek (sans) and Noto Serif (serif) automatically. */
  --font-body: 'Jost', 'Anek Malayalam', 'Anek Tamil', 'Anek Devanagari', sans-serif;
  --font-heading: 'Cormorant Garamond', 'Noto Serif Malayalam', 'Noto Serif Tamil', 'Noto Serif Devanagari', serif;
  --font-caps: 'Cinzel', 'Noto Serif Malayalam', 'Noto Serif Tamil', 'Noto Serif Devanagari', serif;
  --bs-body-font-family: var(--font-body);
}

/* Base */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: #ffffff;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-variant-numeric: lining-nums;
}

/* Cormorant's default figures are old-style, so "1" looks like a Roman "I"; use lining figures */
.activity-quote, .hero-verse, .activity-title, .sermon-heading, @media (min-width: 992px) {
  .sermon-item .activity-head {
    min-height: 8.5rem;
  }
}

.sermon-table {
  margin: 0;
}

.sermon-table th {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--cream);
  width: 50%;
}

.sermon-table td {
  vertical-align: top;
  color: var(--text-muted);
  line-height: 1.7;
}

.sermon-subheading {
  font-variant-numeric: lining-nums;
}

/* Cormorant Garamond sets smaller than the old font, so headings are scaled up */
h5, .h5 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.75rem; }

/* Malayalam, Tamil and Hindi: never italic, never letter-spaced, a little larger and airier */
:lang(ml), :lang(ta), :lang(hi) {
  font-style: normal !important;
  letter-spacing: normal !important;
  line-height: 1.6;
}

/* Keep section headings clear of the fixed navbar when jumping to an anchor */
section[id] {
  scroll-margin-top: 70px;
}

/* ---- Navbar ---- */
.navbar-nav.mx-auto {
  gap: 0.25rem;
}
#mainNav {
  background-color: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  padding: 1rem 0;
}

#mainNav.scrolled,
body.nav-solid #mainNav {
  background-color: var(--primary-dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  padding: 0.5rem 0;
}

/* Phones: the opened menu gets its own dark panel so links never sit on top of the hero text.
   The bar itself stays transparent at the top of the page. */
@media (max-width: 991.98px) {
  #mainNav .navbar-collapse {
    background-color: var(--primary-dark);
    margin: 0.75rem -0.75rem 0;
    padding: 0.5rem 1.5rem 1rem;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  }
}

.navbar-logo-scroll {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mainNav.scrolled .navbar-logo-scroll,
body.nav-solid .navbar-logo-scroll {
  opacity: 1;
  pointer-events: auto;
}

.navbar-logo {
  height: 38px;
  width: auto;
}

.hero-logo {
  height: clamp(100px, 20vw, 180px);
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

.footer-logo {
  height: 80px;
  width: auto;
}

.navbar-nav .nav-link {
  white-space: nowrap;
  color: rgba(255,255,255,0.9) !important;
  font-weight: 400;
  letter-spacing: 0.3px;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
  color: var(--gold-light) !important;
}

/* ---- Hero ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero-bg-default {
  background-color: var(--primary-dark);
}

.hero-section:hover .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29,31,30,0.75) 0%, rgba(0,0,0,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 0 60px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.8;
}

.btn-primary-custom {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123,45,62,0.4);
}

.btn-outline-light {
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  transform: translateY(-2px);
}

/* ---- Sections ---- */
.section-padding {
  padding: var(--section-padding);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-label-light {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2.2rem, 4.6vw, 3rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* ---- About ---- */
.about-stat {
  border: 1px solid rgba(0,0,0,0.06);
}

.text-primary-custom {
  color: var(--primary) !important;
}

.placeholder-photo {
  background-color: var(--cream);
  height: 400px;
}

/* ---- Mission & Vision ---- */
.mission-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.mission-card-vision {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mission-card-vision h3 {
  color: #fff;
}

.mission-icon {
  color: var(--primary);
}

.mission-card-vision .mission-icon {
  color: var(--gold-light);
}

/* ---- Statement of Faith ---- */
.faith-card {
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faith-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.faith-icon {
  color: var(--primary);
}

.faith-card-link {
  color: var(--text-dark);
}

.faith-card-link .faith-icon {
  width: 28px;
  text-align: center;
}

.faith-card-link:hover {
  color: var(--text-dark);
}

.faith-arrow {
  color: var(--gold);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.faith-card-link:hover .faith-arrow {
  transform: translateX(4px);
}

.faith-more {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

.faith-more:hover {
  color: var(--primary);
}

.faith-full {
  scroll-margin-top: 90px;
}

.faith-refs {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  font-style: normal;
  color: var(--gold);
}

/* ---- Services ---- */
.service-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.service-card-featured {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(123,45,62,0.35);
}

.service-card-featured:hover {
  transform: translateY(-12px);
  box-shadow: 0 18px 50px rgba(123,45,62,0.45);
}

.service-card .service-icon {
  color: var(--primary);
}

.service-card-featured .service-icon {
  color: var(--gold-light);
}

.service-card .service-time {
  color: var(--primary);
}

.service-card-featured .service-time {
  color: var(--gold-light);
}

/* ---- Pastor ---- */
.pastor-card {
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.06);
}

.pastor-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 4px solid var(--primary);
}

.pastor-photo-placeholder {
  width: 160px;
  height: 160px;
  background-color: #e9ecef;
  border: 4px solid var(--primary);
}

/* ---- Location ---- */
.location-info {
  border: 1px solid rgba(0,0,0,0.06);
}

.map-wrapper iframe {
  display: block;
}

/* ---- Contact ---- */
.bg-primary-custom {
  background-color: var(--primary) !important;
}

.contact-item {
  border-radius: 12px;
  transition: background 0.2s;
}

.contact-item:hover {
  background: rgba(255,255,255,0.08);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.social-link:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-3px);
}

/* ---- Events ---- */
.btn-outline-primary-custom {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary-custom:hover {
  background-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Activities ---- */
.activity-head {
  background: linear-gradient(135deg, #f0dc9a 0%, #d9b657 100%);
}

.activity-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.activity-media {
  aspect-ratio: 16/9;
  background: var(--primary-dark);
}

.activity-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.activity-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sermon-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
}

.sermon-item:hover .activity-card {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.sermon-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-dark);
}

.sermon-heading:first-child {
  margin-top: 0;
}

.sermon-subheading {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold);
  margin: 1.5rem 0;
}

.sermon-notes .activity-text {
  font-size: 1.05rem;
}

.activity-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.activity-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--primary-dark);
  cursor: zoom-in;
}

.activity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.activity-photo:hover img {
  transform: scale(1.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

.activity-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-dark);
}

.activity-text {
  color: var(--text-muted);
  line-height: 1.7;
}

.activity-detail {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.activity-detail i {
  color: var(--gold);
  margin-right: 0.35rem;
}

.activity-list {
  color: var(--text-muted);
  padding-left: 1.2rem;
}

.activity-quote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-dark);
}

/* ---- Videos ---- */
.video-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.video-thumb-wrapper {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-thumb {
  opacity: 0.75;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(0,0,0,0.25);
}

.video-card:hover .video-play-btn {
  opacity: 1;
}

.video-play-btn i {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  font-size: 3rem !important;
  color: #ff0000;
}

.video-card-body {
  border-top: 1px solid rgba(0,0,0,0.06);
}

.video-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark) !important;
  line-height: 1.4;
  word-wrap: break-word;
}

.video-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Landing hero: Year of Fulfillment of Promise ---- */
.hero-promise {
  background: linear-gradient(180deg, #0b0c0c 0%, #1d1f1e 45%, #6b4f1c 80%, #c49a45 100%);
}

.hero-sun {
  position: absolute;
  left: 50%;
  bottom: -280px;
  width: min(680px, 140vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,226,150,0.85) 0%, rgba(196,154,69,0.45) 40%, transparent 70%);
  pointer-events: none;
}

.hero-year {
  font-family: var(--font-caps);
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-right: -0.15em;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  color: var(--gold-light);
}

.hero-theme {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
}

.hero-rule {
  width: 90px;
  height: 2px;
  background: #fff;
  margin: 1.4rem auto;
}

.hero-verse {
  font-family: var(--font-heading);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  opacity: 0.92;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-verse-ref {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #ffe9a8;
}

.hero-promise .btn-outline-light {
  background: rgba(15,16,16,0.45);
  border-width: 2px;
  border-radius: 50px;
  font-weight: 700;
}

.hero-promise .btn-outline-light:hover {
  background: #fff;
  color: var(--primary);
}

.hero-btn-light {
  border-radius: 50px;
  font-weight: 700;
}

/* Activities page hero */
.activities-page-hero {
  background-color: var(--primary-dark);
  position: relative;
}

.activities-page-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29,31,30,0.9) 0%, rgba(0,0,0,0.6) 100%);
}

.activities-page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  position: relative;
}

/* ---- Footer ---- */
.footer {
  background-color: #1a1a1a !important;
}

/* Nine links: tighten spacing on narrower laptops so none wrap */
@media (min-width: 992px) and (max-width: 1199px) {
  .navbar-nav .nav-link {
    font-size: 0.85rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section {
    min-height: 90vh;
  }

  .hero-bg {
    background-attachment: scroll;
  }

  .service-card-featured {
    transform: none;
  }

  .pastor-card {
    text-align: center;
  }
}

/* Names in Cinzel: capitals, tracked */
.pastor-card h3 {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
}
