/*
Theme Name: قالب خبری فارس - طرهان وب
Theme URI: https://tarhanweb.ir
Author: طرهان وب
Author URI: https://tarhanweb.ir
Description: قالب خبری حرفه‌ای سه ستونه با امکانات پیشرفته برای خبرگزاری‌ها
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: news-theme
*/

:root {
    --primary-color: #c62828;
    --secondary-color: #0288d1;
    --sky-blue: #4fc3f7;
    --orange: #ff9800;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --border-color: #e0e0e0;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--light-color);
    direction: rtl;
    text-align: right;
    font-size: 14px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ===== نوار بالای سایت ===== */
.top-bar {
    background-color: var(--dark-color);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

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

.top-bar-right {
    display: flex;
    gap: 25px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-item i {
    color: var(--sky-blue);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--sky-blue);
    transform: scale(1.1);
}

/* ===== هدر ===== */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    padding: 15px 0;
    border-bottom: 3px solid var(--primary-color);
}

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

.site-logo {
    flex: 0 0 auto;
}

.site-logo img {
    max-height: 70px;
    width: auto;
}

.custom-logo-link {
    display: block;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
    margin: 0;
}

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

.header-search {
    flex: 1;
    max-width: 400px;
}

.search-form-header {
    display: flex;
    gap: 5px;
}

.search-form-header input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

.search-form-header button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* منوی موبایل */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ===== منوی اصلی ===== */
.main-navigation {
    background: linear-gradient(135deg, var(--primary-color) 0%, #d32f2f 100%);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation > ul > li > a {
    display: block;
    padding: 15px 20px;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.main-navigation > ul > li > a:hover {
    background-color: rgba(0,0,0,0.2);
}

/* منوی فرعی */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    z-index: 999;
}

.main-navigation ul li:hover > ul {
    display: block;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.main-navigation ul ul a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* ===== اسلایدر ===== */
.slider-section {
    padding: 25px 0;
    background: linear-gradient(to bottom, var(--sky-blue) 0%, rgba(79,195,247,0.3) 50%, transparent 100%);
}

.slider-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.main-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 450px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

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

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 30px;
}

.slider-category {
    display: inline-block;
    background-color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.slider-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.slider-title a {
    color: white;
}

.slider-excerpt {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* لیست پربازدیدهای کنار اسلایدر */
.slider-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-sidebar-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 12px;
    padding: 12px;
    transition: all 0.3s;
}

.slider-sidebar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.slider-sidebar-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.slider-sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-sidebar-content {
    flex: 1;
}

.slider-sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 5px;
}

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

.slider-sidebar-meta {
    font-size: 0.75rem;
    color: #999;
}

/* ===== لی اوت اصلی 3 ستونه ===== */
.content-layout-3col {
    display: grid;
    grid-template-columns: 1fr 300px 300px;
    gap: 25px;
    padding: 30px 0;
}

.main-content {
    order: 1;
}

.sidebar-widgets {
    order: 2;
}

.sidebar-ads {
    order: 3;
}

/* ===== کارت خبر ===== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    gap: 15px;
    padding: 15px;
}

.news-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.news-card-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 12px;
    border-radius: 3px;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-video {
    background: var(--sky-blue);
}

.badge-image {
    background: var(--orange);
}

.news-card-content {
    flex: 1;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 10px;
}

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

.news-card-lead {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
    font-weight: 500;
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
}

/* ===== ویجت‌ها ===== */
.widget {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.widget-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--sky-blue);
}

/* ویجت اوقات شرعی */
.prayer-times-widget select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 15px;
    font-family: inherit;
}

.prayer-times-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.prayer-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.prayer-name {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.prayer-time {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* ویجت هواشناسی */
.weather-widget select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 15px;
    font-family: inherit;
}

.weather-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--sky-blue) 0%, #4dd0e1 100%);
    color: white;
    border-radius: 8px;
}

.weather-temp {
    font-size: 3rem;
    font-weight: bold;
    margin: 10px 0;
}

.weather-condition {
    font-size: 1rem;
    opacity: 0.95;
}

/* ویجت کد اعلام وصول */
.tracking-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tracking-input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.95rem;
}

.tracking-btn {
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.tracking-btn:hover {
    background: var(--secondary-color);
}

/* ویجت تبلیغات */
.ad-widget {
    background: #f8f9fa;
    border: 2px dashed var(--border-color);
    padding: 40px 20px;
    text-align: center;
    color: #999;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== صفحه تک پست ===== */
.single-post-header {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.single-post-title {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 15px;
}

.post-meta-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

.share-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: white;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-telegram { background: #0088cc; }
.share-whatsapp { background: #25d366; }
.share-twitter { background: #1da1f2; }
.share-facebook { background: #1877f2; }

.single-post-lead {
    background: #fff3e0;
    border-right: 4px solid var(--orange);
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.8;
    color: #555;
}

.single-post-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.single-post-content p {
    margin-bottom: 18px;
    line-height: 2;
    text-align: justify;
}

/* ===== فوتر ===== */
.site-footer {
    background: linear-gradient(135deg, var(--sky-blue) 0%, #4dd0e1 100%);
    color: white;
    margin-top: 40px;
}

.footer-widgets {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.footer-widget-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
}

.footer-credits {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-credits a {
    color: white;
    font-weight: bold;
}

.footer-credits a:hover {
    text-decoration: underline;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
    .content-layout-3col {
        grid-template-columns: 1fr 300px;
    }
    
    .sidebar-ads {
        order: 4;
        grid-column: 1 / -1;
    }
    
    .slider-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    .content-layout-3col {
        grid-template-columns: 1fr;
    }
    
    .news-card {
        flex-direction: column;
    }
    
    .news-card-image {
        width: 100%;
        height: 200px;
    }
    
    .footer-widget-area {
        grid-template-columns: 1fr;
    }
    
    .site-logo img {
        max-height: 50px;
    }
    
    .top-bar-right {
        font-size: 0.8rem;
        gap: 15px;
    }
}

@media print {
    .site-header,
    .site-footer,
    .sidebar-widgets,
    .sidebar-ads,
    .post-meta-bar,
    .share-buttons {
        display: none !important;
    }
}
