/* ProAffiliaters Blog Stylesheet - Fully Responsive */
.blog-hero {
  padding: 2.5rem 1rem 2rem;
  background: radial-gradient(circle at top center, rgba(124, 58, 237, 0.15), transparent 70%);
  text-align: center;
  margin-bottom: 1rem;
}

.blog-hero .div-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100%;
}

@media (min-width: 768px) {
  .blog-hero {
    padding: 4.5rem 1.5rem 2.5rem;
    margin-bottom: 1.5rem;
  }
}

.blog-hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--foreground, #0f172a);
  word-break: break-word;
  text-align: center;
}

.blog-hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  color: var(--muted-foreground, #64748b);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  text-align: center;
}

/* Hide hero subtext on small mobile screens */
@media (max-width: 639px) {
  .blog-hero-sub {
    display: none !important;
  }
}

/* Category Filter & Search */
.blog-controls {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .blog-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    margin-bottom: 3rem;
  }
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 639px) {
  .category-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-pills::-webkit-scrollbar {
    display: none;
  }
}

.category-pill {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: var(--card, #ffffff);
  color: var(--foreground, #334155);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  shrink: 0;
}

@media (min-width: 768px) {
  .category-pill {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }
}

.category-pill:hover,
.category-pill.active {
  background: linear-gradient(135deg, #3b5bfa, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 91, 250, 0.25);
}

.blog-search-box {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .blog-search-box {
    width: 280px;
  }
}

.blog-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: var(--card, #ffffff);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.blog-search-input:focus {
  border-color: #3b5bfa;
  box-shadow: 0 0 0 3px rgba(59, 91, 250, 0.15);
}

.blog-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Grid Layout */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1.5rem;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Card */
.blog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -10px rgba(59, 91, 250, 0.12);
  border-color: rgba(59, 91, 250, 0.3);
}

.blog-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .blog-card-img-wrapper {
    height: 200px;
  }
}

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

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

.blog-card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.blog-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 768px) {
  .blog-card-content {
    padding: 1.5rem;
  }
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .blog-card-title {
    font-size: 1.15rem;
  }
}

.blog-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-author-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

/* Featured Post Spotlight */
.featured-post {
  display: none !important;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .featured-post {
    display: block !important;
  }
}

@media (min-width: 768px) {
  .featured-post {
    padding: 0 1.5rem;
    margin-bottom: 3rem;
  }
}

.featured-card {
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.3);
  color: #ffffff;
}

@media (min-width: 768px) {
  .featured-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    border-radius: 1.5rem;
  }
}

.featured-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 2;
}

@media (min-width: 768px) {
  .featured-card-body {
    padding: 2.5rem;
    order: 1;
  }
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(59, 91, 250, 0.3);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.2);
  margin-bottom: 0.85rem;
  width: fit-content;
}

.featured-title {
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.featured-desc {
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.featured-img-container {
  position: relative;
  width: 100%;
  height: 200px;
  order: 1;
}

@media (min-width: 768px) {
  .featured-img-container {
    height: 100%;
    min-height: 280px;
    order: 2;
  }
}

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

/* Single Article Details */
.article-header {
  padding: 2.5rem 1rem 1.5rem;
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 768px) {
  .article-header {
    padding: 4rem 1.5rem 2rem;
  }
}

.article-category {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(59, 91, 250, 0.1);
  color: #3b5bfa;
  margin-bottom: 0.85rem;
}

.article-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 1.25rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  word-break: break-word;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: #64748b;
}

.article-hero-img {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .article-hero-img {
    margin-bottom: 3rem;
    padding: 0 1.5rem;
  }
}

.article-hero-img img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .article-hero-img img {
    border-radius: 1.5rem;
  }
}

.article-body {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (min-width: 768px) {
  .article-body {
    padding: 0 1.5rem;
    margin-bottom: 4rem;
    font-size: 1.05rem;
    line-height: 1.8;
  }
}

.article-body h2 {
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  font-weight: 700;
  color: #0f172a;
  margin: 2rem 0 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.article-body h3 {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: 700;
  color: #1e293b;
  margin: 1.75rem 0 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem 1.25rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

/* Callout Box */
.blog-callout {
  padding: 1.25rem;
  border-radius: 0.85rem;
  margin: 1.75rem 0;
  border-left: 4px solid #3b5bfa;
  background: #f8fafc;
}

.blog-callout-info {
  border-left-color: #3b5bfa;
  background: rgba(59, 91, 250, 0.04);
}

.blog-callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.blog-callout h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

/* Blog Table Container */
.blog-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 500px;
}

.blog-table th,
.blog-table td {
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.blog-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}

/* Article CTA Card */
.article-cta {
  background: linear-gradient(135deg, #3b5bfa, #7c3aed);
  border-radius: 1.25rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: #ffffff;
  margin: 3rem 0;
  box-shadow: 0 20px 40px -10px rgba(59, 91, 250, 0.3);
}

@media (min-width: 768px) {
  .article-cta {
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    margin: 4rem 0;
  }
}

.article-cta h3 {
  color: #ffffff;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 550px;
  margin: 0 auto 1.25rem;
  font-size: 0.9rem;
}

.article-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #3b5bfa;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
}

/* Homepage Blog Posts Section - 70vw Container, No Scrollbar */
.home-blogs-section {
  padding: 5rem 1.5rem;
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(124, 58, 237, 0.05) 50%, rgba(15, 23, 42, 0.02) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.home-blogs-container {
  width: 100%;
  max-width: 70vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-blogs-section .pr-head {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.home-blogs-section .pr-head h2 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.2;
}

.home-blogs-section .pr-head p {
  color: #64748b;
  font-size: 17px;
  margin: 0;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .home-blogs-container {
    max-width: 90vw;
  }
}

.home-blogs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  width: 100%;
  margin: 2.5rem 0;
}

@media (max-width: 639px) {
  .home-blogs-grid .blog-card:nth-child(n+2) {
    display: none !important;
  }
}

@media (min-width: 640px) {
  .home-blogs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-blogs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-blogs-action {
  text-align: center;
  margin-top: 1rem;
}

.read-more-blogs-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b5bfa, #7c3aed);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 25px -5px rgba(59, 91, 250, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.read-more-blogs-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(59, 91, 250, 0.6);
}
