/*
Theme Name: Atta hani news
Theme URI: https://elomda.net/
Author: Ekramy Hani
Description: قالب إخباري عصري متجاوب - النسخة الاحترافية (تم حل مشاكل PageSpeed).
Version: 30.0
Text Domain: attahaninews
*/

/* تم تغميق اللون الأساسي درجة ليتوافق مع معايير تباين جوجل */
:root { --primary: #1d4ed8; --dark: #0f172a; --text-color: #334155; --border: #e2e8f0; --bg-color: #f8fafc; }
* { box-sizing: border-box; }
body { font-family: 'Tajawal', sans-serif; margin: 0; padding: 0; background-color: var(--bg-color); color: var(--text-color); line-height: 1.8; direction: rtl; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Tajawal', sans-serif !important; }

/* الهيدر ومربع البحث */
.site-header { background: #fff; }
.top-header { position: sticky; top: 0; z-index: 101; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid #f1f5f9; max-width: 100%; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.logo { font-size: 26px; font-weight: 800; color: var(--dark); text-decoration: none; }
.logo span { color: var(--primary); }
.header-search-form { display: flex; align-items: center; background: #f1f5f9; border-radius: 20px; padding: 2px 5px; border: 1px solid var(--border); transition: all 0.3s; }
.header-search-form:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-field { border: none; background: transparent; outline: none; padding: 5px 10px; font-family: 'Tajawal', sans-serif; font-size: 14px; color: var(--dark); width: 140px; transition: width 0.3s; }
.header-search-form button.search-icon { background: none; border: none; color: var(--primary); padding: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.bottom-header { max-width: 1150px; margin: 0 auto; border-bottom: 1px solid var(--border); background: #fff; }
.swipe-menu { display: flex; overflow-x: auto; white-space: nowrap; padding: 0 15px; margin: 0; list-style: none; -ms-overflow-style: none; scrollbar-width: none; align-items: center; }
.swipe-menu::-webkit-scrollbar { display: none; }
.swipe-menu li { display: inline-block; }
.swipe-menu a { display: block; color: #64748b; font-size: 14px; font-weight: 700; padding: 6px 16px; margin: 8px 5px; text-decoration: none; background: #f1f5f9; border-radius: 20px; transition: all 0.2s; border: 1px solid transparent; }
.swipe-menu .current-menu-item a, .swipe-menu a:hover { color: #fff; background: var(--primary); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }

/* الحاوية */
.container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }
.main-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 40px; padding: 10px 0 30px 0; }

/* ==================== السلايدر الاحترافي ==================== */
.news-slider-container { position: relative; width: 100%; aspect-ratio: 16 / 9; height: auto; min-height: 250px; border-radius: 16px; overflow: hidden; margin-bottom: 40px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); background: var(--dark); }
.news-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; z-index: 1; display: block; text-decoration: none;}
.news-slide.active { opacity: 1; z-index: 2; }
.news-slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.98) 0%, rgba(15,23,42,0.4) 60%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; color: #fff; z-index: 3;}
.slide-cat { background: var(--primary); color: #fff; padding: 6px 16px; border-radius: 8px; font-size: 14px; font-weight: 800; width: fit-content; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(37,99,235,0.3); }
.slide-overlay h2 { font-size: 32px; margin: 0 0 10px 0; color: #fff !important; font-weight: 800; line-height: 1.4; text-shadow: 0 2px 5px rgba(0,0,0,0.8); max-width: 900px; }
.slide-overlay p { font-size: 16px; color: #e2e8f0; margin: 0; max-width: 800px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

.slider-controls { position: absolute; bottom: 30px; left: 40px; z-index: 4; display: flex; gap: 12px; direction: ltr; }
.slider-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(8px); color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.slider-btn:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.1); box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.slider-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.slider-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: rgba(255,255,255,0.1); z-index: 5; }
.progress-bar { height: 100%; background: var(--primary); width: 0; border-radius: 0 5px 5px 0; }
@keyframes progressAnimation { 0% { width: 0; } 100% { width: 100%; } }

/* كروت الأخبار */
.section-title { font-size: 24px; border-right: 4px solid var(--primary); padding-right: 12px; margin-bottom: 25px; color: var(--dark); font-weight: 800; }
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-card { display: flex; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); border: 1px solid var(--border); }
.news-img-wrap { width: 280px; height: 100%; flex-shrink: 0; display: block; }
.news-img-wrap img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; display: block; }
.no-thumb-card { background: var(--primary); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; aspect-ratio: 16/9; }
.news-info { padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.category-tag { background: #eff6ff; color: var(--primary); padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 800; margin-bottom: 12px; display: inline-block; width: fit-content; }
.news-info h3 { margin: 0 0 10px 0; font-size: 20px; line-height: 1.4; font-weight: 800; }
.news-info h3 a { text-decoration: none; color: var(--dark); transition: color 0.2s; }
.news-info h3 a:hover { color: var(--primary); }
.news-excerpt { color: #64748b; font-size: 15px; margin: 0; line-height: 1.7; font-weight: 500;}
.pagination-wrap { margin-top: 30px; margin-bottom: 30px; }

/* الودجات */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.widget { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); border: 1px solid var(--border); }
.widget-title { font-size: 18px; color: var(--dark); font-weight: 800; margin-top: 0; margin-bottom: 20px; position: relative; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; }
.widget-title::after { content: ''; position: absolute; right: 0; bottom: -2px; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 12px 0; border-bottom: 1px dashed var(--border); transition: all 0.3s; display: flex; align-items: center; }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li::before { content: '▪'; color: var(--primary); margin-left: 8px; font-size: 16px; }
.widget ul li a { color: var(--text-color); text-decoration: none; font-size: 15px; font-weight: 600; transition: all 0.3s; }
.widget ul li a:hover { color: var(--primary); padding-right: 8px; }
.widget .search-form { display: flex; position: relative; width: 100%; }
.widget .search-form .search-field { width: 100%; padding: 12px 15px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Tajawal', sans-serif; font-size: 14px; background: #f8fafc; outline: none; transition: all 0.3s; }
.widget .search-form .search-field:focus { border-color: var(--primary); background: #fff; }
.widget .search-form .search-submit { position: absolute; left: 5px; top: 5px; bottom: 5px; background: var(--primary); color: #fff; border: none; border-radius: 6px; padding: 0 15px; font-family: 'Tajawal', sans-serif; font-weight: bold; cursor: pointer; transition: background 0.3s; }

/* تنسيق صفحة الخبر */
.single-article { background: #fff; border-radius: 12px; padding: 35px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); border: 1px solid var(--border); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
.breadcrumbs a { background: #f1f5f9; color: var(--dark); text-decoration: none; font-weight: 700; padding: 4px 14px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border); }
.main-article-title { font-size: 34px !important; line-height: 1.3 !important; margin: 0 0 20px 0 !important; color: var(--dark) !important; font-weight: 800 !important; }
.featured-image { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 25px !important; }

.article-content { font-size: 20px; color: #1e293b; line-height: 1.9; font-weight: 500; text-align: right; }
.article-content img { max-width: 100% !important; height: auto !important; border-radius: 8px; margin: 20px auto; display: block; }
.article-content h1, .article-content h2, .article-content h3 { font-size: 24px !important; line-height: 1.4 !important; margin-top: 30px !important; margin-bottom: 15px !important; font-weight: 800 !important; color: var(--dark) !important; border-right: 4px solid var(--primary); padding-right: 12px; }

.share-clean { display: flex; flex-direction: column; align-items: center; justify-content: center; border-top: 1px solid var(--border); padding-top: 30px; margin-bottom: 30px; }
.share-title { font-weight: 700; color: #64748b; margin-bottom: 15px; font-size: 16px; order: -1; } 
.share-icons { display: flex; flex-direction: row; gap: 15px; }
.share-icon { width: 45px !important; height: 45px !important; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: white; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.3s; }
.share-icon:hover { transform: translateY(-4px); box-shadow: 0 8px 15px rgba(0,0,0,0.15); }
.share-icon svg { width: 24px !important; height: 24px !important; fill: currentColor; } 
.btn-fb { background: #1877F2; } .btn-x { background: #000000; } .btn-wa { background: #25D366; } .btn-tg { background: transparent; }

.post-navigation-visual { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 30px 0; margin-bottom: 30px; }
.nav-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.modern-nav-card { position: relative; height: 140px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; border-radius: 12px; text-decoration: none; }
.modern-nav-card img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.4s; }
.modern-nav-card .nav-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.75); z-index: 2; transition: background 0.4s; }
.modern-nav-card:hover img { transform: scale(1.1); }
.modern-nav-card:hover .nav-overlay { background: rgba(37, 99, 235, 0.85); }
.modern-nav-card .nav-card-text { position: relative; z-index: 3; color: #fff; display: flex; flex-direction: column; align-items: center; padding: 15px; width: 100%; }
.modern-nav-card .nav-label { background: #fff; color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.modern-nav-card h4 { color: #fff !important; margin: 0; font-size: 16px; font-weight: 800; line-height: 1.4; }

.related-posts { padding-top: 20px; }
.related-title { font-size: 22px; color: var(--dark); font-weight: 800; margin-bottom: 20px; border-right: 4px solid var(--primary); padding-right: 12px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.related-card { display: flex; flex-direction: column; text-decoration: none; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: all 0.3s; }
.related-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08); border-color: var(--primary); }
.related-img { width: 100%; aspect-ratio: 16/9; background: #f1f5f9; }
.related-img img { width: 100%; height: 100%; object-fit: cover; }
.no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.related-card h4 { padding: 15px; margin: 0; color: var(--dark); font-size: 16px; font-weight: 700; line-height: 1.5; text-align: right; }

/* الفوتر */
.site-footer { background-color: var(--dark); color: #fff; padding: 50px 0 0 0; margin-top: 50px; border-top: 4px solid var(--primary); }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-about h3 { color: #fff; font-size: 24px; margin: 0 0 10px 0; font-weight: 800; letter-spacing: -0.5px; }
.footer-about h3 span { color: var(--primary); }
.footer-about p { color: #94a3b8; line-height: 1.7; font-size: 14px; margin: 0; }
.footer-links h3, .footer-social h3 { color: #fff; font-size: 18px; margin: 0 0 15px 0; border-right: 3px solid var(--primary); padding-right: 10px; font-weight: 800; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color 0.3s; font-size: 14px; font-weight: 600; display: inline-block; }
.footer-links a:hover { color: var(--primary); }
.footer-social .social-icons { display: flex; gap: 12px; }
.footer-social .social-icon { width: 40px !important; height: 40px !important; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.1); }
.footer-social .social-icon:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); }
.footer-social .social-icon svg { width: 18px !important; height: 18px !important; fill: currentColor; }
.footer-bottom { background-color: #0b1120; padding: 15px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }

/* تم تغميق لون خط الفوتر السفلي ليتوافق مع تباين جوجل */
.footer-bottom p { margin: 0; color: #94a3b8 !important; font-size: 13px; font-weight: 600; }

/* تم تغميق لون خط الإعلانات ليتوافق مع تباين جوجل */
.ad-space { background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px; text-align: center; color: #475569; font-size: 13px; margin: 10px 0 !important; width: 100%; }

/* ==================== الموبايل ==================== */
@media (max-width: 768px) {
    body { width: 100%; overflow-x: hidden; }
    .container { padding: 0 10px !important; }
    .main-layout { grid-template-columns: 1fr !important; padding: 10px 0; gap: 15px; display: block; }
    .single-article { padding: 15px !important; border-radius: 12px; width: 100%; box-sizing: border-box; display: block; margin-bottom: 20px; } 
    .top-header { padding: 10px 15px; }
    .logo { font-size: 24px; }
    .search-field { width: 100px; font-size: 13px; }
    
    .news-slider-container { margin-bottom: 25px; border-radius: 12px; height: auto; }
    .slide-overlay { padding: 20px 15px; }
    .slide-overlay h2 { font-size: 18px; margin-bottom: 5px; }
    .slide-overlay p { font-size: 13px; -webkit-line-clamp: 2; }
    .slide-cat { font-size: 11px; padding: 4px 10px; margin-bottom: 10px; }
    .slider-controls { bottom: 15px; left: 15px; gap: 8px; }
    .slider-btn { width: 34px; height: 34px; }
    .slider-btn svg { width: 16px; height: 16px; }
    
    .main-article-title { font-size: 24px !important; line-height: 1.35 !important; margin-bottom: 15px !important; }
    .article-content h1, .article-content h2, .article-content h3 { font-size: 20px !important; }
    .article-content { font-size: 18px; line-height: 1.8; }
    
    .nav-links-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .modern-nav-card { height: 110px; border-radius: 8px; }
    .modern-nav-card .nav-card-text { padding: 5px; }
    .modern-nav-card .nav-label { font-size: 10px; padding: 2px 8px; margin-bottom: 5px; }
    .modern-nav-card h4 { font-size: 13px; line-height: 1.3; }
    
    .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .related-card h4 { padding: 10px; font-size: 14px; }
    
    .news-card { flex-direction: column; border-radius: 12px; }
    .news-img-wrap { width: 100%; }
    .news-card img { width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 12px 12px 0 0; }
    .news-info { padding: 15px; }
    
    .site-footer { padding: 40px 0 0 0; margin-top: 30px; border-top: 3px solid var(--primary); }
    .footer-content { display: flex; flex-direction: column; gap: 20px; text-align: right; margin-bottom: 25px; align-items: flex-start; padding: 0 10px; }
    .footer-about h3 { font-size: 24px; margin-bottom: 5px; }
    .footer-about p { font-size: 14px; max-width: 100%; margin: 0; line-height: 1.6; }
    .footer-links h3, .footer-social h3 { display: none; }
    .footer-links { width: 100%; }
    .footer-links ul { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 8px; width: 100%; }
    .footer-links a { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); padding: 6px 16px; border-radius: 20px; font-size: 13px; color: #cbd5e1; }
    .footer-links a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
    .footer-social { width: 100%; margin-top: 10px; }
    .footer-social .social-icons { justify-content: center; gap: 15px; }
    .footer-social .social-icon { background: transparent; border-color: rgba(255,255,255,0.15); color: #94a3b8; }
    .footer-social .social-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
}