/* Blog Listing & Single Post Styles */

/* Shared Blog Card Styles */
.blog-card {
  width: 336px;
  height: auto;
  min-height: 344px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-behavior: smooth;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  cursor: pointer;
}

.blog-card:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 28px -6px rgba(93, 85, 249, 0.15);
}

.blog-card:hover .blog-image img {
  transform: scale(1.06);
}

.blog-card:hover .blog-title {
  color: var(--brand);
}

.blog-card:hover .blog-link {
  color: var(--brand-dark);
  gap: 10px;
}

.blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.blog-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.blog-date {
  font-size: 13.6px;
  font-weight: 600;
  color: var(--text-3);
}

.blog-title {
  font-size: 18.4px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.184px;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.blog-link {
  font-size: 14.4px;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    gap 0.2s ease,
    color 0.2s ease;
  margin-top: 4px;
}

.blog-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.blog-link:hover {
  color: var(--brand-dark);
  gap: 10px;
}

/* Blog Listing Page Styles (blogs.html) */
.blog-hero-section {
  padding: 80px 0 40px;
  width: 100%;
}

.blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14.8px;
  font-weight: 600;
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.22s ease;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-back-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  background-color: var(--brand-light, rgba(93, 85, 249, 0.08));
}

.blog-hero-content {
  max-width: 750px;
}

.blog-hero-heading {
  font-size: 41.6px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -1.248px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-hero-tagline {
  font-size: 16.8px;
  color: var(--text-2);
  line-height: 1.6;
}

.blog-grid-section {
  padding: 100px 0 90px;
  width: 100%;
}

.blog-page-grid,
.random-blogs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
}

.blog-page-grid .blog-card,
.random-blogs-grid .blog-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 100%;
}

@media (min-width: 1400px) {
  .blog-page-grid,
  .random-blogs-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
}

@media (min-width: 999px) and (max-width: 1399px) {
  .random-blogs-grid .blog-card:nth-child(n + 4) {
    display: none !important;
  }
}

@media (max-width: 998px) {
  .blog-page-grid,
  .random-blogs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .blog-hero-heading {
    font-size: 35.2px;
  }
}

@media (max-width: 668px) {
  .blog-hero-section {
    padding: 90px 0 30px;
  }

  .blog-hero-heading {
    font-size: 28.8px;
  }

  .blog-page-grid,
  .random-blogs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blog-page-grid .blog-card,
  .random-blogs-grid .blog-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* Single Blog Post Content Page Styles (blog-post.html) */
.blog-post-page {
  width: 100%;
  padding: 80px 0 70px;
  background-color: #ffffff;
  min-height: 100vh;
}

.blog-post-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

.blog-post-header {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 32px;
  box-shadow: none;
}

.blog-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 7.2px;
  padding: 6.4px 15.2px;
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.768px;
  text-transform: uppercase;
  color: #5d55f9;
  background-color: rgba(93, 85, 249, 0.08);
  border: 1px solid rgba(93, 85, 249, 0.2);
  border-radius: 20px;
  margin-bottom: 19.2px;
}

.blog-post-title {
  font-size: 33.6px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.84px;
  margin-bottom: 12px;
}

.blog-post-subtitle {
  font-size: 16.8px;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 17.6px;
  max-width: 900px;
}

.blog-post-subtitle.legal-header-meta {
  font-size: 16.32px;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 17.6px;
}

.blog-post-subtitle.legal-header-meta strong {
  color: #0f172a;
  font-weight: 700;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22.4px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.blog-author-info {
  display: flex;
  align-items: center;
  gap: 12.8px;
}

.blog-author-details {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-author-name {
  font-weight: 700;
  font-size: 15.68px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6.4px;
}

.blog-post-date-read {
  font-size: 14.08px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 12.8px;
}

.blog-post-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  position: relative;
}

.blog-toc-sidebar {
  position: sticky;
  top: 83.2px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22.4px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

.blog-toc-sidebar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.blog-toc-sidebar::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.blog-toc-sidebar::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
}

.blog-toc-sidebar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
  margin: 8px 0;
}

.blog-toc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.blog-toc-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}

.blog-toc-mobile-btn {
  display: none;
}

.blog-toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.08px;
  font-weight: 800;
  letter-spacing: 0.8448px;
  text-transform: uppercase;
  color: #5d55f9;
  padding-bottom: 12px;
  margin-bottom: 14.4px;
  border-bottom: 1px solid #e2e8f0;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6.4px;
}

.blog-toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10.4px 13.6px;
  font-size: 15.6px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.22s ease;
  line-height: 1.38;
}

.blog-toc-num {
  font-size: 13.44px;
  font-weight: 800;
  color: #94a3b8;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.blog-toc-link:hover {
  color: #5d55f9;
  background-color: rgba(93, 85, 249, 0.06);
}

.blog-toc-link:hover .blog-toc-num {
  color: #5d55f9;
}

.blog-toc-link.active {
  color: #5d55f9;
  background-color: rgba(93, 85, 249, 0.08);
}

.blog-toc-link.active .blog-toc-num {
  color: #5d55f9;
}

.blog-post-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  min-width: 0;
}

.blog-post-featured-image {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 28.8px;
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  position: relative;
}

.blog-post-featured-image img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-post-featured-image:hover img {
  transform: scale(1.02);
}

.blog-image-caption {
  font-size: 13.76px;
  color: #64748b;
  text-align: center;
  padding: 10.4px 16px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  margin: 0;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.blog-article-body {
  color: #334155;
  font-size: 16.32px;
  line-height: 1.75;
}

.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15.6px;
}

.blog-article-body th,
.blog-article-body td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  font-size: 15.6px;
  line-height: 1.6;
}

.blog-article-body .blog-section {
  scroll-margin-top: 88px;
  margin-top: 24px;
  margin-bottom: 13.6px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.blog-article-body .blog-section:first-child,
.blog-article-body .blog-section:first-of-type {
  margin-top: 8px;
}

.blog-article-body .blog-section h2 {
  font-size: 23.2px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 8px;
  margin-bottom: 9.6px;
  line-height: 1.3;
  letter-spacing: -0.348px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6.4px;
  border-bottom: 2px solid #f1f5f9;
  width: 100%;
}

.blog-article-body .blog-section h3 {
  font-size: 19.2px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 24px;
  margin-bottom: 9.6px;
  line-height: 1.35;
  width: 100%;
}

.blog-article-body .blog-section h4 {
  font-size: 16.8px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 21.6px;
  margin-bottom: 8px;
  line-height: 1.4;
  width: 100%;
}

.blog-section-content {
  display: block !important;
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
}

.blog-article-body .blog-section h2 .faq-icon-box {
  display: none !important;
}

.blog-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(93, 85, 249, 0.12) 0%,
    rgba(93, 85, 249, 0.05) 100%
  );
  color: #5d55f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18.4px;
  flex-shrink: 0;
  border: 1px solid rgba(93, 85, 249, 0.15);
}

.blog-article-body .blog-section p {
  margin-top: 5.6px;
  margin-bottom: 9.6px;
  color: #334155;
  width: 100%;
}

.blog-article-body .blog-section p strong {
  color: #0f172a;
  font-weight: 700;
}

.blog-article-body ul,
.blog-article-body ol {
  padding-left: 17.6px;
  margin-top: 6.4px;
  margin-bottom: 12px;
  margin-left: 0;
  width: 100%;
  box-sizing: border-box;
}

.blog-article-body ul {
  list-style-type: disc;
}

.blog-article-body ol {
  list-style-type: decimal;
}

.blog-article-body li {
  margin-bottom: 7.2px;
  line-height: 1.6;
  color: #334155;
  font-size: 15.2px;
}

.blog-article-body li::marker {
  color: #0f172a;
  font-weight: 600;
}

.blog-article-body li strong {
  color: #0f172a;
}

.blog-callout {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(
    135deg,
    rgba(93, 85, 249, 0.05) 0%,
    rgba(93, 85, 249, 0.12) 100%
  );
  border: 1px solid rgba(93, 85, 249, 0.2);
  border-radius: 10px;
  padding: 12px 17.6px;
  margin: 12px 0;
  box-shadow: 0 2px 10px rgba(93, 85, 249, 0.04);
}

.blog-callout-title {
  font-weight: 700;
  color: #5d55f9;
  font-size: 16.32px;
  margin-bottom: 4.8px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.blog-callout p {
  margin-bottom: 0;
  font-size: 16.32px !important;
  color: #1e293b;
  line-height: 1.55;
  width: 100%;
}

.blog-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  gap: 16px;
  margin: 19.2px 0;
}

.blog-feature-card {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 17.6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.blog-feature-card:hover {
  transform: translateY(-2px);
  border-color: #5d55f9;
  box-shadow: 0 8px 20px -5px rgba(93, 85, 249, 0.12);
}

.blog-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(93, 85, 249, 0.12) 0%,
    rgba(93, 85, 249, 0.05) 100%
  );
  color: #5d55f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17.6px;
  margin-bottom: 12px;
  border: 1px solid rgba(93, 85, 249, 0.15);
}

.blog-feature-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 5.6px;
  color: #0f172a;
}

.blog-feature-card p {
  font-size: 14.4px;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.55;
}

.blog-subpoint-heading {
  font-size: 16.32px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 13.6px;
  margin-bottom: 3.2px;
  line-height: 1.35;
}

.blog-table-container {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  background-color: #ffffff;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15.2px;
  margin: 0;
}

.blog-table th {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  padding: 13.6px 16px;
  border-bottom: 1px solid #1e293b;
  text-transform: uppercase;
  font-size: 13.6px;
  letter-spacing: 0.544px;
}

.blog-table td {
  padding: 13.6px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  background-color: #ffffff;
  font-size: 15.2px;
}

.blog-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

.blog-table tr:last-child td {
  border-bottom: none;
}

.blog-quote-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 12.8px 17.6px;
  margin: 12.8px 0;
  box-shadow: 0 2px 10px rgba(126, 34, 206, 0.04);
  position: relative;
}

.blog-quote-box blockquote {
  margin: 0;
  font-size: 16.32px;
  font-style: italic;
  color: #4c1d95;
  line-height: 1.55;
  font-weight: 500;
}

.blog-quote-author {
  margin-top: 8px;
  font-size: 14.72px;
  font-weight: 700;
  color: #7e22ce;
  font-style: normal;
  display: flex;
  align-items: center;
  gap: 6.4px;
}

.blog-checklist {
  list-style: none;
  padding: 0;
  margin: 19.2px 0;
  display: flex;
  flex-direction: column;
  gap: 9.6px;
}

.blog-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.04px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.25s ease;
}

.blog-checklist li:hover {
  background: #ffffff;
  border-color: rgba(93, 85, 249, 0.3);
  transform: translateX(3px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.blog-checklist li i {
  color: #10b981;
  font-size: 18.4px;
  margin-top: 1.6px;
  flex-shrink: 0;
}

.blog-author-bio-card {
  display: flex;
  align-items: center;
  gap: 17.6px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20.8px;
  margin-top: 28.8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.blog-author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #5d55f9;
  box-shadow: 0 4px 15px rgba(93, 85, 249, 0.2);
  flex-shrink: 0;
}

.blog-author-bio-content h4 {
  font-size: 18.4px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6.4px;
}

.blog-author-bio-content p {
  font-size: 15.2px;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Random Recommended Articles Section */
.random-blogs-section {
  width: 100%;
  padding: 60px 0 90px;
  background-color: var(--page-bg, #f9f9ff);
  border-top: none;
}

.random-blogs-header {
  text-align: center;
  margin-bottom: 40px;
}

.random-blogs-small-badge {
  font-size: 13.6px;
  font-weight: 700;
  color: var(--brand, #5d55f9);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-block;
  margin-bottom: 8px;
}

.random-blogs-heading {
  font-size: 33.6px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .blog-post-container {
    max-width: 100%;
    padding: 0 32px;
  }
  .blog-post-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
  }
  .blog-post-content {
    padding: 0;
  }
}

@media (max-width: 992px) {
  .blog-post-page {
    padding: 105px 0 50px;
  }

  .blog-post-container {
    padding: 0 24px;
  }

  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .blog-toc-sidebar {
    display: none !important;
  }

  .blog-article-body .blog-section {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 22.4px;
  }

  .blog-article-body .blog-section h2 {
    cursor: default;
    margin-bottom: 12.8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 21.6px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    user-select: text;
    background: transparent !important;
  }

  .blog-section-content {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  .blog-post-title {
    font-size: 33.6px;
  }

  .blog-post-content {
    padding: 0;
  }

  .blog-post-featured-image img {
    height: 440px;
  }

  .blog-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-table-container {
    margin-left: -24px !important;
    margin-right: -24px !important;
    width: calc(100% + 48px) !important;
    max-width: calc(100% + 48px) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
  }

  .blog-table th:first-child,
  .blog-table td:first-child {
    padding-left: 24px;
  }

  .blog-table th:last-child,
  .blog-table td:last-child {
    padding-right: 24px;
  }
}

@media (max-width: 640px) {
  .blog-post-page {
    padding: 95px 0 40px;
  }

  .blog-post-container {
    padding: 0 16px;
  }

  .blog-post-header {
    padding: 0;
    margin-bottom: 24px;
  }

  .blog-post-title {
    font-size: 27.2px;
  }

  .blog-post-subtitle {
    font-size: 15.68px;
  }

  .blog-post-content {
    padding: 0;
    border-radius: 0;
  }

  .blog-post-featured-image img {
    height: 340px;
  }

  .blog-feature-grid {
    grid-template-columns: 1fr;
  }

  .blog-table-container {
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
  }

  .blog-table th:first-child,
  .blog-table td:first-child {
    padding-left: 16px;
  }

  .blog-table th:last-child,
  .blog-table td:last-child {
    padding-right: 16px;
  }

  .blog-article-body .blog-section h2 {
    font-size: 20.48px !important;
    font-weight: 700 !important;
    line-height: 1.35;
  }

  .blog-article-body .blog-section h3 {
    font-size: 17.92px;
    font-weight: 700;
  }

  .blog-author-bio-card {
    flex-direction: column;
    text-align: center;
  }
}
