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

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2a44;
  --accent: #e8a838;
  --accent-light: #f0c060;
  --bg: #f4f7fa;
  --bg-dark: #0d1b2a;
  --text: #1a1a2e;
  --text-light: #555;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.85);
  --glass-dark: rgba(13, 27, 42, 0.85);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

body.dark {
  --bg: #0d1b2a;
  --text: #e0e0e0;
  --text-light: #aaa;
  --glass: rgba(13, 27, 42, 0.9);
  --bg-dark: #1a2a3a;
}

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

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

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

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

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

.section-title h2 {
  font-size: 2.4rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
  transition: color var(--transition);
}

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

body.dark .section-title h2 {
  color: var(--accent-light);
}

/* Cards */
.card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #1a1a2e;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--accent-light);
  transform: scale(1.05);
  color: #1a1a2e;
}

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

.btn-outline:hover {
  background: var(--accent);
  color: #1a1a2e;
}

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

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

/* Scroll Animation Base */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: background var(--transition);
}

body.dark header {
  background: var(--glass-dark);
}

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

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  transition: color var(--transition);
}

body.dark .logo {
  color: var(--accent-light);
}

.logo span {
  color: var(--accent);
}

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

nav a {
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

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

body.dark .menu-toggle span {
  background: var(--text);
}

/* Dark Mode Toggle */
.dark-toggle {
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.dark-toggle:hover {
  background: var(--accent);
  color: #1a1a2e;
}

/* Hero Section */
.hero {
  padding-top: 100px;
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 50%, #0f2a44 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

body.dark .hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 50%, #0a1520 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(232, 168, 56, 0.08) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 700px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

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

.hero-svg {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  opacity: 0.15;
}

/* Banner Carousel */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 40px 0;
}

.banner-slide {
  display: none;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  min-height: 300px;
  align-items: center;
}

.banner-slide.active {
  display: flex;
}

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

.banner-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.banner-dots span.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #1a1a2e;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 999;
}

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

.back-to-top:hover {
  transform: scale(1.1);
}

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

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

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-top: 0;
}

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

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

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

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

.search-box button {
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: 50px;
  color: #1a1a2e;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.search-box button:hover {
  background: var(--accent-light);
}

/* Stats */
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  color: var(--text-light);
  font-size: 1rem;
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px;
}

body.dark footer {
  background: #0a1520;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

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

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

  .section {
    padding: 48px 0;
  }

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

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  nav.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

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

  .hero-svg {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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