:root {
  --green: #0f6a4f;
  --green-dark: #0c5a43;
  --green-soft: #e6f2ec;
  --ink: #1f2a26;
  --muted: #5f6f67;
  --sand: #f7f5f0;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(16, 48, 36, 0.08);
}

body {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background: #faf8f3;
  color: var(--ink);
}

a {
  text-decoration: none;
}

.site-header {
  background: #fffdf8;
  border-bottom: 1px solid #efe9e0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.navbar {
  padding: 0.75rem 0;
}

.navbar-toggler {
  border-color: rgba(15, 106, 79, 0.2);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 106, 79, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .nav-link {
  color: var(--ink);
  font-weight: 500;
  margin: 0 0.4rem;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: var(--green);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.brand-logo {
  height: 48px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  display: block;
}

.brand-logo--placeholder {
  height: 48px;
  width: 48px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.brand-tagline {
  font-size: 12px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.btn-donate {
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-donate:hover {
  background: var(--green-dark);
  color: #fff;
}

.hero-section {
  padding: 5rem 0 4rem;
  background: radial-gradient(circle at top, #ffffff 0%, #f1f6f1 50%, #f9f7f3 100%);
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: clamp(2.4rem, 3.2vw, 3.6rem);
  font-weight: 700;
  color: var(--green);
}

.hero-section .lead {
  color: var(--muted);
  margin: 1.5rem 0 2rem;
}

.pill-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.15rem;
  color: var(--green);
  font-weight: 700;
  background: var(--green-soft);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.prayer-bar {
  background: var(--green);
  color: #fff;
  padding: 1rem 0;
}

.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.prayer-title {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.prayer-times {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.feature-section,
.services-section,
.programs-section,
.contact-section,
.gallery-section {
  padding: 4.5rem 0;
}

.feature-card,
.service-card,
.program-card,
.contact-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.feature-card h3,
.service-card h3,
.program-card h3,
.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1rem;
}

.feature-card p,
.service-card p,
.program-card p,
.contact-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.pill-red {
  background: #e85d5d;
}

.pill-green {
  background: #1a8f5f;
}

.pill-blue {
  background: #3b7ddd;
}

.pill-purple {
  background: #7a5ed8;
}

.about-section {
  padding: 4.5rem 0;
}

.about-illustration {
  min-height: 320px;
  border-radius: 26px;
  background: linear-gradient(135deg, #d9e8df, #f3f5f1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow);
}

.about-illustration i {
  font-size: 4rem;
  color: #7fa696;
}

.service-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: var(--green);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.service-badge span {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
}

.checklist li {
  margin-bottom: 0.6rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.checklist i {
  color: var(--green);
  margin-top: 0.2rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.section-heading.centered {
  flex-direction: column;
  text-align: center;
}

.section-heading.centered p {
  max-width: 640px;
  color: var(--muted);
}

.section-heading.spaced {
  align-items: flex-start;
}

.section-heading .btn-link {
  color: var(--green);
  font-weight: 600;
}

.program-card {
  border: 1px solid #eef0ea;
}

.program-tag {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pill-yellow {
  background: #ffe9b0;
  color: #a46b00;
}

.pill-gold {
  background: #ffe1a8;
  color: #996400;
}

.program-meta {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.donate-banner {
  background: var(--green);
  color: #fff;
  padding: 3.5rem 0;
}

.donate-inner {
  max-width: 720px;
  margin: 0 auto;
}

.donate-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.donate-input {
  max-width: 220px;
  border-radius: 999px;
}

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

.contact-card i {
  font-size: 1.6rem;
  color: var(--green);
  margin-bottom: 0.6rem;
}

.gallery-tile {
  background: linear-gradient(135deg, #eef4f1, #fbfaf7);
  border-radius: 16px;
  min-height: 140px;
  border: 1px dashed rgba(15, 106, 79, 0.2);
}

.gallery-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
  border: 1px solid #eef0ea;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(16, 48, 36, 0.14);
  border-color: rgba(15, 106, 79, 0.25);
}

.gallery-card-media {
  aspect-ratio: 4 / 3;
  background: #f2f5f1;
  overflow: hidden;
}

.gallery-card-media.gallery-openable {
  cursor: pointer;
}

.gallery-card-media img,
.gallery-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-body {
  padding: 0.9rem 1rem 1rem;
}

.gallery-card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.gallery-card-body p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.gallery-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
}

.ba-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

.ba-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.ba-after-wrap {
  position: absolute;
  inset: 0 0 0 auto;
  width: 50%;
  overflow: hidden;
}

.ba-after-wrap .ba-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: right center;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #fff;
  color: var(--green);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ba-tag {
  position: absolute;
  bottom: 10px;
  z-index: 2;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 12px;
}

.ba-tag-before {
  left: 10px;
}

.ba-tag-after {
  right: 10px;
}

.gallery-split {
  position: relative;
  overflow: hidden;
}

.gallery-split-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green);
}

.gallery-preview-modal .modal-dialog {
  max-width: 1120px;
}

.gallery-preview-modal .modal-content {
  border-radius: 14px;
  overflow: hidden;
}

.gallery-preview-frame {
  border: 1px solid rgba(15, 106, 79, 0.2);
  border-radius: 12px;
  background: #0b0b0b;
  overflow: hidden;
}

.gallery-preview-frame img,
.gallery-preview-frame video {
  width: 100%;
  height: 70vh;
  object-fit: contain;
  display: block;
  background: #000;
}

.gallery-preview-frame .gallery-before-after img {
  height: 70vh;
  object-fit: cover;
}

.gallery-preview-meta {
  color: var(--muted);
}

.gallery-filter-wrap {
  background: #ffffff;
  border: 1px solid rgba(15, 106, 79, 0.14);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(16, 48, 36, 0.06);
}

.gallery-filter-pill {
  border: 1px solid rgba(15, 106, 79, 0.35);
  color: var(--green);
  background: #f7fbf9;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-weight: 600;
  line-height: 1.1;
  transition: all 0.15s ease;
}

.gallery-filter-pill:hover {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.gallery-filter-pill.is-active {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 6px 14px rgba(15, 106, 79, 0.25);
}

.site-footer {
  background: #f3f4f1;
  color: var(--muted);
  padding: 3rem 0 2rem;
}

.site-footer h4,
.site-footer strong {
  color: var(--ink);
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--green);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e4e2dc;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 991px) {
  .navbar .nav-link {
    margin: 0.2rem 0;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .brand-logo {
    height: 36px;
    max-width: 60px;
  }

  .brand-logo--placeholder {
    height: 36px;
    width: 36px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-tagline {
    font-size: 11px;
    max-width: 160px;
  }

  .prayer-times {
    gap: 0.8rem;
    font-size: 0.85rem;
  }

  .donate-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-preview-frame img,
  .gallery-preview-frame video {
    height: 48vh;
  }

  .gallery-preview-frame .gallery-before-after img {
    height: 48vh;
  }
}

@media (max-width: 420px) {
  .brand-tagline {
    display: none;
  }
}
