/* SinAI Inc Blog Enhanced Styling */
/* Modern, elevated design with improved typography and visual hierarchy */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero h1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blog-hero .lead {
  color: var(--text-secondary, #6c757d);
  font-size: 1.15rem;
  line-height: 1.7;
}

/* Featured Post Card */
.featured-post {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
  border: 2px solid rgba(102, 126, 234, 0.15);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 3rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.08);
}

.featured-post:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 48px rgba(102, 126, 234, 0.18);
  border-color: rgba(102, 126, 234, 0.3);
}

.featured-post .featured-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.featured-post h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary, #212529);
}

.featured-post h2 a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.featured-post h2 a:hover {
  background-size: 100% 2px;
}

.featured-post .excerpt {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary, #6c757d);
  margin-bottom: 1.5rem;
}

/* Blog Cards */
.blog-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(102, 126, 234, 0.2);
}

.blog-card-img {
  height: 220px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.blog-card-img img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.08);
}

.blog-card-img i {
  font-size: 3.5rem;
  color: rgba(102, 126, 234, 0.4);
}

.blog-card .card-body {
  padding: 1.5rem;
}

.blog-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.blog-card .card-title a {
  color: var(--text-primary, #212529);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card .card-title a:hover {
  color: #667eea;
}

.blog-card .card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #6c757d);
  margin-bottom: 1rem;
}

/* Category Badges */
.blog-category {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.blog-category:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Category-specific colors */
.blog-category[href*="company-news"] {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.15);
}

.blog-category[href*="company-news"]:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.blog-category[href*="research"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.15);
}

.blog-category[href*="research"]:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.blog-category[href*="security"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.15);
}

.blog-category[href*="security"]:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Blog Meta */
.blog-meta {
  font-size: 0.875rem;
  color: var(--text-secondary, #6c757d);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-meta i {
  font-size: 1rem;
  opacity: 0.7;
}

/* Sort Select */
.sort-select {
  min-width: 160px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

/* Pagination */
.pagination {
  gap: 0.5rem;
}

.pagination .page-link {
  border: 1px solid rgba(102, 126, 234, 0.15);
  color: #667eea;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Search/Filter Controls */
.blog-filters {
  background: rgba(102, 126, 234, 0.03);
  border: 1px solid rgba(102, 126, 234, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.blog-filters .form-control {
  border-color: rgba(102, 126, 234, 0.2);
  border-radius: 0.5rem;
}

.blog-filters .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading Spinner */
.spinner-border {
  color: #667eea;
}

/* Sidebar (if exists) */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-widget h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary, #212529);
}

/* Dark Mode Support */
[data-theme="dark"] .blog-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
  border-bottom-color: rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .featured-post {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-color: rgba(102, 126, 234, 0.25);
}

[data-theme="dark"] .blog-card {
  background: var(--bg-secondary, #2d2d2d);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .blog-card:hover {
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .blog-card .card-title a {
  color: var(--text-primary, #e0e0e0);
}

[data-theme="dark"] .blog-card .card-title a:hover {
  color: #a78bfa;
}

[data-theme="dark"] .sort-select {
  background-color: var(--bg-secondary, #2d2d2d);
  border-color: rgba(102, 126, 234, 0.3);
  color: var(--text-primary, #e0e0e0);
}

[data-theme="dark"] .sidebar-widget {
  background: var(--bg-secondary, #2d2d2d);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .blog-hero {
    padding: 3rem 0 2rem;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .featured-post h2 {
    font-size: 1.5rem;
  }

  .blog-card-img {
    height: 180px;
  }

  .blog-filters {
    padding: 1rem;
  }

  .sort-select {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Animation for Card Entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: fadeInUp 0.5s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* Highlighted Post (when navigated via hash) */
.blog-card.highlight-post {
  animation: pulseHighlight 2s ease-in-out;
  border: 2px solid rgba(102, 126, 234, 0.4) !important;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25) !important;
}

@keyframes pulseHighlight {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
  }
  50% {
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.4);
  }
}

