:root {
  --font-family: "Poppins", sans-serif;
  --primary-orange: #ff6a00; /* Alibaba Cloud Orange */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #2a2a2a;
  --border-color-light: #e0e0e0;
  --border-color-dark: #444444;
}

/* --- Alibaba Cloud Inspired Theme --- */

/* Light Theme (Default) */
body.light-theme {
  --bg-color: var(--bg-light);
  --text-color: var(--text-dark);
  --heading-color: var(--text-dark);
  --card-bg: var(--bg-light);
  --border-color: var(--border-color-light);
  --control-bg: #f0f0f0;
  --accent-hover: var(--primary-orange);
}

/* Dark Theme */
body.dark-theme {
  --bg-color: var(--bg-dark);
  --text-color: var(--text-light);
  --heading-color: var(--text-light);
  --card-bg: #333333;
  --border-color: var(--border-color-dark);
  --control-bg: #555555;
  --accent-hover: var(--primary-orange);
}

body {
  font-family: var(--font-family);
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

header {
  background-color: var(--bg-color);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s, border-bottom 0.3s;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading-color);
}

.logo-text .logo-cn {
  display: inline;
}

.logo-text .logo-en {
  display: none;
}

.logo-link {
  text-decoration: none;
}

.desktop-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.desktop-nav li {
  margin-left: 2rem;
}

a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn,
.lang-toggle-btn {
  background: var(--control-bg);
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.mobile-menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--heading-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 65px;
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  padding: 1rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-menu a {
  padding: 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("https://images.unsplash.com/photo-1593642632823-8f785ba67e45?q=80&w=2070&auto=format&fit=crop")
      no-repeat center center/cover;
  padding: 8rem 2rem;
  text-align: center;
  color: var(--text-light);
}

body.light-theme .hero {
  background: linear-gradient(
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    url("https://images.unsplash.com/photo-1593642632823-8f785ba67e45?q=80&w=2070&auto=format&fit=crop")
      no-repeat center center/cover;
  color: var(--text-dark);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
}

body.light-theme .hero h1 {
  color: var(--text-dark);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

body.light-theme .hero p {
  color: var(--text-dark);
}

.cta-button {
  background-color: var(--primary-orange);
  color: var(--text-light);
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.cta-button:hover {
  opacity: 0.85;
  color: var(--text-light); /* Keep text color white on hover */
}

.features {
  padding: 5rem 2rem;
  text-align: center;
  background-color: var(--bg-color);
}

.features h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--heading-color);
}

.about-section {
  padding: 5rem 2rem;
}

.about-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--heading-color);
}

.about-row {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-row.reverse {
  flex-direction: row-reverse;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-text {
  flex: 1;
  text-align: left;
}

.feature-list {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 10px;
  max-width: 30%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
  border: 1px solid var(--border-color);
  text-align: left;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature h3 {
  font-size: 1.5rem;
  color: var(--primary-orange);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-section {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
}

.contact-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--heading-color);
}

.contact-container {
  display: flex;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.contact-info{
}
/* .contact-form {
  flex: 1;
} */

.contact-info h3 {
  color: var(--primary-orange);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info ul li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info ul li i {
  color: var(--primary-orange);
  font-size: 1.2rem;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
}

.contact-form button {
  align-self: flex-start;
}

.faq-section {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
}

.faq-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--heading-color);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: background-color 0.3s;
}

.faq-question {
  padding: 1.5rem 2rem;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading-color);
  transition: color 0.3s;
  overflow: hidden; /* To contain the floated icon */
}

.faq-question:hover {
  color: var(--primary-orange);
}

.faq-question i {
  float: right; /* Position the icon to the right */
  color: var(--primary-orange); /* Ensure visibility */
  font-size: 1.2rem; /* Ensure a reasonable size */
  transition: transform 0.3s ease;
  font-family: "Font Awesome 5 Free"; /* Force Font Awesome font */
  font-weight: 900; /* For solid icons */
  display: inline-block; /* Ensure proper rendering */
  flex-shrink: 0; /* Prevent icon from shrinking */
  margin-left: 1rem; /* Add some space between text and icon */
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0; /* No padding when collapsed */
  max-height: 0;
  min-height: 0; /* Ensure it can collapse fully */
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer p {
  margin: 0;
  padding: 0;
}

.faq-question.active + .faq-answer {
  padding: 1.5rem 2rem; /* Apply padding only when active */
}

.faq-answer p {
  margin: 0;
  color: var(--text-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .desktop-nav,
  .nav-controls {
    display: none;
  }

  .mobile-menu-toggle-btn {
    display: block;
  }

  .about-row,
  .about-row.reverse {
    flex-direction: column;
  }

  .contact-container {
    flex-direction: column;
  }

  .feature-list {
    flex-direction: column;
    align-items: center;
  }

  .feature {
    max-width: 90%;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
  margin-top: auto; /* Push footer to the bottom */
}

.scroll-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-orange);
  color: var(--text-light);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s ease-in-out;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

.scroll-to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-to-top-btn:hover {
  background-color: #e65c00; /* Darker orange on hover */
  transform: translateY(-3px);
}

.logo-wall {
  display: grid;
  @media (max-width: 768px) {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  justify-content: center;
  align-items: center;

  .logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem;
  }
  img {
    width: 100%;
  }
}
