/* =========================================
   ScoreTank Single Post Styles (Modern V5.0)
   ========================================= */

/* --- 1. شريط التصفح (Breadcrumbs) --- */
.scoretank-breadcrumbs {
    font-size: 13px;
    margin-bottom: 20px;
    color: #888;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.scoretank-breadcrumbs a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.scoretank-breadcrumbs a:hover {
    color: var(--main-nav-hover);
}
.scoretank-breadcrumbs .delimiter {
    color: #ccc;
    font-size: 12px;
}
.scoretank-breadcrumbs .current {
    color: #999;
    font-weight: normal;
}

/* --- 2. رأس المقال (Header) --- */
.single-post-header {
    margin-bottom: 30px;
    text-align: center; /* توسيط افتراضي */
}

/* التصنيف */
.post-cat-tags {
    margin-bottom: 15px;
}
.post-cat-tags a {
    background: var(--main-nav-hover);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}
.post-cat-tags a:hover { opacity: 0.8; }

/* العنوان */
.post-title {
    font-size: 28px;
    line-height: 1.4;
    font-weight: 800;
    margin: 0 0 15px;
    color: var(--header-text);
}

/* بيانات الميتا (تحت العنوان) */
.single-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #777;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.single-post-meta i, 
.single-post-meta span[class*="tie-icon"] {
    color: var(--main-nav-hover);
    font-size: 15px;
}

/* صورة الكاتب المصغرة في الميتا */
.meta-author-img img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 5px;
}

/* --- 3. المحتوى (Content) --- */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 40px;
}
.entry-content p { margin-bottom: 20px; }
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}
.entry-content blockquote {
    border-right: 4px solid var(--main-nav-hover);
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

/* --- 4. أزرار المشاركة (Share Buttons) --- */
.share-box {
    margin: 30px 0;
    padding: 20px;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.share-title {
    display: block;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 15px;
    text-align: center;
}
.share-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
    color: #fff !important;
}
.share-btn:hover { opacity: 0.8; transform: translateY(-2px); }

/* ألوان الشبكات */
.share-facebook { background-color: #3b5998; }
.share-twitter  { background-color: #000000; }
.share-whatsapp { background-color: #25d366; }
.share-telegram { background-color: #0088cc; }
.share-linkedin { background-color: #0077b5; }

/* المخطط 1: نصي (Text) */
.share-style-text .share-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    min-width: 100px;
}
.share-style-text .share-btn i { margin-left: 8px; }

/* المخطط 2: دائري (Circle) */
.share-style-circle .share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
}
.share-style-circle .share-text { display: none; }

/* المخطط 3: مربع (Square) */
.share-style-square .share-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 18px;
}
.share-style-square .share-text { display: none; }


/* --- 5. صندوق الكاتب (Author Box) --- */
.author-box {
    display: flex;
    align-items: center;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
}
.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.author-info {
    margin-right: 25px; /* RTL */
}
.author-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--header-text);
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}
.author-bio {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}


/* --- 6. مقالات ذات صلة (Related Posts) --- */
.related-posts {
    margin-top: 50px;
}
.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    border-right: 4px solid var(--main-nav-hover);
    padding-right: 15px;
    color: var(--header-text);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.related-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.related-item:hover { transform: translateY(-3px); }
.related-thumb {
    height: 150px;
    overflow: hidden;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    transition: 0.5s;
}
.related-item:hover .related-thumb img { transform: scale(1.1); }
.related-title {
    padding: 10px;
    background: var(--header-bg);
}
.related-title a {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --- 7. الوضع الليلي (Dark Mode Support) --- */
body.dark-skin .single-post-header,
body.dark-skin .entry-content,
body.dark-skin .share-box,
body.dark-skin .related-item .related-title {
    color: #e0e0e0;
}
body.dark-skin .post-title { color: #fff; }
body.dark-skin .entry-content blockquote {
    background: #23282d;
    color: #ccc;
    border-right-color: var(--main-nav-hover);
}
body.dark-skin .author-box {
    background: #23282d;
    border-color: #3a4047;
}
body.dark-skin .author-name { color: #fff; }
body.dark-skin .author-bio { color: #aaa; }
body.dark-skin .author-avatar img { border-color: #333; }
body.dark-skin .single-post-meta { border-top-color: #3a4047; color: #999; }
body.dark-skin .share-box {
    background: #23282d;
    border-color: #3a4047;
}
body.dark-skin .related-title { background: #23282d; }
body.dark-skin .related-title a { color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .author-box { flex-direction: column; text-align: center; }
    .author-info { margin-right: 0; margin-top: 15px; }
    .single-post-meta { flex-direction: column; gap: 8px; }
}