/* Blogs Listing Page */
.blogs-section {
  padding-top: 120px;
  h2{
    font-weight: 500;
  }
}

.blogs-subtitle {
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  z-index: 100;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card .blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

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

.blog-card .blog-image.placeholder {
  background: linear-gradient(135deg, #59398B 0%, #320A70 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card .blog-image.placeholder img {
  width: 60px;
  height: auto;
  object-fit: contain;
}

.blog-card .blog-content {
  padding: 24px;
}

.blog-card .blog-date {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #320A70;
  margin: 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.blog-card .read-more {
  font-size: 14px;
  font-weight: 600;
  color: #59398B;
  display: inline-block;
}

.no-blogs {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 8px;
}

.pagination nav {
  display: flex;
  gap: 8px;
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a {
  background: #fff;
  color: #320A70;
  border: 1px solid #ddd;
}

.pagination a:hover {
  background: #59398B;
  color: #fff;
  border-color: #59398B;
}

.pagination span.current {
  background: #320A70;
  color: #fff;
}

/* Single Blog Page */
.blog-single {
  padding-top: 120px;
}

.back-link {
  display: inline-block;
  color: #59398B;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #320A70;
}

.blog-article {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 900px;
  margin: 0 auto;
}

.blog-featured-image {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-header {
  padding: 40px 40px 20px;
  border-bottom: 1px solid #eee;
}

.blog-header .blog-date {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #320A70;
  margin: 16px 0;
  line-height: 1.3;
}

.blog-header .blog-author {
  font-size: 14px;
  color: #666;
}

.blog-body {
  padding: 40px;
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

.blog-body h2 {
  font-size: 24px;
  color: #320A70;
  margin: 32px 0 16px;
}

.blog-body h3 {
  font-size: 20px;
  color: #320A70;
  margin: 30px 0 12px;
}

.blog-body p {
  margin-bottom: 20px;
  white-space: pre-line;
}

.blog-body ul,
.blog-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.blog-body li {
  margin-bottom: 8px;
}

.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.blog-body blockquote {
  border-left: 4px solid #59398B;
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: #666;
}

.blog-body a {
  color: #59398B;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.blog-body a:hover {
  color: #320A70;
}

.blog-body code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: #d63384;
}

.blog-body pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

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

.blog-body hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 32px 0;
}

.blog-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.blog-body th,
.blog-body td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.blog-body th {
  background: #f8f8f8;
  font-weight: 600;
  color: #320A70;
}

.blog-body tr:nth-child(even) {
  background: #fafafa;
}

.blog-share {
  padding: 20px 40px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #eee;
}

.blog-share span {
  font-weight: 500;
  color: #666;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  transition: all 0.3s ease;
}

.share-btn:hover {
  background: #59398B;
  color: #fff;
}

.share-btn.twitter:hover {
  background: #000;
}

.share-btn.linkedin:hover {
  background: #0077b5;
}

/* RTL Support */
[dir="rtl"] .back-link {
  direction: rtl;
}

[dir="rtl"] .blog-body blockquote {
  border-left: none;
  border-right: 4px solid #59398B;
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .blog-body ul,
[dir="rtl"] .blog-body ol {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .blog-body th,
[dir="rtl"] .blog-body td {
  text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
  .blogs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blogs-grid {
    grid-template-columns: 1fr;
  }

  .blog-header {
    padding: 24px 20px 16px;
  }

  .blog-header h1 {
    font-size: 24px;
  }

  .blog-body {
    padding: 24px 20px;
  }

  .blog-share {
    padding: 16px 20px 24px;
  }
}
