/* 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;
}

.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;
}

.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 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-filters-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 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);
}
