/* ============================================
   MobileCellMedix — Article Pages
   Shared styles for articles hub + individual articles
   ============================================ */

/* ---------- Article Page Base ---------- */
.article-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.article-page main {
  flex: 1;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.breadcrumbs nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb-link {
  font-size: 13px;
  font-weight: 500;
  color: #86868b;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.breadcrumb-link:hover {
  color: #dc2327;
}

.breadcrumb-sep {
  font-size: 12px;
  color: #48484a;
  user-select: none;
}

.breadcrumb-current {
  font-size: 13px;
  font-weight: 500;
  color: #f5f5f7;
  letter-spacing: 0.01em;
}

/* ---------- Article Header ---------- */
.article-header {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #dc2327;
  margin-bottom: 16px;
}

.article-category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2327;
}

.article-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f5f5f7;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #86868b;
  font-weight: 500;
}

.article-meta-item svg {
  flex-shrink: 0;
  color: #48484a;
}

/* ---------- Article Body ---------- */
.article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-body p {
  font-size: 17px;
  color: #a1a1a6;
  line-height: 1.75;
  letter-spacing: -0.003em;
  margin-bottom: 24px;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body p strong {
  color: #f5f5f7;
  font-weight: 600;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: #f5f5f7;
  letter-spacing: -0.02em;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: #f5f5f7;
  letter-spacing: -0.015em;
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.article-body ul,
.article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-body li {
  font-size: 17px;
  color: #a1a1a6;
  line-height: 1.75;
  margin-bottom: 8px;
  letter-spacing: -0.003em;
}

.article-body li strong {
  color: #f5f5f7;
  font-weight: 600;
}

.article-body .callout {
  background: rgba(220, 35, 39, 0.06);
  border-left: 3px solid #dc2327;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.article-body .callout p {
  color: #d1d1d6;
  margin-bottom: 0;
}

.article-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 48px 0;
}

/* ---------- Article CTA ---------- */
.article-cta {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-cta-card {
  background: #1c1c1e;
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.article-cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 35, 39, 0.3), transparent);
}

.article-cta-card h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f5f5f7;
  margin-bottom: 12px;
}

.article-cta-card p {
  font-size: 16px;
  color: #86868b;
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.article-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Related Articles ---------- */
.related-articles {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.related-articles h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f5f5f7;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-card {
  background: #1c1c1e;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.related-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #dc2327;
}

.related-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f5f5f7;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.related-card p {
  font-size: 14px;
  color: #86868b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-arrow {
  font-size: 13px;
  font-weight: 500;
  color: #dc2327;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.related-card:hover .related-card-arrow {
  gap: 8px;
}

/* =============================================
   Articles Hub / Listing Page
   ============================================= */

.articles-hub-hero {
  padding: 80px 24px 48px;
  text-align: center;
}

.articles-hub-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.07;
  color: #f5f5f7;
  margin-bottom: 12px;
}

.articles-hub-hero p {
  font-size: 19px;
  color: #86868b;
  font-weight: 400;
  letter-spacing: -0.005em;
  max-width: 560px;
  margin: 0 auto;
}

/* Category Filter */
.articles-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #86868b;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 980px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.filter-btn.active {
  color: #ffffff;
  background: #dc2327;
  border-color: #dc2327;
}

/* Articles Grid */
.articles-grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: #1c1c1e;
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease, border-color 0.35s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(204, 32, 48, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(220, 35, 39, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2327;
  margin-bottom: 4px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.article-card:hover .article-card-icon {
  transform: scale(1.05);
  background: rgba(220, 35, 39, 0.14);
}

.article-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #dc2327;
}

.article-card h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f5f5f7;
  line-height: 1.3;
}

.article-card p {
  font-size: 14px;
  color: #86868b;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.article-card-read {
  font-size: 14px;
  font-weight: 500;
  color: #dc2327;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.article-card:hover .article-card-read {
  gap: 8px;
}

.article-card-time {
  font-size: 12px;
  color: #48484a;
  font-weight: 500;
}

/* =============================================
   Light Mode Overrides — Articles
   ============================================= */

body.light-mode .breadcrumb-current {
  color: #1d1d1f;
}

body.light-mode .article-header h1 {
  color: #1d1d1f;
}

body.light-mode .article-body p {
  color: #6e6e73;
}

body.light-mode .article-body p strong,
body.light-mode .article-body li strong {
  color: #1d1d1f;
}

body.light-mode .article-body h2,
body.light-mode .article-body h3 {
  color: #1d1d1f;
}

body.light-mode .article-body li {
  color: #6e6e73;
}

body.light-mode .article-body .callout {
  background: rgba(220, 35, 39, 0.04);
}

body.light-mode .article-body .callout p {
  color: #3a3a3c;
}

body.light-mode .article-divider {
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .article-cta-card {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .article-cta-card h2 {
  color: #1d1d1f;
}

body.light-mode .article-cta-card p {
  color: #6e6e73;
}

body.light-mode .related-card {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .related-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .related-card h3 {
  color: #1d1d1f;
}

body.light-mode .related-card p {
  color: #6e6e73;
}

body.light-mode .related-card-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

/* Hub page light mode */
body.light-mode .articles-hub-hero h1 {
  color: #1d1d1f;
}

body.light-mode .filter-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #6e6e73;
}

body.light-mode .filter-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
  color: #1d1d1f;
}

body.light-mode .filter-btn.active {
  background: #dc2327;
  border-color: #dc2327;
  color: #ffffff;
}

body.light-mode .article-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

body.light-mode .article-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .article-card-icon {
  background: rgba(220, 35, 39, 0.06);
}

body.light-mode .article-card:hover .article-card-icon {
  background: rgba(220, 35, 39, 0.1);
}

body.light-mode .article-card h2 {
  color: #1d1d1f;
}

body.light-mode .article-card p {
  color: #6e6e73;
}

body.light-mode .article-card-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .article-card-time {
  color: #a1a1a6;
}

/* =============================================
   Responsive — Articles
   ============================================= */

@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 734px) {
  .articles-hub-hero {
    padding: 60px 20px 36px;
  }

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

  .articles-filters {
    padding: 0 20px 32px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }

  .articles-filters::-webkit-scrollbar {
    display: none;
  }

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

  .articles-grid-container {
    padding: 0 20px 72px;
  }

  .article-card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .article-header {
    padding: 32px 20px 0;
  }

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

  .article-body {
    padding: 32px 20px 60px;
  }

  .article-body h2 {
    font-size: 21px;
    margin-top: 36px;
  }

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

  .article-cta {
    padding: 0 20px 60px;
  }

  .article-cta-card {
    padding: 36px 24px;
    border-radius: 20px;
  }

  .related-articles {
    padding: 0 20px 72px;
  }

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

  .breadcrumbs {
    padding: 16px 20px 0;
  }
}
