/* ===============================
   BASE
================================ */
body {
  background-color: #f8f9fa;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  font-size: 18px;
  margin: 0;
  padding: 0;
}

/* ===============================
   NAVBAR OFFSET (ANCHORS ONLY)
================================ */
:root {
  --nav-offset: 64px;
}

section[id] {
  scroll-margin-top: var(--nav-offset);
}

@media (max-width: 768px) {
  :root {
    --nav-offset: 56px;
  }
}

/* ===============================
   NAVBAR
================================ */
.navbar {
  background-color: #1e3a5f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  min-height: 64px;
}

.navbar-brand {
  font-size: 1rem;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: 5px;
}

.brand-title {
  font-size: 1.1rem;
}

.brand-tagline {
  font-size: 0.75rem;
  opacity: 0.9;
}

.navbar-nav .nav-link {
  font-size: 0.95rem;
  position: relative; /* underline animation-ийг холбоос бүрийн доор байрлуулна */
}

@media (max-width: 768px) {
  .brand-logo {
    height: 30px;
  }
}

/* Нэвтэрсэн үед WordPress admin bar navbar-ыг дарахгүй */
.admin-bar .navbar.fixed-top {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .navbar.fixed-top {
    top: 46px;
  }
}

/* ===============================
   HERO / HOME
================================ */
#home,
.page-wrap {
  margin-top: 64px; /* ONLY navbar compensation */
}

@media (max-width: 768px) {
  #home,
  .page-wrap {
    margin-top: 56px;
  }
}

.hero,
.cover-slideshow-wrapper,
.cover-slideshow-wrapper .carousel,
.cover-slideshow-wrapper .carousel-inner {
  margin: 0;
  padding: 0;
}

/* Hero Images */
.cover-slide-img {
  width: 100%;
  height: calc(100vh - 64px);
  min-height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 992px) {
  .cover-slide-img {
    height: calc(100vh - 64px);
    min-height: 720px;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .cover-slide-img {
    height: 78vh;
    min-height: 560px;
  }
}

/* Слайд оруулаагүй үеийн hero */
.hero-empty {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  background: #1e3a5f;
  color: #fff;
  text-align: center;
}

/* ===============================
   HERO CAPTION
================================ */
.hero .carousel-caption {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 980px;
  margin: auto;
}

.hero .carousel-caption h1 {
  font-size: 3rem;
  margin-bottom: 14px;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-caption .hero-goal-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

@media (max-width: 768px) {
  .hero .carousel-caption {
    padding: 16px;
    max-width: calc(100% - 24px);
  }

  .hero .carousel-caption h1 {
    font-size: 1.7rem;
  }

  .hero-caption .hero-goal-text {
    font-size: 1.05rem;
  }
}

/* ===============================
   SECTIONS
================================ */
.section-padding {
  padding: 60px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  padding-bottom: 20px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* ===============================
   INFO CARDS
================================ */
.info-card {
  background: #fff;
  border-radius: 15px;
  padding: 28px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.info-card h4 {
  font-weight: 600;
  margin-bottom: 12px;
  color: #0d6efd;
}

.info-card p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===============================
   ACTIVITY CARDS
================================ */
.activity-card {
  background: #fff;
  border-radius: 15px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100%;
  overflow: hidden;
}

.activity-image-wrapper {
  height: 280px;
  overflow: hidden;
  background: #f8f9fa;
}

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

.activity-content {
  padding: 22px;
}

.activity-content h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.activity-content p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* Хэд хэдэн догол мөртэй үед хооронд нь зай үлдээнэ */
.activity-content p + p {
  margin-top: 0.5rem;
}

.num-badge {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.num-badge-lg {
  width: 36px;
  height: 36px;
  font-size: 1.05rem;
}

/* Зорилтын картууд */
.goal-badge {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  font-weight: bold;
}

.goal-title {
  color: #2c3e50;
  font-weight: 600;
}

.goal-text {
  color: #666;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .activity-image-wrapper {
    height: 220px;
  }

  .activity-content {
    padding: 18px;
  }
}

/* ===============================
   BRANCH PREVIEW
================================ */
.branch-preview {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.branch-preview::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

/* ===============================
   FOOTER
================================ */
.site-footer {
  background-color: #1e3a5f;
  padding: 60px 0 20px;
  color: #fff;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-logo {
  max-width: 120px;
  height: auto;
  border-radius: 10px;
}

/* ===============================
   RESPONSIVE TEXT
================================ */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ===============================
   ANIMATIONS
================================ */

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero animations */
.hero h1 {
  animation: fadeInUp 1s ease forwards;
}

.hero .hero-goal-text {
  animation: fadeInUp 1.2s ease forwards;
}

/* Card hover lift (kept subtle) */
.info-card,
.activity-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover,
.activity-card:hover {
  transform: translateY(-6px);
}

/* Navbar link underline animation (restore) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
}
