/* blog.css - COMPLETE FIX FOR BLOG LAYOUT */

/* ===== BLOG HERO SECTION - MATCHING FAQ PAGE ===== */
#blog-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 150px 40px 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

#blog-hero .section-bg.contact-bg {
  background: radial-gradient(
      circle at 20% 50%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.15) 0%,
      transparent 50%
    );
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#blog-hero .contact-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

#blog-hero .contact-hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
}

#blog-hero h1 {
  font-size: 52px;
  line-height: 1.2;
  margin-bottom: 25px;
  background: linear-gradient(to right, #f8fafc, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  overflow: hidden;
}

#blog-hero .tagline {
  font-size: 14px;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  display: inline-block;
  padding: 5px 15px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 30px;
  animation: fadeIn 1s ease;
}

#blog-hero .description {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 35px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 1.5s ease;
}

/* UPDATED Search Box to match HELP CENTER page exactly */
#blog-hero .faq-search.blog-search {
  max-width: 600px;
  margin: 40px auto 0;
  position: relative;
}

#blog-hero .faq-search .search-form {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

#blog-hero .faq-search .search-form:focus-within {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

#blog-hero .faq-search .search-input {
  width: 100%;
  padding: 18px 25px;
  background: transparent;
  border: none;
  border-radius: 50px 0 0 50px;
  color: #f8fafc;
  font-size: 16px;
  transition: all 0.3s ease;
}

#blog-hero .faq-search .search-input:focus {
  outline: none;
}

#blog-hero .faq-search .search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* UPDATED: Search Button with text instead of icon (matching help-center) */
#blog-hero .faq-search .search-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: 0 50px 50px 0;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 100px;
}

#blog-hero .faq-search .search-btn:hover {
  background: #60a5fa;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MAIN CONTENT AREA ===== */
.blog-main-section.white-theme {
  background: white !important;
  padding: 80px 0;
  position: relative;
}

/* CONTAINER - This creates equal spacing on both sides of entire page */
.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px; /* 40px spacing on both left and right sides */
}

/* ===== MAIN LAYOUT FIXES ===== */
.blog-main-area {
  display: flex;
  gap: 40px; /* Space between columns */
  align-items: flex-start;
  width: 100%;
  position: relative;
}

/* Left Column - Main Content (68%) */
.blog-content-column {
  flex: 0 0 68%;
  width: 68%;
  min-width: 0; /* Prevent flex item from overflowing */
}

/* Right Column - Sidebar (30%) */
.blog-sidebar-column {
  flex: 0 0 30%;
  width: 30%;
  min-width: 0; /* Prevent flex item from overflowing */
}

/* ===== FEATURED ARTICLE ===== */
.featured-article {
  background: #1e293b;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 50px;
  border: 1px solid #334155;
  display: flex;
  min-height: 350px;
  width: 100%;
  position: relative;
}

.featured-image-container {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 350px;
  transition: transform 0.5s ease;
}

.featured-article:hover .featured-img {
  transform: scale(1.05);
}

.featured-category-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #3b82f6;
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

/* UPDATED: Featured Badge with theme colors */
.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); /* Theme colors */
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  z-index: 2;
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  }
  100% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  }
}

.featured-content-container {
  flex: 0 0 55%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article-title {
  font-size: 28px;
  color: #f8fafc;
  margin-bottom: 20px;
  line-height: 1.3;
}

.featured-article-excerpt {
  font-size: 16px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 25px;
}

.featured-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  font-size: 14px;
  color: #94a3b8;
}

/* UPDATED: Added icons to featured post meta */
.post-date,
.read-time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-date i,
.read-time i {
  color: #3b82f6;
  font-size: 14px;
}

.read-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.read-full-btn:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

/* ===== ARTICLES GRID ===== */
.search-results-header {
  background: #1e293b;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
  border: 1px solid #3b82f6;
}

.search-results-header h2 {
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 8px;
}

.result-count {
  color: #cbd5e1;
  margin-bottom: 15px;
}

.clear-search-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clear-search-link:hover {
  text-decoration: underline;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
  width: 100%;
}

.article-card {
  background: #1e293b;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #334155;
  transition: all 0.3s ease;
  height: 100%;
  width: 100%;
}

.article-card:hover {
  transform: translateY(-10px);
  border-color: #3b82f6;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.article-image {
  height: 200px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.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-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #3b82f6;
  color: white;
  padding: 5px 15px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-info {
  padding: 25px;
  width: 100%;
}

.article-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #94a3b8;
}

.date,
.time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-meta i {
  color: #3b82f6;
}

.article-title {
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 15px;
  line-height: 1.4;
}

.article-excerpt {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.read-more-link:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
  width: 100%;
}

.pagination-arrow,
.page-number {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #cbd5e1;
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-number:hover,
.pagination-arrow:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.page-number.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.pagination-ellipsis {
  color: #94a3b8;
  padding: 0 5px;
}

/* ===== SIDEBAR ===== */
.sidebar-card {
  background: #1e293b;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid #334155;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-card:last-child {
  margin-bottom: 0;
}

.sidebar-heading {
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 20px;
  padding-bottom: 10px;
  position: relative;
}

.sidebar-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
}

.sidebar-text {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 15px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.sidebar-link:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

/* Categories List */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}

.category-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #cbd5e1;
  transition: all 0.3s ease;
  padding: 5px 0;
}

.category-link:hover,
.category-link.active {
  color: #60a5fa;
}

.category-count {
  background: #0f172a;
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
}

/* Popular Posts */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.popular-post-item {
  display: flex;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #334155;
}

.popular-post-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.popular-post-image {
  flex: 0 0 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
}

.popular-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-info {
  flex: 1;
}

.popular-post-title {
  font-size: 15px;
  color: #f8fafc;
  margin-bottom: 6px;
  line-height: 1.4;
}

.popular-post-date {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.popular-post-link {
  font-size: 13px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.popular-post-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Tags */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  background: #0f172a;
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #334155;
}

.tag-item:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

/* Newsletter - UPDATED BUTTON STYLES */
.newsletter-content {
  text-align: center;
}

.newsletter-title {
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 15px;
}

.newsletter-description {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.newsletter-email {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid #334155;
  border-radius: 50px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 15px;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}

.newsletter-email:focus {
  border-color: #3b82f6;
}

/* UPDATED: Newsletter submit button now uses cta-button class */
.newsletter-submit.cta-button {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.newsletter-submit.cta-button::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;
}

.newsletter-submit.cta-button:hover::before {
  left: 100%;
}

.newsletter-submit.cta-button:hover {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.newsletter-success,
.newsletter-error {
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.newsletter-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.newsletter-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* No Articles */
.no-articles-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  width: 100%;
}

.no-articles-found i {
  font-size: 60px;
  color: #3b82f6;
  margin-bottom: 25px;
  display: block;
}

.no-articles-found h3 {
  font-size: 24px;
  color: #f8fafc;
  margin-bottom: 15px;
}

.no-articles-found p {
  color: #cbd5e1;
  font-size: 16px;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* WHITE THEME STYLES */
.white-theme .sidebar-card,
.white-theme .article-card,
.white-theme .featured-article,
.white-theme .search-results-header,
.white-theme .pagination-arrow,
.white-theme .page-number {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
}

.white-theme .article-title,
.white-theme .article-excerpt,
.white-theme .sidebar-heading,
.white-theme .sidebar-text,
.white-theme .featured-article-title,
.white-theme .featured-article-excerpt,
.white-theme .category-link,
.white-theme .popular-post-title,
.white-theme .newsletter-title,
.white-theme .newsletter-description,
.white-theme .search-results-header h2,
.white-theme .result-count,
.white-theme .clear-search-link,
.white-theme .read-more-link,
.white-theme .sidebar-link,
.white-theme .popular-post-link,
.white-theme .read-full-btn {
  color: #333 !important;
}

.white-theme .article-meta,
.white-theme .featured-meta,
.white-theme .popular-post-date,
.white-theme .tag-item {
  color: #666 !important;
}

.white-theme .article-meta i,
.white-theme .featured-meta i {
  color: #3b82f6 !important;
}

.white-theme .search-results-header {
  border: 1px solid #3b82f6 !important;
}

.white-theme .article-card:hover,
.white-theme .featured-article:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.white-theme .category-count {
  background: #e9ecef !important;
  color: #333 !important;
}

.white-theme .tag-item {
  background: #e9ecef !important;
  border: 1px solid #dee2e6 !important;
}

.white-theme .tag-item:hover {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

.white-theme .page-number.active,
.white-theme .page-number:hover,
.white-theme .pagination-arrow:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: white !important;
}

.white-theme .newsletter-email {
  background: white !important;
  border: 1px solid #dee2e6 !important;
  color: #333 !important;
}

.white-theme .newsletter-submit.cta-button {
  background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
  color: white !important;
}

.white-theme .no-articles-found h3,
.white-theme .no-articles-found p {
  color: #333 !important;
}

.white-theme .no-articles-found i {
  color: #3b82f6 !important;
}

/* UPDATED: Featured badge in white theme */
.white-theme .featured-badge {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
  color: white !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .blog-container {
    padding: 0 30px;
  }

  .blog-content-column {
    flex: 0 0 65%;
    width: 65%;
  }

  .blog-sidebar-column {
    flex: 0 0 33%;
    width: 33%;
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  #blog-hero {
    padding: 130px 20px 60px;
  }

  .blog-main-section.white-theme {
    padding: 60px 0;
  }

  .blog-main-area {
    flex-direction: column;
  }

  .blog-content-column,
  .blog-sidebar-column {
    flex: 0 0 100%;
    width: 100%;
  }

  .featured-article {
    flex-direction: column;
  }

  .featured-image-container,
  .featured-content-container {
    flex: 0 0 100%;
  }

  .featured-image-container {
    height: 300px;
  }

  .featured-content-container {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  #blog-hero {
    padding: 120px 20px 50px;
  }

  .blog-container {
    padding: 0 20px;
  }

  #blog-hero h1 {
    font-size: 36px;
  }

  #blog-hero .description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  #blog-hero .faq-search.blog-search {
    max-width: 500px;
  }

  .featured-article-title {
    font-size: 24px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .sidebar-card {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  #blog-hero {
    padding: 100px 15px 40px;
    min-height: 60vh;
  }

  .blog-main-section.white-theme {
    padding: 40px 0;
  }

  .blog-container {
    padding: 0 15px;
  }

  #blog-hero h1 {
    font-size: 32px;
  }

  #blog-hero .faq-search.blog-search {
    max-width: 400px;
  }

  #blog-hero .faq-search .search-input {
    padding: 16px 20px;
    font-size: 15px;
  }

  #blog-hero .faq-search .search-btn {
    padding: 0 20px;
    font-size: 15px;
    min-width: 80px;
  }

  .featured-article-title {
    font-size: 22px;
  }

  .featured-content-container {
    padding: 25px;
  }

  .article-info {
    padding: 20px;
  }

  .article-title {
    font-size: 18px;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .popular-post-item {
    flex-direction: column;
  }

  .popular-post-image {
    width: 100%;
    height: 150px;
  }

  .pagination-arrow,
  .page-number {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

.newsletter-loading {
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}