/* ==========================================================================
   Blog & Learn sections — shared styles
   Extends the design tokens and .container/.faq-* patterns already defined
   in styles.css (loaded before this file on every Blog/Learn page).
   ========================================================================== */

/* ── Breadcrumbs ─────────────────────────────────────────────────────── */
.breadcrumbs {
  padding-top: 18px;
  font-size: 14px;
  color: var(--text-gray);
}

.breadcrumbs a {
  color: var(--text-blue);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: #B7BFCB;
}

.breadcrumbs .current {
  color: var(--text-gray);
  font-weight: 600;
}

/* ── Section hero (hub pages) ────────────────────────────────────────── */
.section-hero {
  padding-top: 48px;
  padding-bottom: 28px;
  text-align: center;
}

.section-hero h1 {
  color: var(--deep-blue);
  font-size: 44px;
  font-weight: 900;
  margin-bottom: 14px;
}

.section-hero p {
  font-size: 19px;
  color: var(--text-gray);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Hub controls: search + filter pills ─────────────────────────────── */
.hub-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.hub-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
}

.hub-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 999px;
  border: 2px solid #E1E7F5;
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  color: var(--text-gray);
  outline: none;
  transition: border-color 0.2s;
}

.hub-search input:focus {
  border-color: var(--primary-blue);
}

.hub-search::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid var(--text-gray);
  border-radius: 50%;
  opacity: 0.55;
}

.hub-search::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 63%;
  width: 6px;
  height: 2px;
  background: var(--text-gray);
  opacity: 0.55;
  transform: rotate(45deg);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-blue);
  background: var(--bg-blue-light);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.filter-pill:hover {
  background-color: #AEE7FB;
}

.filter-pill.active {
  background-color: var(--primary-blue);
  color: #fff;
}

.filter-group-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A93A6;
  margin: 18px 0 8px;
}

.no-results {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-gray);
  font-size: 16px;
}

.no-results.visible {
  display: block;
}

/* ── Post grid / cards ────────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 10px;
  padding-bottom: 40px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #EEF1F7;
  box-shadow: 0 4px 18px rgba(26, 52, 108, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(26, 52, 108, 0.12);
}

.post-card-media {
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--bg-blue-light);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-blue);
  margin-bottom: 10px;
}

.post-card-meta .dot {
  color: #B7BFCB;
}

.post-card-meta .muted {
  color: #8A93A6;
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
}

.post-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--deep-blue);
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-card p {
  font-size: 14.5px;
  color: var(--text-gray);
  line-height: 1.55;
  flex: 1;
}

.post-card-footer {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-blue);
}

/* ── Section headers within hub pages ────────────────────────────────── */
.hub-section {
  padding-top: 30px;
  padding-bottom: 30px;
}

.hub-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hub-section-heading h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--deep-blue);
}

.hub-section-heading a {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-blue);
  text-decoration: none;
}

/* ── Topic badges (used on Learn hub in place of full categories) ────── */
.topic-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--deep-blue);
  background: var(--bg-banner);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 10px;
}

/* ── Newsletter capture (UI-only stub) ───────────────────────────────── */
.newsletter-box {
  background: var(--footer-bg);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin: 20px 0 50px;
}

.newsletter-box h2 {
  color: var(--deep-blue);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter-box p {
  color: var(--text-gray);
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  padding: 13px 18px;
  border-radius: 999px;
  border: 2px solid #D7E2F5;
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  width: 280px;
  max-width: 100%;
  outline: none;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--primary-blue);
}

.newsletter-form button {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--primary-blue);
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.newsletter-form button:hover {
  opacity: 0.88;
}

.newsletter-note {
  margin-top: 14px;
  font-size: 13px;
  color: #8A93A6;
}

.newsletter-thanks {
  display: none;
  font-weight: 700;
  color: var(--deep-blue);
  margin-top: 6px;
}

.newsletter-thanks.visible {
  display: block;
}

/* ── Category page intro ─────────────────────────────────────────────── */
.category-intro {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-gray);
  font-size: 16px;
  line-height: 1.7;
}

.related-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 10px;
}

.related-categories a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-blue);
  background: var(--bg-blue-light);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
}

.related-categories a:hover {
  background: #AEE7FB;
}

/* ==========================================================================
   Article page
   ========================================================================== */

.article-hero {
  padding-top: 26px;
  padding-bottom: 10px;
}

.article-category-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-blue);
  background: var(--bg-blue-light);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: 40px;
  font-weight: 900;
  color: var(--deep-blue);
  line-height: 1.2;
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text-gray);
}

.article-meta .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.article-meta a {
  color: var(--text-gray);
  font-weight: 700;
  text-decoration: none;
}

.article-meta a:hover {
  color: var(--text-blue);
}

.article-meta .dot {
  color: #B7BFCB;
}

.article-cover {
  margin: 26px 0 10px;
  border-radius: 20px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 2.2 / 1;
  object-fit: cover;
  display: block;
}

/* ── Layout: content + sticky TOC rail ───────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 50px;
  padding-top: 20px;
  padding-bottom: 10px;
  align-items: start;
}

.article-toc-rail {
  position: sticky;
  top: 90px;
}

.article-toc-rail h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A93A6;
  margin-bottom: 12px;
}

.article-toc-rail ol {
  list-style: none;
  border-left: 2px solid #EEF1F7;
}

.article-toc-rail li {
  margin-bottom: 2px;
}

.article-toc-rail a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 14px;
  color: var(--text-gray);
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.15s, border-color 0.15s;
}

.article-toc-rail a:hover,
.article-toc-rail a.active {
  color: var(--text-blue);
  border-left-color: var(--primary-blue);
  font-weight: 600;
}

/* ── Key takeaways ────────────────────────────────────────────────────── */
.key-takeaways {
  background: var(--bg-blue-light);
  border-radius: 18px;
  padding: 26px 30px;
  margin: 6px 0 34px;
}

.key-takeaways h2 {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--deep-blue);
  margin-top: 0;
  margin-bottom: 14px;
}

.key-takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.key-takeaways li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--deep-blue);
}

.key-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--primary-blue);
}

/* ── Article body typography ─────────────────────────────────────────── */
.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-gray);
}

.article-body h2 {
  font-size: 27px;
  font-weight: 800;
  color: var(--deep-blue);
  margin: 42px 0 16px;
  scroll-margin-top: 90px;
}

.article-body h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--deep-blue);
  margin: 30px 0 12px;
  scroll-margin-top: 90px;
}

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

.article-body .content-image {
  margin: 4px 0 28px;
  border-radius: 16px;
  overflow: hidden;
}

.article-body .content-image img {
  width: 100%;
  aspect-ratio: 2.2 / 1;
  object-fit: cover;
  display: block;
}

.article-body ul,
.article-body ol {
  margin: 0 0 18px 22px;
}

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

.article-body strong {
  color: var(--deep-blue);
}

.article-body a {
  color: var(--text-blue);
  font-weight: 600;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-blue);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--deep-blue);
  font-style: italic;
}

.table-scroll {
  overflow-x: auto;
  margin: 22px 0;
}

.article-body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 15px;
}

.article-body th,
.article-body td {
  border: 1px solid #E4E9F2;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--footer-bg);
  color: var(--deep-blue);
  font-weight: 700;
}

.article-body tr:nth-child(even) td {
  background: #FAFBFE;
}

.article-body table.breakdown-table {
  width: auto;
  min-width: 0;
  max-width: 260px;
}

.article-body table.breakdown-table th {
  text-align: center;
}

.article-body table.breakdown-table tr:nth-child(even) td {
  background: transparent;
}

.article-body table.breakdown-table tr:last-child td {
  font-weight: 700;
}

.article-body code {
  background: #F2F5FB;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
}

.article-body pre {
  background: #1A346C;
  color: #EAF3FF;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 22px 0;
  font-size: 14.5px;
  line-height: 1.6;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ── Disclaimer ───────────────────────────────────────────────────────── */
.disclaimer-box {
  display: flex;
  gap: 14px;
  background: #FFF6E8;
  border: 1px solid #FCE3B4;
  border-radius: 14px;
  padding: 18px 22px;
  margin: 30px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #7A5B12;
}

.disclaimer-box .icon {
  flex-shrink: 0;
  font-size: 20px;
}

/* ── Evidence / Sources ───────────────────────────────────────────────── */
.sources-block {
  margin: 32px 0;
  padding: 22px 24px;
  background: #F7F9FD;
  border-radius: 16px;
}

.sources-block h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-top: 0;
  margin-bottom: 6px;
}

.sources-block > p {
  font-size: 14px;
  color: #8A93A6;
  margin-top: 0;
  margin-bottom: 16px;
}

.sources-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.sources-block li {
  font-size: 14.5px;
  line-height: 1.55;
  padding-left: 20px;
  position: relative;
}

.sources-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-blue);
}

.sources-block a {
  color: var(--text-blue);
  font-weight: 700;
  text-decoration: none;
}

.sources-block a:hover {
  text-decoration: underline;
}

/* ── CTA blocks ───────────────────────────────────────────────────────── */
.cta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--method-bg), var(--primary-blue));
  color: #fff;
  border-radius: 18px;
  padding: 22px 28px;
  margin: 26px 0 10px;
}

.cta-header p {
  font-size: 16px;
  font-weight: 600;
  max-width: 520px;
}

.cta-header .btn-cta,
.cta-inline .btn-cta,
.cta-bottom-banner .btn-cta {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--deep-blue);
  background: #fff;
  border-radius: 999px;
  padding: 12px 24px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.cta-header .btn-cta:hover,
.cta-inline .btn-cta:hover {
  transform: translateY(-1px);
}

.cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--bg-blue-light);
  border-radius: 16px;
  padding: 20px 26px;
  margin: 30px 0;
}

.cta-inline p {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--deep-blue);
  max-width: 480px;
}

.cta-inline .btn-cta {
  background: var(--primary-blue);
  color: #fff;
}

.cta-bottom-banner {
  background: var(--method-bg);
  border-radius: 22px;
  padding: 40px;
  margin: 46px 0;
  color: #fff;
  text-align: center;
}

.cta-bottom-banner h2 {
  font-size: 26px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 10px;
}

.cta-bottom-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 22px;
}

.cta-bottom-banner .store-buttons {
  justify-content: center;
  margin-bottom: 6px;
}

/* ── Helpful vote widget ──────────────────────────────────────────────── */
.helpful-vote {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 24px;
  margin: 20px 0;
  border-top: 1px solid #EEF1F7;
  border-bottom: 1px solid #EEF1F7;
}

.helpful-vote p {
  font-weight: 700;
  color: var(--deep-blue);
  font-size: 15px;
}

.helpful-vote .vote-buttons {
  display: flex;
  gap: 10px;
}

.helpful-vote button {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-blue);
  background: var(--bg-blue-light);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.helpful-vote button:hover {
  background-color: #AEE7FB;
}

.helpful-vote button.selected {
  background-color: var(--primary-blue);
  color: #fff;
}

.helpful-vote .vote-thanks {
  display: none;
  font-size: 14px;
  color: #8A93A6;
}

.helpful-vote .vote-thanks.visible {
  display: inline-block;
}

/* ── Author byline (E-E-A-T) ──────────────────────────────────────────── */
.author-byline {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #F7F9FD;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 34px 0;
}

.author-byline .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.author-byline a {
  color: var(--deep-blue);
  font-weight: 700;
  text-decoration: none;
}

.author-byline a:hover {
  text-decoration: underline;
}

.author-byline p {
  font-size: 14px;
  color: var(--text-gray);
  margin-top: 3px;
}

/* ── Related articles / Next article ─────────────────────────────────── */
.related-articles {
  margin: 46px 0 20px;
}

.related-articles h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-bottom: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.next-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 2px solid #EEF1F7;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0 50px;
  text-decoration: none;
}

.next-article .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A93A6;
  display: block;
  margin-bottom: 4px;
}

.next-article .title {
  font-size: 17px;
  font-weight: 700;
  color: var(--deep-blue);
}

.next-article .arrow {
  font-size: 22px;
  color: var(--text-blue);
  flex-shrink: 0;
}

/* ── Author page ──────────────────────────────────────────────────────── */
.author-hero {
  padding-top: 50px;
  padding-bottom: 30px;
  text-align: center;
}

.author-hero .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 32px;
  margin: 0 auto 20px;
}

.author-hero h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--deep-blue);
  margin-bottom: 6px;
}

.author-hero .role {
  color: var(--text-blue);
  font-weight: 700;
  margin-bottom: 18px;
}

.author-hero .bio {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-gray);
  line-height: 1.7;
}

.author-todo-note {
  max-width: 640px;
  margin: 24px auto 0;
  background: #FFF6E8;
  border: 1px solid #FCE3B4;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: #7A5B12;
}

.author-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.author-links a {
  color: var(--text-blue);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {

  .post-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc-rail {
    position: static;
    order: -1;
    background: #F7F9FD;
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 20px;
  }

  .article-toc-rail ol {
    columns: 2;
  }
}

@media (max-width: 720px) {
  .section-hero h1 {
    font-size: 32px;
  }

  .article-hero h1 {
    font-size: 28px;
  }

  .post-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hub-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .hub-search {
    max-width: none;
  }

  .article-toc-rail ol {
    columns: 1;
  }

  .key-takeaways,
  .cta-bottom-banner,
  .sources-block {
    padding: 22px;
  }

  .cta-header,
  .cta-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .next-article {
    flex-direction: column;
    align-items: flex-start;
  }
}