*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-primary: #257850;
  --green-secondary: #6CC399;
  --white: #FFFFFF;
  --black: #000000;
  --transition-speed: 0.6s;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Bellefair', serif;
  background: var(--white);
  overflow-x: hidden;
}

.page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* =========================================
      HEADER CSS 
  ========================================= */
.navbar {
  background-color: rgba(255, 255, 255, 0.5); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px); 
  border-bottom: 1px solid rgba(255, 255, 255, 0.4); 
  
  width: 100%;
  height: 80px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03); 
  z-index: 1000;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.navbar.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-container {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 50px;
  display: flex;
  align-items: center;
}

.nav-logo {
  display: block;
}

.navbar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 60px;
  list-style: none;
  margin: 0;
  padding: 0;
}

:root {
  --accent-mint: #5BC299;
}

.nav-link {
  text-decoration: none;
}

.nav-custom-font .nav-link {
  font-family: 'Abhaya Libre', serif;
  font-weight: 800;
  font-size: 18px;
  color: black !important;
  transition: all 0.3s ease;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  text-decoration: transparent underline;
}

.nav-custom-font .nav-link:hover,
.nav-custom-font .nav-link.active {
  color: var(--accent-mint) !important;
  text-decoration: underline;
  text-decoration-color: var(--accent-mint);
}


/* ===== TOP HALF: IMAGE ===== */
.image-section {
  width: 100%;
  height: 55vh; 
  position: relative;
  overflow: hidden;
  background: #1a3a28;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

.image-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
}

/* ===== NAVIGATION PROGRESS BAR ===== */
.nav-progress {
  position: absolute;
  top: 50%; 
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transform: translateY(-50%);
}

.nav-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  transition: background 0.25s ease;
  backdrop-filter: blur(4px);
  z-index: 5;
  flex-shrink: 0;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
}

.nav-track {
  width: 100%;
  max-width: 1000px;
  height: 2px;
  position: relative;
  margin: 0 auto;
}

.nav-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
}

.nav-line-fill {
  height: 100%;
  background: var(--green-secondary);
  transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.nav-points {
  position: absolute;
  inset: 0;
}

.nav-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  width: 40px;
  height: 40px;
}

.nav-point:nth-child(1) {
  left: 0%;
}

.nav-point:nth-child(2) {
  left: 33.333%;
}

.nav-point:nth-child(3) {
  left: 66.666%;
}

.nav-point:nth-child(4) {
  left: 100%;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-secondary);
  transition: all 0.35s ease;
  position: relative;
  z-index: 2;
}

.nav-point.active .nav-dot {
  background: var(--white);
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(108, 195, 153, 0.5);
}

.nav-label {
  position: absolute;
  top: 30px;
  font-family: 'Belanosima', sans-serif;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  font-size: 1.1rem;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-point.active .nav-label {
  font-size: 2.8rem;
  font-weight: 600;
  color: white;
  top: 45px;
}

/* ===== BOTTOM HALF: CONTENT ===== */
.content-section {
  width: 100%;
  height: 45vh; 
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0;
}

.slides-container {
  position: relative;
  width: 100%;
  max-width: 1100px; 
  margin: 0 auto;
  height: 100%;
}

.content-slide {
  position: absolute;
  inset: 0;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  z-index: 1;
}

.content-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  z-index: 2;
}

.text-wrapper {
  width: 100%;
  max-width: 850px; 
  border-left: 2px solid var(--green-primary);
  padding-left: 35px; /* 左侧呼吸感留白 */
  margin: 0 auto;
}

.content-title,
.content-subtitle,
.content-body {
  opacity: 0;
  transform: translateY(20px);
  /* 使用更丝滑的贝塞尔曲线，带有极其轻微的弹性回弹效果 */
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.content-title {
  font-family: 'Belanosima', sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 600;
  color: var(--green-primary);
  line-height: 1;
  margin-bottom: 12px;
}

.content-subtitle {
  font-family: 'Belanosima', sans-serif; 
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  font-weight: 600;
  color: var(--green-secondary); /* ★ 改回你原本的浅绿色 */
  letter-spacing: 0.02em;
  margin-bottom: 30px;
  position: relative; 
}

.content-subtitle::after {
  content: '';
  display: block;
  width: 45px;
  height: 2.5px;
  background-color: var(--green-secondary); /* ★ 线条也改回浅绿色 */
  margin-top: 15px; 
}

.content-body {
  width: 100%;
}

.content-body p {
  font-family: 'Bellefair', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  padding-bottom: 25px; /* 给下方细线留出空间 */
  margin-bottom: 25px; /* 与下一个段落的距离 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.content-body p:last-child {
  margin-bottom: 0;
}

.content-slide.active .content-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s; /* 标题最先出现 */
}

.content-slide.active .content-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s; /* 副标题紧随其后 */
}

.content-slide.active .content-body {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s; /* 正文最后浮现 */
}
/* ===== CHATBOT WIDGET STYLES ===== */

/* Floating Button */
#chatbot-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  overflow: hidden;
}

#chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.1);
}

#chatbot-toggle:active {
  transform: scale(0.96);
}

#chatbot-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#chatbot-toggle .bot-icon-fallback {
  font-size: 28px;
  line-height: 1;
}

/* Popup Container */
#chatbot-popup {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: 370px;
  max-height: 620px;
  background: #E6F3EB;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14), 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#chatbot-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 16px;
  background: #E6F3EB;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}

.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-header-title {
  flex: 1;
  font-family: 'Belanosima', sans-serif;
  font-size: 1.25rem;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.chat-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ff6b6b;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.chat-close-btn:hover {
  background: #e05555;
  transform: scale(1.1);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* Message Bubbles */
.msg-row {
  display: flex;
  opacity: 0;
  transform: translateY(10px);
  animation: bubbleIn 0.35s ease forwards;
}

@keyframes bubbleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-row.bot {
  justify-content: flex-start;
}

.msg-row.user {
  justify-content: flex-end;
}

.bubble {
  font-family: 'Belanosima', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  padding: 13px 18px;
  border-radius: 18px;
  max-width: 80%;
  color: #000;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-row.bot .bubble {
  background: #ffffff;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.msg-row.user .bubble {
  background: #ffffff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

/* Options Area */
.chat-options {
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: #E6F3EB;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.opt-btn {
  font-family: 'Belanosima', sans-serif;
  font-size: 0.9rem;
  color: #2b3a32;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  line-height: 1.5;
}

.opt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  background: #f4fcf7;
  border-color: #cce7d8;
}

.opt-btn:active {
  transform: translateY(0);
}

.opt-btn.back-btn {
  background: #FFE8E8;
  color: #D32F2F;
  text-align: center;
  border-radius: 50px;
  padding: 12px 28px;
  margin-top: 4px;
  border: none;
}

.opt-btn.back-btn:hover {
  background: #FFD4D4;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-grid .opt-btn {
  font-size: 0.8rem;
  padding: 10px 12px;
  text-align: center;
}

.faq-grid .opt-btn.full-width {
  grid-column: 1 / -1;
}

/* ===== Typing Indicator  ===== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 16px 20px !important;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #90a4ae;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* FOOTER */
.footer-font {
  font-family: 'Belanosima';
  font-size: 12px;
}

.footer.bg-black {
  background-color: #000000 !important;
  padding: 45px;
}

.footer-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.custom-footer-layout {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-text {
  color: #888888;
  font-size: 0.8rem;
  line-height: 1.6;
  letter-spacing: 0.3px;
  font-family: 'Belanosima', sans-serif;
  margin-bottom: 0;
}

.footer-desc {
  margin-top: 15px;
}

.footer-text p {
  margin-bottom: 3px;
}

.text-right-align {
  text-align: right;
}

.footer-text .copyright {
  margin-top: 15px;
}

.footer-links {
  margin-top: 30px;
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #888888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.social-icons {
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff !important;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-3px);
}

.social-btn i {
  font-size: 1.1rem;
}

.social-btn.wa {
  background-color: #25D366;
}

.social-btn.ig {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-btn.fb {
  background-color: #1877F2;
}

.social-icons {
  padding-top: 30px;
}

@media (max-width: 768px) {

  /* --- 1. 导航栏：Logo 左上角，汉堡菜单右上角 --- */
  .navbar-toggler {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 5px 10px !important;
    outline: none !important;
    box-shadow: none !important;
  }

  /* 1. 给图标加上丝滑的旋转过渡动画 */
  .navbar-toggler-icon {
    transition: transform 0.3s ease-in-out, background-image 0.3s ease-in-out;
  }

  /* ★ ★ 点击后弹出的小框 (悬浮在右上角) ★ ★ */
  .navbar-collapse {
    position: absolute;
    top: 65px;
    right: 5%;
    width: 150px;
    /* 限制宽度，变成精巧小框 */
    z-index: 1000;
    /* 注意：去除了这里的 background 和 padding，防止卡死收回动画 */
  }

  /* 防止 Bootstrap 原生的折叠动画在绝对定位下卡顿 */
  .navbar-collapse.collapsing {
    transition: none !important;
  }

  /* ★ ★ 真正的白色菜单框本体 ★ ★ */
  .navbar-nav {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center;
    margin: 0 !important;

    /* 核心修复：把白底、圆角、阴影和内边距移到这里 */
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px 0 !important;
  }

  .custom-footer-layout {
    flex-direction: column;
  }

  .footer-right {
    align-items: flex-start;
    text-align: left;
    margin-top: 30px;
  }

  .text-right-align {
    text-align: left;
  }

  .footer.bg-black {
    padding: 30px 20px;
  }
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-progress {
    padding: 0 20px;
    gap: 20px;
  }

  .content-slide {
    padding: 0 20px;
  }

  .nav-point.active .nav-label {
    font-size: 1.8rem;
    top: 35px;
  }
}

/* ===== 手机端响应式完美适配 ===== */
/* ===== 手机端响应式完美适配 (交界线悬浮版) ===== */
@media (max-width: 768px) {
  
  .image-section {
    overflow: visible; 
  }
  
  .bg-slide {
    clip-path: inset(0); 
  }

  .nav-progress {
    padding: 0;
    left: 0;
    right: 0;
    width: 100%;
    top: 50%; 
  }

  /* ★ 创意核心：跨界悬浮按钮 */
  .nav-arrow {
    position: absolute;
    /* 精准数学计算：父容器在 50% 的位置，往下推 27.5vh 就刚好 100% 压在图片和白底的分割线上 */
    top: 27.5vh; 
    transform: translateY(-50%);
    width: 44px; /* 稍微放大一点，跨界时更显大气 */
    height: 44px;
    font-size: 24px;
    
    background: #ffffff;
    color: var(--green-primary);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12); /* 悬浮阴影，让它像一枚实体按键一样浮在缝隙上 */
    backdrop-filter: none;
    z-index: 20;
  }

  #btn-prev {
    left: 20px; /* 往屏幕内收一点，增加精致感 */
  }

  #btn-next {
    right: 20px; 
  }

  /* ★ 修复太宽：收拢轨道，让四个点靠近 */
  .nav-track {
    width: 72%; /* 宽度从之前的 85% 缩窄到 72%，让它们不再那么散漫 */
    margin: 0 auto;
  }

  .nav-label {
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    top: 22px;
    transition: all 0.3s ease;
  }

  .nav-point.active .nav-label {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    top: 24px;
  }

  /* 调整边缘标签的偏移，让首尾文字看起来更均衡 */
  .nav-point:nth-child(1) .nav-label,
  .nav-point:nth-child(2) .nav-label,
  .nav-point:nth-child(3) .nav-label,
  .nav-point:nth-child(4) .nav-label {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
  }

  /* ★ 下方内容区：恢复正常边距，配合交界线按钮 */
  .content-section {
    height: 55vh;
    padding-bottom: 20px;
  }

  .content-slide {
    padding: 0 30px; /* 恢复普通的内边距，文字可以舒展开来 */
    justify-content: flex-start;
    padding-top: 6vh; /* 顶部多留一点点空间，避免跟交界线上方的按钮打架 */
  }

  .text-wrapper {
    padding-left: 15px;
    border-left: 2px solid var(--green-primary);
  }

  .content-title {
    font-size: 2.2rem;
    margin-bottom: 6px;
  }

  .content-subtitle {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .content-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .custom-footer-layout {
    flex-direction: column;
  }

  .footer-right {
    align-items: flex-start;
    text-align: left;
    margin-top: 30px;
  }

  .text-right-align {
    text-align: left;
  }

  .footer.bg-black {
    padding: 30px 20px;
  }

  #chatbot-popup {
    width: calc(100vw - 40px);
    right: 20px;
    bottom: 95px;
    max-height: 65vh;
  }

  #chatbot-toggle {
    right: 20px;
    bottom: 20px;
    width: 55px;
    height: 55px;
  }
}