/* ============================================================
   KingdomERP  |  Public Site Stylesheet
   ============================================================ */

:root {
  --cos-blue:    #1a3c6e;
  --cos-gold:    #f0a500;
  --cos-light:   #f8fafc;
  --cos-dark:    #0f2044;
  --cos-text:    #333;
  --cos-muted:   #6c757d;
  --radius:      10px;
  --shadow:      0 4px 20px rgba(0,0,0,.08);
  --transition:  .25s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--cos-text);
  background: #fff;
  line-height: 1.65;
}
a { color: var(--cos-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--cos-gold); }
img { max-width: 100%; height: auto; }

/* Navbar logo — wrapper clips any oversized image; these override the global reset */
.cos-navbar .navbar-brand .logo-wrap { display:inline-flex;align-items:center;justify-content:center;height:44px;max-width:130px;overflow:hidden;flex-shrink:0; }
.cos-navbar .navbar-brand .logo-wrap img { max-height:44px !important; max-width:130px !important; width:auto !important; height:auto !important; object-fit:contain !important; }

/* ---- Navbar ---- */
.cos-navbar {
  background: var(--cos-dark);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.cos-navbar .navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: -.5px;
  max-width: 280px;          /* never crowd the nav links */
  overflow: hidden;
}
.cos-navbar .navbar-brand span { color: var(--cos-gold); flex-shrink: 1; min-width: 0; }

/* Logo image — always fits inside the navbar regardless of original size */
.cos-navbar .navbar-brand img {
  height: 40px !important;
  width: auto !important;
  max-width: 130px !important;
  object-fit: contain !important;
  display: block;
  flex-shrink: 0;
}
.cos-navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  padding: .75rem 1rem !important;
  transition: var(--transition);
}
.cos-navbar .nav-link:hover,
.cos-navbar .nav-link.active {
  color: var(--cos-gold) !important;
}
.cos-navbar .btn-give {
  background: var(--cos-gold);
  color: var(--cos-dark) !important;
  border-radius: 6px;
  font-weight: 700;
  padding: .45rem 1.2rem !important;
}
.cos-navbar .btn-give:hover { background: #d4920a; }

/* ---- Hero ---- */
.hero-section {
  min-height: 88vh;
  background: linear-gradient(135deg, var(--cos-dark) 0%, var(--cos-blue) 60%, #1e5fa8 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/cross-pattern.svg') center/cover no-repeat;
  opacity: .04;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.hero-content h1 span { color: var(--cos-gold); }
.hero-content p { font-size: 1.2rem; color: rgba(255,255,255,.82); }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: var(--cos-gold);
  border: 1px solid var(--cos-gold);
  border-radius: 50px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.btn-hero-primary {
  background: var(--cos-gold);
  color: var(--cos-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: .8rem 2rem;
  border-radius: 8px;
  border: none;
  transition: var(--transition);
}
.btn-hero-primary:hover { background: #d4920a; color: var(--cos-dark); transform: translateY(-2px); }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 2rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.4);
  transition: var(--transition);
}
.btn-hero-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

/* ---- Section headings ---- */
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--cos-dark);
  position: relative;
  display: inline-block;
}
.section-heading h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--cos-gold);
  border-radius: 2px;
  margin: .5rem auto 0;
}
.section-heading p { color: var(--cos-muted); font-size: 1.05rem; max-width: 600px; margin: 1rem auto 0; }

/* ---- Cards ---- */
.cos-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #eef0f4;
  overflow: hidden;
  transition: var(--transition);
}
.cos-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.cos-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(26,60,110,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--cos-blue);
  margin-bottom: 1rem;
}

/* ---- Stats bar ---- */
.stats-bar {
  background: var(--cos-blue);
  padding: 2.5rem 0;
}
.stat-item { text-align: center; color: #fff; }
.stat-item .stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--cos-gold);
  line-height: 1;
}
.stat-item .stat-label { font-size: .85rem; opacity: .8; text-transform: uppercase; letter-spacing: 1px; margin-top: .3rem; }

/* ---- Sermon cards ---- */
.sermon-card img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}
.sermon-card .sermon-meta { font-size: .8rem; color: var(--cos-muted); }
.sermon-card .sermon-title { font-size: 1rem; font-weight: 700; color: var(--cos-dark); margin: .4rem 0; }

/* ---- Event cards ---- */
.event-card { display: flex; gap: 1.2rem; align-items: flex-start; }
.event-date-box {
  min-width: 60px;
  text-align: center;
  background: var(--cos-blue);
  color: #fff;
  border-radius: 8px;
  padding: .5rem;
}
.event-date-box .day { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.event-date-box .mon { font-size: .7rem; text-transform: uppercase; opacity: .8; }

/* ---- Giving form ---- */
.giving-section { background: var(--cos-light); }
.giving-amount-btn {
  border: 2px solid #dee2e6;
  background: #fff;
  border-radius: 8px;
  padding: .5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.giving-amount-btn:hover, .giving-amount-btn.active {
  border-color: var(--cos-blue);
  background: var(--cos-blue);
  color: #fff;
}

/* ---- Testimonies ---- */
.testimony-card {
  background: var(--cos-light);
  border-left: 4px solid var(--cos-gold);
  border-radius: 8px;
  padding: 1.5rem;
  font-style: italic;
  color: #555;
}
.testimony-card .author { font-style: normal; font-weight: 700; color: var(--cos-dark); margin-top: 1rem; }
.testimony-card .category { font-size: .75rem; background: var(--cos-gold); color: var(--cos-dark); border-radius: 50px; padding: .15rem .7rem; font-style: normal; }

/* ---- Live badge ---- */
.live-badge {
  background: #dc3545;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 4px;
  padding: .2rem .6rem;
  letter-spacing: 1px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ---- Footer ---- */
.cos-footer {
  background: var(--cos-dark);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 2rem;
}
.cos-footer h5 { color: #fff; font-weight: 700; margin-bottom: 1.2rem; }
.cos-footer a { color: rgba(255,255,255,.65); }
.cos-footer a:hover { color: var(--cos-gold); }
.cos-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.cos-footer .social-links a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  margin-right: .4rem;
  transition: var(--transition);
}
.cos-footer .social-links a:hover { background: var(--cos-gold); color: var(--cos-dark); }

/* ---- Utilities ---- */
.bg-cos-blue   { background: var(--cos-blue) !important; }
.bg-cos-gold   { background: var(--cos-gold) !important; }
.bg-cos-dark   { background: var(--cos-dark) !important; }
.text-cos-blue { color: var(--cos-blue) !important; }
.text-cos-gold { color: var(--cos-gold) !important; }
.btn-cos       { background: var(--cos-blue); color: #fff; border: none; border-radius: 8px; font-weight: 600; padding: .6rem 1.6rem; transition: var(--transition); }
.btn-cos:hover { background: #0f2044; color: #fff; }
.btn-cos-gold  { background: var(--cos-gold); color: var(--cos-dark); border: none; border-radius: 8px; font-weight: 700; padding: .6rem 1.6rem; transition: var(--transition); }
.btn-cos-gold:hover { background: #d4920a; color: var(--cos-dark); }
.section-pad   { padding: 5rem 0; }
.section-pad-sm{ padding: 3rem 0; }
.rounded-cos   { border-radius: var(--radius); }

/* ---- Form styles ---- */
.cos-form .form-control,
.cos-form .form-select {
  border-radius: 8px;
  border: 1.5px solid #dee2e6;
  padding: .65rem 1rem;
  transition: var(--transition);
}
.cos-form .form-control:focus,
.cos-form .form-select:focus {
  border-color: var(--cos-blue);
  box-shadow: 0 0 0 .2rem rgba(26,60,110,.15);
}
.cos-form label { font-weight: 500; color: var(--cos-dark); margin-bottom: .35rem; }

/* ---- Announcement banner ---- */
.announcement-bar {
  background: var(--cos-gold);
  color: var(--cos-dark);
  font-weight: 600;
  font-size: .9rem;
  text-align: center;
  padding: .5rem;
}

/* ---- Breadcrumb ---- */
.page-header {
  background: linear-gradient(135deg, var(--cos-dark), var(--cos-blue));
  color: #fff;
  padding: 3rem 0 2rem;
}
.page-header h1 { font-weight: 800; }
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a { color: rgba(255,255,255,.7); }
.page-header .breadcrumb-item.active { color: var(--cos-gold); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { min-height: 70vh; padding: 3rem 0; }
  .stats-bar .stat-num { font-size: 1.8rem; }
  .event-card { flex-direction: column; }
}
