/* ============= BLOG STYLES ============= */
/* Extends homepage styles - same fonts, colors, spacing */

/* Blog Layout */
.blog-wrapper {
  margin-top: 72px;
  min-height: 100vh;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: #F45407;
  color: white;
  padding: 12px 24px;
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 20px 0 0;
  font-size: 14px;
  color: #6b7280;
}

.breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #F45407;
}

.breadcrumbs span {
  margin: 0 8px;
  color: #d1d5db;
}

.breadcrumbs .current {
  color: #1a1a1a;
  font-weight: 500;
}

/* Article Header */
.article-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 40px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6b7280;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-item svg {
  width: 16px;
  height: 16px;
  color: #9ca3af;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #fff5f0;
  color: #F45407;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}

.category-tag:hover {
  background: #ffe8dd;
}

/* Two-column layout */
.blog-content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
}

/* Article content */
.article-content {
  max-width: 100%;
  min-width: 0;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 48px 0 16px;
  padding-top: 16px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  margin: 32px 0 12px;
  line-height: 1.4;
}

.article-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  margin: 24px 0 8px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 20px;
}

.article-content a {
  color: #F45407;
  text-decoration: underline;
  text-decoration-color: rgba(244, 84, 7, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.article-content a:hover {
  text-decoration-color: #F45407;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px 24px;
  padding: 0;
}

.article-content li {
  font-size: 17px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 8px;
}

.article-content strong {
  color: #1e293b;
  font-weight: 600;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

/* Pro tip / blockquote */
.article-content blockquote {
  border-left: 4px solid #F45407;
  background: #fff9f6;
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  line-height: 1.7;
  color: #4b5563;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content blockquote strong {
  color: #F45407;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.article-content table th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.article-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}

.article-content table tr:nth-child(even) {
  background: #f9fafb;
}

.article-content table tr:last-child td {
  border-bottom: none;
}

/* Code blocks */
.article-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: #e11d48;
}

.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Table of Contents */
.toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.toc-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title svg {
  width: 16px;
  height: 16px;
  color: #F45407;
}

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

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-list a:hover {
  color: #F45407;
  background: #fff5f0;
}

.toc-list a.active {
  color: #F45407;
  background: #fff5f0;
  border-left-color: #F45407;
  font-weight: 500;
}

/* Sidebar CTA cards */
.sidebar-card {
  background: linear-gradient(135deg, #fff5f0 0%, #ffe8dd 100%);
  border: 1px solid #ffd9c7;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.sidebar-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 16px;
}

.sidebar-card .btn {
  display: block;
  text-align: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, #F45407 0%, #ff6b28 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(244, 84, 7, 0.25);
}

.sidebar-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 84, 7, 0.35);
}

.sidebar-card .btn-outline {
  background: white;
  color: #F45407;
  border: 2px solid #F45407;
  box-shadow: none;
}

.sidebar-card .btn-outline:hover {
  background: #F45407;
  color: white;
}

/* FAQ Section */
.faq-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid #e5e7eb;
}

.faq-section h2 {
  margin-top: 0 !important;
}

.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: #F45407;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  background: white;
  transition: background 0.2s ease;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.faq-question:hover {
  background: #fafafa;
}

.faq-question h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  padding-right: 16px;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: #F45407;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: #4b5563;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* CTA Banner */
.blog-cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin: 48px 0;
}

.blog-cta-banner h2 {
  font-size: 28px !important;
  font-weight: 700;
  color: white !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

.blog-cta-banner p {
  font-size: 16px;
  color: #94a3b8 !important;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.blog-cta-banner .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #F45407 0%, #ff6b28 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(244, 84, 7, 0.3);
}

.blog-cta-banner .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(244, 84, 7, 0.4);
}

.blog-cta-banner .cta-btn svg {
  width: 18px;
  height: 18px;
}

/* Related Posts */
.related-posts {
  padding: 48px 0;
  border-top: 1px solid #e5e7eb;
}

.related-posts h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 24px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.related-post-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
}

.related-post-card:hover {
  border-color: #F45407;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.related-post-card .card-category {
  font-size: 12px;
  font-weight: 600;
  color: #F45407;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.related-post-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.related-post-card:hover h3 {
  color: #F45407;
}

.related-post-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-card .card-meta {
  font-size: 13px;
  color: #9ca3af;
}

/* ============= BLOG LISTING PAGE ============= */
.blog-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 80px 0 48px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 44px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.blog-hero p {
  font-size: 18px;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Search */
.blog-search-wrap {
  max-width: 480px;
  margin: 24px auto 0;
  position: relative;
}

.blog-search-wrap input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.blog-search-wrap input::placeholder {
  color: #64748b;
}

.blog-search-wrap input:focus {
  border-color: #F45407;
  background: rgba(255,255,255,0.12);
}

.blog-search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #64748b;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 32px;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cat-tab:hover {
  color: #F45407;
  background: #fff5f0;
}

.cat-tab.active {
  color: white;
  background: #F45407;
}

/* Post Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.post-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Card Thumbnail */
.card-thumbnail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  min-height: 160px;
  position: relative;
  text-align: center;
}

.card-thumb-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.card-thumb-title {
  font-size: 15px;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.card-thumb-brand {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

.post-card:hover {
  border-color: #F45407;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.post-card .card-category {
  font-size: 12px;
  font-weight: 600;
  color: #F45407;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding: 20px 24px 0;
}

.post-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s ease;
  padding: 0 24px;
}

.post-card:hover h2 {
  color: #F45407;
}

.post-card .card-excerpt {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 24px;
}

.post-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #9ca3af;
  border-top: 1px solid #f3f4f6;
  padding: 12px 24px 20px;
  margin-top: auto;
}

/* Load More */
.load-more-wrap {
  text-align: center;
  margin-bottom: 64px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  border-color: #F45407;
  color: #F45407;
}

.no-results {
  text-align: center;
  padding: 64px 0;
  color: #6b7280;
  font-size: 16px;
  grid-column: 1 / -1;
}

/* Mobile TOC (collapsible) */
.mobile-toc {
  display: none;
  margin-bottom: 24px;
}

.mobile-toc-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.mobile-toc-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.mobile-toc.open .mobile-toc-toggle svg {
  transform: rotate(180deg);
}

.mobile-toc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-toc.open .mobile-toc-content {
  max-height: 1000px;
}

.mobile-toc-content .toc-list {
  padding: 16px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 12px 12px;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1199px) {
  .blog-content-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    display: none;
  }

  .mobile-toc {
    display: block;
  }

  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .blog-wrapper {
    margin-top: 72px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-content h2 {
    font-size: 22px;
  }

  .article-content h3 {
    font-size: 18px;
  }

  .article-content p,
  .article-content li {
    font-size: 16px;
  }

  .article-meta {
    gap: 8px;
  }

  .blog-cta-banner {
    padding: 32px 20px;
    border-radius: 12px;
  }

  .blog-cta-banner h2 {
    font-size: 22px !important;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

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

  .blog-hero h1 {
    font-size: 32px;
  }

  .blog-hero p {
    font-size: 16px;
  }

  .category-tabs {
    padding: 16px 0;
  }

  .blog-content-layout {
    gap: 24px;
  }

  .faq-question {
    padding: 16px 20px;
  }

  .faq-question h3 {
    font-size: 15px;
  }

  .faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 15px;
  }
}
