/* ===== CSS Variables ===== */
:root {
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-300: #93C5FD;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E3A5F;
  --blue-900: #0F172A;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --green-500: #22C55E;
  --green-100: #DCFCE7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-blue: 0 4px 20px rgba(37,99,235,0.25);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-decoration: none; }
img { max-width: 100%; height: auto; }

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

/* ===== Navigation ===== */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--blue-700);
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 1.4rem;
}
.site-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem; font-weight: 800;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

/* Nav menu items */
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-menu li { list-style: none; }
.nav-menu .nav-link {
  color: var(--gray-600); font-size: 0.9rem; font-weight: 500;
  padding: 8px 16px; border-radius: 8px;
  transition: all 0.2s; text-decoration: none;
}
.nav-menu .nav-link:hover,
.nav-menu .nav-link.active { background: var(--blue-50); color: var(--blue-600); }

.nav-login {
  background: var(--blue-600); color: white !important;
  padding: 8px 20px; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem;
  margin-left: 8px; text-decoration: none;
  transition: all 0.2s;
}
.nav-login:hover { background: var(--blue-700); box-shadow: var(--shadow-blue); }

/* Mobile menu */
.mobile-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.mobile-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--gray-700); margin: 5px 0;
  border-radius: 2px; transition: all 0.3s;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-menu {
    display: none; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: white; padding: 16px; gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open { display: flex; }
  .nav-login { margin-left: 0; text-align: center; display: block; margin-top: 8px; }
}

/* ===== Hero Section ===== */
.hero {
  padding: 120px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--blue-50) 0%, white 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59,130,246,0.05) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, 2%); }
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--blue-200);
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.85rem; color: var(--blue-600);
  font-weight: 600; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800; line-height: 1.15;
  color: var(--blue-900); margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.15rem; color: var(--gray-500);
  max-width: 540px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-600); color: white;
  padding: 14px 28px; border-radius: 14px;
  font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer;
  transition: all 0.25s; box-shadow: var(--shadow-blue);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--blue-700); color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37,99,235,0.35);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; color: var(--gray-700);
  padding: 14px 28px; border-radius: 14px;
  font-weight: 600; font-size: 1rem;
  border: 1px solid var(--gray-200);
  transition: all 0.25s; text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--blue-300); background: var(--blue-50); color: var(--blue-700);
}

/* ===== Section Headers ===== */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; color: var(--blue-900); margin-bottom: 12px;
}
.section-header p { color: var(--gray-500); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ===== Stage Cards ===== */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.stage-card {
  background: white; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--gray-200);
  transition: all 0.3s; text-decoration: none; color: inherit; display: block;
}
.stage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-300);
}
.stage-card-img {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; position: relative;
}
.stage-card-img::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, white);
}
.stage-card-body { padding: 20px; }
.stage-card-body h3 {
  font-weight: 700; font-size: 1.1rem;
  color: var(--gray-800); margin-bottom: 6px;
}
.stage-card-body p {
  font-size: 0.88rem; color: var(--gray-500);
  margin-bottom: 16px; line-height: 1.5;
}
.stage-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.8rem; color: var(--gray-400);
}
.stage-tag {
  background: var(--blue-50); color: var(--blue-600);
  padding: 3px 10px; border-radius: 6px;
  font-weight: 600; font-size: 0.75rem;
}

/* ===== Feature Cards ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: white; padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}
.feature-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px;
}
.feature-card h3 { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; }

/* ===== Stage Detail ===== */
.stage-detail-section {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden;
}
.stage-detail-header {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  padding: 40px 32px; color: white;
}
.stage-detail-header h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem; font-weight: 800; margin-bottom: 8px;
}
.stage-detail-header p { opacity: 0.9; font-size: 0.95rem; }
.stage-detail-content { padding: 32px; }
.stage-detail-content h2 {
  font-size: 1.2rem; font-weight: 700; color: var(--gray-800);
  margin: 24px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-100);
}
.stage-detail-content p { color: var(--gray-600); line-height: 1.7; margin-bottom: 16px; }
.stage-detail-content ol, .stage-detail-content ul {
  padding-left: 24px; margin-bottom: 16px;
}
.stage-detail-content li { margin-bottom: 8px; color: var(--gray-600); }

/* Video embed */
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: var(--radius-sm);
  margin: 24px 0; background: var(--gray-100);
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.video-placeholder {
  background: var(--gray-100); border-radius: var(--radius-sm);
  height: 300px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--gray-400); margin: 24px 0;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0; font-size: 0.85rem; color: var(--gray-400);
}
.breadcrumb a { color: var(--blue-600); text-decoration: none; }
.breadcrumb .sep { margin: 0 8px; }

/* ===== Guide Steps ===== */
.guide-step {
  display: flex; gap: 16px;
  margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}
.guide-step:last-child { border-bottom: none; }
.guide-step-num {
  width: 36px; height: 36px;
  background: var(--blue-100); color: var(--blue-700);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}
.guide-step h4 { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.guide-step p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.5; }

/* ===== News / Posts ===== */
.post-card {
  background: white; padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 16px; transition: all 0.3s;
}
.post-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.post-card .post-date {
  font-size: 0.8rem; color: var(--blue-600); font-weight: 600; margin-bottom: 8px;
}
.post-card h3 { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--gray-800); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue-600); }
.post-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; }

/* ===== Login Page ===== */
.login-wrapper {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-box {
  background: white; border-radius: var(--radius);
  padding: 40px; width: 100%; max-width: 420px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-md);
  text-align: center;
}
.login-box h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800; color: var(--blue-900); font-size: 1.5rem;
  margin: 16px 0 4px;
}
.login-box .subtitle { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 28px; }
.login-box label {
  display: block; text-align: left;
  font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px;
}
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  font-size: 0.95rem; font-family: inherit;
  outline: none; transition: border-color 0.2s;
  margin-bottom: 16px;
}
.login-box input:focus { border-color: var(--blue-400); }

/* ===== Footer ===== */
.site-footer {
  background: var(--blue-900); color: white;
  padding: 48px 24px 24px; margin-top: 40px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 32px;
}
.footer-brand p { color: var(--gray-400); font-size: 0.88rem; max-width: 280px; line-height: 1.6; margin-top: 12px; }
.footer-links h4 {
  font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--gray-400); margin-bottom: 12px;
}
.footer-links a {
  display: block; color: var(--gray-300);
  font-size: 0.9rem; padding: 4px 0; transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-links ul { list-style: none; }
.footer-bottom {
  max-width: 1200px; margin: 32px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem; color: var(--gray-500); text-align: center;
}

/* ===== Page spacing ===== */
.page-content { padding-top: 90px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 100px 20px 60px; }
  .stage-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .stage-detail-header { padding: 28px 20px; }
  .stage-detail-content { padding: 20px; }
  .guide-step { flex-direction: column; gap: 8px; }
}
