/* html{
    font-family: inherit;
  } */
/* Blog Header Section */
.blog-header {
  background: white;
  padding: 80px 0 30px;
  /* color: #3d59ab; */
  position: relative;
  overflow: hidden;
}

.container {
  max-width: 90% !important;
}

.blog-header::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="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.blog-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
  color: #3d59ab;
}

.blog-header p {
  font-size: 1.25rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* Featured Post Section */
.featured-section {
  padding: 80px 0;
  background: #f8fafc;
}

.section-title {
  text-align: center;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #3d59ab;
}

.section-title p {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.featured-article {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 350px; /* Fixed height */
}

.featured-article:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.featured-article .row {
  height: 100%;
  margin: 0;
}

.featured-article .col-lg-6 {
  height: 100%;
  padding: 0;
}

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

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

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

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #ffd700;
  color: black;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.featured-content {
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.featured-description {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
}

.author-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.post-date {
  color: #64748b;
  font-size: 0.85rem;
}

.read-time {
  background: #3d59ab;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Main Content Layout */
.main-content {
  background: white;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 4rem;
  align-items: start;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.article-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(61, 89, 171, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  box-shadow: 0 20px 40px rgba(61, 89, 171, 0.15);
  text-decoration: none;
  color: inherit;
}

.article-card:hover::before {
  opacity: 1;
}

.article-image {
  height: 200px;
  overflow: hidden;
  position: relative;
  /* Prevent flex shrinking */
  flex-shrink: 0;
}

.article-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: linear-gradient(45deg, #3d59ab 0%, transparent 50%, #ffd700 100%); */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-card:hover .article-image::after {
  opacity: 0.1;
}

.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-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: relative;
  flex: 1;
  min-height: 0; /* Allow content to shrink if needed */
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
  height: 3.5rem;
  flex-shrink: 0;
}

.article-card:hover .article-title {
  color: #2c4a8c;
}

.article-excerpt {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  height: 4.5rem; 
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  position: relative;
  /* Key: Keep at bottom */
  margin-top: auto;
  flex-shrink: 0;
}

.article-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 1px;
  background: #ffd700;
  transition: width 0.3s ease;
}

.article-card:hover .article-meta::before {
  width: 100%;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transition: border-color 0.3s ease;
}


.article-author-name {
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.article-date {
  color: black;
  font-size: 0.85rem;
  background: #ffd700;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* No results styling */
.no-results {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  grid-column: 1 / -1;
}

.no-results h3 {
  color: #3d59ab;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-content {
    padding: 1.25rem;
  }

  .article-title {
    font-size: 1.1rem;
    height: 3rem;
  }

  .article-excerpt {
    height: 4rem;
  }
}

/* Category badge (optional enhancement) */
.article-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(45deg, #ffd700, #ffed4a);
  color: #3d59ab;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-content {
    padding: 1.25rem;
  }
}

/* Sidebar Categories */
.sidebar {
  position: sticky;
  top: 2rem;
}

.sidebar-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.5rem;
  position: relative;
}

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

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

.category-item {
  margin-bottom: 0.75rem;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  text-decoration: none;
  color: #475569;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.category-link:hover {
  background: #3d59ab;
  color: white;
  transform: translateX(5px);
  text-decoration: none;
}

.category-count {
  background: #e2e8f0;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-link:hover .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Newsletter Signup */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-input {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: #667eea;
}

.newsletter-btn {
  background: #3d59ab;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
}

/* CTA Section */
.cta-section {
  background: #3d59ab;
  padding: 100px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.cta-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.cta-description {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffd700;
  color: black;
  padding: 18px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.cta-button:hover {
  transform: translateY(-3px);
  /* box-shadow: 0 15px 30px white; */
  text-decoration: none;
  color: black;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .content-wrapper {
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }
}

@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-header h1 {
    font-size: 2.5rem;
  }

  .cta-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .blog-header {
    padding: 100px 0 60px;
  }

  .container {
  max-width: 95% !important;
}

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

  .blog-header p {
    font-size: 1.1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .sidebar-section {
    padding: 1.5rem;
  }

  .cta-section {
    padding: 80px 0;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-description {
    font-size: 1.1rem;
  }
}


@media (max-width: 767.98px) {
  .featured-article {
    margin-bottom: 1.5rem;
    height: auto;
  }
  
  .featured-image {
    height: 200px;
  }
  
  .featured-content {
    padding: 1.25rem;
  }
  
  .featured-title {
    font-size: 1.25rem;
  }
  
  .featured-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .featured-meta {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .author-info {
    gap: 10px;
  }
  
  .author-avatar {
    width: 40px;
    height: 40px;
  }
  
  .author-name {
    font-size: 0.9rem;
  }
  
  .post-date {
    font-size: 0.8rem;
  }
  
  .read-time {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
}

@media (max-width: 575.98px) {
  .featured-image {
    height: 180px;
  }
  
  .featured-badge {
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .featured-content {
    padding: 1rem;
  }
  
  .featured-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .featured-description {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }

  .featured-article {
    height: auto;
  }
}