/* Blog Page Specific Styles */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(59, 130, 246, 0.8)),
              url('../assets/blog header.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.page-header .container {
  padding-left: 20px;
  padding-right: 20px;
}

.page-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="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  opacity: 0.95;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.6;
}

/* Header Badge */
.header-badge {
  position: relative;
  z-index: 2;
  display: inline-block;
}

.badge-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.badge-content:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.badge-content i {
  color: #fbbf24;
  font-size: 1rem;
}

/* Header Stats */
.header-stats {
  position: relative;
  z-index: 2;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
}

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

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

.stat-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.stat-icon i {
  font-size: 1.2rem;
  color: white;
  transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-content h5 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.stat-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

/* Blog Categories */
.blog-categories {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.blog-categories .container {
  padding-left: 20px;
  padding-right: 20px;
}

.categories-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.category-link {
  display: inline-block;
  padding: 12px 24px;
  color: var(--medium-gray);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.category-link:hover,
.category-link.active {
  color: var(--white);
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-color: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.category-link.active {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* Search Section */
.search-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.search-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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  z-index: 0;
}

.search-card {
  background: white;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 400px;
}

.search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.08), transparent);
  transition: left 0.6s ease;
  z-index: 0;
}

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

.search-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 25px 60px rgba(30, 58, 138, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.search-content {
  padding: 40px;
  position: relative;
  z-index: 2;
  flex: 1;
}

.search-visual {
  padding: 40px;
  position: relative;
  z-index: 2;
  background: #f8fafc;
  border-left: 1px solid #e5e7eb;
}

.search-container {
  background: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.search-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6, #1e40af);
}

.search-content .section-title {
  color: #1e3a8a;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.search-description {
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.search-features {
  margin-top: 32px;
}

.search-features .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.search-features .feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.search-features .feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.search-features .feature-icon i {
  color: white;
  font-size: 1.2rem;
}

.search-features .feature-item:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.search-features .feature-content h5 {
  color: #1e3a8a;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.search-features .feature-content p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.search-input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input-group .input-group-text {
  background: #f8fafc;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
}

.search-input-group .form-control {
  border: none;
  padding: 15px 20px;
  font-size: 1rem;
  background: var(--white);
}

.search-input-group .form-control:focus {
  box-shadow: none;
  background: var(--white);
}

.search-input-group .btn {
  padding: 15px 25px;
  font-weight: 600;
  border: none;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

.search-suggestions {
  margin-top: 25px;
}

.suggestions-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-weight: 600;
  color: #374151;
}

.suggestions-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #64748b;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.search-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.1), transparent);
  transition: left 0.5s ease;
}

.search-tag:hover::before {
  left: 100%;
}

.search-tag:hover {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.search-tag i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.search-tag:hover i {
  transform: scale(1.1);
}

/* Section Subtitle */
.section-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 0;
  font-weight: 400;
}

/* View Options */
.view-options {
  display: flex;
  gap: 0;
}

.view-options .btn-group {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.view-options .btn {
  padding: 10px 14px;
  border-radius: 0;
  transition: all 0.3s ease;
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
}

.view-options .btn:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.view-options .btn:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.view-options .btn:hover {
  background: #f9fafb;
  color: #374151;
  transform: translateY(-1px);
}

.view-options .btn.active {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Loading and No Results States */
.loading-state {
  padding: 60px 0;
}

.loading-state .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

.no-results {
  padding: 60px 0;
}

.no-results-icon {
  opacity: 0.6;
}

.no-results h4 {
  font-weight: 600;
  margin-bottom: 10px;
}

.no-results p {
  margin-bottom: 25px;
}

.no-results .btn {
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.no-results .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

/* Featured Blog Post */
.featured-post {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  padding: 60px 0;
}

.featured-post .container {
  padding-left: 20px;
  padding-right: 20px;
}

.featured-post-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  max-width: 100%;
  margin: 0 auto;
}

.featured-post-card:hover {
  box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2);
}

.featured-post-card:hover {
  transform: translateY(-5px);
}

.featured-post-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.featured-post-image img {
  width: 100%;
  height: 300px;
  min-height: 300px;
  object-fit: cover;
  border-radius: 16px;
  /* Prevent layout shift */
  aspect-ratio: 16 / 9;
  display: block;
}

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

.featured-post-content {
  padding-left: 30px;
}

@media (max-width: 991px) {
  .featured-post-content {
    padding-left: 0;
    padding-top: 30px;
  }
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.post-category {
  background: linear-gradient(135deg, var(--gold), #fbbf24);
  color: #ffffff !important;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-category,
.post-category * {
  color: #ffffff !important;
}

.post-date {
  color: var(--medium-gray);
  font-size: 0.9rem;
  font-weight: 500;
}

.featured-post-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 22px;
  line-height: 1.35;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featured-post-excerpt {
  color: var(--medium-gray);
  line-height: 1.85;
  margin-bottom: 32px;
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  text-align: left;
}

.featured-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.post-author {
  display: flex;
  align-items: center;
  color: var(--medium-gray);
  font-size: 0.9rem;
}

.post-author i {
  margin-right: 8px;
  color: var(--primary-blue);
  font-size: 1.1rem;
}

.featured-post-footer .btn {
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Blog Posts Grid */
.blog-posts {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  position: relative;
  padding: 60px 0 80px;
}

.blog-posts .section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-posts .section-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #6b7280;
  margin-bottom: 0;
  line-height: 1.6;
}

.blog-posts::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.blog-posts .container {
  max-width: 1400px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Laptop screens - Reduce content width */
@media (min-width: 1024px) and (max-width: 1920px) {
  .blog-posts .container {
    max-width: 1200px;
  }
}

.blog-posts .posts-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 100%;
}

.blog-posts .row {
  margin: 0;
  --bs-gutter-x: 2rem;
  --bs-gutter-y: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.blog-posts .row > [class*='col-'] {
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .blog-posts .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1.5rem;
  }
}

.blog-post-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.blog-post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15);
  border-color: rgba(30, 58, 138, 0.1);
}

.post-image {
  position: relative;
  overflow: hidden;
  height: 180px;
  min-height: 180px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  /* Prevent layout shift */
  aspect-ratio: 16 / 9;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  /* Prevent layout shift */
  display: block;
}

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

/* Post Badge on Image */
.post-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
}

.badge-label {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(59, 130, 246, 0.95));
  backdrop-filter: blur(10px);
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-label,
.badge-label * {
  color: #ffffff !important;
}

.post-content {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-content .post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.post-meta > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
}

.post-meta i {
  color: #1e3a8a;
  font-size: 0.9rem;
}

.post-date,
.post-reading-time {
  transition: color 0.3s ease;
}

.blog-post-card:hover .post-date,
.blog-post-card:hover .post-reading-time {
  color: #1e3a8a;
}

.post-title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 14px;
  line-height: 1.4;
  transition: color 0.3s ease;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.blog-post-card:hover .post-title {
  color: #1e3a8a;
}

.post-excerpt {
  color: #6b7280;
  line-height: 1.75;
  margin-bottom: auto;
  font-size: clamp(0.95rem, 1.5vw, 1rem);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}

.post-footer .post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
}

.post-footer .post-author i {
  font-size: 1.2rem;
  color: #1e3a8a;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.read-more-btn:hover {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.read-more-btn i {
  transition: transform 0.3s ease;
}

.read-more-btn:hover i {
  transform: translateX(3px);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

.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="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.2;
  z-index: 0;
}

.cta-card {
  background: white;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.cta-content {
  padding: 50px;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 20px;
  line-height: 1.3;
}

.cta-description {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 40px;
  line-height: 1.6;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #f8fafc;
  border-radius: 25px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.cta-feature:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.cta-feature i {
  color: #1e3a8a;
  font-size: 1.1rem;
}

.cta-feature span {
  color: #334155;
  font-weight: 500;
  font-size: 0.95rem;
}

.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="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.2;
}

.cta-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 40%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transform: rotate(15deg);
}

.cta-container {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.95;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  padding: 15px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta-buttons .btn i {
  font-size: 1.1rem;
  line-height: 1;
  vertical-align: middle;
}

.cta-buttons .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-buttons .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  border: none;
}

.cta-buttons .btn-outline-primary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

.cta-buttons .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* Blog grid specific styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
}

.blog-post {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-5px);
}

.blog-hero {
  background: var(--light-gray);
  padding: 80px 0;
  text-align: center;
}

.blog-content {
  padding: 80px 0;
}

/* Article Container */
.article-container {
            background: white;
            border-radius: 20px;
            padding: 50px 60px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
            margin-bottom: 40px;
            max-width: 1100px;
            margin-left: auto;
            margin-right: auto;
        }

/* Laptop screens - Reduce article container width */
@media (min-width: 1024px) and (max-width: 1920px) {
  .article-container {
    max-width: 1000px;
    padding: 45px 50px;
  }
}

/* Professional Enhancements */
/* Note: .section-title and .blog-post-card styles are defined earlier in the file */

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-header {
    padding: 80px 0;
    min-height: 350px;
  }

  .page-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .blog-hero {
    padding: 60px 0;
  }

  .blog-content {
    padding: 60px 0;
  }

  .search-container {
    padding: 25px;
  }

  .header-stats .row {
    gap: 10px;
  }

  .stat-item {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .page-header {
    padding: 80px 15px 60px;
    min-height: auto;
  }

  .page-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  .page-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-header {
    padding: 60px 15px;
    min-height: 300px;
  }

  .page-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .blog-categories {
    padding: 30px 15px;
  }

  .search-section,
  .featured-post,
  .cta-section {
    padding: 40px 15px;
  }

  .featured-post .container,
  .blog-categories .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .search-section {
    padding: 60px 20px;
  }

  .search-card {
    flex-direction: column;
    min-height: auto;
  }

  .search-content {
    padding: 30px 25px;
  }

  .search-visual {
    padding: 30px 25px;
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }

  .search-features .feature-item {
    padding: 16px;
    margin-bottom: 16px;
  }

  .search-features .feature-icon {
    width: 40px;
    height: 40px;
  }

  .search-features .feature-icon i {
    font-size: 1rem;
  }

  .search-features .feature-content h5 {
    font-size: 1rem;
  }

  .search-features .feature-content p {
    font-size: 0.9rem;
  }

  .cta-section {
    padding: 60px 20px;
  }

  .cta-content {
    padding: 40px 30px;
  }

  .cta-features {
    gap: 20px;
    margin-bottom: 30px;
  }

  .cta-feature {
    padding: 10px 16px;
  }

  .blog-posts {
    padding: 40px 15px 60px;
  }

  .blog-posts .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .blog-posts .row {
    margin: 0;
  }

  .blog-posts .row > [class*='col-'] {
    padding-left: 10px;
    padding-right: 10px;
  }

  .featured-post-card {
    padding: 25px 20px;
  }

  .featured-post-title {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
  }

  .featured-post-content {
    padding-left: 0;
    margin-top: 20px;
  }

  .featured-post-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 15px;
  }

  .categories-nav {
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
  }

  .category-link {
    font-size: 0.85rem;
    padding: 10px 18px;
  }

  .category-link {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .blog-post-card {
    margin-bottom: 0;
  }

  .post-image {
    height: 180px;
    min-height: 180px;
  }

  .post-content {
    padding: 20px 18px;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .post-footer {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .read-more-btn {
    justify-content: center;
    width: 100%;
  }

  .cta-section {
    padding: 50px 15px;
  }

  .cta-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
    padding: 12px 25px;
  }

  .cta-buttons .btn i {
    font-size: 1rem;
  }

  .article-container {
    padding: 40px 20px;
  }

  .search-container {
    padding: 25px 20px;
  }

  .search-suggestions {
    justify-content: center;
  }

  .suggestions-tags {
    justify-content: center;
  }

  .view-options {
    margin-top: 15px;
  }
}

@media (max-width: 576px) {
  .page-header {
    min-height: 250px;
    padding: 50px 15px;
  }

  .page-title {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
  }

  .stat-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto;
  }

  .stat-icon i {
    font-size: 0.9rem;
  }

  .stat-content h5 {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .stat-content p {
    font-size: 0.8rem;
  }

  .search-section {
    padding: 40px 15px;
  }

  .search-content {
    padding: 25px 20px;
  }

  .search-visual {
    padding: 25px 20px;
  }

  .search-features .feature-item {
    padding: 12px;
    margin-bottom: 12px;
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .search-features .feature-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto;
  }

  .search-features .feature-icon i {
    font-size: 0.9rem;
  }

  .search-features .feature-content h5 {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .search-features .feature-content p {
    font-size: 0.85rem;
  }

  .cta-section {
    padding: 40px 15px;
  }

  .cta-content {
    padding: 30px 20px;
  }

  .cta-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }

  .cta-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .cta-features {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }

  .cta-feature {
    padding: 8px 12px;
    justify-content: center;
  }

  .featured-post-card {
    padding: 25px 20px;
  }

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

  .post-image {
    height: 150px;
  }

  .post-content {
    padding: 16px;
  }

  .newsletter-title {
    font-size: clamp(1.6rem, 5vw, 2rem);
  }

  .newsletter-form .input-group {
    flex-direction: column;
  }

  .newsletter-form .form-control,
  .newsletter-form .btn {
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .newsletter-form .btn {
    padding: 15px 25px;
  }

  .blog-hero {
    padding: 40px 15px;
  }

  .blog-content {
    padding: 40px 15px;
  }

  .blog-title {
    font-size: 1.8rem;
  }

  .blog-post {
    padding: 20px 15px;
  }

  .article-container {
    padding: 30px 15px;
  }

  .header-stats .row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .stat-item {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .search-suggestions {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .search-tag {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

/* Animation Classes */
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Animations */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Staggered Animation for Cards */
.blog-post-card {
  animation: fadeInUp 0.6s ease forwards;
  animation-fill-mode: both;
}

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

/* Hover Effects for Interactive Elements */
.interactive-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Focus States for Accessibility */
.search-input-group .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.category-link:focus,
.search-tag:focus,
.view-options .btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading Animation for Search */
.search-loading {
  position: relative;
}

.search-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 50px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Optimized hover effects */
.blog-post-card:hover .post-image img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Note: .section-title gradient effect and card shadows are defined earlier in the file */

/* Category Link Animations */
.category-link {
  position: relative;
  overflow: hidden;
}

.category-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.category-link:hover::before {
  left: 100%;
}

/* Post Card Hover Effects - Top border animation */
.blog-post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 1;
}

.blog-post-card:hover::before {
  transform: scaleX(1);
}

/* --- Mobile adjustments for search section and newsletter --- */
@media (max-width: 576px) {
  .cta-section {
    padding: 45px 20px;
  }

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

  .cta-description {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .cta-buttons .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .cta-buttons .btn i {
    font-size: 0.9rem;
  }

  /* Enhanced blog mobile responsiveness */
  .blog-header {
    padding: 80px 15px 40px;
  }

  .blog-header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .blog-header p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .search-section {
    padding: 30px 15px;
  }

  .search-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .search-section .input-group {
    margin: 0 auto;
    max-width: 100%;
  }

  .search-section .form-control {
    font-size: 16px;
    padding: 12px 16px;
  }

  .search-suggestions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-suggestions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .blog-posts {
    padding: 30px 15px;
  }

  .blog-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .blog-post-card {
    margin-bottom: 20px;
  }

  .post-content {
    padding: 20px 15px;
  }

  .post-content h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .post-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .post-meta {
    font-size: 0.8rem;
  }

  .view-options {
    margin-top: 15px;
    flex-direction: column;
    gap: 10px;
  }

  .view-options .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .article-container {
    padding: 30px 20px;
  }

  .search-section .input-group {
    margin: 0 auto;
    max-width: 100%;
  }

  .search-section .form-control {
    font-size: 0.95rem;
  }
}

/* =========================================================
   BLOG CONTENT FORMATTING & TYPOGRAPHY
========================================================= */

/* Content Wrapper - Main container for blog post content */
.content-wrapper,
.rich-content {
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.8;
  color: #334155;
  font-size: 1.1rem;
  text-align: left;
}

.content-wrapper h2,
.rich-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #1e3a8a;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.content-wrapper h2:first-child,
.rich-content h2:first-child {
  margin-top: 0;
}

.content-wrapper h3,
.rich-content h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: #2563eb;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.content-wrapper h4,
.rich-content h4 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 600;
  color: #3b82f6;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.content-wrapper p,
.rich-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #475569;
  text-align: left;
  font-size: 1.1rem;
}

.content-wrapper p:last-child,
.rich-content p:last-child {
  margin-bottom: 0;
}

.content-wrapper ul,
.content-wrapper ol,
.rich-content ul,
.rich-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

.content-wrapper ul,
.rich-content ul {
  list-style-type: disc;
}

.content-wrapper ol,
.rich-content ol {
  list-style-type: decimal;
}

.content-wrapper li,
.rich-content li {
  margin-bottom: 0.75rem;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
  padding-left: 0.5rem;
}

.content-wrapper li strong,
.rich-content li strong {
  color: #1e3a8a;
  font-weight: 600;
}

.content-wrapper a,
.rich-content a {
  color: #2563eb;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.content-wrapper a:hover,
.rich-content a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.content-wrapper strong,
.rich-content strong {
  font-weight: 600;
  color: #1e3a8a;
}

.content-wrapper em,
.rich-content em {
  font-style: italic;
  color: #64748b;
}

/* Spacing between sections */
.content-wrapper > * + h2,
.rich-content > * + h2 {
  margin-top: 3rem;
}

.content-wrapper > * + h3,
.rich-content > * + h3 {
  margin-top: 2.5rem;
}

/* Responsive adjustments for blog content */
@media (max-width: 768px) {
  .content-wrapper,
  .rich-content {
    font-size: 1rem;
    line-height: 1.7;
  }

  .content-wrapper h2,
  .rich-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  .content-wrapper h3,
  .rich-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .content-wrapper p,
  .rich-content p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .content-wrapper ul,
  .content-wrapper ol,
  .rich-content ul,
  .rich-content ol {
    padding-left: 1.5rem;
    margin: 1.25rem 0;
  }

  .content-wrapper li,
  .rich-content li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .content-wrapper,
  .rich-content {
    font-size: 0.95rem;
  }

  .content-wrapper h2,
  .rich-content h2 {
    font-size: 1.35rem;
  }

  .content-wrapper h3,
  .rich-content h3 {
    font-size: 1.2rem;
  }

  .content-wrapper ul,
  .content-wrapper ol,
  .rich-content ul,
  .rich-content ol {
    padding-left: 1.25rem;
  }
}