/* assets/css/articles.css - DexMicro Articles, Tutorials & Community Hub */

/* --- Category Color Tokens & Badges --- */
.art-badge-tutorial {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.art-badge-news {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.art-badge-example {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.art-badge-community {
  background: rgba(34, 197, 94, 0.15);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.art-badge-teaching {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(249, 115, 22, 0.2));
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.45);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.2);
}

/* --- Articles Catalog Hub Header --- */
.articles-hub-hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.articles-hub-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.articles-filter-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.articles-filter-bar::-webkit-scrollbar {
  display: none;
}

.art-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.art-filter-btn:hover {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.08);
}

.art-filter-btn.active {
  background: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(255, 90, 0, 0.35);
}

/* --- Search & Sort Bar --- */
.art-search-bar {
  margin-bottom: 1.5rem;
}

.art-search-form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
}

.art-search-input-wrap {
  position: relative;
  flex-grow: 1;
}

.art-search-input-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.72rem 6.5rem 0.72rem 2.6rem;
  color: var(--heading-color);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.art-search-input-wrap input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 12px rgba(255, 90, 0, 0.25);
}

.art-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.art-search-submit-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.45rem 1.15rem;
  font-size: 0.825rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.art-search-submit-btn:hover {
  background: var(--brand-orange-hover, #e04f00);
  transform: translateY(-50%) scale(1.02);
}

.art-reset-btn {
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  white-space: nowrap;
}

/* --- Articles Grid & Cards --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(14px);
  position: relative;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--cyan-accent);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(6, 182, 212, 0.2);
}

.article-thumbnail-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #090e1a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-thumbnail {
  transform: scale(1.05);
}

.article-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.article-title-link {
  color: var(--heading-color);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-title-link:hover {
  color: var(--cyan-accent);
}

.article-excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cyan-accent);
  color: #040813;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-stats-counters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.art-stat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ======================================================== */
/* ARTICLE DETAIL READER VIEW                               */
/* ======================================================== */
.article-detail-container {
  max-width: 900px;
  margin: 0 auto 5rem auto;
}

.article-reader-header {
  margin-bottom: 2rem;
}

.article-reader-badges {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.article-reader-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--heading-color);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.article-reader-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.author-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-large-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #38bdf8;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.author-large-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-featured-media-wrap {
  margin-bottom: 2.5rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #020617;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.article-featured-media-wrap img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.article-video-player-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.article-video-player-container iframe,
.article-video-player-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- CKEditor Rendered Typography Content --- */
.article-rich-content {
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 3.5rem;
}

.article-rich-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--heading-color);
  margin: 2.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-rich-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #38bdf8;
  margin: 2rem 0 0.85rem 0;
}

.article-rich-content p {
  margin-bottom: 1.4rem;
}

.article-rich-content ul,
.article-rich-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  line-height: 1.7;
}

.article-rich-content li {
  margin-bottom: 0.5rem;
}

.article-rich-content blockquote {
  border-left: 4px solid var(--cyan-accent);
  background: rgba(6, 182, 212, 0.08);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: #cbd5e1;
}

.article-rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.article-rich-content pre {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.925rem;
  line-height: 1.6;
  margin: 1.75rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.article-rich-content code {
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  font-size: 0.9em;
}

.article-rich-content pre code {
  background: transparent;
  color: #f1f5f9;
  padding: 0;
  border-radius: 0;
}

/* --- Social Interaction Floating Bar --- */
.article-social-actions-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.btn-like-interactive {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-like-interactive:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-like-interactive.liked {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

.share-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-share-social {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-share-social:hover {
  color: var(--heading-color);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-share-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.btn-share-tg:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.btn-share-fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-share-tw:hover { background: #1da1f2; color: #fff; border-color: #1da1f2; }

/* --- Comments Section --- */
.comments-section-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.comments-header-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heading-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comment-input-box {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
}

.comment-input-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--heading-color);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 90px;
}

.comments-list-thread {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comment-item-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
}

.comment-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.comment-author-name {
  font-weight: 800;
  color: var(--heading-color);
  font-size: 0.95rem;
}

.comment-content-body {
  color: var(--text-color);
  font-size: 0.925rem;
  line-height: 1.6;
}

/* ======================================================== */
/* CKEDITOR CUSTOM STYLING & ARTICLE FORM                   */
/* ======================================================== */
.editor-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(16px);
  margin-bottom: 5rem;
}

.ck.ck-editor__main>.ck-editor__editable {
  background: #090e1a !important;
  color: #f1f5f9 !important;
  min-height: 420px;
  border: 1px solid #1e293b !important;
  border-radius: 0 0 12px 12px !important;
  padding: 1.5rem !important;
  font-size: 1.05rem;
  line-height: 1.75;
}

.ck.ck-toolbar {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 12px 12px 0 0 !important;
}

.ck.ck-button {
  color: #cbd5e1 !important;
}

.ck.ck-button:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}

.ck.ck-button.ck-on {
  background: rgba(6, 182, 212, 0.25) !important;
  color: #38bdf8 !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .articles-hub-hero {
    padding: 2rem 1.5rem;
  }
  .article-reader-author-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .article-social-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ======================================================== */
/* LIGHT THEME OVERRIDES FOR ARTICLES & COMMUNITY HUB       */
/* ======================================================== */
[data-theme="light"] .articles-hub-hero {
  background: linear-gradient(135deg, #fffbf5 0%, #faefe3 100%) !important;
  border: 2px solid #fed7aa !important;
  box-shadow: 0 15px 40px rgba(255, 90, 0, 0.06) !important;
}

[data-theme="light"] .articles-hub-hero h1 {
  color: #0f172a !important;
}

[data-theme="light"] .articles-hub-hero p {
  color: #334155 !important;
}

[data-theme="light"] .art-filter-btn {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
  color: #334155 !important;
}

[data-theme="light"] .art-filter-btn:hover {
  color: #ff5a00 !important;
  border-color: #ff5a00 !important;
}

[data-theme="light"] .art-filter-btn.active {
  background: #ff5a00 !important;
  border-color: #ff5a00 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3) !important;
}

[data-theme="light"] .articles-hub-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  border: 1px solid #fed7aa !important;
  box-shadow: 0 10px 30px rgba(255, 90, 0, 0.06) !important;
}

[data-theme="light"] .art-search-input-wrap input {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
  color: #0f172a !important;
}

[data-theme="light"] .art-search-input-wrap input:focus {
  border-color: #ff5a00 !important;
  box-shadow: 0 0 12px rgba(255, 90, 0, 0.2) !important;
}

[data-theme="light"] .article-card,
[data-theme="light"] .art-card {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .article-card:hover,
[data-theme="light"] .art-card:hover {
  border-color: #ff5a00 !important;
  box-shadow: 0 12px 30px rgba(255, 90, 0, 0.12) !important;
}

[data-theme="light"] .article-title-link,
[data-theme="light"] .art-card-title {
  color: #0f172a !important;
}

[data-theme="light"] .article-title-link:hover {
  color: #ff5a00 !important;
}

[data-theme="light"] .article-excerpt,
[data-theme="light"] .art-card-excerpt {
  color: #334155 !important;
}

[data-theme="light"] .article-meta-header {
  color: #64748b !important;
}

[data-theme="light"] .article-card-footer {
  border-top-color: #f1f5f9 !important;
}

[data-theme="light"] .article-author-info div div:first-child,
[data-theme="light"] .art-card-author-name {
  color: #0f172a !important;
}

[data-theme="light"] .art-stat-item {
  color: #64748b !important;
}

[data-theme="light"] .article-detail-wrap {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .article-detail-title {
  color: #0f172a !important;
}

[data-theme="light"] .article-content {
  color: #1e293b !important;
}

[data-theme="light"] .article-comments-section {
  background: #fffbf7 !important;
  border: 1px solid #fed7aa !important;
}

[data-theme="light"] .comment-card {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
}

[data-theme="light"] .comment-author-name {
  color: #0f172a !important;
}

[data-theme="light"] .comment-content-body {
  color: #334155 !important;
}

[data-theme="light"] .editor-form-card {
  background: #ffffff !important;
  border: 1px solid #fed7aa !important;
}

[data-theme="light"] .ck.ck-editor__main>.ck-editor__editable {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .ck.ck-toolbar {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .ck.ck-button {
  color: #334155 !important;
}

/* ======================================================== */
/* ARTICLES HUB MOBILE OPTIMIZATIONS                        */
/* ======================================================== */
@media (max-width: 768px) {
  .articles-hub-hero {
    padding: 1.5rem 1.15rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 18px !important;
    text-align: center !important;
  }

  .articles-hub-hero h1 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
    margin: 0.5rem 0 0.4rem 0 !important;
  }

  .articles-hub-hero p {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    margin: 0 auto 1.25rem auto !important;
  }

  .articles-hub-hero .btn {
    width: 100% !important;
    justify-content: center !important;
    border-radius: 9999px !important;
    font-size: 0.92rem !important;
    padding: 0.75rem 1.25rem !important;
  }

  .art-search-bar {
    margin-bottom: 1rem !important;
  }

  .art-search-form {
    gap: 0.45rem !important;
  }

  .art-search-input-wrap input {
    padding: 0.65rem 4.5rem 0.65rem 2.4rem !important;
    font-size: 0.85rem !important;
  }

  .art-search-submit-btn {
    padding: 0.4rem 0.85rem !important;
    font-size: 0.8rem !important;
  }

  .articles-filter-bar {
    margin-bottom: 1.5rem !important;
    padding-bottom: 0.75rem !important;
  }

  .art-filter-btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.9rem !important;
  }

  .articles-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    margin-bottom: 3.5rem !important;
  }

  .article-card {
    border-radius: 18px !important;
  }

  .article-thumbnail-wrap {
    height: 175px !important;
  }

  .article-card-body {
    padding: 1.15rem !important;
  }

  .article-title-link {
    font-size: 1.1rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.35rem !important;
  }

  .article-excerpt {
    font-size: 0.825rem !important;
    margin-bottom: 0.85rem !important;
    -webkit-line-clamp: 2 !important;
  }
}

/* ======================================================== */
/* INTERACTIVE ARTICLE IMAGE LIGHTBOX / POPUP VIEWER        */
/* ======================================================== */
.article-rich-content img,
.article-featured-media-wrap img {
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.2s ease;
  border-radius: 12px;
}

.article-rich-content img:hover,
.article-featured-media-wrap img:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 30px rgba(255, 90, 0, 0.25), 0 0 0 2px rgba(255, 90, 0, 0.4);
}

.image-lightbox-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  user-select: none;
}

.image-lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-toolbar {
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(14, 21, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 10;
}

[data-theme="light"] .lightbox-toolbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-badge {
  background: rgba(255, 90, 0, 0.15);
  color: var(--brand-orange, #ff5a00);
  border: 1px solid rgba(255, 90, 0, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.lightbox-caption {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .lightbox-caption {
  color: #334155;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

[data-theme="light"] .lightbox-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.lightbox-btn:hover {
  background: var(--brand-orange, #ff5a00);
  border-color: var(--brand-orange, #ff5a00);
  color: #ffffff;
  transform: scale(1.08);
}

.lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.lightbox-content-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: auto;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 90, 0, 0.15);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  cursor: zoom-out;
  pointer-events: auto;
}

.image-lightbox-overlay.active .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-img.zoomed {
  max-width: none;
  max-height: none;
  transform: scale(1.65) !important;
  cursor: grab;
}

.lightbox-img.zoomed:active {
  cursor: grabbing;
}


