/* Blog section styles. Reuses the site's existing color palette, fonts
   (see fonts.css), and card/chip patterns (.reveal, --page-edge) from
   main.css — this file only adds blog-specific layout, kept separate so
   the homepage's own CSS stays untouched. */

.blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--page-edge);
  box-sizing: border-box;
}

.blog-header-logo img {
  display: block;
  height: 26px;
  width: auto;
}

.blog-header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.blog-lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.blog-lang-toggle span[data-onclick] {
  cursor: pointer;
  padding-bottom: 2px;
  color: #18233A;
}

.blog-hamburger {
  position: relative;
  width: 20px;
  height: 14px;
  cursor: pointer;
}

.blog-hamburger span {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #18233A;
  border-radius: 2px;
}

.blog-hamburger span:first-child { top: 2px; }
.blog-hamburger span:last-child { top: 10px; }

/* The [hidden] toggle lives on .blog-menu-wrap (a plain div with no class
   of its own — see blog/index.html and blog/post.html) rather than on
   .blog-menu-panel directly: a class selector and the [hidden] attribute
   selector are equal specificity, so an unconditional `display: flex` here
   would win the cascade over the browser's default `[hidden]{display:none}`
   and the menu would never actually hide. */
.blog-menu-panel {
  position: absolute;
  top: 34px;
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #E8DFD3;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(24,35,58,0.18);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}

.blog-menu-panel a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: #18233A;
  text-decoration: none;
}

.blog-menu-panel a.is-cta {
  font-weight: 500;
  background: #F1F8E3;
}

/* Page hero: eyebrow + headline, same pattern as the homepage's feature/
   steps section headers. */
.blog-hero {
  margin: 0 var(--page-edge);
  padding: 40px 12px 8px;
}

.blog-hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #18233A;
  margin-bottom: 16px;
}

.blog-hero-title {
  margin: 0 0 14px;
  max-width: 780px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.03em;
}

.blog-hero-sub {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.55;
  color: #18233A;
}

/* "Browse by category" heading */
.blog-browse-head {
  margin: 44px var(--page-edge) 0;
  padding: 0 12px;
}

.blog-browse-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.02em;
}

/* Category browse cards — color-blocked icon card + arrow button, with the
   title/subtitle set below the card rather than overlaid on it. */
.blog-category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 24px var(--page-edge) 0;
  padding: 0 12px;
}

.blog-category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(36,31,27,0.10);
}

.blog-category-card.is-active {
  box-shadow: 0 0 0 3px #18233A;
}

.blog-category-card-icon {
  display: flex;
  width: 62%;
  height: 62%;
}

.blog-category-card-icon svg {
  width: 100%;
  height: 100%;
}

.blog-category-card-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-category-card-label {
  margin-top: 14px;
}

.blog-category-card-label h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.01em;
}

.blog-category-card-label p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #6B7486;
}

/* Expanding articles panel, revealed below the browse cards once one is
   selected. */
.blog-articles-panel {
  margin: 0 var(--page-edge);
  padding: 56px 12px 0;
  min-height: 40px;
  scroll-margin-top: 28px;
}

.blog-pick-prompt {
  margin: 0;
  font-size: 14.5px;
  color: #6B7486;
}

.blog-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.blog-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.1;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.02em;
}

.blog-category-title svg {
  flex-shrink: 0;
}

.blog-category-count {
  font-size: 12.5px;
  font-weight: 500;
  color: #6B7486;
  white-space: nowrap;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

/* Article preview card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E7E9EE;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(36,31,27,0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(36,31,27,0.10);
}

.blog-card-media {
  height: 8px;
  background: linear-gradient(90deg, #28CC95, #4C7A1E);
}

.blog-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  background: #F1F8E3;
  color: #18233A;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card-tag svg,
.blog-article-tag svg {
  flex-shrink: 0;
}

.blog-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.01em;
}

.blog-card-excerpt {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #18233A;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #6B7486;
}

.blog-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6B7486;
}

/* Article page */
.blog-article-wrap {
  margin: 0 var(--page-edge);
  padding: 32px 12px 0;
  max-width: 780px;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #18233A;
  text-decoration: none;
  margin-bottom: 28px;
}

.blog-article-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 7px;
  background: #F1F8E3;
  color: #18233A;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.blog-article-title {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.03em;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7486;
  margin-bottom: 40px;
}

.blog-article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6B7486;
}

.blog-article-body {
  font-size: 16.5px;
  line-height: 1.7;
  color: #18233A;
  padding-bottom: 48px;
  border-bottom: 1px solid #E7E9EE;
}

.blog-article-body h2 {
  margin: 36px 0 14px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.02em;
}

.blog-article-body h3 {
  margin: 28px 0 12px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  color: #18233A;
}

.blog-article-body p {
  margin: 0 0 18px;
}

.blog-article-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.blog-article-body li {
  margin-bottom: 8px;
}

.blog-article-body strong { font-weight: 500; }
.blog-article-body em { font-style: italic; }

.blog-related {
  margin: 0 var(--page-edge) 0;
  padding: 56px 12px 90px;
}

.blog-related-title {
  margin: 0 0 24px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.02em;
}

/* Featured article hero, above the category browse cards. Toggled via the
   [hidden] attribute (removed once JS has content to show) — needs an
   explicit override here since a class selector and [hidden] are equal
   specificity, and an unconditional `display: grid` would otherwise win
   the cascade over the browser's default `[hidden]{display:none}` (same
   issue as .blog-menu-panel elsewhere in this file). */
.blog-featured[hidden] {
  display: none;
}

.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  margin: 44px var(--page-edge) 0;
  padding: 0 12px;
}

.blog-featured-media {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  min-height: 220px;
  text-decoration: none;
}

.blog-featured-media-icon svg {
  width: 96px;
  height: 96px;
  display: block;
}

.blog-featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 4px;
}

.blog-featured-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #6B7486;
}

.blog-featured-title {
  margin: 4px 0 0;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.blog-featured-title a {
  color: #18233A;
  text-decoration: none;
}

.blog-featured-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #18233A;
}

.blog-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  font-family: 'General Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

/* Quick-takeaways callout, below the title/meta and above the body. */
.blog-takeaways {
  margin: 28px 0 8px;
  padding: 20px 24px;
  border: 1.5px solid #E7E9EE;
  border-radius: 16px;
  background: #FAFAF8;
}

.blog-takeaways-title {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.blog-takeaways ul {
  margin: 0;
  padding-left: 20px;
}

.blog-takeaways li {
  font-size: 14.5px;
  line-height: 1.55;
  color: #18233A;
  margin-bottom: 6px;
}

.blog-takeaways li:last-child {
  margin-bottom: 0;
}

/* Pull-quote block within article body content. */
.blog-pullquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid #28CC95;
  font-family: 'General Sans', sans-serif;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: #18233A;
  letter-spacing: -0.01em;
}

/* Reading progress bar, fixed to the top of article pages. */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 30;
}

#reading-progress-bar {
  height: 100%;
  width: 0%;
  background: #4C7A1E;
  transition: width 0.1s linear;
}

@media (max-width: 900px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }

  .blog-featured-media {
    min-height: 180px;
  }
}
