/*
Theme Name: عالم واحد للإعلام والبرمجيات
Theme URI: https://awepai.com
Author: شركة عالم واحد للإعلام والبرمجيات | awepAi
Author URI: https://awepai.com/about.php
Description: قالب ووردبريس احترافي للمواقع الإخبارية العربية
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: awepai
*/

/* ===================================
   CSS Variables
   =================================== */
:root {
    --primary-color: #c93756;
    --secondary-color: #8b2d47;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white-color: #ffffff;
    --gray-color: #95a5a6;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --hover-color: #a42e48;
    
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
    --font-secondary: 'Amiri', serif;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-color);
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
}
.section-head{
 background: #8e2e48;
    font-size: 20px;
    font-weight: 900;
    color: whitesmoke;
} 

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}
.featured-mini img{
width:100%;
    height: 223px;

}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Top Bar
   =================================== */
.top-bar {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white-color);
    padding: 8px 0;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-link {
    color: var(--white-color);
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: var(--white-color);
}

.top-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-time i {
    margin-left: 5px;
}

/* ===================================
   Main Header
   =================================== */
.site-header {
    background: var(--white-color);
    padding: 25px 0;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Logo & Branding */
.site-branding {
    flex: 1;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    width: 250px;
    height: 150px;
}
.logo-wrapper img{
  width: 100%;
    height: 185px;
}
.site-logo-text .site-title {
    font-family: var(--font-secondary);
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.site-logo-text .site-title a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-tagline {
    font-size: 14px;
    color: var(--gray-color);
    margin: 5px 0 0;
    font-style: italic;
}

/* Editor Info */
.editor-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.editor-label {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.editor-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
}

/* ===================================
   Navigation Bar
   =================================== */
.main-navigation {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
}

/* Search Form */
.header-search {
    padding: 15px 0;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.search-form:hover,
.search-form:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.search-field {
    border: none;
    background: transparent;
    padding: 10px 20px;
    color: var(--white-color);
    font-size: 14px;
    width: 200px;
    outline: none;
}

.search-field::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.search-submit {
    background: transparent;
    border: none;
    color: var(--white-color);
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-submit:hover {
    color: var(--light-color);
}

/* Main Menu */
.menu-container {
    flex: 1;
}

.primary-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu > li > a {
    display: block;
    padding: 18px 20px;
    color: var(--white-color);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    border-radius: 4px;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white-color);
}

/* Dropdown Menu */
.primary-menu li .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white-color);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
    padding: 10px 0;
    border-radius: 8px;
    z-index: 1000;
}

.primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu li .sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

.primary-menu li .sub-menu li a:hover {
    background: var(--light-color);
    padding-right: 25px;
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 15px 10px;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--white-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Navigation */
.mobile-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: right 0.4s ease;
    overflow-y: auto;
}

.mobile-navigation.active {
    right: 0;
}

.mobile-menu-close {
    padding: 20px;
    text-align: left;
}

.mobile-menu-close .close-btn {
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-close .close-btn:hover {
    background: var(--hover-color);
    transform: rotate(90deg);
}

.mobile-menu {
    list-style: none;
    padding: 0 20px;
}

.mobile-menu li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu li a {
    display: block;
    padding: 15px 10px;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.mobile-menu li a:hover {
    color: var(--primary-color);
    padding-right: 20px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 9999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   Main Content
   =================================== */
.site-main {
    padding: 40px 0;
    min-height: 60vh;
    margin: 0 100px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.read-more:hover {
    background: var(--hover-color);
    transform: translateX(-5px);
    color: var(--white-color);
}
.layout-with-sticky-ads {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    gap: 20px;
    align-items: start;
}

/* الإعلانات */
.sticky-ad {
    position: sticky;
    top: 80px;
}
.sticky-ad-right img{
  margin-right:15px;
}
/* المحتوى الأوسط */
.main-center-content {
    width: 100%;
}

/* ترتيب الأقسام */
.main-center-content section {
    margin-bottom: 30px;
}
.breaking-featured-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}
.breaking-post img {
    width: 100%;
    height: auto;
    display: block;
}

.breaking-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.breaking-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.articles-mini{
        display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 10px;
}
.hero-slider-section {
    margin-bottom: 30px;
}

.main-slider {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}

.slide-item.active {
    opacity: 1;
    z-index: 1;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 15px 20px;
    max-width: 70%;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
}

.slider-prev { right: 10px; }
.slider-next { left: 10px; }

.slider-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* ===================================
   Footer
   =================================== */
/* =========================
   Dark Footer (Exact Design)
   ========================= */

.site-footer-dark {
    background: #000;
    color: #fff;
    font-family: inherit;
}

/* -------- Top -------- */

.footer-top {
    padding: 25px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Logo */

.footer-logo img {
    max-height: 139px;
    width: 252px;
}
/* Menu */

.footer-main-menu .footer-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-main-menu .footer-menu li a {
    color: #fff;
    font-size: 15px;
    transition: 0.3s;
}

.footer-main-menu .footer-menu li a:hover {
    color: #e50914;
}

/* Social */

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    transition: 0.3s;
}

.footer-social a:hover {
    background: #e50914;
    border-color: #e50914;
}

/* -------- Bottom -------- */

.footer-bottom {
    padding: 15px 0;
    font-size: 13px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 992px) {
    .site-logo-text .site-title {
        font-size: 36px;
    }
    
    .editor-info {
        padding: 10px 15px;
    }
    
    .editor-name {
        font-size: 16px;
    }
    
    .primary-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .site-branding {
        width: 100%;
    }
    
    .editor-info {
        width: 100%;
    }
    
    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .nav-wrapper {
        justify-content: space-between;
    }
    
    .search-field {
        width: 150px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-logo-text .site-title {
        font-size: 28px;
    }
    
    .header-search {
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-field {
        width: 100%;
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.6s ease;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
/* ===================================
   Mobile & Tablet Responsive Fixes
   =================================== */

/* ====== 1️⃣ إصلاح الهوامش العامة ====== */
@media (max-width: 1200px) {
    .site-main {
        margin: 0;
        padding: 20px 10px;
    }
}

/* ====== 2️⃣ معالجة الإعلانات الجانبية ====== */
@media (max-width: 1024px) {

    .layout-with-sticky-ads {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sticky-ad {
        position: relative;
        top: auto;
        display: none;
    }
}

/* ====== 3️⃣ أقسام Breaking + Featured ====== */
@media (max-width: 768px) {

    .breaking-featured-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .breaking-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .breaking-card img {
        height: auto;
    }
}

@media (max-width: 480px) {

    .breaking-cards {
        grid-template-columns: 1fr;
    }
}

/* ====== 4️⃣ السلايدر الرئيسي ====== */
@media (max-width: 768px) {

    .main-slider {
        height: 260px;
    }

    .slide-content {
        right: 10px;
        left: 10px;
        bottom: 10px;
        max-width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    .slider-prev,
    .slider-next {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* ====== 5️⃣ المقالات المصغرة ====== */
@media (max-width: 768px) {

    .articles-mini {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
}

/* ====== 6️⃣ الشبكات العامة ====== */
@media (max-width: 768px) {

    .posts-grid,
    .slider-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-thumbnail img {
        height: auto;
    }
}

/* ====== 7️⃣ الهيدر واللوجو ====== */
@media (max-width: 768px) {

    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo-wrapper {
        width: 180px;
        height: auto;
        margin: 0 auto;
    }

    .logo-wrapper img {
        width: 100%;
        height: auto;
    }

    .editor-info {
        width: 100%;
    }
}

/* ====== 8️⃣ Top Bar ====== */
@media (max-width: 768px) {

    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ====== 9️⃣ البحث والقائمة ====== */
@media (max-width: 768px) {

    .header-search {
        width: 100%;
    }

    .search-form {
        width: 100%;
    }

    .search-field {
        width: 100%;
    }
}

/* ====== 🔟 تحسين الأداء البصري ====== */
img {
    max-width: 100%;
    height: auto;
}
