/* ================================
   Reading Layout (BBC-like)
   ================================ */

.news-detail {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Category above title */
.news-detail-category {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* ================================
   Title
   ================================ */
.news-detail-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* ================================
   Meta (date, author)
   ================================ */
.news-detail-meta {
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ================================
   Main Image
   ================================ */
.news-detail-image {
  margin: 2rem 0;
}

.news-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

/* ================================
   Abstract
   ================================ */
.news-detail-abstract {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 2rem;
  max-width: 680px;
}

/* ================================
   Content
   ================================ */
.news-detail-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.news-detail-content p {
  margin-bottom: 1.25rem;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.news-detail-content .djangocms-video-plugin {
  margin: 1.5rem 0;
}

.news-detail-content .djangocms-video-plugin iframe,
.news-detail-content .djangocms-video-plugin video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

/* ================================
   Divider Accent
   ================================ */
.news-divider-accent {
  position: relative;
  margin: 2rem 0;
  height: 1px;
  background-color: #e5e5e5;
}

.news-divider-accent::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline-start: 0;
  width: 60px;
  height: 3px;
  background-color: #0d6efd;
}

/* ================================
   Categories & Tags
   ================================ */
.news-detail-categories,
.news-detail-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.news-detail-categories strong,
.news-detail-tags strong {
  margin-inline-end: 0.5rem;
}

.news-detail-categories a,
.news-detail-tags span {
  font-size: 0.8rem;
  padding: 0.35em 0.6em;
  border-radius: 0.5rem;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
  .news-detail-title {
    font-size: 1.6rem;
  }

  .news-detail {
    padding-inline: 1rem;
  }
}

/* ================================
   Related News
   ================================ */

.related-news {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.related-news-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: start; /* RTL/LTR friendly */
}

.related-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* Card */
.related-card {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* Image */
.related-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
  overflow: hidden;
}

.related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content */
.related-body {
  padding: 0.75rem 1rem 1rem;
}

.related-title {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.related-title a {
  color: #212529;
  text-decoration: none;
}

.related-title a:hover {
  color: #0d6efd;
}

.related-date {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Responsive */
@media (max-width: 576px) {
  .related-news-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Share Buttons
   ================================ */

.news-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
  flex-wrap: wrap;
}

.news-share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  margin-inline-end: 0.5rem;
}

.news-share-btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.news-share-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Platform colors */
.news-share-btn.facebook {
  background-color: #1877f2;
}

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

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

/* RTL / LTR friendly */
html[dir="rtl"] .news-share {
  justify-content: flex-start;
}

html[dir="ltr"] .news-share {
  justify-content: flex-start;
}

/* ================================
   Share Icons (SVG)
   ================================ */

.news-share-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
}

.news-share-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.news-share-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.news-share-icon:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Platform colors */
.news-share-icon.facebook {
  background-color: #1877f2;
}

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

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

/* RTL / LTR friendly */
html[dir="rtl"] .news-share-icons {
  justify-content: flex-start;
}

html[dir="ltr"] .news-share-icons {
  justify-content: flex-start;
}

.news-share-icon.instagram {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.news-share-icon.copied {
  transform: scale(0.95);
  opacity: 0.85;
}

.news-share-icon.copied::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
}

/* Hide Instagram on desktop */
.news-share-icon.instagram {
  display: none;
}

@media (max-width: 768px) {
  .news-share-icon.instagram {
    display: grid;
  }
}

.news-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.news-share-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f2f2f2;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.news-share-icon:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

/* Tooltip */
.news-share-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.news-share-icon.show-tooltip::after {
  opacity: 1;
}

/* Tooltip */
.news-share-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.news-share-icon.show-tooltip::after {
  opacity: 1;
}

/* Toast */
.share-toast {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #111;
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

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

/* ============================
   Breadcrumbs
============================ */

.news-breadcrumb {
  margin: 1rem 0 1.5rem;
}

.news-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.news-breadcrumb .breadcrumb-item a {
  color: #666;
  text-decoration: none;
}

.news-breadcrumb .breadcrumb-item a:hover {
  color: #b80000;
  text-decoration: underline;
}

.news-breadcrumb .breadcrumb-item.active {
  color: #111;
  font-weight: 600;
}

/* RTL Support */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
  content: "›";
}
