/* ============================================================
   ArabPressHouse.com — article.css
   Include on article.php in addition to main.css
   ============================================================ */

/* ── Article wrapper ─────────────────────────────────────────── */
.article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
@media (max-width: 600px) { .article-wrap { padding: 0 14px 40px; } }

/* ── Hero image ──────────────────────────────────────────────── */
.article-hero {
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}
.art-hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}
.art-hero-placeholder {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
}
.article-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 50%, rgba(10,15,40,.35) 100%);
  pointer-events: none;
}
@media (max-width: 600px) {
  .art-hero-img, .art-hero-placeholder { height: 220px; font-size: 60px; }
}

/* ── Meta bar ────────────────────────────────────────────────── */
.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.meta-left { display: flex; gap: 8px; align-items: center; }
.share-row { display: flex; gap: 7px; flex-wrap: wrap; }
.share-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  color: var(--text2);
  transition: var(--transition);
}
.share-btn:hover { border-color: var(--navy); color: var(--navy); }

/* ── Title & excerpt ─────────────────────────────────────────── */
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 14px;
}
body.ar-mode .article-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
}
.article-excerpt {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.65;
  border-left: 4px solid var(--gold);
  padding-left: 16px;
  margin-bottom: 22px;
  font-style: italic;
}
body.ar-mode .article-excerpt {
  border-left: none;
  border-right: 4px solid var(--gold);
  padding-left: 0;
  padding-right: 16px;
}

/* ── Author row ──────────────────────────────────────────────── */
.author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 12px;
}
.author-info { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.author-avatar-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author-name { font-size: 15px; font-weight: 600; color: var(--text); }
.source-tag  { font-size: 13px; color: var(--text3); font-weight: 400; }
.author-meta { font-size: 12px; color: var(--text3); margin-top: 3px; }
.article-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text3); }
.stat {
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; transition: var(--transition);
  background: none; border: none; color: var(--text3); font-family: inherit; font-size: 13px;
}
.stat:hover { color: var(--gold); }
.stat.liked, .stat.liked:hover { color: var(--navy); font-weight:700; }

/* ── Article body ────────────────────────────────────────────── */
.article-body {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 32px;
}
body.ar-mode .article-body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 17px;
  line-height: 2.1;
}
.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 23px; font-weight: 700;
  color: var(--navy);
  margin: 2em 0 .75em;
}
body.ar-mode .article-body h2 { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.article-body h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 1.5em 0 .6em; }
.article-body blockquote {
  border-left: 4px solid var(--gold);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--gold-pale);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--text2);
}
body.ar-mode .article-body blockquote {
  border-left: none;
  border-right: 4px solid var(--gold);
  border-radius: 10px 0 0 10px;
}
.article-body a { color: var(--navy); text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-bottom: 1.4em; }
body.ar-mode .article-body ul,
body.ar-mode .article-body ol { padding-left: 0; padding-right: 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body img { border-radius: 8px; margin: 1.5em 0; max-width: 100%; }

/* External article notice */
.external-notice {
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text2);
}
.ext-icon { font-size: 28px; flex-shrink: 0; }
.ext-link { color: var(--navy); font-weight: 600; text-decoration: underline; }

/* ── Article tags ────────────────────────────────────────────── */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.a-tag {
  padding: 5px 14px;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.a-tag:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Related articles ────────────────────────────────────────── */
.related-section { margin-bottom: 38px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  margin-top: 16px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rel-thumb {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; overflow: hidden; position: relative;
}
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.rel-body { padding: 11px; }
.rel-cat   { font-size: 9px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.rel-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); }

/* ── Comments ────────────────────────────────────────────────── */
.comments-section { border-top: 2px solid var(--border); padding-top: 32px; }
.comments-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 10px;
}
.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--navy);
}
body.ar-mode .comments-title { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.sort-row { display: flex; gap: 7px; }
.sort-btn {
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white); font-size: 12px; font-weight: 500;
  color: var(--text2); transition: var(--transition); font-family: inherit;
}
.sort-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Sign-in prompt */
.signin-prompt {
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
}
.signin-prompt a { color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Compose box */
.compose-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  transition: border .2s;
}
.compose-box:focus-within { border-color: var(--navy); }
.compose-top { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.my-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.my-avatar img { width: 100%; height: 100%; object-fit: cover; }
.compose-textarea {
  width: 100%; border: none; outline: none; resize: none;
  font-family: 'Merriweather', serif;
  font-size: 15px; color: var(--text); background: transparent;
  min-height: 72px; line-height: 1.6;
}
body.ar-mode .compose-textarea { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.compose-textarea::placeholder { color: var(--text3); }
.compose-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.lang-selector { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text2); }
.lang-sel {
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; font-size: 11px; font-weight: 600;
  color: var(--text2); transition: var(--transition); font-family: inherit;
}
.lang-sel.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.char-count { font-size: 12px; color: var(--text3); }
.char-count.warn { color: var(--navy); font-weight:700; }

/* Comments list */
.comment {
  display: flex; gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.c-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-dark), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-body { flex: 1; min-width: 0; }
.c-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; flex-wrap: wrap; }
.c-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.c-time  { font-size: 11px; color: var(--text3); }
.auth-badge {
  font-size: 9px; background: var(--gold-pale); color: var(--navy);
  padding: 2px 7px; border-radius: 10px; font-weight: 700; border: 1px solid var(--gold-light);
}
.lang-badge {
  font-size: 9px; padding: 2px 6px; border-radius: 8px;
  background: var(--offwhite); border: 1px solid var(--border); color: var(--text3);
}
.c-text { font-size: 14px; line-height: 1.65; color: var(--text); white-space: pre-line; }
.c-actions { display: flex; gap: 14px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.c-act {
  font-size: 12px; color: var(--text3);
  background: none; border: none; padding: 0;
  display: flex; align-items: center; gap: 4px;
  transition: var(--transition); font-family: inherit;
}
.c-act:hover { color: var(--navy); }
.c-act.liked, .c-act.liked:hover { color: var(--navy); font-weight:700; }

/* Replies */
.replies {
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}
body.ar-mode .replies {
  padding-left: 0; padding-right: 18px;
  border-left: none; border-right: 2px solid var(--border);
}
.reply-row {
  display: none; gap: 8px; margin-top: 10px; align-items: center;
}
.reply-row.open { display: flex; }
.reply-input {
  flex: 1; padding: 8px 13px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: var(--white);
  transition: border .18s;
}
.reply-input:focus { outline: none; border-color: var(--navy); }
.r-btn {
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--navy);
  white-space: nowrap; transition: var(--transition); font-family: inherit;
}
.r-btn:hover { background: var(--navy); color: #fff; }

@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
  .author-row { flex-direction: column; align-items: flex-start; }
  .article-stats { gap: 12px; }
  .share-row { gap: 5px; }
  .share-btn { font-size: 11px; padding: 5px 9px; }
}
