/* ==========================================================================
   GLANCE APPLE-STYLE RELEASE NOTES (cap-nhat.css)
   Follows Glance Apple Pro Blue design tokens in styles.css
   ========================================================================== */

.changelog-page {
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.changelog-page main {
  flex: 1;
}

.product-nav nav a.is-active {
  color: #ffffff;
  font-weight: 650;
}

/* Header */
.changelog-hero {
  padding: clamp(56px, 8vw, 108px) 0 clamp(32px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-hero .product-name {
  margin-bottom: 12px;
}

.changelog-hero h1 {
  font-size: clamp(2.55rem, 6vw, 4.7rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: #f5f5f7;
}

.changelog-intro {
  color: var(--muted);
  max-width: 38em;
  margin-top: 16px;
}

/* Toolbar: Apple Segmented Pills + Quick Jump */
.changelog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: clamp(26px, 4vw, 38px);
}

.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 100px;
  background: #14161d;
}

.filter-pill {
  border: 0;
  border-radius: 100px;
  padding: 8px 16px;
  background: transparent;
  color: #b4b7c2;
  font: 550 14px/1.2 var(--display);
  transition: background-color 0.2s, color 0.2s;
}

.filter-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.filter-pill.is-active {
  background: #f5f5f7;
  color: #0d0f14;
  font-weight: 650;
}

.version-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: 0;
}

.version-jump a {
  padding: 6px 12px;
  border-radius: 100px;
  background: #14161d;
  color: var(--blue-light);
  font: 600 13px/1.2 var(--display);
  transition: background-color 0.2s, color 0.2s;
}

.version-jump a:hover {
  background: #1d2433;
  color: #ffffff;
  text-decoration: none;
}

.filter-status {
  margin-top: 16px;
  font-size: 0.92rem;
  color: #828694;
}

/* Two-Column Apple Release Feed */
.changelog-feed {
  padding: clamp(20px, 3vw, 36px) 0 clamp(40px, 6vw, 72px);
}

.release-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(36px, 5vw, 58px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scroll-margin-top: calc(var(--nav) + 24px);
}

.release-row:last-child {
  border-bottom: 0;
}

.release-sticky {
  position: sticky;
  top: calc(var(--nav) + 26px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.release-date {
  font: 550 0.92rem/1.3 var(--text);
  color: #8d92a0;
}

.release-version {
  font: 650 clamp(1.35rem, 2.2vw, 1.75rem)/1.2 var(--display);
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 100px;
  background: #1b1e28;
  color: #b4b9c7;
  font: 600 12px/1.2 var(--display);
  margin-top: 2px;
}

.release-badge.is-latest {
  background: var(--blue);
  color: #ffffff;
}

.release-body {
  min-width: 0;
}

.release-headline {
  margin: 0;
  font: 650 clamp(1.45rem, 2.4vw, 2rem)/1.24 var(--display);
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.release-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.55;
  max-width: 44em;
  text-wrap: pretty;
}

.release-items {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}

.release-items li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px 18px;
  padding: 18px 22px;
  border-radius: 18px;
  background: #12141b;
  transition: background-color 0.2s ease;
}

.release-items li:hover {
  background: #171a24;
}

.release-tag {
  display: inline-flex;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 100px;
  background: #1c2536;
  color: var(--blue-light);
  font: 600 0.8rem/1.3 var(--display);
  white-space: nowrap;
  margin-top: 2px;
}

.release-items strong {
  display: block;
  font: 650 1.04rem/1.35 var(--display);
  color: #f5f5f7;
  margin-bottom: 4px;
}

.release-items p {
  color: #b4b7c2;
  font-size: 0.97rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.release-items p strong {
  display: inline;
  font-size: inherit;
  color: #ffffff;
}

/* Bottom CTA Card */
.changelog-cta {
  padding: 12px 0 clamp(64px, 9vw, 108px);
}

.cta-card {
  border-radius: 28px;
  padding: clamp(32px, 5vw, 56px);
  background: linear-gradient(145deg, #131c2e 0%, #101218 100%);
  text-align: center;
}

.cta-card h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #ffffff;
}

.cta-card p {
  margin: 12px auto 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.changelog-page footer {
  background: #0d0f14;
  color: #8f93a0;
}

/* Responsive */
@media (max-width: 820px) {
  .release-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .release-sticky {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }

  .release-date {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .product-nav nav a[href="./#faq"] {
    display: none;
  }

  .filter-bar {
    width: 100%;
    border-radius: 18px;
  }

  .filter-pill {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
  }

  .release-items li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 16px;
  }

  .release-tag {
    justify-self: start;
  }
}
