/* ===== CSS Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: #0f0f1a;
  color: #eee;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Dark/Light Mode ===== */
.dark-mode body,
body.dark-mode {
  background: #0f0f1a;
  color: #eee;
}

body:not(.dark-mode) {
  background: #f5f5fa;
  color: #222;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Glassmorphism Cards ===== */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s, border-color 0.3s;
}

.glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body:not(.dark-mode) .glass {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .glass:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== Typography ===== */
h1, h2, h3 {
  color: #e94560;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.4;
}

p {
  color: #ccc;
  margin-bottom: 12px;
  line-height: 1.8;
}

body:not(.dark-mode) p {
  color: #333;
}

a {
  color: #e94560;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #ff6b81;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
}

svg {
  display: block;
}

/* ===== Header & Navigation ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s, border-color 0.3s;
}

body:not(.dark-mode) header {
  background: rgba(245, 245, 250, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo {
  display: flex;
  align-items: center;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  padding: 8px 0;
  font-weight: 500;
  position: relative;
  color: #ccc;
  transition: color 0.3s;
}

body:not(.dark-mode) .nav-links a {
  color: #444;
}

.nav-links a.active,
.nav-links a:hover {
  color: #e94560;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #e94560;
  transition: width 0.3s;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-actions button {
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.nav-actions button:hover {
  background: rgba(233, 69, 96, 0.1);
}

.menu-toggle {
  display: none;
}

/* ===== Search Bar ===== */
.search-bar {
  display: none;
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #555;
  background: #1a1a2e;
  color: #fff;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.3s, background 0.3s;
}

.search-bar input:focus {
  border-color: #e94560;
}

body:not(.dark-mode) .search-bar input {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

body:not(.dark-mode) .search-bar input:focus {
  border-color: #e94560;
}

.search-bar button {
  padding: 10px 20px;
  background: #e94560;
  color: #fff;
  border-radius: 8px;
  margin-left: 8px;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.search-bar button:hover {
  background: #d63850;
  transform: scale(1.02);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 8px 24px;
  font-size: 0.85rem;
  color: #888;
}

body:not(.dark-mode) .breadcrumb {
  color: #666;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  height: 600px;
  margin-top: 60px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  z-index: 5;
}

.hero-controls button {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}

.hero-controls button:hover {
  background: #e94560;
  transform: scale(1.1);
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.hero-dots span.active {
  background: #e94560;
  transform: scale(1.2);
}

.hero-dots span:hover {
  background: #e94560;
}

/* ===== Sections General ===== */
.section {
  padding: 80px 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #e94560, #ff6b81);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section > .container > p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
}

/* ===== About Section ===== */
.about-grid,
.team-grid,
.product-grid,
.service-grid,
.case-grid,
.testimonial-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.team-member {
  text-align: center;
  padding: 24px;
}

.team-member svg {
  margin: 0 auto 16px;
  border-radius: 50%;
  transition: transform 0.3s;
}

.team-member:hover svg {
  transform: scale(1.1);
}

.team-member h3 {
  margin-bottom: 8px;
}

.team-member p {
  font-size: 0.9rem;
  color: #999;
}

body:not(.dark-mode) .team-member p {
  color: #666;
}

/* ===== Stats Section ===== */
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.stat-item {
  text-align: center;
  min-width: 150px;
  padding: 32px 24px;
  transition: transform 0.3s;
}

.stat-item:hover {
  transform: translateY(-4px);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: #e94560;
  line-height: 1;
}

.stat-item span {
  font-size: 1.5rem;
  color: #e94560;
}

.stat-item p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #aaa;
}

body:not(.dark-mode) .stat-item p {
  color: #555;
}

/* ===== Partners ===== */
.partner-logos {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.partner-logos svg {
  transition: transform 0.3s, opacity 0.3s;
}

.partner-logos svg:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  transition: border-color 0.3s;
}

body:not(.dark-mode) .faq-item {
  border-color: rgba(0, 0, 0, 0.1);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 12px 0;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: #eee;
  transition: color 0.3s;
}

body:not(.dark-mode) .faq-question {
  color: #222;
}

.faq-question:hover {
  color: #e94560;
}

.arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 12px;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 12px;
}

.faq-item.active .arrow {
  transform: rotate(180deg);
}

/* ===== Contact ===== */
.contact-info p {
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body:not(.dark-mode) .contact-info p {
  border-color: rgba(0, 0, 0, 0.05);
}

.company-info {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .company-info {
  border-color: rgba(0, 0, 0, 0.1);
}

.company-info h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

/* ===== Footer ===== */
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .footer-inner {
  border-color: rgba(0, 0, 0, 0.1);
}

.footer-section h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

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

.footer-section ul li a {
  color: #999;
  transition: color 0.3s, padding-left 0.3s;
}

body:not(.dark-mode) .footer-section ul li a {
  color: #555;
}

.footer-section ul li a:hover {
  color: #e94560;
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #888;
}

body:not(.dark-mode) .footer-bottom {
  border-color: rgba(0, 0, 0, 0.1);
  color: #666;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e94560;
  color: #fff;
  font-size: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  background: #d63850;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

/* ===== Scroll Animation ===== */
.scroll-animate,
.glass,
.team-member,
.product-card,
.service-card,
.case-card,
.testimonial-card,
.news-card,
.stat-item,
.faq-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.visible,
.glass.visible,
.team-member.visible,
.product-card.visible,
.service-card.visible,
.case-card.visible,
.testimonial-card.visible,
.news-card.visible,
.stat-item.visible,
.faq-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero {
    height: 500px;
  }
  .slide svg {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    gap: 12px;
    z-index: 100;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  body:not(.dark-mode) .nav-links.open {
    background: rgba(245, 245, 250, 0.95);
  }

  .nav-links.open a {
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.3s;
  }

  .nav-links.open a:hover {
    background: rgba(233, 69, 96, 0.1);
  }

  .hero {
    height: 400px;
  }

  .slide svg {
    height: 400px;
  }

  .section {
    padding: 48px 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .stats-grid {
    gap: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-item {
    min-width: 120px;
    padding: 24px 16px;
  }

  .about-grid,
  .team-grid,
  .product-grid,
  .service-grid,
  .case-grid,
  .testimonial-grid,
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }

  .footer-inner {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    padding: 32px 16px;
  }

  .hero-controls button {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 300px;
  }

  .slide svg {
    height: 300px;
  }

  .container {
    padding: 0 12px;
  }

  .section {
    padding: 32px 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .nav-inner {
    padding: 10px 12px;
  }

  .breadcrumb {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .about-grid,
  .team-grid,
  .product-grid,
  .service-grid,
  .case-grid,
  .testimonial-grid,
  .news-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats-grid {
    gap: 12px;
  }

  .stat-item {
    min-width: 100px;
    padding: 16px 12px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .glass {
    padding: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 12px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    bottom: 20px;
    right: 20px;
  }

  .hero-controls button {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .hero-dots span {
    width: 10px;
    height: 10px;
  }
}

/* ===== Smooth scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

body:not(.dark-mode) ::-webkit-scrollbar-track {
  background: #e0e0e8;
}

::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d63850;
}

/* ===== Selection ===== */
::selection {
  background: #e94560;
  color: #fff;
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #e94560;
  outline-offset: 2px;
}

/* ===== Additional hover effects ===== */
.product-card:hover,
.service-card:hover,
.case-card:hover,
.news-card:hover {
  border-color: #e94560;
}

.testimonial-card:hover {
  border-color: #e94560;
}

/* ===== Product advantages list ===== */
.product-advantages ul {
  list-style: disc;
  padding-left: 24px;
  margin-top: 16px;
}

.product-advantages ul li {
  margin-bottom: 8px;
  color: #ccc;
  line-height: 1.6;
}

body:not(.dark-mode) .product-advantages ul li {
  color: #444;
}

/* ===== HowTo section ===== */
.howto ol {
  list-style: decimal;
  padding-left: 24px;
  margin-top: 16px;
}

.howto ol li {
  margin-bottom: 8px;
  color: #ccc;
  line-height: 1.6;
  padding: 8px 0;
}

body:not(.dark-mode) .howto ol li {
  color: #444;
}

/* ===== Latest articles & Related articles ===== */
.latest-articles ul,
.related-articles ul {
  margin-top: 12px;
}

.latest-articles ul li,
.related-articles ul li {
  margin-bottom: 8px;
  padding: 4px 0;
}

.latest-articles ul li a,
.related-articles ul li a {
  color: #e94560;
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
}

.latest-articles ul li a:hover,
.related-articles ul li a:hover {
  color: #ff6b81;
  padding-left: 4px;
}

/* ===== News date ===== */
.news-card .date {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #888;
}

body:not(.dark-mode) .news-card .date {
  color: #666;
}

/* ===== Testimonial author ===== */
.testimonial-card .author {
  margin-top: 12px;
  font-weight: 600;
  color: #e94560;
}

/* ===== Solution & Industry sections ===== */
.solution-section,
.industry-section {
  margin-top: 48px;
}

.solution-section h2,
.industry-section h2 {
  text-align: left;
}

.solution-section h2::after,
.industry-section h2::after {
  margin: 12px 0 0;
}

/* ===== Team section ===== */
.team-section {
  margin-top: 48px;
}

.team-section h2 {
  text-align: center;
}

/* ===== Product advantages ===== */
.product-advantages {
  margin-top: 48px;
}

.product-advantages h2 {
  text-align: left;
}

.product-advantages h2::after {
  margin: 12px 0 0;
}

/* ===== Partners section ===== */
.partners-section {
  margin-top: 48px;
}

.partners-section h2 {
  text-align: center;
}

/* ===== Company info ===== */
.company-info h3 {
  margin-top: 24px;
}