/* MyWhiteCoat - Blog Styling Stylesheet */

.blog-hero {
  position: relative;
  padding: 60px 20px 60px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}

.blog-hero .mesh-orb {
  width: 300px;
  height: 300px;
  opacity: 0.15;
}

.blog-hero .o1 {
  top: -50px;
  left: 10%;
  background: var(--blue);
}

.blog-hero .o2 {
  bottom: -50px;
  right: 15%;
  background: var(--amber);
}

.blog-eyebrow {
  display: inline-block;
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber-deep);
  background: var(--amber-pale);
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.blog-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  max-width: 800px;
  margin: 0 auto 16px auto;
  position: relative;
  padding-bottom: 20px;
}

.blog-hero h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
}

.blog-hero-sub {
  font-size: var(--fs-base);
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 auto;
}

.blog-meta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 16px;
  flex-wrap: wrap;
}

.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Blog List Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(240, 160, 48, 0.4);
}

.blog-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(61, 123, 247, 0.1) 0%, rgba(240, 160, 48, 0.1) 100%);
}

.blog-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  z-index: 2;
  box-shadow: var(--shadow-xs);
}

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

.blog-card-meta {
  font-size: var(--fs-2xs);
  color: var(--muted);
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-card-body h3 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.25s var(--ease);
}

.blog-card:hover h3 {
  color: var(--amber-deep);
}

.blog-card-body p {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--amber-deep);
  gap: 4px;
}

.blog-card-footer svg {
  transition: transform 0.25s var(--ease);
}

.blog-card:hover .blog-card-footer svg {
  transform: translateX(4px);
}

/* Single Blog Page View */
.blog-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.blog-article {
  background: var(--surface);
}

.blog-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: 24px;
}

.blog-breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.blog-breadcrumbs a:hover {
  color: var(--amber-deep);
  text-decoration: underline;
}

.blog-article-content {
  font-size: var(--fs-base);
  color: var(--ink);
  line-height: 1.8;
}

.blog-article-content p {
  margin-bottom: 24px;
}

.blog-article-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-lg);
  color: var(--ink);
  margin: 40px 0 16px 0;
  font-weight: 700;
  border-bottom: 2px solid var(--amber-pale);
  padding-bottom: 10px;
}

.blog-article-content strong {
  color: var(--ink);
  font-weight: 700;
}

.blog-article-content a {
  color: var(--amber-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--amber-pale);
  text-underline-offset: 2px;
}

.blog-article-content a:hover {
  text-decoration-color: var(--amber-deep);
}

.blog-article-content ul, .blog-article-content ol {
  margin-bottom: 24px;
  padding-left: 20px;
}

.blog-article-content li {
  margin-bottom: 10px;
}

.blog-callout {
  background: var(--amber-pale);
  border-left: 4px solid var(--amber);
  padding: 20px 24px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 32px 0;
  font-weight: 500;
  color: var(--ink);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.blog-tags-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
  margin-right: 4px;
}

.tag-chip {
  background: var(--bg-alt);
  color: var(--ink-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.tag-chip:hover {
  background: var(--amber-pale);
  color: var(--amber-deep);
  border-color: var(--amber);
}

.blog-faq {
  margin: 40px 0;
}

.blog-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--surface);
}

.blog-faq-item summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
}

.blog-faq-item summary::-webkit-details-marker {
  display: none;
}

.blog-faq-item summary::after {
  content: '+';
  float: right;
  font-weight: 400;
  color: var(--amber-deep);
}

.blog-faq-item[open] summary::after {
  content: '\2212';
}

.blog-faq-item p {
  margin: 12px 0 0 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.blog-related {
  margin: 40px 0;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--r-md);
}

.blog-related-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-related-links a {
  color: var(--amber-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
}

.blog-related-links a:hover {
  text-decoration: underline;
}

.blog-related-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bg);
  background: var(--amber);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Blog Sidebar */
.blog-sidebar {
  position: sticky;
  top: 180px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.sidebar-box.cta {
  background: var(--grad-card);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}

.sidebar-box.cta::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(240, 160, 48, 0.15);
  filter: blur(40px);
  border-radius: 50%;
}

.sidebar-box h4 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-box.cta h4 {
  color: #fff;
}

.sidebar-box p {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.sidebar-box.cta p {
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-list {
  list-style: none;
  padding: 0;
}

.sidebar-list-item {
  display: flex;
  gap: 10px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--ink);
}

.sidebar-list-item:last-child {
  margin-bottom: 0;
}

.sidebar-list-item svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--green);
  margin-top: 2px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 99px;
  background: var(--amber);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-sm);
  box-shadow: 0 4px 14px rgba(240, 160, 48, 0.3);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.sidebar-btn:hover {
  background: var(--amber-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-amber);
}

.sidebar-box.cta .sidebar-btn {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.sidebar-box.cta .sidebar-btn:hover {
  background: var(--amber-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-amber);
}

/* SVG dynamic graphics placeholders for posts */
.blog-vector-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.blog-vector-img svg {
  width: 64px;
  height: 64px;
  opacity: 0.8;
  color: var(--amber);
}

/* Responsive Scaling */
@media (max-width: 960px) {
  .blog-content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .blog-hero {
    padding-top: 100px;
  }
  
  .blog-hero h1 {
    font-size: var(--fs-xl);
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog Topic Filter Badges styling */
.blog-toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 0 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 10px 18px;
  flex: 1 1 320px;
  max-width: 420px;
  color: var(--muted);
  transition: border-color 0.25s var(--ease);
}

.blog-search:focus-within {
  border-color: var(--amber);
  color: var(--ink-2);
}

.blog-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
}

.blog-search input::placeholder {
  color: var(--muted);
}

.blog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-sort label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.blog-sort select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 9px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.blog-sort select:focus {
  outline: none;
  border-color: var(--amber);
}

.blog-no-results {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .blog-toolbar {
    padding-top: 20px;
    justify-content: stretch;
  }

  .blog-search {
    flex: 1 1 100%;
    max-width: none;
  }

  .blog-sort {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .blog-sort select {
    flex: 1;
  }
}

.blog-filters-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 0 20px;
  display: flex;
  justify-content: center;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.filter-badge {
  background: var(--bg-alt);
  color: var(--ink-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 99px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  user-select: none;
}

.filter-badge:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--amber);
  transform: translateY(-1px);
}

.filter-badge.active {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber-deep);
  box-shadow: 0 4px 12px rgba(240, 160, 48, 0.18);
}

/* Card Filtering Transition states */
.blog-card.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .blog-filters-wrapper {
    padding-top: 20px;
    justify-content: flex-start;
  }
  
  .blog-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  .blog-filters::-webkit-scrollbar {
    display: none;
  }
  
  .filter-badge {
    flex: none;
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Lazy Loading styles */
.blog-card.lazy-hide {
  display: none !important;
  opacity: 0;
}

.blog-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 20px;
}

.btn-load-more {
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 12px 32px;
  border-radius: 99px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.25s var(--ease);
}

.btn-load-more:hover {
  background: var(--amber-deep);
  color: #fff;
  border-color: var(--amber-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-amber);
}

.btn-load-more:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   PANEL-AUTHORED ARTICLE CONTENT
   Posts written in the blog panel arrive as rich HTML plus section blocks,
   so they use elements the JSON snapshot never produced.
   ═══════════════════════════════════════════ */

.blog-article-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-md);
  color: var(--ink);
  font-weight: 700;
  margin: 32px 0 12px;
}

.blog-article-content h4 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-base);
  color: var(--ink-2);
  font-weight: 700;
  margin: 24px 0 10px;
}

.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.blog-article-content figure {
  margin: 28px 0;
}

.blog-article-content figcaption,
.blog-section-image figcaption {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}

.blog-article-content blockquote,
.blog-section-quote {
  margin: 28px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--amber);
  background: var(--amber-pale);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--ink);
}

.blog-article-content blockquote p:last-child,
.blog-section-quote p:last-child {
  margin-bottom: 0;
}

.blog-section-quote cite {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-sm);
  font-style: normal;
  font-weight: 600;
  color: var(--ink-2);
}

.blog-article-content code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .9em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}

.blog-article-content pre {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--bg-dark);
  color: #fff;
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-article-content pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

/* Tables scroll sideways on narrow screens instead of stretching the page */
.blog-article-content table,
.blog-section-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.blog-section-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.blog-article-content table th,
.blog-section-table th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.blog-article-content table td,
.blog-section-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-2);
  vertical-align: top;
}

.blog-article-content table tr:last-child td,
.blog-section-table tr:last-child td {
  border-bottom: 0;
}

/* Call-to-action block */
.blog-section-cta {
  margin: 30px 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--border);
  text-align: center;
}

.blog-section-cta h3 {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-md);
  color: var(--ink);
  margin: 0 0 14px;
}

/* Sits inside .blog-article-content, so it has to opt out of the link underline */
.blog-section-cta .sidebar-btn {
  display: inline-block;
  width: auto;
  text-decoration: none;
}

/* Responsive 16:9 video embed */
.blog-section-video {
  position: relative;
  margin: 28px 0;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-dark);
}

.blog-section-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
