/**
 * Magazine OS — editorial frontend (Phase 1)
 * Loaded on hub, category, and article pages via magazine.php
 */

.mag-search-results.hidden {
  display: none;
}

.magazine-editorial {
  direction: rtl;
  text-align: right;
  padding-bottom: 3rem;
  color: #222;
  font-family: 'Heebo', sans-serif;
}

/* Reset catalog link defaults inside magazine shell */
.magazine-editorial a {
  color: inherit;
}
.magazine-editorial .mag-card,
.magazine-editorial .mag-card__title a,
.magazine-editorial .mag-hub-ring,
.magazine-editorial .mag-dept-strip__item,
.magazine-editorial .mag-section-more a {
  text-decoration: none;
}
.magazine-editorial .mag-card__title a:hover,
.magazine-editorial .mag-hub-ring:hover,
.magazine-editorial .mag-section-more a:hover {
  text-decoration: underline;
}

/* Section title with horizontal rules */
.mag-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 2.5rem 0 1.5rem;
}
.mag-section-title__line {
  flex: 1;
  height: 1px;
  background: #d1d5db;
  max-width: 120px;
}
.mag-section-title__text {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  line-height: 1.3;
  color: #111;
}
.mag-section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #444;
}

/* Card grid */
.mag-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.5rem;
  margin-bottom: 2rem;
}
.mag-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: opacity 0.2s ease;
}
.mag-card:hover {
  opacity: 0.92;
}
.mag-card__image-wrap {
  display: block;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 16 / 10;
}
.mag-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mag-card__image--placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, #e5e7eb 0%, #f9fafb 100%);
}
.mag-card__body {
  padding: 1rem 0 0;
}
.mag-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0.5rem;
  color: #111;
}
.mag-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 0.5rem;
}
.mag-card__meta {
  font-size: 0.8rem;
  color: #888;
}

/* Hero overlap — image full width + title box beside it (~5% edge overlap for float effect) */
.magazine-editorial .mag-hero-overlap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  margin: 1.75rem 0 2.75rem;
  direction: ltr;
  unicode-bidi: isolate;
  position: relative;
}
.magazine-editorial .mag-hero-overlap__media {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  overflow: visible;
  background: transparent;
}
.magazine-editorial .mag-hero-overlap__zoom {
  display: block;
  width: 100%;
  max-width: none;
}
.mag-hero-overlap__media img,
.mag-hero-overlap__zoom img {
  width: 100%;
  aspect-ratio: 1710 / 740;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.mag-hero-overlap__media--empty {
  width: 100%;
  min-height: 220px;
  aspect-ratio: 1710 / 740;
  background: linear-gradient(135deg, #e8ecef 0%, #f5f7fa 100%);
}
.magazine-editorial .mag-hero-overlap__box {
  flex: 0 0 min(32%, 340px);
  width: min(32%, 340px);
  max-width: 340px;
  margin-right: 0;
  margin-left: clamp(-1.5rem, -2.5%, -0.75rem);
  align-self: center;
  position: relative;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.45rem 1.75rem 1.45rem 1.55rem;
  z-index: 2;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
}
.magazine-editorial .mag-hero-overlap__accent {
  position: absolute;
  right: 0;
  left: auto;
  top: 1.25rem;
  width: 4px;
  height: 52px;
  background: #6b9b7a;
}
.mag-hero-overlap__meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}
.mag-hero-overlap__title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: #111;
}
.mag-hero-overlap__intro {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
}

/* Share row */
.mag-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  margin: 0.5rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  direction: rtl;
}
.mag-share-row--footer {
  margin: 2rem 0 1.5rem;
  padding: 1.25rem 0 0;
  border-bottom: 0;
  border-top: 1px solid #eee;
  justify-content: center;
}
.mag-share-row__label {
  color: #444;
  font-weight: 600;
  white-space: nowrap;
}
.mag-share-row__icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.mag-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}
.mag-share-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  opacity: 0.95;
}
.mag-share-icon svg {
  width: 12px;
  height: 12px;
  fill: #fff;
}
.mag-share-icon--facebook {
  background-color: rgb(59, 89, 152);
}
.mag-share-icon--pinterest {
  background-color: rgb(203, 32, 39);
}
.mag-share-icon--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.mag-share-icon--whatsapp {
  background-color: #25d366;
}

/* Hub rings (circular child depts) */
.mag-hub-rings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  margin: 1.5rem 0 2rem;
}
.mag-hub-ring {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 120px;
}
.mag-hub-ring__img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.65rem;
  background: #eee;
}
.mag-hub-ring__img--placeholder {
  background: linear-gradient(135deg, #ddd 0%, #f0f0f0 100%);
}
.mag-hub-ring__label {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: #222;
}

/* Dept strip (subcategories) */
.mag-dept-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 2rem;
}
.mag-dept-strip__item {
  flex: 1 1 140px;
  max-width: 200px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}
.mag-dept-strip__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 0.5rem;
  background: #eee;
}
.mag-dept-strip__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

/* Hub section footer link */
.mag-section-more {
  text-align: left;
  margin: 0.5rem 0 2rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #ccc;
}
.mag-section-more a {
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
}
.mag-section-more a:hover {
  text-decoration: underline;
}

/* Search */
.mag-search {
  max-width: 480px;
  margin: 0 auto 2rem;
  display: flex;
  gap: 0.5rem;
}
.mag-search__input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.mag-search__btn {
  padding: 0.65rem 1.25rem;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
}
.mag-search-results {
  max-width: 640px;
  margin: -1rem auto 2rem;
}
.mag-search-results a {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eee;
  color: #222;
  text-decoration: none;
}
.mag-search-results a:hover {
  color: #6b9b7a;
}
.mag-search-summary {
  max-width: 780px;
  margin: -1rem auto 1.75rem;
  text-align: center;
  color: #555;
  font-size: 1rem;
}

/* Article body typography */
.mag-article-body {
  max-width: 780px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #333;
  direction: rtl;
  text-align: right;
}
.mag-article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.25rem 0 0.85rem;
  color: #111;
  border-right: 3px solid #FF9800;
  padding-right: 0.8rem;
  line-height: 1.35;
}
.mag-article-body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 1.75rem 0 0.5rem;
  color: #1e4078;
  padding-right: 0.1rem;
}
.mag-article-body h3::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #FF9800;
  border-radius: 50%;
  margin-left: 0.55rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
  flex-shrink: 0;
}
.mag-article-body p {
  margin: 0 0 1.15rem;
  text-align: justify;
}
.mag-article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}
.mag-article-body a {
  color: #2563eb;
  text-decoration: underline;
}

/* Inline generative assets — legacy small thumb (non-H2 slots) */
.mag-article-body .mag-article-asset--thumb {
  margin: 0.85rem 0 1.25rem auto;
  max-width: 200px;
  width: fit-content;
  clear: both;
  direction: rtl;
}
.mag-article-body .mag-article-asset--thumb .mag-article-asset__zoom {
  display: block;
  width: auto;
  max-width: 200px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  cursor: zoom-in;
  text-align: right;
}
.mag-article-body .mag-article-asset--thumb .mag-article-asset__img {
  display: block;
  width: auto;
  max-width: 200px;
  max-height: 110px;
  height: auto;
  object-fit: contain;
  object-position: right center;
  margin: 0 0 0 auto;
}
.mag-article-body .mag-article-asset--thumb .mag-article-asset__zoom-hint {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  padding: 0.35rem 0.5rem;
  text-align: right;
}

/* Inline H2 images — full article width, before H2 heading */
.mag-article-body .mag-article-asset--inline-full {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.75rem 0 1.25rem;
  padding: 0;
  clear: both;
  direction: rtl;
}
.mag-article-body .mag-article-asset--inline-full .mag-article-asset__link {
  display: block;
  text-decoration: none;
  line-height: 0;
}
.mag-article-body .mag-article-asset--inline-full .mag-article-asset__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 8px;
}
.mag-article-body .mag-article-asset--inline-full .mag-article-asset__caption {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #475569;
  text-align: right;
}

.mag-article-body .mag-article-asset--thumb .mag-article-asset__caption {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #475569;
  text-align: right;
}
.mag-article-body .mag-article-asset--thumb .mag-article-asset__caption-link {
  color: #2563eb;
  text-decoration: underline;
}

.mag-hero-overlap__caption {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #475569;
  text-align: right;
}
.mag-hero-overlap__caption-link {
  color: #2563eb;
  text-decoration: underline;
}

.mag-hero-overlap__zoom {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
}

.mag-article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.mag-article-lightbox[hidden] {
  display: none !important;
}
.mag-article-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
}
.mag-article-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mag-article-lightbox__img {
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.mag-article-lightbox__close {
  position: absolute;
  top: -2.25rem;
  left: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.mag-article-lightbox__caption {
  margin: 0.75rem 0 0;
  color: #f8fafc;
  font-size: 0.95rem;
  text-align: center;
  max-width: 90vw;
}
body.mag-article-lightbox-open {
  overflow: hidden;
}

.mag-slot-thumb {
  display: block;
  max-width: 200px;
  width: fit-content;
  margin: 0 0 0.5rem auto;
  direction: rtl;
}
.mag-slot-thumb__btn {
  cursor: zoom-in;
}
.mag-slot-thumb__img {
  display: block;
  width: auto;
  max-width: 200px;
  max-height: 110px;
  object-fit: contain;
  object-position: right center;
  margin: 0 0 0 auto;
}

.mag-faq {
  max-width: 780px;
  margin: 2rem auto 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  direction: rtl;
  text-align: right;
}
.mag-faq__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-align: center;
  color: #111;
}
.mag-faq__body,
.mag-faq-items {
  direction: rtl;
  text-align: right;
}
.mag-faq__body > h2,
.mag-faq-items > h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #555;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eaeaea;
  text-align: right;
}
.mag-faq-item {
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mag-faq-item h3,
.mag-faq__body > h3,
.mag-faq-items--plain h3 {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: #1e4078;
  background: linear-gradient(to left, #f8fafc 0%, #eef2f7 100%);
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}
.mag-faq-item p,
.mag-faq__body > h3 + p,
.mag-faq-items--plain p {
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
  text-align: right;
}
.mag-faq-item p + p,
.mag-faq-items--plain p + p {
  padding-top: 0;
  margin-top: -0.5rem;
}
.mag-faq-item p strong,
.mag-faq-items--plain p strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e4078;
  margin-bottom: 0.35rem;
}
.mag-faq-items--plain p:first-child strong:only-child {
  margin-bottom: 0;
}
.mag-faq__body ul,
.mag-faq__body ol,
.mag-faq-item ul,
.mag-faq-item ol {
  margin: 0;
  padding: 0 1.25rem 1.25rem 1.25rem;
  padding-right: 2rem;
}
.mag-faq__body li,
.mag-faq-item li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.mag-faq__body .faq-item,
.mag-faq-items .faq-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #e0e0e0;
}
.mag-faq__body .faq-question,
.mag-faq-items .faq-question {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e4078;
  margin-bottom: 0.5rem;
}
.mag-faq__body .faq-answer,
.mag-faq-items .faq-answer {
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
}

/* Pagination */
.mag-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0;
}
.mag-pagination a,
.mag-pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
}
.mag-pagination a:hover {
  background: #f5f5f5;
}
.mag-pagination .mag-pagination__current {
  background: #222;
  color: #fff;
  border-color: #222;
}
.mag-load-more-wrap {
  text-align: center;
  margin: 2rem 0;
}
.mag-load-more-btn {
  padding: 0.75rem 2rem;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

/* Phase 2 product slot (hidden stub) */
.magazine-products-slot {
  display: none;
}

/* Legacy article product grid (when enabled later) */
.magazine-product-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.magazine-product-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}
.magazine-product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

@media (max-width: 992px) {
  .mag-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .magazine-editorial .mag-hero-overlap {
    display: block;
    min-height: 0;
  }
  .magazine-editorial .mag-hero-overlap__media {
    width: 100%;
    max-width: none;
  }
  .magazine-editorial .mag-hero-overlap__zoom {
    width: 100%;
    max-width: none;
  }
  .mag-hero-overlap__media--empty {
    width: 100%;
    max-width: none;
  }
  .magazine-editorial .mag-hero-overlap__box {
    flex: none;
    width: auto;
    max-width: none;
    margin-top: clamp(-2.25rem, -7vw, -1.5rem);
    margin-right: 0.85rem;
    margin-left: 0.85rem;
    padding: 1.15rem 1.25rem;
  }
}

@media (max-width: 600px) {
  .mag-card-grid {
    grid-template-columns: 1fr;
  }
  .mag-section-title__text {
    font-size: 1.4rem;
  }
  .magazine-editorial .mag-hero-overlap__title {
    font-size: 1.25rem;
    line-height: 1.3;
  }
  .magazine-editorial .mag-hero-overlap__intro {
    font-size: 0.9rem;
    line-height: 1.55;
  }
  .magazine-editorial .mag-hero-overlap__box {
    margin-top: clamp(-2rem, -6.5vw, -1.35rem);
    margin-right: 0.65rem;
    margin-left: 0.65rem;
    padding: 1rem 1.1rem;
  }
  .mag-hub-rings {
    gap: 1rem;
  }
  .mag-hub-ring {
    width: 100px;
  }
  .mag-hub-ring__img {
    width: 80px;
    height: 80px;
  }
}

/* Article byline + GEO body blocks */
.mag-article-byline {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #555;
  font-weight: 600;
}

/* Comparison tables: wrap cell text; on mobile each column ≈ viewport width */
.mag-article-body .mag-article-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  box-sizing: border-box;
}
.mag-article-body .mag-article-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  table-layout: fixed;
}
.mag-article-body .mag-article-table th,
.mag-article-body .mag-article-table td {
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.75rem;
  text-align: right;
  vertical-align: top;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.45;
  box-sizing: border-box;
}
.mag-article-body .mag-article-table th {
  background: #f3f4f6;
  font-weight: 700;
}

@media (max-width: 767px) {
  /*
   * Mobile: one column fills nearly the full screen width; long cell text
   * wraps to multiple lines. Swipe horizontally only to move between columns.
   */
  .mag-article-body .mag-article-table-scroll .mag-article-table {
    width: max-content;
    max-width: none;
    min-width: 100%;
    table-layout: auto;
  }
  .mag-article-body > .mag-article-table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.25rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    table-layout: auto;
  }
  .mag-article-body > .mag-article-table thead,
  .mag-article-body > .mag-article-table tbody {
    display: table;
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
  }
  .mag-article-body .mag-article-table th,
  .mag-article-body .mag-article-table td {
    width: calc(100vw - 2.75rem);
    min-width: calc(100vw - 2.75rem);
    max-width: calc(100vw - 2.75rem);
  }
  .mag-article-body .mag-article-table {
    font-size: 0.9rem;
  }
}

.mag-commercial-closure {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.mag-commercial-closure__title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.mag-commercial-closure__list {
  margin: 0;
  padding-right: 1.25rem;
  line-height: 1.7;
}
.mag-commercial-closure__list a {
  color: #2563eb;
  text-decoration: underline;
}

.mag-preview-banner {
  margin: 0 0 1.25rem;
  padding: 0.65rem 1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
}

/* Article table of contents */
.mag-article-body h2[id^="mag-toc-"] {
  scroll-margin-top: 5.5rem;
}
.magazine-editorial {
  scroll-behavior: smooth;
}
.mag-toc {
  max-width: 780px;
  margin: 2rem auto 3rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  direction: rtl;
  text-align: right;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mag-toc__title {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eaeaea;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
}
.mag-toc__list {
  margin: 0;
  padding: 0 1.25rem 0 0;
  list-style: decimal;
}
.mag-toc__item {
  margin: 0 0 0.85rem;
  padding: 0;
  line-height: 1.55;
}
.mag-toc__item:last-child {
  margin-bottom: 0;
}
.mag-toc__link {
  color: #333;
  text-decoration: none;
  font-size: 1rem;
}
.mag-toc__link:hover {
  color: #111;
  text-decoration: underline;
}
.mag-toc__link--active {
  color: #9ca3af;
}

.mag-quick-guide {
  margin: 1.75rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  direction: rtl;
  text-align: right;
}
.mag-quick-guide h2 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
}
.mag-quick-guide ul {
  margin: 0;
  padding: 0 1.25rem 0 0;
  list-style: disc;
}
.mag-quick-guide li {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  color: #333;
}
.mag-quick-guide li:last-child {
  margin-bottom: 0;
}
.mag-expert-tip {
  margin: 2rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  background: #fffaf0;
  border-right: 4px solid #d4a017;
  direction: rtl;
  text-align: right;
}
.mag-expert-tip p {
  margin: 0 0 0.5rem;
  line-height: 1.6;
  color: #333;
}
.mag-expert-tip p:last-child {
  margin-bottom: 0;
}
.mag-author-byline {
  font-size: 0.92rem;
  color: #666;
}
.mag-editorial-closing {
  margin: 1.5rem 0;
  font-style: italic;
  color: #444;
  line-height: 1.6;
}
