/*
Theme Name: فردای عالیشاهی
Theme URI: https://fardayealishahi.ir
Author: علیرضا پورزمزم
Description: قالب خبری اختصاصی، سریع و ریسپانسیو
Version: 1.0
License: GPL v2 or later
Text Domain: fardaye
*/

/* ==========================================
   RESET و تنظیمات پایه
   ========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a237e;
    --primary-dark: #0d1654;
    --accent: #e53935;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #f5f6f8;
    --white: #ffffff;
    --border: #e5e5e5;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ==========================================
   کانتینر اصلی
   ========================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   هدر (Top Bar + Main Header + Menu)
   ========================================== */
.top-bar {
    background: var(--primary);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.top-bar-social {
    display: flex;
    gap: 12px;
}

.top-bar-social a {
    color: #fff;
    font-size: 15px;
    transition: 0.3s;
}

.top-bar-social a:hover {
    color: #ffeb3b;
}

.main-header {
    background: linear-gradient(135deg, #0d1b4c 0%, #1a237e 100%);
    color: #fff;
    padding: 20px 0;
    position: relative;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    max-height: 70px;
    width: auto;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 3px;
}

.logo-text p {
    font-size: 12px;
    opacity: 0.85;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions .live-btn {
    background: var(--accent);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.header-actions .live-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

/* ==========================================
   منوی اصلی
   ========================================== */
.main-menu {
    background: var(--primary-dark);
    padding: 0;
}

.main-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.main-menu ul li a {
    color: #fff;
    padding: 14px 18px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.main-menu ul li a:hover,
.main-menu ul li.active a {
    background: var(--primary);
    border-bottom-color: var(--accent);
}

/* ==========================================
   تیکر خبر فوری
   ========================================== */
.breaking-news {
    background: var(--accent);
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: #b71c1c;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-ticker span {
    display: inline-block;
    animation: ticker 25s linear infinite;
    padding-right: 100%;
    font-size: 14px;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ==========================================
   چیدمان اصلی (Main Content + Sidebar)
   ========================================== */
.main-content {
    padding: 25px 0;
}

.content-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 25px;
}

/* ==========================================
   کارت خبر اصلی (Hero)
   ========================================== */
.hero-news {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    background: #000;
}

.hero-news img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-news:hover img {
    transform: scale(1.05);
}

.hero-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: #fff;
}

.hero-news-category {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-news-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-news-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    opacity: 0.9;
}

/* ==========================================
   گرید اخبار
   ========================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-body {
    padding: 15px;
}

.news-card-cat {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    gap: 10px;
}

/* ==========================================
   سایدبار
   ========================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.widget-title {
    background: var(--primary);
    color: #fff;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title a {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
}

.widget-body {
    padding: 15px;
}

/* لیست اخبار پرخواننده */
.popular-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-num {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-item img {
    width: 70px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-info h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-info span {
    font-size: 11px;
    color: var(--text-light);
}

/* گالری تصاویر */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gallery-grid img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* برچسب‌ها */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-list a {
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text);
    transition: 0.3s;
    border: 1px solid var(--border);
}

.tags-list a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==========================================
   فوتر
   ========================================== */
.site-footer {
    background: linear-gradient(135deg, #0d1b4c 0%, #1a237e 100%);
    color: #fff;
    margin-top: 40px;
    padding: 40px 0 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 30px;
}

.footer-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.footer-widget p,
.footer-widget li {
    font-size: 13px;
    opacity: 0.85;
    line-height: 2;
}

.footer-widget a {
    color: #fff;
    opacity: 0.85;
    transition: 0.3s;
}

.footer-widget a:hover {
    opacity: 1;
    color: #ffeb3b;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 15px 0;
    text-align: center;
    font-size: 12px;
    opacity: 0.8;
}

/* ==========================================
   ریسپانسیو - تبلت (زیر 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .content-wrap {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-news img {
        height: 380px;
    }
    
    .hero-news-title {
        font-size: 22px;
    }
}

/* ==========================================
   ریسپانسیو - موبایل (زیر 768px)
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    /* هدر */
    .main-header {
        padding: 12px 0;
    }
    
    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo-area {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo-area img {
        max-height: 50px;
    }
    
    .logo-text h1 {
        font-size: 18px;
    }
    
    .logo-text p {
        font-size: 10px;
    }
    
    /* منو - اسکرول افقی */
    .main-menu ul {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    
    .main-menu ul::-webkit-scrollbar {
        display: none;
    }
    
    .main-menu ul li a {
        padding: 12px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* تیکر */
    .breaking-label {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .breaking-ticker span {
        font-size: 12px;
    }
    
    /* کارت اصلی */
    .hero-news img {
        height: 250px;
    }
    
    .hero-news-overlay {
        padding: 15px;
    }
    
    .hero-news-title {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .hero-news-meta {
        font-size: 10px;
        gap: 10px;
    }
    
    /* گرید اخبار - دو ستونه */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .news-card img {
        height: 100px;
    }
    
    .news-card-body {
        padding: 10px;
    }
    
    .news-card-title {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .news-card-cat {
        font-size: 9px;
        padding: 2px 8px;
    }
    
    .news-card-meta {
        font-size: 10px;
    }
    
    /* سایدبار - تک ستونه */
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .widget-title {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    /* فوتر */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* تاپ بار */
    .top-bar {
        font-size: 11px;
    }
    
    .top-bar-inner {
        justify-content: center;
    }
}

/* ==========================================
   موبایل کوچک (زیر 400px)
   ========================================== */
@media (max-width: 400px) {
    .hero-news-title {
        font-size: 14px;
    }
    
    .news-card-title {
        font-size: 11px;
    }
}