/* =============================================
   MARUTI SENA CHARITABLE TRUST - MAIN STYLES
   Light, grounded layout with flat surfaces.
============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
  --primary: #237227;
  --secondary: #519A66;
  --accent: #FFAA00;
  --highlight: #FFD786;
  --ink: #17251a;
  --muted: #5a6f5d;
  --line: #d8e6d7;
  --paper: #ffffff;
  --soft: #f5fbf2;
  --warm: #fff8ea;
  --deep: #173d1a;
  --radius: 4px;
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  padding-top: 94px;
}

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: 0; }

a { text-decoration: none; color: inherit; }

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

.section-pad { padding: 76px 0; }

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  color: var(--deep);
  display: inline-block;
  margin-bottom: 0.65rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.25rem;
}

.bg-light-green { background-color: var(--soft); }
.accent-text { color: #b87800; }
.text-accent { color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }

.btn {
  border-radius: var(--radius);
  font-weight: 600;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid #d89100;
  padding: 11px 28px;
  transition: var(--transition);
}

.btn-accent:hover {
  background: #e69900;
  border-color: #c88400;
  color: var(--ink);
}

.btn-outline-accent {
  border: 1px solid #c98300;
  color: #8b5b00;
  padding: 10px 26px;
  background: transparent;
  transition: var(--transition);
}

.btn-outline-accent:hover {
  background: var(--warm);
  color: var(--ink);
  border-color: var(--accent);
}

/* Navbar */
#mainNav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0;
  min-height: 94px;
  transition: var(--transition);
  overflow: visible;
  z-index: 1030;
}

#mainNav.scrolled { min-height: 86px; }

#mainNav .container {
  min-height: 94px;
  align-items: center;
  overflow: visible;
}

#mainNav.scrolled .container { min-height: 86px; }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

#mainNav .brand-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(24px);
  transition: var(--transition);
}

#mainNav.scrolled .brand-logo {
  width: 104px;
  height: 104px;
  transform: translateY(20px);
}

.brand-text .brand-name {
  color: var(--deep);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.brand-text .brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-mobile-brand { display: none; }

.nav-link {
  color: var(--ink) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 12px !important;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  background: var(--soft);
}

.navbar-toggler {
  border-color: var(--line);
  border-radius: var(--radius);
  width: 58px;
  height: 48px;
  padding: 0;
}

.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='%23237227' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero */
#heroOwl {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: relative;
  min-height: 540px;
  height: calc(100vh - 96px);
  max-height: 680px;
  overflow: hidden;
  background: var(--paper);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #ffffff 0%, #ffffff 34%, rgba(255,255,255,0.92) 48%, rgba(255,255,255,0.34) 72%, rgba(255,255,255,0.08) 100%),
    linear-gradient(180deg, rgba(245,251,242,0.18), rgba(245,251,242,0.18));
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 620px;
  padding: 18px 30px 0;
  border-left: 4px solid var(--accent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--warm);
  border: 1px solid #f2cf8c;
  color: #8b5b00;
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  color: var(--deep);
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-content h1 span { color: #b87800; }

.hero-content p {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 560px;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

#heroOwl .hero-content p {
  height: 88px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#heroOwl .hero-btns {
  min-height: 48px;
  align-content: flex-start;
}

.owl-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--paper) !important;
  color: var(--primary) !important;
  width: 44px;
  height: 44px;
  border-radius: var(--radius) !important;
  font-size: 1.2rem !important;
  line-height: 1 !important;
  transition: var(--transition);
  border: 1px solid var(--line) !important;
}

.owl-carousel .owl-nav button:hover { background: var(--soft) !important; }
.owl-carousel .owl-nav .owl-prev { left: 20px; }
.owl-carousel .owl-nav .owl-next { right: 20px; }

#heroOwl .owl-dots { display: none !important; }
#heroOwl .owl-nav { margin-top: 0; }

.owl-carousel .owl-dots .owl-dot span {
  background: #c9d8ca !important;
  transition: var(--transition);
  border-radius: 2px !important;
}

.owl-carousel .owl-dots .owl-dot.active span {
  background: var(--primary) !important;
  width: 28px;
}

/* Stats */
.stats-bar {
  background: var(--warm);
  padding: 34px 0;
  border-bottom: 1px solid #f0dfbd;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 6px;
}

.stat-divider { border-left: 1px solid #eedbb1; }

/* About */
.about-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.about-img-wrap img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.about-img-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: var(--paper);
  color: var(--deep);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.88rem;
}

.about-features {
  list-style: none;
  padding: 0;
  margin: 22px 0 28px;
}

.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 0.95rem;
}

.about-features li .bi {
  color: var(--primary);
  font-size: 1.12rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Activities */
.activity-owl {
  position: relative;
  padding: 0 54px;
}

.activity-slide { height: 100%; }

.activity-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: grid;
  grid-template-rows: 230px 1fr;
  width: 100%;
}

.activity-card:hover { border-color: var(--secondary); }

.activity-image {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

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

.activity-count {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--paper);
  border: 1px solid #f0dfbd;
  border-left: 4px solid var(--accent);
  color: var(--deep);
  border-radius: var(--radius);
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.activity-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8b5b00;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.activity-icon {
  width: 38px;
  height: 38px;
  background: var(--warm);
  border: 1px solid #f0dfbd;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18rem;
  color: #b87800;
  flex-shrink: 0;
}

.activity-card-body h5 {
  color: var(--deep);
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.activity-card-body p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.activity-owl .owl-stage { display: flex; }
.activity-owl .owl-item { display: flex; }
.activity-owl .owl-item > .activity-slide {
  display: flex;
  width: 100%;
}

.activity-owl .owl-nav button {
  background: var(--paper) !important;
  border-color: var(--line) !important;
}

.activity-owl .owl-nav .owl-prev { left: 0; }
.activity-owl .owl-nav .owl-next { right: 0; }

.activity-owl .owl-dots { display: none !important; }

.activity-owl .disabled { display: none; }

/* Gallery */
.gallery-filter .btn {
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 18px;
  margin: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  transition: var(--transition);
}

.gallery-filter .btn.active,
.gallery-filter .btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--paper);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--soft);
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(23, 61, 26, 0.88);
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  transition: var(--transition);
}

.gallery-overlay span {
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
}

.gallery-item:hover img { filter: saturate(1.05); }

/* News */
.news-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.news-card:hover { border-color: var(--secondary); }

.news-card-body { padding: 22px; }

.news-date {
  font-size: 0.78rem;
  color: #8b5b00;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.news-card-body h5 {
  color: var(--deep);
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.4;
}

.news-card-body p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.read-more-link {
  color: #8b5b00;
  font-size: 0.85rem;
  font-weight: 700;
}

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

.news-tag {
  display: inline-block;
  background: var(--soft);
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.news-owl .owl-dots {
  margin-top: 24px;
  text-align: center;
}

/* Contact */
.contact-info-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 34px;
  color: var(--ink);
  height: 100%;
}

.contact-info-card h3 { color: var(--deep); margin-bottom: 18px; }
.contact-note { color: var(--muted); }

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-info-item .icon-box {
  width: 42px;
  height: 42px;
  background: var(--warm);
  border: 1px solid #f0dfbd;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  color: #b87800;
  flex-shrink: 0;
}

.contact-info-item .info-text strong {
  display: block;
  font-size: 0.78rem;
  color: var(--primary);
  text-transform: uppercase;
}

.contact-info-item .info-text span {
  font-size: 0.95rem;
  color: var(--ink);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--primary);
  font-size: 1.08rem;
  margin-right: 8px;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.social-links a:hover {
  background: var(--primary);
  color: var(--paper);
  border-color: var(--primary);
}

.contact-form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 38px 34px;
  border: 1px solid var(--line);
}

.contact-form-card h3 {
  color: var(--deep);
  margin-bottom: 24px;
}

.form-control,
.form-select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--paper);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary);
  outline: 2px solid rgba(81,154,102,0.16);
  background: var(--paper);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

/* Footer */
footer {
  background: var(--soft);
  color: var(--ink);
  padding: 56px 0 0;
  border-top: 1px solid var(--line);
}

.footer-brand { margin-bottom: 18px; }

.footer-logo {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  background: var(--warm);
  /* border: 1px solid var(--accent); */
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}

.footer-heading {
  color: var(--deep);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-bottom span { color: var(--primary); font-weight: 700; }

footer .form-control {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

/* Back to top */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--paper);
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: var(--primary);
  color: var(--paper);
  border-color: var(--primary);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.3);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.5rem;
  color: var(--paper);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lightbox-close:hover { color: var(--accent); }

@media (max-width: 991px) {
  body { padding-top: 112px; }

  #mainNav,
  #mainNav.scrolled {
    min-height: 112px;
  }

  #mainNav .container,
  #mainNav.scrolled .container {
    min-height: 112px;
  }

  #mainNav .brand-logo,
  #mainNav.scrolled .brand-logo {
    width: 86px;
    height: 86px;
    transform: none;
  }

  .nav-mobile-brand {
    display: block;
  }

  .brand-text .brand-name {
    font-size: 1.28rem;
  }

  .brand-text .brand-sub {
    font-size: 0.9rem;
  }

  .navbar-collapse {
    background: var(--paper);
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding: 12px 0 16px;
  }

  .hero-slide {
    height: 620px;
    min-height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(255,255,255,0.97), rgba(255,255,255,0.88) 56%, rgba(255,255,255,0.42));
  }

  #heroOwl .owl-nav button {
    top: 250px;
  }

  .section-pad { padding: 60px 0; }
  .contact-info-card { margin-bottom: 24px; }
}

@media (max-width: 767px) {
  body { padding-top: 104px; }

  #mainNav,
  #mainNav.scrolled {
    min-height: 104px;
  }

  #mainNav .container,
  #mainNav.scrolled .container {
    min-height: 104px;
  }

  #mainNav .brand-logo,
  #mainNav.scrolled .brand-logo {
    width: 72px;
    height: 72px;
  }

  .navbar-brand {
    gap: 10px;
    max-width: calc(100% - 78px);
  }

  .brand-text .brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .brand-text .brand-sub {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .navbar-toggler {
    width: 52px;
    height: 44px;
  }

  .hero-slide {
    height: auto;
    min-height: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .hero-slide img {
    height: 250px;
    object-position: center;
  }

  .hero-overlay {
    position: relative;
    inset: auto;
    display: block;
    background: var(--paper);
    padding: 24px 0 30px;
  }

  .hero-content {
    max-width: none;
    padding: 0 4px 0 16px;
    border-left: 4px solid var(--accent);
  }

  .hero-badge {
    max-width: 100%;
    font-size: 0.72rem;
    line-height: 1.35;
    padding: 6px 10px;
    margin-bottom: 14px;
  }

  .hero-content h1 {
    font-size: 2.08rem;
    line-height: 1.12;
    margin-bottom: 14px;
  }

  .hero-content p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
  }

  #heroOwl .hero-content p {
    height: 126px;
    -webkit-line-clamp: 5;
  }

  .hero-btns {
    display: grid;
    gap: 10px;
  }

  #heroOwl .hero-btns {
    min-height: 118px;
  }

  .hero-btns .btn {
    width: 100%;
    padding: 12px 18px;
  }

  .section-title { font-size: 1.7rem; }
  .stat-divider { border-left: none; }
  .activity-card { grid-template-rows: 210px 1fr; }
  .contact-form-card,
  .contact-info-card { padding: 28px 20px; }
  .owl-carousel .owl-nav button { display: none; }
  #heroOwl .owl-nav button { display: none !important; }
  .activity-owl { padding: 0; }
}
