/* assets/style.css - Score808 Stylesheet */

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content { 
    flex: 1; 
    padding: 30px 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%; 
}

/* MAIN GRID LAYOUT */
.homepage-grid-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .homepage-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* RECENT POSTS AREA */
.posts-recent-area {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.section-main-title {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.post-card-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* حماية حاوية الصورة لضمان سلاسة التكبير بدون تجاوز الحدود */
.post-card-item a:has(.post-thumb) {
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
    height: 120px;
}

.post-thumb {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    background: #cbd5e1;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-thumb:hover {
    transform: scale(1.08);
}

.post-details { 
    flex: 1; 
    min-width: 0; /* حل نهائي لمشكلة overflow في الشاشات الصغيرة مع الـ Flexbox */
}

.post-cat-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
    text-decoration: none;
}

.post-details h2 { 
    font-size: 16px; 
    margin-bottom: 6px; 
}

.post-details h2 a { 
    color: #1e293b; 
    text-decoration: none; 
    transition: 0.2s; 
    word-break: break-word; /* منع العناوين الطويلة من تخريب التنسيق */
}

.post-details h2 a:hover { 
    color: #0284c7; 
}

.post-excerpt { 
    font-size: 13px; 
    color: #64748b; 
    margin-bottom: 8px; 
    line-height: 1.5; 
    word-break: break-word; 
}

.post-date { 
    font-size: 12px; 
    color: #94a3b8; 
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* SIDEBAR AREA */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.widget-box h3 {
    font-size: 17px;
    color: #1e293b;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

i.fa-solid.fa-up-right-from-square {
    font-size: 11px;
}

.widget-list, .category-tags-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li, .category-tags-list li {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f1f5f9;
}

.widget-list li:last-child, .category-tags-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-list li a, .category-tags-list li a {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    word-break: break-word;
}

.widget-list li a:hover, .category-tags-list li a:hover {
    color: #0284c7;
}

.comments-widget-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comm-item {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    word-break: break-word;
}

.comm-item strong { 
    color: #1e293b; 
}

.comm-item a { 
    color: #0284c7; 
    text-decoration: none; 
}

.comm-item p { 
    margin-top: 4px; 
    color: #64748b; 
    font-style: italic; 
}

/* PAGINATION STYLES */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.page-btn {
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.2s ease;
}

.page-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.page-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

@media (max-width: 768px) {
    .post-card-item {
        flex-direction: column;
    }
    .post-card-item a:has(.post-thumb) {
        height: auto;
    }
    .post-thumb {
        width: 100%;
        height: 160px;
    }
}