/* ==========================================================================
   DizitalXpert Blog & Content Hub Master Stylesheet
   Engineered for Readability, Performance, High Contrast & WCAG 2.2 AA
   ========================================================================== */

/* --- 1. Article Typography & Prose System --- */
.article-prose {
  color: #CBD5E1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem; /* 17px base for optimal readability */
  line-height: 1.8;
  letter-spacing: -0.011em;
}

.article-prose h2 {
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  scroll-margin-top: 6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .article-prose h2 {
    font-size: 2rem;
  }
}

.article-prose h3 {
  color: #F1F5F9;
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
}

.article-prose p {
  margin-bottom: 1.35rem;
}

.article-prose strong {
  color: #FFFFFF;
  font-weight: 600;
}

.article-prose a {
  color: #60A5FA;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-prose a:hover {
  color: #93C5FD;
}

.article-prose ul, 
.article-prose ol {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-prose ul {
  list-style-type: disc;
}

.article-prose ol {
  list-style-type: decimal;
}

.article-prose li {
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.article-prose blockquote {
  border-left: 4px solid #2563EB;
  background: rgba(37, 99, 235, 0.08);
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 1.75rem 0;
  color: #E2E8F0;
  font-style: italic;
}

/* --- 2. Executive Summary / AEO Takeaways Box --- */
.key-takeaways-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.25);
}

.key-takeaways-box h3 {
  color: #60A5FA;
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- 3. Sticky Table of Contents --- */
.sticky-toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sticky-toc::-webkit-scrollbar {
  width: 4px;
}

.sticky-toc::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.toc-link {
  display: block;
  font-size: 0.875rem;
  color: #94A3B8;
  padding: 0.45rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.4;
  text-decoration: none !important;
}

.toc-link:hover,
.toc-link.active {
  color: #FFFFFF;
  border-left-color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 0 0.375rem 0.375rem 0;
}

/* --- 4. Callout Alert Boxes --- */
.callout-box {
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #D1FAE5;
}

.callout-tip .callout-icon {
  color: #34D399;
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FEF3C7;
}

.callout-warning .callout-icon {
  color: #FBBF24;
}

.callout-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #DBEAFE;
}

.callout-info .callout-icon {
  color: #60A5FA;
}

/* --- 5. Clean Comparison Tables --- */
.article-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

.article-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #FFFFFF;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.article-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  vertical-align: top;
}

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

.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --- 6. Checklist Item Component --- */
.checklist-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.875rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #E2E8F0;
  font-size: 0.95rem;
}

.checklist-item:last-child {
  margin-bottom: 0;
}

.checklist-item .material-symbols-outlined {
  color: #10B981;
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* --- 7. FAQ Accordion for Articles & Hub --- */
.article-faq-item {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.article-faq-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.article-faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.article-faq-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: #94A3B8;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- 8. Contextual Article CTA Banner --- */
.article-cta-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 1rem;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

.article-cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* --- 9. Blog Hub Card Grid & Filter Pills --- */
.hub-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.8);
  color: #94A3B8;
  cursor: pointer;
}

.hub-filter-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.9);
}

.hub-filter-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.blog-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 99, 235, 0.15);
}

/* --- Blog Hub Layered Layout System --- */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-overflow: ellipsis;
  white-space: normal;
}

.blog-layer-item {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  width: 100%;
}

.blog-layer-item:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(22, 33, 56, 0.95);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 99, 235, 0.18);
}

.btn-read-more {
  background: #2563EB;
  color: #FFFFFF;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-read-more:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

/* Badges */
.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-digital-marketing {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-meta-ads {
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-google-ads {
  background: rgba(234, 179, 8, 0.15);
  color: #FACC15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-web-dev {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-app-dev {
  background: rgba(236, 72, 153, 0.15);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-seo {
  background: rgba(14, 165, 233, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-specialist {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
