/* Underline current page */
header .header-inner .menu-container .menu .whats-new:after {
  transform: translateX(-50%) scaleX(1);
}

/* ========================================
   Hero Section
   ======================================== */
/* Same lit slate as the other pages. The latest version card rises into the
   bottom of this band, so it never reads as an empty bar. */
.hero {
  position: relative;
  padding: 148px 0 150px;
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(120, 150, 220, 0.16), transparent 70%),
    linear-gradient(160deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  color: var(--white);
}

.hero .hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero h1 {
  font-size: var(--text-6xl);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--white);
  max-width: 600px;
  margin: 0 auto 32px;
}

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

.hero .btn-primary {
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary-blue);
  color: var(--white);
  border-radius: var(--radius-md);
  width: 220px;
  transition: background 0.2s ease;
}

.hero .btn-primary:hover {
  background: var(--blue-700);
}

.hero .btn-secondary {
  padding: 14px 28px;
  background: var(--white-alpha-10);
  color: var(--white);
  border: 1px solid var(--white-alpha-30);
  border-radius: var(--radius-md);
  width: 220px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero .btn-secondary:hover {
  background: var(--white-alpha-15);
  border-color: var(--white-alpha-60);
}

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

/* ========================================
   Version Grid
   ======================================== */
.version-grid {
  position: relative;
  display: grid;
  gap: 24px;
  margin-top: -110px;
  padding: 0 0 80px;
}

.version-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  line-height: 1.6;
  box-shadow: var(--elevation-md);
  border: 1px solid var(--gray-border);
  transition: box-shadow 0.2s ease;
}

.version-card:hover {
  box-shadow: var(--elevation-lg);
}

.version-card:first-child {
  border: 2px solid var(--primary-blue);
  position: relative;
}

.version-card:first-child::before {
  content: 'Latest';
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--primary-blue);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  cursor: pointer;
  padding: 4px 0;
}

.version-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.version-tag {
  background: var(--blue-50);
  color: var(--blue-800);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-sm);
}

.date-tag {
  color: var(--black);
  font-size: var(--text-xs);
}

.dropdown-arrow {
  color: var(--black);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.version-card.collapsed .dropdown-arrow {
  transform: rotate(-90deg);
}

.version-content {
  max-height: 5000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.version-card.collapsed .version-content {
  max-height: 0;
}

/* ========================================
   Release Post (Blog Style)
   ======================================== */
.release-post {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
}

.release-post .intro {
  font-size: var(--text-md);
  color: var(--black);
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-border);
}

.release-post h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  margin: 28px 0 12px 0;
}

.release-post h3:first-of-type {
  margin-top: 0;
}

.release-post p {
  color: var(--black);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin: 0 0 16px 0;
}

.release-post strong {
  color: var(--gray-800);
}

/* ========================================
   Changelog (grouped by type)
   ======================================== */
.changelog {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
}

.changelog-intro {
  color: var(--black);
  font-size: var(--text-sm);
  margin: 0 0 16px 0;
}

.changelog-section {
  margin-bottom: 20px;
}

.changelog-section:last-child {
  margin-bottom: 0;
}

.section-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
  font-weight: 600;
  margin: 0 0 10px 0;
}

.section-label.feature {
  background: var(--blue-50);
  color: var(--blue-700);
}

.section-label.enhancement {
  background: var(--green-50);
  color: var(--green-700);
}

/* Neutral rather than red, so a list of fixes doesn't read as a warning. */
.section-label.fix {
  background: var(--gray-100);
  color: var(--gray-700);
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-list li {
  position: relative;
  padding: 8px 0 8px 20px;
  color: var(--black);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.changelog-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-round);
  background: var(--gray-300);
}

.changelog-list li strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* ========================================
   Documentation Link
   ======================================== */
.documentation-link {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
}

.documentation-link p {
  margin: 0;
  color: var(--black);
  font-size: var(--text-xs);
}

.documentation-link a {
  color: var(--primary-blue);
  text-decoration: none;
}

.documentation-link a:hover {
  text-decoration: underline;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 120px;
  }

  .version-grid {
    margin-top: -90px;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero p {
    font-size: var(--text-md);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero .btn-primary,
  .hero .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 550px) {
  .hero h1 {
    font-size: var(--text-3xl);
  }

  .version-grid {
    padding: 40px 0 60px;
  }

  .version-card {
    padding: 20px;
  }

  .version-card:first-child::before {
    left: 16px;
  }

  .changelog-list li {
    font-size: var(--text-xs);
  }
}
