/* Blog Styles */
.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="30" cy="30" r="0.5" fill="white" opacity="0.05"/><circle cx="70" cy="70" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.blog-hero .hero-content {
  position: relative;
  z-index: 2;
}

/* Two-column hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-left {
  text-align: left;
}

.hero-right {
  text-align: right;
}

.hero-subcopy {
  font-size: 1.2rem;
  opacity: 0.95;
  max-width: 620px;
}

.blog-hero .eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}

.blog-hero h1 {
  font-size: 3.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.blog-hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin: 18px 0 10px;
}

.hero-btn {
  padding: 12px 18px;
  border-radius: 10px;
}

/* Improve ghost button legibility on gradient */
.hero-ctas .btn-ghost.hero-btn {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-weight: 800;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
}

.hero-ctas .btn-ghost.hero-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-ctas .btn-ghost.hero-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-stats {
  display: flex;
  justify-content: flex-end;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Featured Article */
.featured-article {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.featured-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.featured-image {
  position: relative;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content .article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.featured-content .category {
  background: var(--brand);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.featured-content .date,
.featured-content .read-time {
  color: var(--muted);
}

.featured-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.featured-content h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.featured-content h3 a:hover {
  color: var(--brand);
}

.featured-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--border-light);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.read-more {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: var(--brand-dark);
  transform: translateX(4px);
}

/* Blog Categories */
.blog-categories {
  padding: 80px 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.category-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--brand);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.category-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.category-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* All Articles */
.all-articles {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.blog-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  flex: 1;
  max-width: 420px;
}

.search-box input {
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  flex: 1;
  background: transparent;
}

.search-btn {
  background: var(--brand);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: var(--brand-dark);
  transform: scale(1.05);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: white;
  border: 2px solid var(--border);
  color: var(--muted);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: translateY(-2px);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.article-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--brand);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.article-content {
  padding: 1.5rem;
}

.article-content .article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-content h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-content h3 a:hover {
  color: var(--brand);
}

.article-content p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-content .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-content .read-more {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.article-content .read-more:hover {
  color: var(--brand-dark);
  transform: translateX(4px);
}

.load-more-section {
  text-align: center;
  margin-top: 3rem;
}

/* Improve Load More button legibility */
.load-more-section #load-more-btn {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #ffffff;
  border: none;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.load-more-section #load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.load-more-section #load-more-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3), 0 12px 28px rgba(0, 0, 0, 0.16);
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.newsletter-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.newsletter-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.newsletter-form {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem;
  color: white;
  font-size: 1rem;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-group button {
  background: white;
  color: var(--brand);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-group button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Article Page Styles */
.article-header {
  padding: 80px 0 40px;
  background: var(--bg-secondary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.article-meta .category {
  background: var(--brand);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.article-meta .date,
.article-meta .read-time {
  color: var(--muted);
}

.article-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text);
}

.article-excerpt {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.article-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--text);
}

.publish-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.article-actions {
  display: flex;
  gap: 1rem;
}

.share-btn,
.bookmark-btn {
  background: var(--border-light);
  color: var(--text);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.share-btn:hover,
.bookmark-btn:hover {
  background: var(--brand);
  color: white;
  transform: translateY(-2px);
}

.bookmark-btn.bookmarked {
  background: var(--brand);
  color: white;
}

.article-content {
  padding: 40px 0;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h1,
.article-body h2,
.article-body h3 {
  margin: 2rem 0 1rem;
  color: var(--text);
  font-weight: 700;
}

.article-body h1 {
  font-size: 2.5rem;
}

.article-body h2 {
  font-size: 2rem;
}

.article-body h3 {
  font-size: 1.5rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--muted);
}

.article-body code {
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.article-body a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-body a:hover {
  color: var(--brand-dark);
}

.related-articles {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.related-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.related-image {
  height: 150px;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
  transform: scale(1.05);
}

.related-content {
  padding: 1.5rem;
}

.related-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.related-content h4 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-content h4 a:hover {
  color: var(--brand);
}

.related-content p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.related-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

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

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-left, .hero-right {
    text-align: center;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-tags, .hero-stats {
    justify-content: center;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .featured-card {
    grid-template-columns: 1fr;
  }
  
  .featured-content {
    padding: 2rem;
  }
  
  .blog-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: none;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .article-header h1 {
    font-size: 2rem;
  }
  
  .article-author {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .article-actions {
    justify-content: center;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 60px 0;
  }
  
  .blog-hero h1 {
    font-size: 2rem;
  }
  
  .featured-content {
    padding: 1.5rem;
  }
  
  .newsletter-card {
    padding: 2rem;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .form-group button {
    width: 100%;
  }
}

/* Error and Success Messages */
.error-message,
.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.error-message {
  background: var(--danger);
}

.success-message {
  background: var(--success);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
