/* CSS Reset & Variables */
:root {
  --primary: #1a2a6c;
  --primary-light: #3a5a9c;
  --primary-dark: #0f1a3e;
  --accent: #e94560;
  --accent-light: #ff6b81;
  --bg: #f0f4ff;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-light: #555;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s ease;
  --gradient: linear-gradient(135deg, #1a2a6c, #16213e, #0f3460);
  --gradient-accent: linear-gradient(135deg, #e94560, #ff6b81);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

body.dark {
  --primary: #3a5a9c;
  --primary-light: #5a7abc;
  --primary-dark: #0f1a3e;
  --bg: #0d1117;
  --bg-card: #161b22;
  --text: #e6edf3;
  --text-light: #8b949e;
  --glass: rgba(22, 27, 34, 0.8);
  --glass-border: rgba(48, 54, 61, 0.5);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 15px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 50px;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition);
}

header.scrolled {
  background: var(--glass);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.logo svg {
  width: 40px;
  height: 40px;
}

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

.nav a {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all var(--transition);
}

.dark-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 5px;
  color: var(--text);
  transition: transform var(--transition);
}

.dark-toggle:hover {
  transform: rotate(20deg);
}

/* Banner */
.banner {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 60%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.banner h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.banner p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 35px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.banner-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.banner .btn-outline {
  border-color: #fff;
  color: #fff;
}

.banner .btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

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

.banner-slider span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition);
}

.banner-slider span.active {
  background: #fff;
  transform: scale(1.3);
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
  padding: 0 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
}

.stat-item .number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item .label {
  color: var(--text-light);
  margin-top: 8px;
  font-size: 1rem;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* About */
.about-content p {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.about-content strong {
  color: var(--text);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
  border-left: 3px solid var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

.timeline-item .year {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.team-card {
  text-align: center;
  padding: 30px 20px;
}

.team-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
}

.team-card h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.team-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Product Card */
.product-card {
  text-align: center;
  padding: 30px 20px;
}

.product-card .icon {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
}

.product-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.product-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Service Card */
.service-card {
  padding: 30px 20px;
  text-align: center;
}

.service-card .icon {
  margin-bottom: 15px;
}

/* Testimonial Card */
.testimonial-card {
  padding: 30px 20px;
  position: relative;
}

.testimonial-card .quote {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 15px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.testimonial-card .author {
  font-weight: 600;
}

/* News Card */
.news-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card .date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.news-card h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}

.news-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex: 1;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 18px 0;
  cursor: pointer;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-question .icon {
  font-size: 1.3rem;
  transition: transform var(--transition);
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--text-light);
  padding-top: 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 12px;
}

/* HowTo Steps */
.howto-steps {
  counter-reset: step;
  padding: 0;
}

.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 25px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info p {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info svg {
  flex-shrink: 0;
}

/* QR Grid */
.qr-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.qr-item {
  text-align: center;
}

.qr-item svg {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: block;
}

/* Footer */
.footer {
  background: var(--gradient);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 25px;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-modal.open {
  display: flex;
}

.search-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.search-modal input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.search-modal .close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Article Section */
.article-section {
  padding: 60px 0;
}

.article-card {
  padding: 25px;
}

.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.article-card .meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.article-card p {
  color: var(--text-light);
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-2, .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    box-shadow: var(--shadow);
    z-index: 999;
  }
  .nav.open {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .banner h1 {
    font-size: 2.2rem;
  }
  .banner p {
    font-size: 1rem;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -40px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .banner h1 {
    font-size: 1.8rem;
  }
}