/*
Theme Name: Ekhbary24 News
Author: Salma Mohammed
Description: A modern, clean news theme for Ekhbary24 News.
Version: 1.0
*/

:root {
    --primary-black: #121212;
    --soft-orange: #ff8c32; /* اللون الجديد المعتمد */
    --soft-red: #ff8c32; /* للحفاظ على توافق الكلاسات القديمة بدون تغيير أسمائها في ملفات PHP */
    --light-gray: #f8f9fa;
    --text-muted: #6c757d;
    --border-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: var(--primary-black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fix for WordPress Links & Lists */
a {
    text-decoration: none;
    color: inherit;
}

/* حذف النقط والقوائم الافتراضية */
.sub-nav ul, .sidebar ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.sidebar ul {
    display: block;
}

.sub-nav li, .sidebar li {
    list-style: none !important;
}

/* Animations */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.hero-main, .article-card, .mini-card { animation: fadeInDown 0.8s ease-out; }

/* Header & Navigation */
header {
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-right, .header-left { display: flex; align-items: center; gap: 20px; flex: 1; }
.header-left { justify-content: flex-end; }

.menu-btn {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; gap: 10px; font-family: 'Cairo'; font-weight: 600;
    transition: var(--transition);
    color: var(--primary-black);
}
.menu-btn:hover { color: var(--soft-orange); transform: scale(1.05); }

/* Language Dropdown */
.lang-dropdown { position: relative; display: inline-block; }
.lang-switch {
    text-decoration: none; color: var(--primary-black); font-weight: 600; font-size: 0.85rem; 
    border: 1px solid #ddd; padding: 4px 12px; border-radius: 20px; cursor: pointer;
    transition: var(--transition); display: block;
}
.dropdown-content {
    display: none; position: absolute; left: 0; background: #fff;
    min-width: 120px; box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px; overflow: hidden; z-index: 10;
}
.dropdown-content a { color: black; padding: 10px; text-decoration: none; display: block; font-size: 0.8rem; transition: 0.3s; }
.dropdown-content a:hover { background: var(--light-gray); color: var(--soft-orange); }
.lang-dropdown:hover .dropdown-content { display: block; animation: fadeInDown 0.3s ease; }

/* Search Box */
.search-box {
    display: none; width: 100%; position: absolute; top: 100%; left: 0;
    padding: 20px 0; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px);
    animation: fadeInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); z-index: 999;
}
.search-inner { max-width: 500px; margin: 0 auto; padding: 0 20px; position: relative; display: flex; justify-content: center; }
.search-box input {
    width: 100%; padding: 12px 25px; border: 2px solid #f0f0f0; border-radius: 30px;
    outline: none; font-family: 'Cairo'; font-size: 0.95rem; transition: var(--transition);
    box-sizing: border-box; background: #fff; text-align: center;
}
.search-box input:focus { border-color: var(--soft-orange); width: 105%; box-shadow: 0 5px 20px rgba(255, 140, 50, 0.15); }

/* Logo */
.logo { font-family: 'Playfair Display', serif; font-size: 2.2rem; text-decoration: none; letter-spacing: -1px; flex: 1; text-align: center; }
.logo .black-text { color: var(--primary-black); font-weight: 800; }
.logo .red-text { color: var(--soft-orange); font-weight: 400; }

/* Navigation (Sub-nav) */
.sub-nav { 
    background: #fff; 
    border-bottom: 1px solid #eee; 
    padding: 10px 0; 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    flex-wrap: wrap; 
}
.sub-nav a { 
    text-decoration: none; 
    color: var(--primary-black); 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: var(--transition); 
    position: relative; 
}
.sub-nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; right: 0; background: var(--soft-orange); transition: 0.3s; }
.sub-nav a:hover::after { width: 100%; }
.sub-nav a:hover { color: var(--soft-orange); }

/* Sidebar */
.sidebar { 
    position: fixed; 
    top: 0; 
    right: -350px; 
    width: 300px; 
    height: 100%; 
    background: var(--primary-black); 
    color: white; 
    z-index: 2000; 
    transition: var(--transition); 
    padding: 40px 20px; 
    overflow-y: auto;
    visibility: hidden; 
    box-shadow: none;
}

.sidebar.active { 
    right: 0; 
    visibility: visible;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.sidebar a { 
    display: block; 
    color: white; 
    text-decoration: none; 
    padding: 15px 0; 
    border-bottom: 1px solid #333; 
    font-size: 1.1rem; 
    transition: var(--transition); 
}
.sidebar a:hover { color: var(--soft-orange); padding-right: 15px; }
.close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; margin-bottom: 30px; }

/* Overlay */
.overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    display: none; 
    z-index: 1500; 
    backdrop-filter: blur(3px); 
}
.overlay.active { display: block; }

/* Grid Layouts */
.container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; margin-bottom: 60px; }
.hero-main { position: relative; border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.hero-main img { width: 100%; height: 550px; object-fit: cover; display: block; transition: 0.6s ease; }
.hero-main:hover img { transform: scale(1.05) rotate(1deg); }
.hero-content { position: absolute; bottom: 0; right: 0; left: 0; padding: 40px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: white; transform: translateY(10px); transition: 0.4s; }
.hero-main:hover .hero-content { transform: translateY(0); }
.hero-content h1 { font-size: 2.2rem; margin: 10px 0; line-height: 1.3; }
.hero-content h1 a { color: white; text-decoration: none; }
.badge { background: var(--soft-orange); padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-right: 5px solid var(--soft-orange); padding-right: 15px; }
.section-header h2 { font-size: 1.8rem; margin: 0; }

.modern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 50px; }
.article-card { background: #fff; border-radius: var(--border-radius); transition: var(--transition); overflow: hidden; }
.article-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.article-card img { width: 100%; height: 200px; border-radius: var(--border-radius); object-fit: cover; margin-bottom: 15px; transition: 0.4s; }
.article-card:hover img { filter: brightness(0.8); }
.article-card h3 { font-size: 1.2rem; margin: 10px 0; color: var(--primary-black); transition: 0.3s; padding: 0 5px; }
.article-card:hover h3 { color: var(--soft-orange); }
.article-card p { color: var(--text-muted); font-size: 0.9rem; padding: 0 5px; }

.side-news { display: flex; flex-direction: column; gap: 20px; }
.mini-card { display: flex; gap: 15px; align-items: center; padding: 10px; border-radius: var(--border-radius); background: var(--light-gray); transition: var(--transition); }
.mini-card:hover { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: scale(1.02); }
.mini-card img { width: 100px; height: 100px; border-radius: 8px; object-fit: cover; }

/* Footer Styles */
footer { background: var(--primary-black); color: white; padding: 60px 20px; text-align: center; margin-top: 80px; }
footer .black-text { color: #ffffff !important; }

/* Modern Pagination */
.pagination-wrapper {
    margin: 50px 0;
    display: flex;
    justify-content: center;
}
.pagination-wrapper ul {
    display: flex;
    list-style: none !important;
    padding: 0;
    gap: 10px;
}
.pagination-wrapper ul li {
    list-style: none !important;
}
.pagination-wrapper ul li a, 
.pagination-wrapper ul li span {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--light-gray);
    color: var(--primary-black);
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid #eee;
}
.pagination-wrapper ul li span.current {
    background: var(--soft-orange);
    color: white;
    border-color: var(--soft-orange);
}
.pagination-wrapper ul li a:hover {
    background: var(--primary-black);
    color: white;
    transform: translateY(-3px);
}

@media (max-width: 992px) {
    .hero { grid-template-columns: 1fr; }
    .hero-main img { height: 400px; }
    .logo { font-size: 1.8rem; }
    .sub-nav { display: none; }
}