/* ===== CSS Reset & Variables ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #555;
  --primary: #e94560;
  --primary-hover: #d63850;
  --secondary: #0f3460;
  --accent: #16213e;
  --card-bg: #ffffff;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
}

.dark {
  --bg: #0f0f1a;
  --text: #e0e0e0;
  --text-light: #aaa;
  --card-bg: #1a1a2e;
  --glass: rgba(26, 26, 46, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
header {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  height: 100%;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform 0.2s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s;
  transform: translateX(-50%);
  border-radius: 2px;
}

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

.nav a:hover {
  background: rgba(233, 69, 96, 0.1);
  color: var(--primary);
}

.nav a.active {
  background: var(--primary);
  color: #fff;
}

.nav a.active::after {
  background: #fff;
}

.dark-toggle {
  border: 2px solid var(--text);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: rotate(20deg);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav a::after {
    display: none;
  }

  .header-inner {
    position: relative;
  }
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  border-radius: 0 0 48px 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.03)' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,186.7C960,213,1056,235,1152,218.7C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 32px;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 36px;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-block;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after {
  opacity: 1;
}

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

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

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: var(--text);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}

.breadcrumb a:hover {
  opacity: 1;
  color: var(--primary);
}

.breadcrumb span {
  opacity: 0.4;
}

/* ===== Search ===== */
.search-box {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto 40px;
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border var(--transition), box-shadow 0.3s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.search-box input::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

.search-box button {
  padding: 12px 24px;
  border-radius: 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition), transform 0.2s;
}

.search-box button:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
}

/* ===== Banner Carousel ===== */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 40px 0;
  height: 320px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  gap: 24px;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide svg {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.banner-text h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--text);
}

.banner-text p {
  opacity: 0.8;
  color: var(--text-light);
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.banner-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  opacity: 0.3;
  cursor: pointer;
  transition: all var(--transition);
}

.banner-dots button.active {
  opacity: 1;
  background: var(--primary);
  transform: scale(1.2);
}

.banner-dots button:hover {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .banner-carousel {
    height: 240px;
  }

  .banner-slide {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .banner-slide svg {
    width: 56px;
    height: 56px;
  }

  .banner-text h3 {
    font-size: 1.3rem;
  }
}

/* ===== Section ===== */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 4px;
  transition: width 0.3s;
}

.section-title:hover h2::after {
  width: 80px;
}

.section-title p {
  color: var(--text);
  opacity: 0.7;
  margin-top: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Grid ===== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== Card ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #ff6b6b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.card:hover::before {
  transform: scaleX(1);
}

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

.card-icon {
  margin-bottom: 16px;
  display: inline-block;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text);
}

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

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.stat-label {
  margin-top: 8px;
  opacity: 0.7;
  color: var(--text-light);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: var(--shadow-hover);
}

.faq-question {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background var(--transition);
  user-select: none;
}

.faq-question:hover {
  background: rgba(233, 69, 96, 0.05);
}

.faq-question .icon {
  font-size: 1.4rem;
  transition: transform 0.3s;
  color: var(--primary);
}

.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;
  padding: 0 24px;
  color: var(--text-light);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

/* ===== Footer ===== */
footer {
  background: var(--accent);
  color: #ccc;
  padding: 60px 0 20px;
  margin-top: 60px;
}

footer a {
  color: #aaa;
  text-decoration: none;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--primary);
}

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

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

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--primary);
  margin-top: 6px;
  border-radius: 2px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col li a {
  display: inline-block;
  transition: transform 0.2s, color 0.2s;
}

.footer-col li a:hover {
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-bottom a {
  color: #aaa;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ===== Scroll Animation ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

.back-to-top:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 24px rgba(233, 69, 96, 0.5);
}

/* ===== HowTo ===== */
.howto-step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.howto-step:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-hover);
}

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

.howto-step h3 {
  margin-bottom: 4px;
  color: var(--text);
}

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

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

.partner-item {
  background: var(--card-bg);
  padding: 20px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 120px;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  font-weight: 500;
  color: var(--text);
}

.partner-item:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

/* ===== Utility ===== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ===== Responsive Fine-tuning ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 60px 0 40px;
    border-radius: 0 0 32px 32px;
  }

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

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

  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .card {
    padding: 20px;
  }

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

  .footer-grid {
    gap: 24px;
  }

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

/* ===== Dark Mode Adjustments ===== */
.dark .card {
  border-color: rgba(255, 255, 255, 0.06);
}

.dark .search-box input {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--card-bg);
}

.dark .search-box input:focus {
  border-color: var(--primary);
}

.dark .banner-slide {
  background: var(--card-bg);
}

.dark .faq-item {
  border-color: rgba(255, 255, 255, 0.06);
}

.dark .partner-item {
  border-color: rgba(255, 255, 255, 0.06);
}

.dark .howto-step {
  background: var(--card-bg);
}

/* ===== Print Styles ===== */
@media print {
  header,
  footer,
  .back-to-top,
  .search-box,
  .banner-carousel,
  .dark-toggle,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}