/* Latest Articles Section - CSS منفصل بدون التأثير على باقي الأقسام */
.latest-articles-section {
    background: #ffffff;
    padding: 20px 15px;
    margin: 15px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* تأكد من أن الـ container لا يخرج عن الإطار */
.latest-articles-section .container,
.latest-articles-section .row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.latest-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 40px;
    margin-top: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.latest-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ff661f;
    border-radius: 2px;
}

.latest-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.latest-article-item {
    background: #ffffff !important;
    border-radius: 8px !important;
    /* overflow: hidden !important; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #f1f3f4 !important;
    height: 380px !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.latest-article-item:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
    border-color: #e74c3c !important;
}

.latest-article-image {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    /* overflow: hidden !important; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    position: relative !important;
    flex-shrink: 0 !important;
}

.latest-article-image img {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
    display: block !important;
}

.latest-article-item:hover .latest-article-image img {
    transform: scale(1.05);
}

.latest-article-content {
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
    justify-content: space-between !important;
}

.latest-article-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    margin-bottom: 6px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    /* overflow: hidden !important; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    min-height: 34px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.latest-article-excerpt {
    color: #7f8c8d !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    /* overflow: hidden !important; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    margin: 0 !important;
    margin-bottom: 8px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Force correct positioning for author and date - LIKE SLIDER */
.latest-article-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: auto !important;
    padding-top: 6px !important;
    border-top: 1px solid #f1f3f4 !important;
    flex-direction: row !important;
}

/* Date on the LEFT (like slider) */
.latest-article-time {
    color: #7f8c8d !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin-top: auto !important;
    order: 1 !important;
}

.latest-article-time::before {
    font-size: 2px !important;
}

/* Author on the RIGHT (like slider) */
.latest-article-author {
    color: #7f8c8d !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    order: 2 !important;
}

.latest-article-author::before {
    content: '👤' !important;
    font-size: 9px !important;
}

.latest-article-category {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 15px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    align-self: flex-start !important;
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.3) !important;
}

/* Show More Button Styling */
.latest-show-more-container {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f1f3f4;
}

.latest-show-more-btn {
    background: #ff661f;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.latest-show-more-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.latest-show-more-btn:active {
    transform: translateY(0);
}

.latest-show-more-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.latest-show-more-btn:hover i {
    transform: translateY(2px);
}

/* Responsive Design for Latest Articles Only */
@media (max-width: 1200px) {
    .latest-articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .latest-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .latest-article-item {
        height: 220px !important;
    }
    
    .latest-article-image {
        height: 110px !important;
    }
}

@media (max-width: 768px) {
    .latest-articles-section {
        padding: 15px 10px !important;
        margin: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .latest-section-title {
        font-size: 20px !important;
        margin-bottom: 35px !important;
        margin-top: 15px !important;
        padding-bottom: 12px !important;
    }
    
    .latest-articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .latest-article-item {
        width: 100% !important;
        box-sizing: border-box !important;
        height: 220px !important;
    }
    
    .latest-article-content {
        padding: 8px !important;
    }
    
    .latest-article-title {
        font-size: 11px !important;
        min-height: 30px !important;
        margin-bottom: 5px !important;
    }
    
    .latest-article-excerpt {
        margin-bottom: 6px !important;
    }
    
    .latest-article-image {
        height: 110px !important;
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .latest-articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 5px !important;
    }
    
    .latest-articles-section {
        padding: 12px 8px !important;
        margin: 8px 5px !important;
    }
    
    .latest-section-title {
        font-size: 18px !important;
        margin-bottom: 30px !important;
        margin-top: 12px !important;
        padding-bottom: 10px !important;
    }
    
    .latest-article-item {
        height: 200px !important;
        min-width: 0 !important;
    }
    
    .latest-article-image {
        height: 90px !important;
    }
    
    .latest-article-content {
        padding: 5px !important;
    }
    
    .latest-article-title {
        font-size: 9px !important;
        min-height: 24px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }
    
    .latest-article-excerpt {
        margin-bottom: 4px !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }
    
    .latest-article-meta {
        font-size: 8px !important;
    }
}

@media (max-width: 480px) {
    .latest-articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        padding: 0 3px !important;
    }
    
    .latest-articles-section {
        padding: 10px 6px !important;
        margin: 6px 3px !important;
    }
    
    .latest-section-title {
        font-size: 18px !important;
        padding: 0 5px !important;
    }
    
    .latest-article-item {
        height: 180px !important;
        min-width: 0 !important;
    }
    
    .latest-article-image {
        height: 90px !important;
    }
    
    .latest-article-content {
        padding: 5px !important;
    }
    
    .latest-article-title {
        font-size: 9px !important;
        min-height: 24px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }
    
    .latest-article-excerpt {
        margin-bottom: 4px !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }
    
    .latest-article-meta {
        font-size: 8px !important;
    }
}

/* للشاشات الصغيرة جداً - عمود واحد فقط */
@media (max-width: 360px) {
    .latest-articles-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }
    
    .latest-articles-section {
        padding: 15px 10px !important;
        margin: 10px !important;
    }
    
    .latest-article-item {
        height: 200px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .latest-article-image {
        height: 100px !important;
    }
    
    .latest-article-content {
        padding: 8px !important;
    }
    
    .latest-article-title {
        font-size: 11px !important;
        min-height: 30px !important;
        margin-bottom: 5px !important;
        line-height: 1.3 !important;
    }
    
    .latest-article-excerpt {
        margin-bottom: 6px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
    }
    
    .latest-article-meta {
        font-size: 9px !important;
    }
}

/* Category Sections Styles - Simple Design like Latest Articles */
.category-sections-container {
    background: #ffffff;
    padding: 30px 20px;
    margin: 25px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 1200px;
}

.category-section-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    padding: 25px;
    background: #ffffff;
}

.category-section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border-color: #e74c3c;
}

.category-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.category-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 2px;
}

.category-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.category-articles-row {
    display: flex;
    gap: 20px;
}

.category-article-item {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
    height: 110px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    flex: 1;
}

.category-article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border-color: #e74c3c;
}

.category-article-image {
    width: 110px;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.category-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-article-item:hover .category-article-image img {
    transform: scale(1.05);
}

.category-article-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.category-article-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.category-article-time {
    color: #7f8c8d;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-article-time::before {
    font-size: 12px;
}

/* Show More Button for Category Sections - Simple */
.category-show-more-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f1f3f4;
}

.category-show-more-btn {
    background: #ff661f;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-show-more-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.category-show-more-btn:active {
    transform: translateY(0);
}

.category-show-more-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.category-show-more-btn:hover i {
    transform: translateY(2px);
}

/* Responsive Design for Category Sections - Simple */
@media (max-width: 768px) {
    .category-sections-container {
        padding: 25px 15px;
        margin: 20px 15px;
    }
    
    .category-section-card {
        padding: 20px;
    }
    
    .category-section-title {
        font-size: 22px;
        margin-bottom: 25px;
        padding-bottom: 12px;
    }
    
    .category-articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .category-articles-row {
        gap: 15px;
    }
    
    .category-article-item {
        height: 100px;
    }
    
    .category-article-image {
        width: 100px;
    }
    
    .category-article-content {
        padding: 12px;
    }
    
    .category-article-title {
        font-size: 13px;
        min-height: 35px;
    }
    
    .category-article-time {
        font-size: 10px;
    }
    
    .category-show-more-container {
        margin-top: 25px;
        padding-top: 20px;
    }
    
    .category-show-more-btn {
        padding: 10px 25px;
        font-size: 12px;
    }
    
    .category-show-more-btn i {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .category-sections-container {
        padding: 20px 12px;
        margin: 15px 10px;
    }
    
    .category-section-card {
        padding: 15px;
    }
    
    .category-section-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .category-articles-grid {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .category-articles-row {
        gap: 12px;
    }
    
    .category-article-item {
        height: 90px;
    }
    
    .category-article-image {
        width: 90px;
    }
    
    .category-article-content {
        padding: 10px;
    }
    
    .category-article-title {
        font-size: 12px;
        min-height: 30px;
    }
    
    .category-article-time {
        font-size: 9px;
    }
    
    .category-show-more-container {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .category-show-more-btn {
        padding: 8px 20px;
        font-size: 11px;
    }
    
    .category-show-more-btn i {
        font-size: 9px;
    }
}

/* Latest News Section - Simple Design */
.latest-news-section {
    margin: 20px auto;
    max-width: 1200px;
}

.latest-news-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f1f3f4;
    overflow: hidden;
    transition: all 0.3s ease;
}

.latest-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.latest-news-title {
    background: #2c3e50;
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    padding: 15px;
    margin: 0;
    position: relative;
}

.latest-news-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: #e74c3c;
    border-radius: 1px;
}

.latest-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
}

.latest-news-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.latest-news-item:nth-child(odd) {
    border-right: 1px solid #f1f3f4;
}

.latest-news-item:nth-child(3),
.latest-news-item:nth-child(4) {
    border-bottom: none;
}

.latest-news-item:hover {
    background: #f8fafc;
}

.latest-news-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 12px;
}

.latest-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-news-item:hover .latest-news-image img {
    transform: scale(1.05);
}

.latest-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.latest-news-category {
    background: #e74c3c;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
}

.latest-news-headline {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

/* تم حذف latest-news-time من هنا */

/* Show More Button for Latest News */
.latest-news-show-more {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f3f4;
}

.latest-news-btn {
    background: #ff661f;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.latest-news-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.latest-news-btn:active {
    transform: translateY(0);
}

.latest-news-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.latest-news-btn:hover i {
    transform: translateY(2px);
}

/* Responsive Design for Latest News */
@media (max-width: 768px) {
    .latest-news-grid {
        grid-template-columns: 1fr;
    }
    
    .latest-news-item:nth-child(odd) {
        border-right: none;
    }
    
    .latest-news-item:nth-child(3) {
        border-bottom: 1px solid #f1f3f4;
    }
    
    .latest-news-item {
        padding: 12px;
    }
    
    .latest-news-image {
        width: 60px;
        height: 60px;
        margin-left: 10px;
    }
    
    .latest-news-title {
        font-size: 18px;
        padding: 12px;
    }
    
    .latest-news-headline {
        font-size: 12px;
        min-height: 32px;
    }
    
    .latest-news-show-more {
        padding: 15px;
    }
    
    .latest-news-btn {
        padding: 8px 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .latest-news-item {
        padding: 10px;
    }
    
    .latest-news-image {
        width: 50px;
        height: 50px;
        margin-left: 8px;
    }
    
    .latest-news-title {
        font-size: 16px;
        padding: 10px;
    }
    
    .latest-news-headline {
        font-size: 11px;
        min-height: 28px;
    }
    
    .latest-news-category {
        font-size: 9px;
        padding: 2px 8px;
    }
    
    /* تم حذف latest-news-time من هنا */
    
    .latest-news-show-more {
        padding: 12px;
    }
    
    .latest-news-btn {
        padding: 6px 15px;
        font-size: 10px;
    }
} 

/* Override any conflicting styles with maximum specificity */
.latest-articles-section .latest-article-item .latest-article-meta {
    flex-direction: row-reverse !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.latest-articles-section .latest-article-item .latest-article-author {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.latest-articles-section .latest-article-item .latest-article-time {
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
} 

/* FINAL OVERRIDE - Force correct positioning like slider */
.latest-articles-section .latest-article-item .latest-article-meta {
    flex-direction: row !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.latest-articles-section .latest-article-item .latest-article-time {
    order: 1 !important;
}

.latest-articles-section .latest-article-item .latest-article-author {
    order: 2 !important;
}

/* Additional specificity to override any conflicts */
.latest-articles-section .latest-article-item .latest-article-content .latest-article-meta {
    flex-direction: row !important;
}

.latest-articles-section .latest-article-item .latest-article-content .latest-article-time {
    order: 1 !important;
}

.latest-articles-section .latest-article-item .latest-article-content .latest-article-author {
    order: 2 !important;
} 