:root {
  --bg-gradient-start: #26744E;
  --bg-gradient-end: #204C34;
  --light-green-bg: #e9f2e1;
  --text-black: #000000;
  --btn-color: #257850;
  --accent-mint: #5BC299;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  overflow-x: hidden;
  font-family: 'Bellefair', serif;
  background-color: var(--light-green-bg);
  scroll-behavior: smooth;
}

/* --- Navbar --- */
.navbar {
  background-color: transparent;
  width: 100%;
  height: 80px;
  box-shadow: none;
  z-index: 1000;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.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;
}

.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);
}

/* --- Intro Section --- */
#intro-section {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: linear-gradient(to bottom right, var(--bg-gradient-start), var(--bg-gradient-end));
}

.dark-layer-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 2s cubic-bezier(0.65, 0, 0.35, 1);
}

.dark-layer-content.lift {
  transform: translateY(-24vh);
}

.intro-text-wrapper {
  text-align: center;
  color: var(--text-black);
}

.intro-text-wrapper h1 {
  font-family: 'Belanosima', sans-serif;
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: 8px;
  margin-bottom: 20px;
  color: #ffffff;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: #ffffff;
  margin: 0 auto 30px auto;
  opacity: 0.8;
}

.intro-text-wrapper p {
  font-family: 'Bellefair', serif;
  font-weight: 100;
  font-size: 1.4rem;
  line-height: 1.6;
  opacity: 0.8;
  color: #c1c1c1;
}

.light-dome {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48vh;
  background-color: var(--light-green-bg);
  border-top-left-radius: 50% 120px;
  border-top-right-radius: 50% 120px;
  transform: translateY(100%);
  transition: transform 2s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15vw;
  padding-top: 60px;
  z-index: 10;
}

.light-dome.reveal {
  transform: translateY(0);
}

.info-block {
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.info-block img {
  width: 40px;
  height: 40px;
  margin-bottom: 15px;
  object-fit: contain;
}

.info-block h3 {
  font-family: 'Abhaya Libre', serif;
  font-weight: 800;
  color: var(--text-black);
  font-size: 1.4rem;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.info-block p {
  font-family: 'Bellefair', serif;
  color: var(--text-black);
  opacity: 0.7;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.light-dome.reveal .info-block {
  opacity: 1;
  transform: translateY(0);
}

.light-dome.reveal .info-block:nth-child(1) { transition-delay: 0.6s; }
.light-dome.reveal .info-block:nth-child(2) { transition-delay: 0.8s; }

/* --- Form Section --- */
#form-section {
  min-height: 100vh;
  width: 100vw;
  background-color: var(--light-green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-radius: 40px;
  padding: 60px;
  width: 90%;
  max-width: 1200px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.02),
    0 20px 50px rgba(37, 120, 80, 0.06); 
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.form-flex-container {
  display: flex;
  gap: 50px;
  align-items: center;
}

.form-left-col {
  flex: 1.2;
  background: #ffffff;
  border-radius: 30px;
  padding: 50px 45px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
  border-left: 16px solid #257850;
}

.form-right-col {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-heading {
  font-family: 'Abhaya Libre', serif;
  font-weight: 800;
  color: #000000;
  font-size: 2.2rem;
  line-height: 1.4;
  margin-bottom: 35px;
}

.form-group {
  margin-bottom: 35px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: 'Bellefair', serif;
  font-size: 1.1rem;
  color: #257850;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid #257850;
  border-radius: 0;
  padding: 8px 0;
  font-family: 'Bellefair', serif;
  font-size: 1.1rem;
  color: #000000;
  box-shadow: none;
  outline: none;
  transition: border-bottom-color 0.3s ease;
}

.form-group textarea {
  height: 130px;
  resize: none;
}

.submit-btn {
  background-color: #257850;
  color: #ffffff;
  font-family: 'Abhaya Libre', serif;
  font-weight: 800;
  font-size: 1.2rem;
  padding: 14px 55px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.4s ease;
  letter-spacing: 0.05em;
  align-self: flex-start;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 120, 80, 0.3);
  filter: brightness(1.1);
}

/* --- Footer --- */
.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; padding-top: 30px; }
.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.fb { background-color: #1877F2; }

/* --- Chatbot Widget Styles --- */
#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-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;
}

.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); }

.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; }

.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); }

.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 { 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; } }

/* --- 响应式媒体查询 (合并与清理优化版) --- */
@media (max-width: 991px) {
  .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;
  }

  .navbar-toggler-icon {
    transition: transform 0.3s ease-in-out;
  }

  .navbar-collapse {
    position: absolute;
    top: 65px;
    right: 5%;
    width: 150px;
    z-index: 1000;
  }

  .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;
  }
}

@media (max-width: 768px) {
  .intro-text-wrapper h1 {
    font-size: 2.5rem;
    letter-spacing: 4px;
  }

  .intro-text-wrapper p {
    font-size: 1.1rem;
    padding: 0 20px;
  }

  .dark-layer-content.lift {
    transform: translateY(-12vh);
  }

  .light-dome {
    height: auto;
    min-height: 40vh; 
    flex-direction: column;
    gap: 25px;    
    padding: 30px 20px 40px 20px; 
    border-top-left-radius: 50% 40px;
    border-top-right-radius: 50% 40px;
  }

  .info-block img {
    width: 35px;
    height: 35px;
    margin-bottom: 10px;
  }

  .info-block h3 { font-size: 1.2rem; }
  .info-block p { font-size: 1rem; }

  #form-section {
    padding: 15px 10px 60px 10px; 
  }

  .glass-panel {
    padding: 30px 20px;
    border-radius: 25px;
    width: 100%;
    margin-top: -10px; 
  }

  .form-flex-container {
    flex-direction: column;
    gap: 30px;
  }

  .form-left-col {
    width: 100%;
    padding: 35px 20px;
    border-left: 10px solid #257850;
  }

  .form-right-col {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .form-heading {
    font-size: 1.8rem;
    white-space: normal; /* 手机端允许换行避免切断 */
    margin-bottom: 20px;
  }

  .submit-btn {
    width: 100%;
    padding: 14px 0;
    align-self: center;
  }

  .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; }
}

/* --- Form Section Animation --- */
#form-section .glass-panel {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#form-section .form-left-col,
#form-section .form-right-col {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#form-section.is-visible .glass-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#form-section.is-visible .form-left-col {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

#form-section.is-visible .form-right-col {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}