/* ==========================================================================
   AUIPR News & Editorial Stylesheet (الاتحاد العربي لحماية حقوق الملكية الفكرية)
   ========================================================================== */

:root {
  --news-primary: #3cebc3;
  --news-primary-dark: #00b894;
  --news-purple: #7251cd;
  --news-navy: #1a2b4b;
  --news-dark-card: #2b2346;
  --news-darker-card: #221a38;
  --news-text-main: #334155;
  --news-text-dark: #0f172a;
  --news-text-muted: #64748b;
  --news-bg-light: #f4fbf9;
  --news-card-border: rgba(226, 232, 240, 0.85);
  --news-radius-lg: 28px;
  --news-radius-md: 18px;
  --news-radius-sm: 12px;
  --news-shadow: 0 15px 35px rgba(26, 43, 75, 0.07);
  --news-shadow-hover: 0 20px 45px rgba(26, 43, 75, 0.13);
}

body.news-details-page {
  background-color: var(--news-bg-light);
  color: var(--news-text-main);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1. Editorial Header Banner (راية عنوان المقال الفخمة)
   -------------------------------------------------------------------------- */
.news-banner-section {
  padding-top: 110px;
  padding-bottom: 20px;
}

@media (max-width: 768px) {
  .news-banner-section {
    padding-top: 80px;
    padding-bottom: 15px;
  }
}

.news-banner-card {
  background: linear-gradient(145deg, #2b2346 0%, #1e1935 100%);
  border-radius: var(--news-radius-lg);
  padding: 55px 60px 65px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-banner-card .banner-wave-bg {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 150%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(60, 235, 195, 0.05) 41%, transparent 42%),
              radial-gradient(circle at 30% 70%, transparent 30%, rgba(255, 255, 255, 0.03) 31%, transparent 32%);
  pointer-events: none;
  z-index: 1;
}

.news-banner-inner {
  position: relative;
  z-index: 2;
  text-align: right;
  max-width: 980px;
  margin: 0 auto;
}

/* Breadcrumbs مسار التصفح */
.news-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 22px;
  font-weight: 500;
}

.news-breadcrumbs a {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
}

.news-breadcrumbs a:hover {
  color: var(--news-primary);
}

.news-breadcrumbs .sep {
  color: #64748b;
  font-size: 0.75rem;
}

.news-breadcrumbs .current {
  color: #ffffff;
  font-weight: 600;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges & Meta Row الأوسمة والتاريخ */
.news-meta-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.news-pill.category {
  background: linear-gradient(135deg, rgba(60, 235, 195, 0.2) 0%, rgba(0, 196, 167, 0.3) 100%);
  color: var(--news-primary);
  border: 1px solid rgba(60, 235, 195, 0.4);
}

.news-pill.date {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.news-pill.read-time {
  background: rgba(114, 81, 205, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(114, 81, 205, 0.35);
}

.news-pill.location {
  background: rgba(255, 255, 255, 0.08);
  color: #fed7aa;
  border: 1px solid rgba(254, 215, 170, 0.25);
}

/* Main Article Title العنوان الرئيسي */
.news-main-title {
  color: #ffffff;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 25px;
  letter-spacing: -0.5px;
}

@media (max-width: 992px) {
  .news-main-title {
    font-size: 2.1rem;
  }
  .news-banner-card {
    padding: 40px 30px;
  }
}

@media (max-width: 768px) {
  .news-main-title {
    font-size: 1.65rem;
    line-height: 1.4;
  }
  .news-banner-card {
    padding: 30px 20px;
    border-radius: 20px;
  }
  .news-breadcrumbs .current {
    max-width: 200px;
  }
}

/* Author / Publisher Signature جهة النشر */
.news-publisher-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.publisher-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.publisher-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.publisher-meta {
  display: flex;
  flex-direction: column;
}

.publisher-name {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
}

.publisher-role {
  color: #94a3b8;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   2. Article Layout & Reading Column (هيكل المقال ومساحة القراءة المريحة)
   -------------------------------------------------------------------------- */
.article-reading-section {
  padding: 10px 0 70px;
}

.article-reading-wrapper {
  max-width: 920px;
  margin: 0 auto;
}

/* Featured Media Box صورة المقال البارزة */
.article-featured-media {
  position: relative;
  border-radius: var(--news-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  margin-bottom: 35px;
  background-color: #0c1222;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.article-featured-media img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.article-featured-media:hover img {
  transform: scale(1.02);
}

.article-featured-media .media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.85) 100%);
  color: #f1f5f9;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-featured-media .media-caption i {
  color: var(--news-primary);
}

/* Article Card Surface ورقة المقال الرئيسية */
.article-paper-card {
  background: #ffffff;
  border-radius: var(--news-radius-lg);
  padding: 50px 55px;
  box-shadow: var(--news-shadow);
  border: 1px solid var(--news-card-border);
  position: relative;
}

@media (max-width: 768px) {
  .article-paper-card {
    padding: 30px 20px;
    border-radius: 20px;
  }
}

/* Top Quick Share Bar شريط المشاركة السريع */
.article-top-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 25px;
  margin-bottom: 30px;
  border-bottom: 1px solid #f1f5f9;
}

.tools-label {
  font-size: 0.92rem;
  color: var(--news-text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-share:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-share.whatsapp {
  background-color: #25d366;
}

.btn-share.twitter {
  background-color: #000000;
}

.btn-share.facebook {
  background-color: #1877f2;
}

.btn-share.linkedin {
  background-color: #0a66c2;
}

.btn-share.copy-link {
  background-color: var(--news-purple);
}

.btn-share.print-btn {
  background-color: #475569;
}

/* --------------------------------------------------------------------------
   3. Rich Typography & Content Blocks (طباعة النص والتنسيق الاحترافي)
   -------------------------------------------------------------------------- */
.article-body-text {
  font-size: 1.15rem;
  line-height: 2.1;
  color: var(--news-text-main);
  text-align: justify;
}

/* Lead Paragraph الفقرة الافتتاحية */
.article-body-text .lead-text {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 2.0;
  color: var(--news-text-dark);
  background: linear-gradient(135deg, rgba(60, 235, 195, 0.08) 0%, rgba(248, 250, 252, 0.9) 100%);
  border-right: 5px solid var(--news-primary-dark);
  padding: 24px 30px;
  border-radius: var(--news-radius-md);
  margin-bottom: 35px;
  box-shadow: 0 4px 15px rgba(0, 196, 167, 0.05);
}

@media (max-width: 768px) {
  .article-body-text .lead-text {
    font-size: 1.12rem;
    padding: 18px 20px;
  }
}

.article-body-text p {
  margin-bottom: 26px;
  font-weight: 400;
}

.article-body-text strong {
  color: var(--news-text-dark);
  font-weight: 700;
}

/* Subheadings العناوين الفرعية */
.article-body-text h2.sub-title,
.article-body-text h3.sub-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--news-navy);
  margin: 45px 0 22px;
  padding-right: 18px;
  border-right: 5px solid var(--news-primary);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .article-body-text h2.sub-title,
  .article-body-text h3.sub-title {
    font-size: 1.4rem;
    margin: 35px 0 18px;
  }
}

/* Elegant Pull Quote الاقتباس المميّز */
.article-body-text blockquote.article-quote {
  position: relative;
  background: linear-gradient(135deg, #f0fdf9 0%, #f8fafc 100%);
  border-right: 6px solid var(--news-primary);
  border-radius: var(--news-radius-md);
  padding: 35px 40px 35px 40px;
  margin: 45px 0;
  box-shadow: 0 8px 25px rgba(0, 196, 167, 0.08);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.9;
  color: var(--news-navy);
}

.article-body-text blockquote.article-quote .quote-icon {
  font-size: 2.2rem;
  color: var(--news-primary);
  margin-bottom: 12px;
  display: block;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .article-body-text blockquote.article-quote {
    padding: 25px 20px;
    font-size: 1.15rem;
    margin: 30px 0;
  }
}

/* --------------------------------------------------------------------------
   4. Article Bottom Actions & Sharing (أسفل المقال وأزرار المشاركة والعودة)
   -------------------------------------------------------------------------- */
.article-bottom-actions {
  margin-top: 50px;
  padding-top: 35px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.btn-back-news {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #2b2346 0%, #1a2b4b 100%);
  color: #ffffff;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 10px 25px rgba(26, 43, 75, 0.15);
  transition: all 0.3s ease;
}

.btn-back-news:hover {
  background: linear-gradient(135deg, var(--news-primary) 0%, var(--news-primary-dark) 100%);
  color: #0f172a;
  transform: translateX(-4px);
  box-shadow: 0 12px 30px rgba(60, 235, 195, 0.35);
}

.btn-back-news i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-back-news:hover i {
  transform: translateX(-3px);
}

.bottom-share-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bottom-share-label {
  font-weight: 700;
  color: var(--news-navy);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   5. Related Articles Grid (أخبار أخرى قد تهمك أسفل الصفحة)
   -------------------------------------------------------------------------- */
.related-news-section {
  padding-top: 30px;
  padding-bottom: 70px;
}

.related-header {
  text-align: right;
  margin-bottom: 35px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.related-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--news-navy);
  margin: 0;
  position: relative;
  padding-right: 18px;
  border-right: 5px solid var(--news-primary);
}

.related-all-link {
  color: var(--news-purple);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.related-all-link:hover {
  color: var(--news-primary-dark);
  transform: translateX(-4px);
}

.related-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

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

@media (max-width: 640px) {
  .related-news-grid {
    grid-template-columns: 1fr;
  }
  .related-title {
    font-size: 1.6rem;
  }
}

.related-card {
  background: #ffffff;
  border-radius: var(--news-radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--news-card-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
  text-decoration: none;
  color: inherit;
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--news-shadow-hover);
  border-color: rgba(60, 235, 195, 0.5);
}

.related-card-thumb {
  height: 190px;
  overflow: hidden;
  position: relative;
  background-color: #1a2b4b;
}

.related-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-thumb img {
  transform: scale(1.08);
}

.related-card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.related-card-body {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: right;
}

.related-card-date {
  font-size: 0.85rem;
  color: var(--news-primary-dark);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.related-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--news-navy);
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.related-card:hover .related-card-title {
  color: var(--news-primary-dark);
}

.related-card-summary {
  font-size: 0.92rem;
  color: var(--news-text-muted);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-readmore {
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--news-purple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   6. Toast Feedback Notification (إشعار نسخ الرابط)
   -------------------------------------------------------------------------- */
.news-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
  pointer-events: none;
  border: 1px solid rgba(60, 235, 195, 0.3);
}

.news-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.news-toast i {
  color: var(--news-primary);
  font-size: 1.1rem;
}