/* ============================================
   EVSELab Blog Styles
   ============================================ */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0891B2, #7C3AED);
  z-index: 9999;
  transition: width 0.1s linear;
  width: 0%;
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #E5E7EB;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.15);
  border-color: #0891B2;
}

.blog-card .blog-card-image {
  overflow: hidden;
  position: relative;
}

.blog-card .blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.blog-card-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Featured Post Card */
.blog-featured-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

.blog-featured-card:hover {
  box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.15);
  border-color: #0891B2;
}

/* Filter Pills */
.blog-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  color: #6B7280;
  border: 1px solid #E5E7EB;
  white-space: nowrap;
}

.blog-filter-pill:hover {
  border-color: #0891B2;
  color: #0891B2;
}

.blog-filter-pill.active {
  background: linear-gradient(135deg, #0891B2, #7C3AED);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px -3px rgba(8, 145, 178, 0.4);
}

/* Blog Content Typography */
.blog-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #374151;
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #E5E7EB;
}

.blog-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1F2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

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

.blog-content ul {
  list-style-type: disc;
}

.blog-content ol {
  list-style-type: decimal;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid #0891B2;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #F0FDFA;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #0F766E;
  font-style: italic;
}

.blog-content pre {
  background: #1E293B;
  color: #E2E8F0;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-content code {
  background: #F1F5F9;
  color: #0891B2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.blog-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

.blog-content a {
  color: #0891B2;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: #7C3AED;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.blog-content table th {
  background: #F8FAFC;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #E5E7EB;
}

.blog-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #F1F5F9;
}

.blog-content table tr:hover td {
  background: #F8FAFC;
}

/* Table of Contents */
.blog-toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.blog-toc::-webkit-scrollbar {
  width: 3px;
}

.blog-toc::-webkit-scrollbar-track {
  background: transparent;
}

.blog-toc::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.blog-toc a {
  display: block;
  padding: 6px 0 6px 16px;
  font-size: 0.85rem;
  color: #6B7280;
  border-left: 2px solid #E5E7EB;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.blog-toc a:hover {
  color: #0891B2;
  border-left-color: #0891B2;
}

.blog-toc a.active {
  color: #0891B2;
  font-weight: 600;
  border-left-color: #0891B2;
  border-left-width: 3px;
}

.blog-toc a.toc-h3 {
  padding-left: 28px;
  font-size: 0.8rem;
}

.blog-toc a.toc-h4 {
  padding-left: 40px;
  font-size: 0.75rem;
}

/* Share Buttons */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  transition: all 0.3s ease;
  color: #6B7280;
  background: #F3F4F6;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn.linkedin:hover {
  background: #0A66C2;
  color: #fff;
}

.share-btn.twitter:hover {
  background: #1DA1F2;
  color: #fff;
}

.share-btn.facebook:hover {
  background: #1877F2;
  color: #fff;
}

.share-btn.copy:hover {
  background: #0891B2;
  color: #fff;
}

/* Pagination */
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.blog-pagination a {
  color: #6B7280;
  background: #fff;
  border: 1px solid #E5E7EB;
}

.blog-pagination a:hover {
  border-color: #0891B2;
  color: #0891B2;
  transform: translateY(-1px);
}

.blog-pagination .active {
  background: linear-gradient(135deg, #0891B2, #7C3AED);
  color: #fff;
  border-color: transparent;
}

/* Author Card */
.author-card {
  background: linear-gradient(135deg, #F0FDFA, #EDE9FE);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #E5E7EB;
}

/* Blog Hero */
.blog-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(8, 145, 178, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
  animation: blogHeroFloat 20s ease-in-out infinite;
}

@keyframes blogHeroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -2%); }
}

/* Blog Single Hero */
.blog-single-hero {
  position: relative;
  overflow: hidden;
}

.blog-single-hero .hero-overlay {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.3) 100%);
}

/* Search Input */
.blog-search-input {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  color: #fff;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.blog-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.blog-search-input:focus {
  outline: none;
  border-color: #0891B2;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2);
}

/* Sidebar Widget */
.blog-sidebar-widget {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #E5E7EB;
}

/* Tag Cloud */
.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6B7280;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  transition: all 0.2s ease;
}

.blog-tag:hover {
  color: #0891B2;
  border-color: #0891B2;
  background: #F0FDFA;
}

/* Related Post Card */
.related-post-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.1);
  border-color: #0891B2;
}

/* Prev/Next Navigation */
.blog-nav-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
  flex: 1;
}

.blog-nav-card:hover {
  border-color: #0891B2;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .blog-content h2 {
    font-size: 1.5rem;
  }

  .blog-content h3 {
    font-size: 1.2rem;
  }

  .blog-content {
    font-size: 1rem;
  }

  .blog-filter-pill {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}
