/* =============================================
   Fajr Advanced — Single Post Page Styles
   fajradv.net | Arabic RTL
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* =============================================
   BLOG POST HERO BANNER
   ============================================= */

.fajr-sp-banner {
    position: relative;
    background: linear-gradient(150deg, #071624 0%, #0a2540 40%, #0f4c81 85%, #1565c0 100%);
    padding: 44px 0 58px;
    overflow: hidden;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.fajr-sp-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.fajr-sp-banner::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 50px;
    background: #f8f9fb;
    clip-path: ellipse(60% 100% at 50% 100%);
    z-index: 2;
}

.fajr-sp-banner-glow {
    position: absolute;
    top: -80px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(21,101,192,0.45) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.fajr-sp-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 3;
}

/* Breadcrumb */
.fajr-sp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fajr-sp-breadcrumb a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.25s;
}

.fajr-sp-breadcrumb a:hover { color: #fbbf24; }

.fajr-sp-breadcrumb .sep {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    transform: scaleX(-1);
    display: inline-block;
}

.fajr-sp-breadcrumb .current {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Pill */
.fajr-sp-banner-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.4);
    color: #fbbf24;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.fajr-sp-banner-cat:hover {
    background: rgba(245,158,11,0.28);
    color: #fbbf24;
    text-decoration: none;
}

/* Post Title */
.fajr-sp-banner-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.3);
    margin: 0;
}

/* =============================================
   SINGLE POST CONTENT AREA
   ============================================= */

body.single-post #content,
body.single-post .site-content,
body.single-post .main-page-wrapper {
    background: #f8f9fb !important;
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
}

/* Post Article Container */
body.single-post article.post {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 40px rgba(15,76,129,0.08);
    border: 1px solid #e5e7eb;
    margin-top: -20px;
    position: relative;
    z-index: 4;
}

/* Hide theme default title/breadcrumb inside content body */
body.single-post .entry-title,
body.single-post .woodmart-breadcrumbs,
body.single-post .page-title-default {
    display: none !important;
}

/* Post Content Formatting */
body.single-post .entry-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #374151;
}

body.single-post .entry-content h2,
body.single-post .entry-content h3 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 800;
    color: #0d1b2a;
    margin-top: 32px;
    margin-bottom: 16px;
}

body.single-post .entry-content img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Blockquotes */
body.single-post .entry-content blockquote {
    background: #f0f6ff;
    border-right: 4px solid #0f4c81;
    border-left: none;
    padding: 20px 24px;
    border-radius: 10px;
    font-style: normal;
    color: #0d1b2a;
    margin: 24px 0;
}

/* Post Tags & Meta Footer */
body.single-post .post-single-footer,
body.single-post .single-post-social {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 32px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .fajr-sp-banner {
        padding: 32px 0 50px;
    }

    .fajr-sp-banner-inner {
        padding: 0 16px;
    }

    .fajr-sp-banner-title {
        font-size: 1.4rem;
    }

    body.single-post article.post {
        padding: 20px 16px;
        border-radius: 12px;
        margin-top: -10px;
    }
}

/* ==========================================================================
   Fajr Single Article Layout Styles
   ========================================================================== */

:root {
  --fajr-primary: #2563eb;
  --fajr-primary-hover: #1d4ed8;
  --fajr-bg-surface: #ffffff;
  --fajr-bg-body: #f8fafc;
  --fajr-text-main: #0f172a;
  --fajr-text-muted: #64748b;
  --fajr-border-color: #e2e8f0;
  --fajr-radius: 16px;
  --fajr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --fajr-shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.fajr-single-post-wrapper {
  padding: 50px 0 80px;
  background-color: var(--fajr-bg-body);
}

.fajr-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.fajr-single-card {
  background: var(--fajr-bg-surface);
  border: 1px solid var(--fajr-border-color);
  border-radius: var(--fajr-radius);
  padding: 32px;
  box-shadow: var(--fajr-shadow-sm);
  margin-bottom: 30px;
}

/* Post Meta Top Bar */
.fajr-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--fajr-border-color);
  font-size: 0.875rem;
  color: var(--fajr-text-muted);
}

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

.fajr-single-meta a {
  color: var(--fajr-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.fajr-single-meta a:hover {
  color: var(--fajr-primary);
}

/* Featured Image */
.fajr-single-featured-image {
  margin: 0 -32px 32px -32px;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}

.fajr-single-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Entry Content Formatting */
.fajr-single-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--fajr-text-main);
}

.fajr-single-content p {
  margin-bottom: 1.5em;
}

.fajr-single-content h2,
.fajr-single-content h3,
.fajr-single-content h4 {
  color: var(--fajr-text-main);
  font-weight: 700;
  margin: 1.8em 0 0.8em;
  line-height: 1.3;
}

.fajr-single-content blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  background-color: #f1f5f9;
  border-right: 4px solid var(--fajr-primary);
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #334155;
}

.fajr-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5em 0;
}

/* Tags Footer */
.fajr-single-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--fajr-border-color);
}

.fajr-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fajr-tags-list .tags-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fajr-text-muted);
  margin-left: 8px;
}

.fajr-tag-pill {
  font-size: 0.8125rem;
  color: var(--fajr-text-muted);
  background-color: #f1f5f9;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.fajr-tag-pill:hover {
  background-color: var(--fajr-primary);
  color: #ffffff;
}

/* Author Box */
.fajr-author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--fajr-bg-surface);
  border: 1px solid var(--fajr-border-color);
  border-radius: var(--fajr-radius);
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: var(--fajr-shadow-sm);
}

.fajr-author-avatar img {
  border-radius: 50%;
  display: block;
}

.fajr-author-info .author-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--fajr-text-main);
}

.fajr-author-info .author-bio {
  font-size: 0.9375rem;
  color: var(--fajr-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .fajr-single-card {
    padding: 20px;
  }
  
  .fajr-single-featured-image {
    margin: 0 -20px 20px -20px;
    max-height: 300px;
  }
  
  .fajr-author-box {
    flex-direction: column;
    text-align: center;
  }
}

/* Fix text overflow for uninterrupted strings and elements */
.fajr-single-content,
.fajr-single-content p,
.wp-block-paragraph {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}