/* ========================================
   Enhanced Home Page CSS
   ======================================== */

/* ========================================
   Latest Articles Section
   ======================================== */

/* Enhanced Latest Articles Card Design */
.latest-article-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    /* overflow: hidden; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    border: 1px solid #f0f0f0;
    height: 380px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.latest-article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Enhanced Image */
.latest-article-image {
    position: relative;
    /* overflow: hidden; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
}

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

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

/* Enhanced Category Badge */
.latest-article-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin-bottom: 8px;
}

/* Enhanced Title - Responsive to card size */
.latest-article-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* overflow: hidden; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
}

.latest-article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.latest-article-title a:hover {
    color: #667eea;
}

/* Enhanced Excerpt - Responsive to card size */
.latest-article-excerpt {
    font-size: 12px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* overflow: hidden; */ /* تم إزالة هذا لمنع مشاكل الـ scroll */
    min-height: 36px;
}

/* Enhanced Footer */
.latest-article-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding: 12px 0 0 0;
    border-top: 1px solid #e9ecef;
    position: relative;
    box-sizing: border-box;
}

.latest-article-meta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

/* Enhanced Time - Fixed 11px */
.latest-article-time {
    color: #6c757d;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
    overflow: visible;
    max-width: 45%;
    box-sizing: border-box;
}

.latest-article-time::before {
    content: '🕒';
    font-size: 10px;
    flex-shrink: 0;
}

/* Enhanced Author - Fixed 11px */
.latest-article-author {
    color: #6c757d;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
    overflow: visible;
    max-width: 45%;
    box-sizing: border-box;
}

.latest-article-author::before {
    content: '👤';
    font-size: 10px;
    flex-shrink: 0;
}

/* Enhanced Content Container */
.latest-article-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Fix for card height and spacing */
.latest-article-item {
    height: auto;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

/* Ensure footer elements are fully visible */
.latest-article-meta .latest-article-time,
.latest-article-meta .latest-article-author {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

/* Hover Effects for Footer Elements */
.latest-article-time:hover,
.latest-article-author:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* ========================================
   News Cards Section
   ======================================== */

/* CSS for all article excerpts across sections - Responsive sizing */
.news-excerpt,
.latest-news-excerpt,
.category-article-excerpt {
    font-size: 12px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

/* Ensure proper spacing for all sections */
.news-content,
.latest-news-content,
.category-article-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
}

/* Fix for news cards - Responsive typography */
.news-card {
    height: auto;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* تم إزالة news-meta و news-time و news-author من هنا لتجنب التضارب */

/* ========================================
   Latest News Section
   ======================================== */

/* Fix for latest news items - Responsive typography */
.latest-news-item {
    height: auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

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

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

/* ========================================
   Category Section
   ======================================== */

/* Fix for category article items - Responsive typography */
.category-article-item {
    height: auto;
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.category-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-article-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-article-time {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 11px;
}

/* ========================================
   Featured Articles Section
   ======================================== */

/* Featured Articles - Responsive typography */
.featured-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.featured-time,
.featured-author {
    font-size: 11px;
    color: #6c757d;
}

/* ========================================
   Slider Section
   ======================================== */

/* Slider - Responsive typography */
.slide-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.slide-time,
.slide-author {
    font-size: 11px;
    color: #6c757d;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Medium screens */
@media (max-width: 768px) {
    .latest-article-content,
    .news-content,
    .latest-news-content,
    .category-article-content {
        padding: 10px;
    }
    
    .latest-article-title,
    .news-title,
    .latest-news-headline {
        font-size: 12px;
        min-height: 32px;
    }
    
    .latest-article-excerpt,
    .news-excerpt,
    .latest-news-excerpt,
    .category-article-excerpt {
        font-size: 11px;
        margin-bottom: 6px;
        min-height: 33px;
    }
    
    .featured-title {
        font-size: 14px;
        min-height: 38px;
    }
    
    .featured-excerpt {
        font-size: 12px;
        min-height: 36px;
    }
    
    .slide-title {
        font-size: 13px;
        min-height: 36px;
    }
    
    .slide-excerpt {
        font-size: 11px;
        min-height: 33px;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .latest-article-title,
    .news-title,
    .latest-news-headline {
        font-size: 11px;
        min-height: 30px;
    }
    
    .latest-article-excerpt,
    .news-excerpt,
    .latest-news-excerpt,
    .category-article-excerpt {
        font-size: 10px;
        min-height: 30px;
    }
} 

/* ========================================
   Final Overrides — Latest Articles (Ensure enhanced styles win)
   ======================================== */
.latest-articles-section .latest-article-item {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    height: auto !important;
    min-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
}

.latest-articles-section .latest-article-image img {
    height: 120px !important;
    object-fit: cover !important;
    width: 100% !important;
}

.latest-articles-section .latest-article-title {
    font-size: 14px !important;
    min-height: 40px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
}

.latest-articles-section .latest-article-excerpt {
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #6c757d !important;
    min-height: 36px !important;
    margin-bottom: 12px !important;
}

.latest-articles-section .latest-article-content {
    padding: 16px !important;
}

.latest-articles-section .latest-article-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 12px !important;
    border-top: 1px solid #e9ecef !important;
    margin-top: auto !important;
}

.latest-articles-section .latest-article-time,
.latest-articles-section .latest-article-author {
    font-size: 11px !important;
    color: #6c757d !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 45% !important;
} 

/* ========================================
   Final Overrides — Latest News (meta alignment)
   ======================================== */

/* ========================================
   Final Overrides — Latest News Card (balanced classic look)
   ======================================== */
.latest-news-section .latest-news-item {
	background: #ffffff !important;
	border: 1px solid #e9ecef !important;
	border-radius: 10px !important;
	box-shadow: 0 1px 3px rgba(16,24,40,0.04) !important;
	transition: box-shadow .2s ease, transform .2s ease !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	height: auto !important;
	min-height: 190px !important;
}

.latest-news-section .latest-news-item:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 20px rgba(16,24,40,0.08) !important;
}

.latest-news-section .latest-news-image img {
	width: 100% !important;
	height: 120px !important;
	object-fit: cover !important;
	transition: transform .25s ease !important;
	display: block !important;
}

.latest-news-section .latest-news-item:hover .latest-news-image img {
	transform: scale(1.03) !important;
}

.latest-news-section .latest-news-content {
	padding: 12px !important;
}

/* Category badge — classic pill */
.latest-news-section .latest-news-category {
	background: #ff661f !important; /* dark blue */
	color: #ffffff !important;
	padding: 4px 10px !important;
	border-radius: 16px !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	display: inline-block !important;
	margin-bottom: 8px !important;
	box-shadow: none !important;
}

.latest-news-section .latest-news-headline { margin-bottom: 6px !important; }

.latest-news-section .latest-news-headline a {
	color: #2c3e50 !important;
	text-decoration: none !important;
	transition: color .15s ease !important;
}
.latest-news-section .latest-news-headline a:hover { color: #1b5cff !important; }

.latest-news-section .latest-news-excerpt { margin-bottom: 8px !important; color: #6c757d !important; } 

/* ========================================
   Final Overrides — Latest News: centered headline + subtle card polish
   ======================================== */
.latest-news-section .latest-news-headline {
	text-align: center !important;
}

.latest-news-section .latest-news-item {
	border-radius: 12px !important;
}

.latest-news-section .latest-news-item:hover {
	border-color: #dfe3e8 !important;
} 