/* ===================================
   BLOG STYLES - PREMIUM REDESIGN
   =================================== */

/* Blog Header */
.blog-header {
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, hsl(var(--primary) / 0.05), transparent 70%);
  z-index: -1;
}

.blog-header-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.blog-header-content p {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Blog Cards */
.blog-card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  height: 100%;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.2);
}

.blog-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: hsl(var(--muted));
}

.blog-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-placeholder {
  transform: scale(1.05);
}

/* Gradients for placeholders */
.bg-gradient-1 {
  background: linear-gradient(135deg, #FF6B6B, #FFE66D);
}

.bg-gradient-2 {
  background: linear-gradient(135deg, #4ECDC4, #556270);
}

.bg-gradient-3 {
  background: linear-gradient(135deg, #A83279, #D38312);
}

.bg-gradient-4 {
  background: linear-gradient(135deg, #00C9FF, #92FE9D);
}

.blog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

.blog-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.blog-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}

.blog-date {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.blog-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.blog-card-title a {
  color: hsl(var(--foreground));
  text-decoration: none;
  background-image: linear-gradient(hsl(var(--foreground)), hsl(var(--foreground)));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}

.blog-card:hover .blog-card-title a {
  background-size: 100% 2px;
}

.blog-card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border) / 0.5);
  margin-top: auto;
}

.reading-time {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.blog-read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-read-more::after {
  content: '→';
  transition: transform 0.3s ease;
}

.blog-read-more:hover::after {
  transform: translateX(4px);
}

/* CTA Section Override */
.cta-section {
  background: transparent;
  position: relative;
}

.cta-card {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  color: white;
  border: none;
  box-shadow: 0 20px 60px -10px hsl(var(--primary) / 0.3);
}

.cta-card h2 {
  color: white;
  background: none;
  -webkit-text-fill-color: initial;
}

.cta-card .text-muted {
  color: rgba(255, 255, 255, 0.9);
}

.cta-card .btn-primary {
  background: white;
  color: hsl(var(--primary));
  border: none;
}

.cta-card .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* ===================================
   BLOG POST PAGE STYLES
   =================================== */

.blog-post {
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.blog-post-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Post Header */
.blog-post-header {
  text-align: center;
  margin-bottom: 4rem;
}

.blog-breadcrumbs {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.blog-breadcrumbs a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}

.blog-breadcrumbs a:hover {
  color: hsl(var(--primary));
}

.blog-post-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 1.5rem 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, hsl(var(--foreground)) 0%, hsl(var(--muted-foreground)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1.5rem;
}

.separator {
  color: hsl(var(--border));
}

/* Post Content */
.blog-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(var(--foreground) / 0.9);
}

.blog-post-content .lead {
  font-size: 1.5rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin-bottom: 3rem;
  font-weight: 400;
  border-left: 4px solid hsl(var(--primary));
  padding-left: 1.5rem;
}

.blog-post-content h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

.blog-post-content h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.blog-post-content li::marker {
  color: hsl(var(--primary));
}

.blog-post-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-decoration-color: hsl(var(--primary) / 0.3);
  text-underline-offset: 4px;
  transition: all 0.2s;
}

.blog-post-content a:hover {
  text-decoration-color: hsl(var(--primary));
  color: hsl(var(--primary) / 0.8);
}

/* Callout Box */
.blog-callout {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

.blog-callout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: hsl(var(--primary));
}

.blog-callout strong {
  color: hsl(var(--primary));
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 3rem 0;
  border-radius: 12px;
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.2);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: hsl(var(--card));
}

.comparison-table th {
  background: hsl(var(--muted) / 0.5);
  padding: 1.25rem;
  text-align: left;
  font-weight: 600;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
}

.comparison-table td {
  padding: 1.25rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  color: hsl(var(--muted-foreground));
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: hsl(var(--muted) / 0.3);
}

/* Blog Post Footer */
.blog-post-footer {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid hsl(var(--border));
}

.blog-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.tag {
  padding: 0.5rem 1.25rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.tag:hover {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.2);
  transform: translateY(-2px);
}

.blog-cta {
  text-align: center;
  padding: 4rem 2rem;
  margin: 4rem 0;
  background: radial-gradient(circle at center, hsl(var(--card)), hsl(var(--background)));
  border: 1px solid hsl(var(--border));
}

.blog-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
}

.blog-nav-links .btn {
  flex: 1;
  max-width: 300px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .blog-header-content h1 {
    font-size: 2.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-card-image-wrapper {
    padding-top: 60%;
  }

  .blog-post-title {
    font-size: 2.25rem;
  }

  .blog-post-content .lead {
    font-size: 1.25rem;
  }

  .blog-nav-links {
    flex-direction: column;
    align-items: center;
  }

  .blog-nav-links .btn {
    width: 100%;
    max-width: none;
  }
}