﻿/* ===========================================
   4) Single Article Page
=========================================== */
.article-container {
  max-width: 900px;
  margin: auto;
}

.single-title {
  font-family: "Cairo", sans-serif;
  text-align: center;
}

.article-category .badge {
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
}

.article-content {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem;
  line-height: 1.95;
  color: #000;
}

.article-content p {
  margin-bottom: 1.4rem;
}

.single-featured-img img {
  width: 100% !important;
  height: 380px !important;
  object-fit: cover !important;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  color: #111;
}

.article-content h2 { font-size: 1.8rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.3rem; }

.article-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.article-content a {
  color: #007bff;
  text-decoration: underline;
}

.article-content a:hover {
  color: #0056b3;
}

.back-button .btn-outline-primary {
  border-color: #166b43;
  color: #166b43;
  background: transparent;
}

.back-button .btn-outline-primary:hover,
.back-button .btn-outline-primary:focus,
.back-button .btn-outline-primary:active,
.back-button .btn-outline-primary.active {
  background: #166b43;
  border-color: #166b43;
  color: #fff;
}

.back-button .btn-outline-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(22, 107, 67, 0.25);
}

.article-content blockquote {
  border-right: 4px solid #166b43;
  padding: 1rem 1.2rem;
  background: #f7faff;
  border-radius: 10px;
  margin: 2rem 0;
  font-size: 1.2rem;
  font-style: italic;
  color: #444;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  margin: 1.2rem 0;
  padding-right: 1.7rem;
  line-height: 2;
}

.article-content li {
  margin-bottom: 0.6rem;
}

.article-content pre {
  background: #1e1e1e;
  color: #f1f1f1;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  direction: ltr;
  overflow-x: auto;
  font-size: 0.95rem;
  margin: 1.8rem 0;
}

.article-content code {
  background: #f1f1f1;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: "Courier New", monospace;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.article-content table th,
.article-content table td {
  border: 1px solid #ddd;
  padding: 0.8rem;
}

.article-content table th {
  background: #f1f5ff;
  font-weight: bold;
}

.share-buttons a {
  margin-left: 8px;
  border-radius: 50px !important;
  padding: 6px 14px !important;
  font-size: 0.85rem !important;
}

.share-buttons a:hover {
  opacity: 0.8;
}

.social-icons {
  display: flex;
  gap: 18px;
}

.social-icons a {
  font-size: 1.2rem;
  color: #333;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #166b43;
}

.site-footer .social-icons a {
  font-size: 1.1rem;
}


.related-posts h4 {
  color: #1f1f1f !important;
}

.related-posts .card {
  border-radius: 10px;
  transition: 0.2s;
}

.related-posts .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.related-posts img {
  transition: 0.3s;
}

.related-posts img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .single-featured-img img {
    height: 240px !important;
  }
  .article-content {
    font-size: 1.05rem;
  }
  .article-content h2 { font-size: 1.5rem; }
}

/* ===========================================

/* =======================================
   تصميم صفحة المقال – متوافق RTL
======================================= */

.single-article-container {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.8;
    color: #333;
}

.article-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.article-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    text-align: right;
}

.article-meta {
    font-size: 0.9rem;
    color: #888;
    text-align: right;
}

.article-meta span {
    margin-left: 5px;
}

.article-image img {
    max-width: 100%;
    border-radius: 8px;
}

.article-content p {
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
    text-align: justify;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-share h5 {
    font-weight: 600;
    margin-bottom: 0.8rem;
}
.article-meta-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.article-meta-item::before {
    content: "•";
    margin: 0 8px;
    color: #9ca3af;
}
.article-meta-item:first-child::before {
    content: "";
    margin: 0;
}

.article-share .article-share-btn {
    color: #fff !important;
}
.article-share .article-share-btn i {
    color: #fff !important;
}

.article-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.article-share-btn i {
    font-size: 1rem;
}
.article-share .btn-facebook { background-color: #1877F2; color: #fff; }
.article-share .btn-twitter { background-color: #111111; color: #fff; }
.article-share .btn-linkedin { background-color: #0A66C2; color: #fff; }
.article-share .btn-whatsapp { background-color: #25D366; color: #fff; }
.article-share .btn-telegram { background-color: #229ED9; color: #fff; }
.article-share .article-share-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

/* الإعلانات */
.ad {
    padding: 15px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

/* تعليق */
.article-comments {
    margin-top: 50px;
}

/* RTL adjustments */
body.rtl .article-meta {
    text-align: right;
}

/* =======================================
   تصميم الشريط الجانبي – sidebar.php
======================================= */

.widget-area {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.widget-area p {
    font-size: 1rem;
    color: #555;
    text-align: right;
}

.widget-area .ad {
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
}

/* =======================================
   تصميم التعليقات – comments.php
======================================= */

.comments-area {
    font-family: 'Tajawal', sans-serif;
    margin-top: 50px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.comments-area h2.comments-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: right;
    color: #1a1a1a;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list li {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.comment-list li:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #222;
    text-align: right;
}

.comment-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
    text-align: right;
}

.comment-content {
    font-size: 1rem;
    color: #555;
    text-align: justify;
}

.comment-reply-link {
    font-size: 0.85rem;
    color: #007bff !important;
    text-decoration: none;
    margin-top: 5px;
    display: inline-block;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* تصميم فورم التعليق */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    font-size: 1rem;
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 15px;
}

.comment-form-cookies-consent input {
    width: auto;
    margin: 0;
}

body.rtl .comment-form-cookies-consent {
    flex-direction: row-reverse;
    text-align: right;
}

.display-fullname-check {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.display-fullname-check .form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    background-color: #ffffff;
    margin: 0;
}
.display-fullname-check .form-check-input:checked {
    background-color: #166b43;
    border-color: #166b43;
}

.comment-form .btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 8px;
}

/* تباعد ومظهر عام */
.comments-area .children {
    margin-right: 40px; /* للردود المتداخلة RTL */
    margin-left: 0;
}

body.rtl .comment-meta,
body.rtl .comment-author {
    text-align: right;
}

/* =======================================
   تصميم الإعلانات داخل التعليقات والمقالات
======================================= */
.ad {
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin: 20px 0;
    font-size: 0.95rem;
    color: #555;
}



