/*
Theme Name: قصة عشق - 3ishq
Theme URI: https://3isq.cam/
Author: Oubaali
Author URI: https://3isq.cam/
Description: قالب ووردبريس حديث ومتجاوب لعرض المسلسلات والأفلام التركية المترجمة بتصميم عصري وجذاب
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 3ishq
Tags: rtl-language-support, custom-menu, featured-images, post-thumbnails, custom-post-type, movies, series, entertainment
*/

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

:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --hover-color: #c0392b;
    --gradient-primary: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --gradient-dark: linear-gradient(180deg, #2c3e50 0%, #1a1a1a 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    direction: rtl;
    text-align: right;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   Header Styles
   ========================================== */
.site-header {
    background: var(--gradient-dark);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-top {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.site-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Navigation */
.main-navigation {
    background: rgba(0, 0, 0, 0.2);
}

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

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #fff;
    padding: 15px 25px;
    display: block;
    font-weight: 500;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: var(--gradient-primary);
    transform: translateY(-2px);
}

/* Search Form */
.header-search {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.search-form input[type="search"] {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-family: inherit;
}

.search-form input[type="search"]:focus {
    outline: none;
}

.search-form button {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--hover-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
}

/* ==========================================
   Content Grid Sections
   ========================================== */
.content-section {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

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

.post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 140%;
    background: var(--gradient-dark);
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.episode-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.quality-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--secondary-color);
}

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

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    background: var(--hover-color);
    transform: translateX(-5px);
}

/* ==========================================
   Sidebar
   ========================================== */
.site-main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px 0;
}

.sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--secondary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    transition: var(--transition);
}

.widget ul li a:hover {
    color: var(--primary-color);
    padding-right: 10px;
}

/* ==========================================
   Single Post Page
   ========================================== */
.single-post-header {
    background: var(--gradient-dark);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.single-post-meta {
    display: flex;
    gap: 30px;
    font-size: 1rem;
    flex-wrap: wrap;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.video-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.video-player iframe,
.video-player video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.post-navigation {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 15px 20px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.nav-previous a:hover,
.nav-next a:hover {
    background: var(--hover-color);
    transform: scale(1.02);
}

/* ==========================================
   Episodes List
   ========================================== */
.episodes-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.episode-item {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    font-weight: 600;
    cursor: pointer;
}

.episode-item:hover,
.episode-item.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: var(--gradient-dark);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
    padding-right: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   Pagination
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--gradient-primary);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .site-main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--secondary-color);
        padding: 20px;
        gap: 10px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .site-title {
        font-size: 1.8rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .single-post-title {
        font-size: 1.8rem;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

/* ==========================================
   Utilities
   ========================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.no-results h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}
