/* =====================================================
   NETTS.IO BLOG STYLES - Modern & Clean Design
   ===================================================== */

/* Variables */
:root {
  --primary-color: #4169E1;
  --primary-dark: #2952cc;
  --secondary-color: #1a1a1a;
  --text-muted: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
}

/* =====================================================
   BLOG HERO SECTION
   ===================================================== */
.blog-hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 120px 0 80px;
  margin-top: -80px;
  padding-top: 160px;
  position: relative;
  overflow: hidden;
}

.blog-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="1440" height="400" viewBox="0 0 1440 400" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 400L48 383.3C96 366.7 192 333.3 288 316.7C384 300 480 300 576 316.7C672 333.3 768 366.7 864 366.7C960 366.7 1056 333.3 1152 300C1248 266.7 1344 233.3 1392 216.7L1440 200V0H1392C1344 0 1248 0 1152 0C1056 0 960 0 864 0C768 0 672 0 576 0C480 0 384 0 288 0C192 0 96 0 48 0H0V400Z" fill="white" fill-opacity="0.05"/%3E%3C/svg%3E') no-repeat bottom;
  background-size: cover;
  opacity: 0.3;
}

.blog-hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  font-weight: 400;
}

/* =====================================================
   BLOG CONTENT SECTION
   ===================================================== */
.blog-content-section {
  background-color: var(--bg-light);
  min-height: 70vh;
  padding-top: 60px !important;
}

.blog-content-section .container-fluid {
  max-width: 1400px;
}

/* Blog Main Title */
.blog-main-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* =====================================================
   BLOG CARD STYLES
   ===================================================== */
.blog-card {
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

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

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blog-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: var(--primary-color);
  color: white;
  border: none;
}

.blog-category.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.blog-date i {
  font-size: 0.875rem;
}

.blog-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.blog-card-title a:hover {
  color: var(--primary-color);
}

.blog-card-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.blog-card .btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-card .btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

/* =====================================================
   SIDEBAR STYLES
   ===================================================== */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.widget {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list li {
  margin-bottom: 0.75rem;
}

.widget-list a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  transition: var(--transition-fast);
  font-weight: 500;
  font-size: 0.95rem;
}

.widget-list a:hover,
.widget-list a.active {
  background: var(--bg-light);
  color: var(--primary-color);
  transform: translateX(4px);
}

.widget-list .badge {
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

/* =====================================================
   TAG CLOUD STYLES
   ===================================================== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.tag-link:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.tag-link.active {
  background: var(--primary-color);
  color: white;
}

.tag-count {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* =====================================================
   PAGINATION STYLES
   ===================================================== */
.pagination {
  --bs-pagination-padding-x: 1rem;
  --bs-pagination-padding-y: 0.5rem;
  --bs-pagination-border-radius: 0.5rem;
  --bs-pagination-border-color: var(--border-color);
  --bs-pagination-hover-bg: var(--bg-light);
  --bs-pagination-hover-border-color: var(--primary-color);
  --bs-pagination-active-bg: var(--primary-color);
  --bs-pagination-active-border-color: var(--primary-color);
  gap: 0.5rem;
}

.page-link {
  font-weight: 600;
  transition: var(--transition-fast);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.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 JAVASCRIPT ENHANCEMENTS
   ===================================================== */

/* Fade in animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reading-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.1s ease;
}

/* Search results */
#search-results {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

#search-results h5 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

#search-results .blog-card {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

#search-results .blog-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Tag filtering */
.tag-filter {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem;
  background: var(--bg-light);
  color: var(--text-muted);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.tag-filter:hover,
.tag-filter.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Lazy loading images */
img[data-src] {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

img[data-src].loaded {
  filter: blur(0);
}

/* Social sharing enhancements */
.social-share-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-share-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.6s ease;
  transform: translate(-50%, -50%);
}

.social-share-btn:hover::before {
  width: 300px;
  height: 300px;
}

.social-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced blog cards */
.blog-card {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
}

.blog-card:hover::before {
  left: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions for filtered content */
.fade-in {
  animation: fadeInScale 0.6s ease-out forwards;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
  .blog-hero-title {
    font-size: 2.5rem;
  }
  
  .blog-hero-subtitle {
    font-size: 1.1rem;
  }
  
  .blog-card-body {
    padding: 1.5rem;
  }
  
  .blog-card-title {
    font-size: 1.25rem;
  }
  
  .blog-sidebar {
    position: relative;
    top: 0;
    margin-top: 3rem;
  }
  
  .blog-card-image {
    height: 100px;
  }
}

@media (max-width: 576px) {
  .blog-hero-section {
    padding: 100px 0 60px;
    margin-top: -60px;
    padding-top: 120px;
  }
  
  .blog-hero-title {
    font-size: 2rem;
  }
  
  .blog-card {
    margin-bottom: 1.5rem;
  }
  
  .widget {
    padding: 1.5rem;
  }
}

/* =====================================================
   ARTICLE PAGE STYLES
   ===================================================== */
.article-featured-image {
  max-height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.article-featured-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.article-content {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #374151;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  color: var(--secondary-color);
}

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

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-content figure {
  text-align: center;
  margin: 2rem 0;
}

.article-content figure img {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

.article-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
}

.article-content table th {
  background: var(--bg-light);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.article-content table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.social-share {
  text-align: center;
}

.social-share .btn-outline-primary {
  margin: 0 0.25rem;
}

/* =====================================================
   PLACEHOLDER IMAGE STYLES
   ===================================================== */
.blog-card-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.blog-card-image.placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M20 20L80 80M80 20L20 80" stroke="white" stroke-opacity="0.1" stroke-width="2"/%3E%3C/svg%3E');
  opacity: 0.3;
}

.blog-card-image.placeholder i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* =====================================================
   LOADING ANIMATION
   ===================================================== */
.blog-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.blog-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}