/*
Theme Name: Petro News
Author: Salma Mohammed
Description: نسخة البترول المودرن - تصميم سلمى محمد الكامل.
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;800&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary-black: #1a2a33; /* أسود مائل للبترولي الغامق */
    --petro-blue: #005f73;    /* اللون البترولي الأساسي */
    --petro-accent: #0a9396;  /* لون بترولي فاتح للتفاعل */
    --light-gray: #f0f4f5;
    --text-muted: #5c717a;
    --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;
    direction: rtl; /* التأكد من الاتجاه */
}

/* 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); } }
.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(--petro-blue); 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:hover { background: var(--light-gray); color: var(--petro-blue); }
.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.95); backdrop-filter: blur(8px);
    z-index: 999;
}
.search-inner { max-width: 500px; margin: 0 auto; 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'; transition: var(--transition);
}
.search-box input:focus { border-color: var(--petro-blue); box-shadow: 0 5px 20px rgba(0, 95, 115, 0.15); }

/* Logo */
.logo { font-family: 'Playfair Display', serif; font-size: 2.2rem; text-decoration: none; flex: 1; text-align: center; }
.logo .black-text { color: var(--primary-black); font-weight: 800; }
.logo .red-text { color: var(--petro-blue); font-weight: 400; } /* تحول للبترولي */

/* Navigation */
.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(--petro-blue); transition: 0.3s; }
.sub-nav a:hover::after { width: 100%; }
.sub-nav a:hover { color: var(--petro-blue); }

/* 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;
}
.sidebar.active { right: 0; visibility: visible; box-shadow: -10px 0 30px rgba(0,0,0,0.3); }
.sidebar a { display: block; color: white; padding: 15px 0; border-bottom: 1px solid #333; font-size: 1.1rem; }
.sidebar a:hover { color: var(--petro-accent); padding-right: 15px; }
.close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* 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; }
.hero-main img { width: 100%; height: 550px; object-fit: cover; display: block; transition: 0.6s ease; }
.hero-main:hover img { transform: scale(1.05); }
.hero-content { position: absolute; bottom: 0; right: 0; left: 0; padding: 40px; background: linear-gradient(transparent, rgba(26,42,51,0.95)); color: white; }
.badge { background: var(--petro-blue); 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(--petro-blue); padding-right: 15px; }

.modern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.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; }
.article-card:hover h3 { color: var(--petro-blue); }

.mini-card { display: flex; gap: 15px; align-items: center; padding: 10px; border-radius: var(--border-radius); background: var(--light-gray); }
.mini-card:hover { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* Footer */
footer { background: var(--primary-black); color: white; padding: 60px 20px; text-align: center; margin-top: 80px; }
footer .black-text { color: #ffffff !important; }

/* Pagination */
.pagination-wrapper ul li a, .pagination-wrapper ul li span {
    padding: 10px 20px; border-radius: 8px; background: var(--light-gray); color: var(--primary-black); font-weight: 600; border: 1px solid #eee;
}
.pagination-wrapper ul li span.current { background: var(--petro-blue); color: white; border-color: var(--petro-blue); }
.pagination-wrapper ul li a:hover { background: var(--petro-accent); color: white; }

@media (max-width: 992px) {
    .hero { grid-template-columns: 1fr; }
    .sub-nav { display: none; }
}