/* ==========================================================================
   Royal Auto Paints Qatar - Technical Article / Blog Detail Styling (v2.0)
   Design Language: Light Gray Primary Canvas (#F7F0F2), Master Graphite Gray (#58585A),
   Charcoal (#22272F), and Automotive Racing Yellow/Gold (#FFB800 / #F5C518).
   Zero blue tones (#0A3254 / #072239 eliminated completely).
   ========================================================================== */

:root {
  --royal-yellow-accent: #FFB800;
  --royal-yellow-gold: #F5C518;
  --royal-yellow-hover: #E0A200;
  --royal-gray-darkest: #14171C;
  --royal-gray-charcoal: #22272F;
  --royal-gray-slate: #333A45;
  --royal-gray-graphite: #58585A; /* Official Master Brand Graphite Gray */
  --royal-gray-body: #58585A;
  --royal-gray-muted: #58585A;
  --royal-gray-light: #F7F0F2;     /* Primary light gray canvas */
  --royal-gray-border: #E2E8F0;
  --royal-text-primary: #58585A;
  --royal-text-white: #FFFFFF;
}

/* Base Body on Blog Detail Page */
body#blog-detail-page,
#blog-detail-page {
  background-color: var(--royal-gray-light, #F7F0F2) !important;
  color: var(--royal-text-primary, #58585A);
  font-family: 'DM Sans', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Main Section Wrapper on Light Gray Canvas */
.blog-detail-section {
  padding: 60px 0 90px;
  background-color: var(--royal-gray-light, #F7F0F2) !important;
}

/* Article Card Surface (Crisp White on Light Gray Canvas) */
.bd-article {
  background: #FFFFFF;
  border: 1px solid var(--royal-gray-border, #E2E8F0);
  border-radius: 18px;
  padding: 44px 44px 50px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

/* Article Header & Meta */
.bd-header {
  margin-bottom: 30px;
}

.bd-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

/* Category Badge (Subtle Gold Fill with Charcoal Text) */
.bd-category-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 197, 24, 0.12);
  color: var(--royal-gray-charcoal, #22272F);
  border: 1px solid rgba(245, 197, 24, 0.4);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bd-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--royal-gray-muted, #58585A);
  font-size: 0.88rem;
}

.bd-meta-item i {
  color: var(--royal-yellow-gold, #F5C518);
}

/* Article Title & Lead */
.bd-title {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1.25;
  color: var(--royal-gray-charcoal, #22272F);
  margin-bottom: 18px;
  font-weight: 400;
}

.bd-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--royal-gray-body, #58585A);
  border-left: 4px solid var(--royal-yellow-gold, #F5C518);
  padding-left: 20px;
  margin-bottom: 30px;
  font-style: italic;
  background: rgba(245, 197, 24, 0.04);
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 0 8px 8px 0;
}

/* Featured Article Image */
.bd-featured-image-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
  background: var(--royal-gray-charcoal, #22272F);
}

.bd-featured-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.bd-img-caption {
  padding: 12px 20px;
  background: #F8FAFC;
  border-top: 1px solid var(--royal-gray-border, #E2E8F0);
  color: var(--royal-gray-muted, #58585A);
  font-size: 0.85rem;
  font-style: italic;
}

/* Article Body Typography */
.bd-article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #374151;
}

.bd-article-body h2 {
  font-family: 'Marcellus', serif;
  color: var(--royal-gray-charcoal, #22272F);
  font-size: 1.65rem;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--royal-gray-border, #E2E8F0);
}

.bd-article-body h3 {
  font-family: 'Marcellus', serif;
  color: var(--royal-gray-graphite, #58585A);
  font-size: 1.3rem;
  margin: 28px 0 12px;
}

.bd-article-body p {
  margin-bottom: 22px;
}

.bd-article-body ul,
.bd-article-body ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.bd-article-body li {
  margin-bottom: 10px;
}

/* Technical Callout Box */
.bd-callout-box {
  background: #F8FAFC;
  border-left: 4px solid var(--royal-yellow-gold, #F5C518);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 34px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--royal-gray-border, #E2E8F0);
  border-right: 1px solid var(--royal-gray-border, #E2E8F0);
  border-bottom: 1px solid var(--royal-gray-border, #E2E8F0);
}

.bd-callout-box h4 {
  font-family: 'Marcellus', serif;
  color: var(--royal-gray-charcoal, #22272F);
  font-size: 1.2rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bd-callout-box h4 i {
  color: var(--royal-yellow-gold, #F5C518);
}

.bd-callout-box p {
  margin-bottom: 0;
  font-size: 0.98rem;
  color: var(--royal-gray-body, #58585A);
  line-height: 1.65;
}

/* Author Info Card */
.bd-author-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: #F8FAFC;
  border: 1px solid var(--royal-gray-border, #E2E8F0);
  border-radius: 14px;
  padding: 26px;
  margin: 45px 0 20px;
}

.bd-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--royal-gray-graphite, #58585A) 0%, var(--royal-gray-charcoal, #22272F) 100%);
  color: var(--royal-yellow-gold, #F5C518);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.bd-author-name {
  font-family: 'Marcellus', serif;
  font-size: 1.25rem;
  color: var(--royal-gray-charcoal, #22272F);
  margin-bottom: 4px;
}

.bd-author-role {
  font-size: 0.88rem;
  color: var(--royal-yellow-text-on-light, #9A6200);
  margin-bottom: 8px;
  font-weight: 600;
}

.bd-author-bio {
  font-size: 0.92rem;
  color: var(--royal-gray-muted, #58585A);
  margin-bottom: 0;
  line-height: 1.55;
}

/* Sidebar Widgets (Clean White Surface) */
.bd-sidebar-widget {
  background: #FFFFFF;
  border: 1px solid var(--royal-gray-border, #E2E8F0);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.bd-widget-title {
  font-family: 'Marcellus', serif;
  font-size: 1.25rem;
  color: var(--royal-gray-charcoal, #22272F);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--royal-gray-border, #E2E8F0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.bd-widget-title i {
  color: var(--royal-yellow-gold, #F5C518);
}

.bd-recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bd-recent-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--royal-gray-border, #E2E8F0);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bd-recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bd-recent-link {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--royal-gray-charcoal, #22272F);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.bd-recent-link:hover {
  color: var(--royal-yellow-gold, #F5C518);
}

.bd-recent-date {
  font-size: 0.8rem;
  color: #9CA3AF;
}

/* Sidebar CTA Card (Master Charcoal/Graphite Gradient with Glowing Yellow) */
.bd-sidebar-cta {
  background: linear-gradient(135deg, var(--royal-gray-graphite, #58585A) 0%, var(--royal-gray-charcoal, #22272F) 100%) !important;
  color: #FFFFFF !important;
  border-radius: 16px !important;
  padding: 34px 26px !important;
  text-align: center !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16) !important;
}

.bd-sidebar-cta i.fa-microscope {
  font-size: 2.5rem !important;
  color: var(--royal-yellow-gold, #F5C518) !important;
  margin-bottom: 16px !important;
  display: inline-block !important;
  filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.4)) !important;
}

.bd-sidebar-cta h3 {
  font-family: 'Marcellus', serif !important;
  font-size: 1.35rem !important;
  margin-bottom: 12px !important;
  color: #FFFFFF !important;
}

.bd-sidebar-cta p {
  font-size: 0.92rem !important;
  color: #E2E8F0 !important;
  line-height: 1.6 !important;
  margin-bottom: 22px !important;
}

.btn-sidebar-whatsapp {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 13px 20px !important;
  background: #25D366 !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35) !important;
}

.btn-sidebar-whatsapp:hover {
  background: #1EBE5B !important;
  color: #FFFFFF !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45) !important;
}

/* Master Footer Parity - Guaranteed Brand Graphite Gray (#58585A), 0% Blue */
footer#footer .elementor-element.elementor-element-ecae855 {
  background-color: var(--royal-gray-graphite, #58585A) !important;
}

footer#footer .elementor-element.elementor-element-00ae94a {
  background-color: var(--royal-gray-light, #F7F0F2) !important;
}

@media (max-width: 991px) {
  .bd-article {
    padding: 28px 22px;
  }
  .bd-featured-img {
    height: 300px;
  }
}
