/* =========================================
   ARTICLE & BLOG STYLES — V2 Premium
   ========================================= */

/* ── Reading Progress Bar ── */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
  z-index: 9999;
  transition: width .15s linear;
  border-radius: 0 0 0 2px;
}

/* ── Article Hero V2 (Full Image Background) ── */
.article-hero-v2 {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.article-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 26, 46, 0.95) 0%,
    rgba(15, 26, 46, 0.7) 40%,
    rgba(15, 26, 46, 0.3) 70%,
    rgba(15, 26, 46, 0.15) 100%
  );
}
.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 56px;
  width: 100%;
}

/* ── Breadcrumb V2 ── */
.article-breadcrumb-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.article-breadcrumb-v2 a {
  color: rgba(255,255,255,.75);
  font-weight: 600;
  transition: var(--transition);
}
.article-breadcrumb-v2 a:hover { color: var(--accent); }
.article-breadcrumb-v2 svg { opacity: .5; }
.breadcrumb-current { color: rgba(255,255,255,.45); }

/* ── Category Badge ── */
.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 20px;
  letter-spacing: .03em;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

/* ── Title V2 ── */
.article-title-v2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.35;
  max-width: 820px;
  margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

/* ── Meta Bar V2 ── */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}
.meta-chip svg { opacity: .7; }

/* ── Article Main V2 ── */
.article-main-v2 {
  background: var(--bg);
  position: relative;
}
.article-layout-v2 {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 56px 0 80px;
  align-items: start;
}

/* ── Content Wrapper V2 ── */
.article-content-wrapper-v2 {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 32px rgba(26,86,219,.04);
  border: 1px solid var(--border);
}

/* ── Share Bar V2 ── */
.article-share-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.share-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.share-buttons {
  display: flex;
  gap: 8px;
}
.share-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  cursor: pointer;
}
.share-icon:hover { transform: translateY(-2px); }
.share-icon.twitter:hover { background: #000; color: #fff; border-color: #000; }
.share-icon.facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-icon.whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.share-icon.copy-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.share-icon.copied { background: var(--success); color: #fff; border-color: var(--success); }

/* ── Article Body V2 ── */
.article-body-v2 {
  font-size: 1.08rem;
  color: var(--text-body);
  line-height: 2;
}
.article-body-v2 h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 48px 0 18px;
  padding-right: 16px;
  border-right: 4px solid var(--primary);
  line-height: 1.4;
}
.article-body-v2 h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 32px 0 12px;
}
.article-body-v2 p { margin-bottom: 20px; }
.article-body-v2 ul, .article-body-v2 ol {
  margin: 18px 0;
  padding-right: 28px;
}
.article-body-v2 li {
  margin-bottom: 12px;
  position: relative;
}
.article-body-v2 strong { color: var(--text-main); }
.article-body-v2 a, .auto-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(26,86,219,.15);
  transition: var(--transition);
}
.article-body-v2 a:hover, .auto-link:hover {
  border-bottom-color: var(--primary);
  color: var(--primary-light);
}
.article-body-v2 figure, .injected-figure {
  margin: 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}
.article-body-v2 figure img, .injected-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
.article-body-v2 figcaption, .injected-figure figcaption {
  background: var(--surface-2);
  padding: 12px 18px;
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}
.article-body-v2 .table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.article-body-v2 table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.article-body-v2 table td, .article-body-v2 table th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.article-body-v2 table tr:nth-child(even) { background: var(--surface-2); }
.article-body-v2 table tr:first-child td { background: var(--primary-pale); font-weight: 700; color: var(--text-main); }
.article-body-v2 code {
  background: var(--primary-pale);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .88em;
  font-family: 'Tajawal', sans-serif;
}

/* ── Tags V2 ── */
.article-tags-v2 {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.tags-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.tag-badge-v2 {
  background: var(--surface-2);
  color: var(--text-body);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}
.tag-badge-v2:hover {
  background: var(--primary-pale);
  color: var(--primary);
  border-color: rgba(26,86,219,.2);
  transform: translateY(-1px);
}

/* ── Author Box V2 ── */
.author-box-v2 {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 48px;
  padding: 28px;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.author-avatar-v2 {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.author-info-v2 .author-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.author-info-v2 h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.author-info-v2 p {
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 100px; }
.sidebar-cta {
  background: linear-gradient(145deg, var(--primary), #0f3a9e);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  color: white;
  margin-bottom: 24px;
}
.cta-icon { font-size: 2.5rem; margin-bottom: 12px; }
.sidebar-cta h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.sidebar-cta p { font-size: .9rem; opacity: .85; margin-bottom: 20px; }
.sidebar-btn {
  display: block;
  padding: 14px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  transition: var(--transition);
}
.phone-btn { background: white; color: var(--primary); }
.phone-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.wa-btn { background: #25D366; color: white; }
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,.3); }
.sidebar-toc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-toc h4 { font-size: 1rem; font-weight: 800; color: var(--text-main); margin-bottom: 14px; }
.sidebar-toc ul { list-style: none; padding: 0; }
.sidebar-toc li { margin-bottom: 6px; }
.sidebar-toc a {
  display: block;
  padding: 8px 12px;
  font-size: .88rem;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sidebar-toc a:hover { background: var(--primary-pale); color: var(--primary); }
.sidebar-toc .toc-sub a { padding-right: 28px; font-size: .82rem; }

/* ── Related Section V2 ── */
.related-section-v2 {
  padding: 80px 0;
  background: var(--surface-2);
}
.related-header {
  text-align: center;
  margin-bottom: 48px;
}
.related-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-pale);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid rgba(26,86,219,.15);
}
.related-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}
.related-header p {
  font-size: .95rem;
  color: var(--text-body);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Blog Hero ── */
.blog-hero {
  background: linear-gradient(165deg, var(--primary-pale) 0%, #fff 60%);
  padding: 120px 24px 48px;
  text-align: center;
}
.blog-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 16px;
}
.blog-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero-desc { font-size: 1.05rem; color: var(--text-body); max-width: 600px; margin: 0 auto 28px; }
.blog-search { max-width: 500px; margin: 0 auto 24px; }
.blog-search input {
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: var(--transition);
}
.blog-search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(26,86,219,.1); }
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: white;
  border: 1px solid var(--border);
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-body);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Blog Grid ── */
.blog-main { padding: 48px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(26,86,219,.2); }
.blog-card-img { height: 200px; overflow: hidden; background: var(--primary-pale); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-tag {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 700;
  width: fit-content;
}
.blog-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-main); line-height: 1.4; }
.blog-card p { font-size: .88rem; color: var(--text-body); line-height: 1.6; }
.blog-date { font-size: .8rem; color: var(--text-muted); margin-top: auto; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .article-layout-v2 { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .article-hero-v2 { min-height: 420px; }
  .article-hero-content { padding: 120px 20px 40px; }
  .article-title-v2 { font-size: 1.4rem; }
  .article-meta-bar { gap: 8px; }
  .meta-chip { padding: 5px 10px; font-size: .78rem; }
  .article-layout-v2 { padding: 32px 0 48px; gap: 24px; }
  .article-content-wrapper-v2 { padding: 28px 20px; border-radius: var(--radius-lg); }
  .article-share-v2 { flex-direction: column; align-items: flex-start; gap: 12px; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .blog-filters { gap: 6px; }
  .filter-btn { padding: 8px 14px; font-size: .82rem; }
  .blog-hero { padding: 100px 20px 36px; }
  .author-box-v2 { flex-direction: column; align-items: center; text-align: center; }
}
