/* ===================================
   CPC Lansdowne – minimal Bootstrap 5 theme overrides
   Brand: Navy #002147; Accent Gold #d4af37
   =================================== */

:root{
  --cpc-navy:#002147;
  --cpc-gold:#d4af37;
  --cpc-light:#f6f8fc;
}

html, body { height: 100%; }
body{ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* forces body to fill viewport */
}

main {
  flex: 1;
}

.navbar-brand img{
  height: 36px;
  width: auto;
}
.nav-link.active{
  font-weight: 600;
  color: var(--cpc-gold) !important;
}

.btn-cpc{
  --bs-btn-bg: var(--cpc-navy);
  --bs-btn-border-color: var(--cpc-navy);
  --bs-btn-hover-bg: #001732;
  --bs-btn-hover-border-color: #001732;
  --bs-btn-color: #fff;
}

.bg-cpc{
  background: var(--cpc-navy) !important;
  color:#fff;
}

#site-footer {
  flex-shrink: 0;
  min-height: 180px; /* roughly the height of your real footer */
  background: #0e1a33; /* same as footer background */
  border-top: 3px solid var(--cpc-gold);
}

/* === Gold bottom border for all pages === */
/* #main-header.border-bottom {
  border-bottom: 2px solid var(--cpc-gold, #d4af37) !important;
} */


/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  background: 
    linear-gradient(rgba(0, 33, 71, 0.4), rgba(0, 33, 71, 0.6)),
    url("../img/hero.webp") center/cover no-repeat;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 1rem;
  z-index: 1;
}

.hero-title {
  font-size: 7.0rem !important;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.5px;
}

.hero-subtitle {
  font-size: 3.5rem !important;
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeUp 1.2s ease-out forwards;
  animation-delay: 0.8s;
}

.hero-content {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1.2s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 992px) {
  .hero-title { font-size: 3.5rem; }
  .hero-subtitle { font-size: 1.5rem; }
}

/* ===================================
   LAYOUT & COMPONENTS
   =================================== */
.section-pad{ padding: 4rem 0; }

.footer{
  background: #0e1a33;
  color:#dfe6f5;
  border-top: 3px solid var(--cpc-gold);
}
.footer a{ color:#dfe6f5; text-decoration: none; }
.footer a:hover{ color:#fff; text-decoration: underline; }

.card-border{
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  border-radius: 0.75rem;
}

/* Utility */
.text-gold{ color: var(--cpc-gold) !important; }
.bg-light-cpc{ background: var(--cpc-light); }

#site-header,
footer.footer {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 1s ease, transform 1s ease;
}

#site-header.loaded,
footer.footer.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header-bar {
  width: 100%;
  padding-left: 1cm;
  padding-right: 1cm;
}

.navbar-nav .nav-link {
  color: #002147 !important;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--cpc-gold, #bfa544) !important;
}

/* Dropdown hover animation */
.dropdown-menu {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: block;
  visibility: hidden;
  position: absolute;
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

@media (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  .navbar .dropdown-menu {
    margin-top: 0.4rem;
  }
}

/* CPC dropdown refinement + gold underline */
.navbar .dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  margin-top: 0;
}

.navbar .dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--cpc-gold);
  border-radius: 0.5rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  min-width: 200px;
  transition: all 0.25s ease;
  z-index: 1000;
}

.dropdown-item {
  position: relative;
  color: var(--cpc-navy);
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  transition: color 0.2s ease;
}

.dropdown-item::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  bottom: 6px;
  width: 0;
  height: 2px;
  background: var(--cpc-gold);
  transition: width 0.25s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--cpc-gold);
}

.dropdown-item:hover::after,
.dropdown-item:focus::after {
  width: calc(100% - 2.5rem);
}

/* Z-index fixes */
#site-header, 
header.border-bottom {
  position: relative;
  z-index: 9999;
}

.hero { position: relative; z-index: 0; }

.navbar .dropdown-menu {
  position: absolute !important;
  z-index: 10000 !important;
  inset: auto auto auto 0 !important;
}

/* ===================================
   FOOTER ENHANCEMENTS
   =================================== */
.footer {
  background: #0e1a33;
  color: #dfe6f5;
  border-top: 3px solid var(--cpc-gold);
  width: 100%;
  position: relative;
  bottom: 0;
  left: 0;
  opacity: 0;
  transform: translateY(20px);
  animation: footerFadeUp 1s ease-out forwards;
  margin-top: 2rem;
}

@keyframes footerFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.footer a {
  color: #dfe6f5;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footer a:hover { color: var(--cpc-gold); }

.footer img {
  filter: brightness(0) invert(1);
  transition: transform 0.25s ease;
}

.footer img:hover { transform: translateY(-3px); }

body {
  padding-bottom: 0;
  margin: 0;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Small screens */
@media (max-width: 576px){
  .footer .container-fluid { gap:12px; }
}

/* === CARD HEIGHT ALIGNMENT FIX === */
.section-pad .row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch; /* all cards same height */
}

.section-pad .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.section-pad .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* aligns bottom elements evenly */
}

/* ===================================
   VERSE OF THE DAY (Responsive + Fade Fix)
   =================================== */
.verse-of-the-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  height: 100%;
  min-height: 320px; /* ensure it fills its card */
}

.verse-image-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

/* fade-in and scale animation */
.verse-image-wrapper img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(70%);
  border-radius: inherit;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.5s ease;
}


.verse-image-wrapper:hover img {
  transform: scale(1.03);
}

/* overlay styling */
.verse-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
}

.verse-text {
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.verse-reference {
  font-style: italic;
  font-size: 0.95rem;
  color: #f5d97c;
}

/* fade animation keyframes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
  .verse-image-wrapper {
    min-height: 220px;
  }
  .verse-text {
    font-size: 0.95rem;
  }
}



/* ===================================
   MODALS & FORMS
   =================================== */
.modal-dialog { margin-top: 5rem !important; }
.modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding-right: 1rem;
}

#bookingModal .modal-dialog {
  margin-top: 9rem !important;
  align-items: flex-start !important;
}

.modal-backdrop.show { background-color: rgba(0, 0, 0, 0.7); }

#bookingModal .modal-content {
  margin-top: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #bookingModal .modal-dialog { margin-top: 6rem !important; }
}

/* ===================================
   FINAL FOOTER ALIGNMENT FIX
   =================================== */
.footer-top-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Left icons */
.footer-social {
  position: absolute;
  left: 1cm;
  display: flex;
  align-items: center;
  gap: 0.7cm;
}

/* Center copyright */
.footer-copy {
  font-size: 1rem;
  color: #dfe6f5;
  white-space: nowrap;
  text-align: center;
}

/* Right-aligned Back-to-Top */
.footer-top-btn {
  position: absolute;
  right: 1cm;
  display: flex;
  align-items: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .footer-top-row {
    flex-direction: column;
    text-align: center;
  }
  .footer-social,
  .footer-top-btn {
    position: static;
    margin: 0.5rem 0;
  }
}

.project-thumb {
  width: 100%;
  max-width: 110px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.project-thumb:hover {
  transform: scale(1.05);
}
.bank-details {
  background: #f9fafc;
  border-left: 3px solid var(--cpc-gold, #d4af37);
  padding: 8px 10px;
  border-radius: 4px;
}

/* === GIVE CARD STYLING === */
.bank-details {
  background: #f9fafc;
  border-left: 3px solid var(--cpc-gold, #d4af37);
  padding: 8px 10px;
  border-radius: 4px;
}

.give-projects {
  gap: 1rem;
}

.project-thumb {
  width: 100%;
  max-width: 110px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-thumb:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.project p {
  white-space: normal; /* allows wrapping for "(Child Care)" */
  color: #002147;
  font-weight: 600;
  font-size: 0.85rem;
}

/* === GIVE NOW BUTTON (Navy + Gold Glow) === */
.btn-primary {
  background-color: #002147; /* CPC navy */
  border: 2px solid transparent;
  color: var(--cpc-gold, #d4af37);
  font-weight: 600;
  transition: all 0.35s ease;
  box-shadow: 0 0 0 rgba(212, 175, 55, 0);
}

.btn-primary:hover {
  background-color: #001732;
  color: #f9d97a;
  border-color: var(--cpc-gold, #d4af37);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}


/* Contact link color fix */
.btn-link {
  color: #002147 !important;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.btn-link:hover {
  color: var(--cpc-gold, #d4af37) !important;
  text-decoration: underline;
}

/* === Worship Card === */
.worship-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.worship-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border: 2px solid var(--cpc-gold, #d4af37);
}

.worship-bg {
  position: absolute;
  inset: 0;
  background: url("../img/church-inside.webp") center/cover no-repeat;
  opacity: 0;
  z-index: 0;
  animation: worshipFadeIn 1.2s ease forwards;
  filter: brightness(85%) contrast(105%);
}

.worship-content,
.worship-card .btn {
  z-index: 1;
}

.worship-card .card-body {
  background: transparent; /* allow background image to show */
  position: relative;
  z-index: 1;
}

/* keyframes for fade-in effect */
@keyframes worshipFadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 0.25; transform: scale(1); }
}

/* === CPC CARD GOLD GLOW HOVER EFFECT === */
.section-pad .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.section-pad .card:hover {
  transform: translateY(-4px);
  border: 2px solid var(--cpc-gold, #d4af37);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Worship card keeps subtle fade behavior */
.worship-card:hover .worship-bg {
  opacity: 0.35;
  filter: brightness(90%) contrast(110%);
  transition: opacity 0.6s ease, filter 0.6s ease;
}

/* === GOLD GLOW ANIMATION (soft inward pulse) === */
@keyframes goldGlow {
  0% {
    box-shadow: 0 0 10px rgba(212,175,55,0.3), 0 8px 20px rgba(0,0,0,0.1);
  }
  50% {
    box-shadow: 0 0 18px rgba(212,175,55,0.6), 0 8px 24px rgba(0,0,0,0.12);
  }
  100% {
    box-shadow: 0 0 10px rgba(212,175,55,0.3), 0 8px 20px rgba(0,0,0,0.1);
  }
}

/* Apply the animated pulse to hovered cards */
.section-pad .card:hover {
  transform: translateY(-4px);
  border: 2px solid var(--cpc-gold, #d4af37);
  animation: goldGlow 2.5s ease-in-out infinite;
}


/* === PLAN YOUR VISIT MODAL REFINEMENTS === */
#visitModal .modal-header {
  background: var(--cpc-navy);
  color: #fff;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  display: flex;
  align-items: center;          /* vertically center contents */
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Title sits perfectly vertical-centered */
#visitModal .modal-title {
  color: var(--cpc-gold);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin-bottom: 0;             /* remove any uneven baseline */
}

/* Gold close button styling */
#visitModal .btn-close {
  filter: brightness(0) saturate(100%) invert(74%) sepia(63%) saturate(394%) hue-rotate(18deg) brightness(94%) contrast(92%);
  opacity: 1;
  transition: all 0.25s ease;
}

#visitModal .btn-close:hover {
  filter: drop-shadow(0 0 4px rgba(212,175,55,0.9))
          brightness(0) saturate(100%) invert(74%) sepia(63%) saturate(394%) hue-rotate(18deg) brightness(94%) contrast(92%);
  transform: scale(1.1);
}

/* === Verse of the Day: Ensure image fills the box fully === */
.verse-of-the-day {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
}

.verse-image-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.verse-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
}

/* === Verse-of-the-Day Alignment Fix for Sermons Page === */
.sidebar-col .verse-of-the-day,
aside .verse-of-the-day {
  height: auto;
  min-height: 0;
}

.sidebar-col .verse-image-wrapper,
aside .verse-image-wrapper {
  height: 100%;
  min-height: 0;
}

.sidebar-col .verse-image-wrapper img,
aside .verse-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Remove the extra padding from its parent card */
.sidebar-col .card:has(.verse-of-the-day),
aside .card:has(.verse-of-the-day) {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* === Home Page (index.html) — Verse of the Day font size adjustment === */
body#index-page .verse-text {
  font-size: 1.6rem !important;   /* increased by +0.5rem */
}

body#index-page .verse-reference {
  font-size: 1.1rem !important;   /* slightly larger for balance */
}

/* === Dropdown width auto-adjust === */
.navbar .dropdown-menu {
  width: auto !important;           /* shrink to fit */
  min-width: max-content !important;/* expand for longest text */
  white-space: nowrap;              /* keep single line */
}

#contactForm textarea {
  resize: vertical;
  line-height: 1.6;
}

#charCount {
  display: block;
  text-align: right;
  margin-top: 2px;
  font-size: 0.85rem;
}

#successNote {
  font-size: 0.9rem;
  color: var(--cpc-gold, #d4af37);
  display: none;
}