/*
Theme Name: Tasnim Style Theme
Author: mosalasenergy
Description: قالب خبری تحلیلی استاندارد با فونت بهینه‌شده استعداد
Version: 1.1.0
Text Domain: tasnim-style
*/

/* ==================================================== */
/* فراخوانی فونت استاندارد استعداد (حل مشکل جدا شدن حروف) */
/* ==================================================== */

@font-face {
    font-family: 'Estedad';
    src: url('assets/fonts/Estedad/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('assets/fonts/Estedad/Estedad-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('assets/fonts/Estedad/Estedad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('assets/fonts/Estedad/Estedad-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* تعریف فونت‌های جایگزین برای سازگاری با تمامی المان‌های قبلی */
@font-face {
    font-family: 'IRAN';
    src: url('assets/fonts/Estedad/Estedad-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANBold';
    src: url('assets/fonts/Estedad/Estedad-Bold.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================================================== */
/* متغیرها و تنظیمات پایه قالب                         */
/* ==================================================== */

:root {
    --main-red: #3f51b5;
    --dark-red: #ff9800;
    --text-dark: #222;
    --gray-text: #555;
    --border-color: #eee;
    --sidebar-width: 280px;
}

* { 
    box-sizing: border-box; 
}

body {
    font-family: 'Estedad', 'IRAN', Tahoma, sans-serif;
    background-color: #fff;
    color: var(--text-dark);
    margin: 0; 
    padding: 0; 
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s; 
}

ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.container { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* --- بخش چسبان (Header + Nav) --- */
.sticky-top-wrapper {
    position: static;
    box-shadow: none;
}

/* هدر */
header { 
    border-top: 5px solid var(--main-red); 
    padding: 12px 0; 
    background: var(--dark-red); 
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search {
    position: relative;
    display: block;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 3px 3px 3px 12px;
    transition: all 0.3s ease;
}

.header-search form:focus-within {
    background: #fff;
    border-color: var(--main-red);
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.1);
}

.header-search input[type="search"] {
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-family: 'Estedad', sans-serif;
    font-size: 13px;
    width: 180px;
    outline: none;
    color: #333;
}

.header-search button {
    background: var(--main-red);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}

.header-search button:hover {
    background: var(--dark-red);
}

.header-search button svg {
    width: 16px;
    height: 16px;
}

.mobile-menu-header, .menu-close {
    display: none !important;
}

.logo { 
    font-size: 24px; 
    font-weight: bold; 
    color: var(--main-red); 
}

.logo img {
    max-width: 100%;
    height: auto !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none; 
    border: none; 
    padding: 5px;
}

.menu-toggle span { 
    width: 25px; 
    height: 3px; 
    background: var(--main-red); 
    border-radius: 2px; 
}

/* منوی اصلی - چسبان */
nav.main-nav { 
    background: var(--main-red); 
    color: white; 
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

nav.main-nav ul { 
    display: flex; 
}

nav.main-nav ul li a { 
    display: block; 
    padding: 10px 15px; 
    color: #fff; 
    font-size: 13px; 
    font-weight: bold; 
}

nav.main-nav ul li a:hover { 
    background: var(--dark-red); 
}

/* تاریخ هدر */
.today-date {
    font-size: 12px;
    padding-left: 15px;
    opacity: 0.9;
    font-weight: normal;
}

/* ==================================================== */
/* روتیتر و لید خبر                                     */
/* ==================================================== */

.post-subtitle {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}

.post-lead {
    font-size: 15.5px;
    line-height: 1.9;
    color: #333;
    background-color: #f8f9fa;
    border-right: 4px solid var(--main-red);
    padding: 18px 20px;
    margin-top: 15px;
    margin-bottom: 30px;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
    text-align: justify;
}

/* ==================================================== */
/* چیدمان محتوا و ستون‌ها                              */
/* ==================================================== */

.main-wrapper { 
    display: flex; 
    gap: 40px; 
    margin-top: 30px;
    margin-bottom: 50px;
}

.col-main { 
    flex: 0 0 50%; 
    min-width: 0; 
    overflow-wrap: break-word;
    word-wrap: break-word;
} 

.col-side { 
    flex: 0 0 22%; 
} 

.col-ads { 
    flex: 0 0 22%; 
}  

/* تیتر یک */
.featured-news {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--main-red);
}

.featured-img { 
    flex: 0 0 50%; 
}

.featured-img img { 
    width: 100%; 
    height: 280px; 
    object-fit: cover; 
    border-radius: 5px; 
}

.featured-text { 
    flex: 0 0 50%; 
}

.featured-text h1,
.featured-text h2 { 
    font-family: 'Estedad', sans-serif !important;
    font-weight: 800 !important;
    font-size: 23px !important;
    margin: 0 0 15px 0; 
    color: #000; 
    line-height: 1.7; 
}

.featured-text h1 a,
.featured-text h2 a {
    font-family: 'Estedad', sans-serif !important;
    font-weight: 800 !important;
}

.featured-text p { 
    font-size: 14px; 
    color: var(--gray-text); 
    text-align: justify; 
    line-height: 1.8;
}

/* لیست اخبار */
.news-item { 
    display: flex; 
    gap: 15px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 20px;
}

.news-item img { 
    width: 160px; 
    height: 100px; 
    object-fit: cover; 
    border-radius: 4px; 
    flex-shrink: 0; 
}

.news-item-content h3 { 
    font-size: 15px; 
    margin: 0 0 8px 0; 
    color: var(--main-red); 
    font-weight: 700;
}

.news-item-content p { 
    font-size: 13px; 
    color: var(--gray-text); 
    margin: 0; 
    line-height: 1.7;
}

/* سایدبار */
.widget {
    position: relative;
    margin-bottom: 30px;
}

.widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #f0f0f0;
    z-index: 0;
}

.widget-title {
    position: relative;
    z-index: 1;
    display: table;
    height: 30px;
    line-height: 30px;
    background: var(--main-red);
    color: #fff;
    padding: 0 15px 0 30px;
    margin: 0 0 20px 0;
    border-right: 4px solid var(--dark-red);
    font-family: 'Estedad', sans-serif !important;
    font-weight: 700;
    font-size: 14px;
}

.widget-title::after {
    display: none !important;
}

.pol-news { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
    align-items: center; 
    border-bottom: 1px solid #f9f9f9; 
    padding-bottom: 8px; 
}

.pol-news img { 
    width: 60px !important; 
    height: 60px !important; 
    object-fit: cover; 
    border-radius: 4px; 
    flex-shrink: 0; 
}

.pol-news span { 
    font-size: 13px; 
}

/* تبلیغات */
.ad-slot { 
    background: #fdfdfd; 
    border: 1px solid #eee; 
    margin-bottom: 20px; 
    text-align: center; 
    position: relative; 
}

.ad-slot img { 
    width: 100%; 
    display: block; 
}

.ad-tag { 
    font-size: 9px; 
    color: #bbb; 
    position: absolute; 
    top: 0; 
    right: 5px; 
}

/* صفحه‌بندی */
.pagination { 
    display: flex; 
    gap: 10px; 
    margin-top: 30px; 
}

.pagination .page-numbers { 
    padding: 5px 12px; 
    border: 1px solid #ddd; 
    background: #f9f9f9; 
    color: #333; 
    border-radius: 3px;
}

.pagination .current { 
    background: var(--main-red); 
    color: #fff; 
    border-color: var(--main-red); 
}

/* برچسب‌ها */
.post-tags a {
    display: inline-block;
    background: #f1f1f1;
    padding: 3px 10px;
    margin: 2px;
    font-size: 12px;
    color: #666;
    border-radius: 3px;
}

.post-tags a:hover { 
    background: var(--main-red); 
    color: #fff; 
}

/* لیست آخرین اخبار سایدبار */
.latest-news-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-news-sidebar li {
    position: relative;
    padding: 10px 18px 10px 0;
    border-bottom: 1px dotted #ddd;
    transition: all 0.3s ease;
}

.latest-news-sidebar li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 18px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 8px 4px 0; 
    border-color: transparent var(--main-red) transparent transparent;
    transform: rotate(-15deg) skewX(-20deg); 
    transition: all 0.3s ease;
}

.latest-news-sidebar li a {
    font-size: 13px;
    color: #444;
    line-height: 1.7;
    display: block;
    text-decoration: none;
}

.latest-news-sidebar li:hover::before {
    border-color: transparent var(--dark-red) transparent transparent;
}

.latest-news-sidebar li:hover a {
    color: var(--main-red);
}

.latest-news-sidebar li:last-child {
    border-bottom: none;
}

/* ==================================================== */
/* متن خبر و تصاویر داخلی                               */
/* ==================================================== */

img {
    max-width: 100%;
    height: auto !important;
}

.post-content {
    font-size: 16px;
    line-height: 2;
    color: #333;
    text-align: justify;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "liga" 1, "dlig" 1;
    -webkit-font-feature-settings: "liga" 1;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: right;
    margin: 0 0 20px 20px;
}

.alignright {
    float: left;
    margin: 0 20px 0 0;
}

.post-content iframe, 
.post-content embed, 
.post-content video {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ==================================================== */
/* بخش نظرات                                            */
/* ==================================================== */

.comments-area {
    margin-top: 40px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 5px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.comment {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 4px;
}

.comment .children {
    list-style: none;
    margin-right: 30px;
    border-right: 2px solid var(--main-red);
    padding-right: 15px;
    margin-top: 10px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
}

.comment-author b {
    color: var(--main-red);
}

.comment-metadata a {
    color: #999;
}

.comment-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin: 5px 0;
}

.reply a {
    display: inline-block;
    color: #fff;
    background: #888;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 3px;
    transition: 0.3s;
}

.reply a:hover {
    background: var(--main-red);
}

.comment-respond {
    background: #f1f1f1;
    padding: 20px;
    border-radius: 5px;
}

#reply-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.comment-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-form-col {
    flex: 1;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Estedad', sans-serif;
    font-size: 14px;
}

.comment-form textarea:focus {
    border-color: var(--main-red);
    outline: none;
}

.submit-btn {
    background: var(--main-red);
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-family: 'Estedad', sans-serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.submit-btn:hover {
    background: var(--dark-red);
}

/* ==================================================== */
/* صفحه ۴۰۴                                            */
/* ==================================================== */

.error-404-wrapper {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

.error-code {
    font-size: clamp(80px, 10vw, 120px);
    color: var(--main-red);
    margin: 0;
    line-height: 1;
    font-weight: 900;
}

.error-title {
    font-size: 24px;
    margin: 20px 0;
    color: #333;
    font-weight: 700;
}

.error-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-search-form {
    max-width: 450px;
    margin: 0 auto 40px;
}

.error-search-form form {
    display: flex;
    gap: 8px;
}

.error-search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Estedad', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.error-search-form input[type="search"]:focus {
    border-color: var(--main-red);
}

.error-search-form button {
    background: var(--main-red);
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Estedad', sans-serif;
    font-weight: bold;
    transition: background 0.3s;
}

.error-search-form button:hover {
    background: var(--dark-red);
}

.back-to-home {
    display: inline-block;
    background: var(--main-red);
    color: #fff;
    padding: 12px 35px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.2);
}

.back-to-home:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.3);
    color: #fff;
}

/* ==================================================== */
/* گالری تصاویر (پایین سایت)                           */
/* ==================================================== */

.photo-gallery-section {
    background: #fafafa;
    padding: 40px 0;
    margin-top: 30px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.photo-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-red);
}

.photo-gallery-title {
    font-family: 'Estedad', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #222;
    margin: 0;
    padding-right: 12px;
    border-right: 4px solid var(--main-red);
}

.photo-gallery-more {
    font-size: 13px;
    color: var(--main-red);
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--main-red);
    transition: 0.3s;
    text-decoration: none;
}

.photo-gallery-more:hover {
    background: var(--main-red);
    color: #fff;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.photo-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.photo-gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.photo-gallery-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.photo-gallery-item:hover img {
    transform: scale(1.05);
}

.photo-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    border-radius: 12px;
}

.photo-gallery-item:hover .photo-icon-overlay {
    opacity: 1;
}

.photo-icon-overlay svg {
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    transition: transform 0.2s;
}

.photo-gallery-item:hover .photo-icon-overlay svg {
    transform: scale(1.1);
}

.photo-gallery-caption {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background: white;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================================================== */
/* گالری ویدئو                                         */
/* ==================================================== */

.video-gallery-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    padding: 50px 0;
    margin-top: 30px;
    border-top: 4px solid var(--main-red);
    border-bottom: none;
}

.video-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.video-gallery-title {
    font-family: 'Estedad', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #fff;
    margin: 0;
    padding-right: 15px;
    border-right: 4px solid var(--main-red);
}

.video-gallery-more {
    font-size: 13px;
    color: var(--main-red);
    background: transparent;
    padding: 5px 15px;
    border-radius: 30px;
    border: 1.5px solid var(--main-red);
    transition: 0.3s;
    text-decoration: none;
    font-weight: bold;
}

.video-gallery-more:hover {
    background: var(--main-red);
    color: #fff;
    transform: translateY(-2px);
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.video-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.4s;
}

.video-gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px rgba(0,0,0,0.6);
}

.video-gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.video-gallery-link img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.video-gallery-item:hover img {
    transform: scale(1.1);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(3px);
}

.video-gallery-item:hover .video-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 70px;
    height: 70px;
    background: rgba(204, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
    animation: pulse 2s infinite;
}

.play-icon svg {
    width: 35px;
    height: 35px;
    margin-right: 4px;
}

.video-gallery-item:hover .play-icon {
    transform: scale(1.15);
    background: var(--main-red);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(204, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
    }
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 15px 15px 10px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    text-align: right;
}

.video-gallery-item:hover .video-info {
    transform: translateY(0);
}

.video-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Estedad', sans-serif;
}

.video-date {
    font-size: 11px;
    color: #ddd;
    display: inline-block;
}

/* ==================================================== */
/* دکمه اسکرول به بالا (Back to Top)                     */
/* ==================================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--main-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    line-height: 1;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-red);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

/* ==================================================== */
/* فوتر                                                 */
/* ==================================================== */

.main-footer { 
    background: #1a1a1a; 
    color: #ccc; 
    padding: 50px 0 20px; 
    border-top: 5px solid var(--main-red); 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px; 
}

.footer-col h4 { 
    color: #fff; 
    margin-bottom: 20px; 
    padding-bottom: 8px;
    border-bottom: 2px solid var(--main-red); 
    display: inline-block; 
    font-size: 18px;
    font-weight: 700;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.8;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon img {
    width: 22px;
    height: 22px;
    transition: filter 0.3s;
}

.social-icon:hover {
    background: var(--main-red);
    transform: translateY(-3px);
    border-color: var(--main-red);
}

.social-icon:hover img {
    transform: scale(1.1);
}

.about-us-text {
    font-size: 14px;
    line-height: 1.8;
    color: #ccc;
    text-align: justify;
}

.about-us-text p {
    margin: 0 0 10px;
}

.about-us-text a {
    color: var(--main-red);
    text-decoration: none;
}

.about-us-text a:hover {
    text-decoration: underline;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: var(--main-red);
}

.footer-bottom { 
    border-top: 1px solid #333; 
    margin-top: 40px; 
    padding-top: 20px; 
    text-align: center; 
    font-size: 12px; 
    color: #777;
}

/* ==================================================== */
/* قفل دانلود تصاویر و ویدئوها (Anti-Download Protection) */
/* ==================================================== */

img, video {
    -webkit-touch-callout: none !important; /* قفل منوی دانلود در لمس طولانی در آیفون و اندروید */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important; /* قفل کشیدن عکس با موس */
}

/* حذف گزینه دانلود از کنترلر مرورگر */
video::-internal-media-controls-download-button {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

/* ==================================================== */
/* بخش واکنش‌گرا (Responsive)                          */
/* ==================================================== */

@media (max-width: 992px) {
    header {
        position: sticky;
        top: 0;
        z-index: 9999;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .menu-toggle { 
        display: flex !important; 
    }

    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: var(--main-red);
        color: #fff;
    }

    .menu-close {
        display: block !important;
        background: none;
        border: none;
        color: #fff;
        font-size: 30px;
        cursor: pointer;
    }

    nav.main-nav {
        position: fixed; 
        top: 0; 
        right: -320px; 
        width: 300px; 
        height: 100vh;
        background: #ffffff !important;
        z-index: 10001;
        transition: 0.4s ease;
        display: flex;
        flex-direction: column;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    nav.main-nav.active { 
        right: 0; 
    }

    nav.main-nav ul { 
        flex-direction: column; 
        width: 100%;
        padding: 0;
    }

    nav.main-nav ul li {
        width: 100%;
    }

    nav.main-nav ul li a { 
        color: #333 !important; 
        border-bottom: 1px solid #f0f0f0; 
        padding: 15px 20px;
        font-size: 14px;
        display: block;
        font-weight: 500;
    }

    .overlay { 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        background: rgba(0,0,0,0.6); 
        z-index: 9998; 
        visibility: hidden;
        opacity: 0;
        transition: 0.3s;
    }

    .overlay.active { 
        visibility: visible;
        opacity: 1; 
    }

    .today-date {
        color: #666;
        padding: 15px 20px;
        border-top: 1px solid #eee;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .main-wrapper { 
        flex-direction: column; 
    }
    
    .featured-news { 
        flex-direction: column; 
    }
    
    .col-main, .col-side, .col-ads { 
        flex: 0 0 100%; 
    }

    .footer-grid { 
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-col:first-child {
        grid-column: span 2;
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .photo-gallery-link img {
        height: 150px;
    }
    
    .photo-gallery-caption {
        font-size: 12px;
        padding: 6px 8px;
    }

    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .video-gallery-link img {
        height: 200px;
    }
    
    .play-icon {
        width: 60px;
        height: 60px;
    }
    
    .play-icon svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    /* در موبایل، تراز از راست باعث می‌شود حتی با کشیدگی صفحه حروف کلمات از هم باز نشوند */
    .post-content, .post-lead {
        text-align: right !important;
    }

    .header-search input[type="search"] {
        width: 120px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    .post-lead {
        font-size: 14.5px;
        padding: 15px;
    }
}

@media (max-width: 600px) {
    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .social-icon img {
        width: 18px;
        height: 18px;
    }
    
    .main-footer {
        padding: 40px 0 20px;
        text-align: center;
    }
    
    .footer-grid { 
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-col:first-child {
        grid-column: span 1;
    }
    
    .footer-col h4 {
        display: table;
        margin: 0 auto 15px;
    }
    
    .footer-links {
        padding: 0;
    }
    
    .comment-form-row {
        flex-direction: column;
    }
}

@media (max-width: 550px) {
    .news-item { 
        flex-direction: row; 
    }
    
    .news-item img { 
        width: 100px; 
        height: 70px; 
    }
    
    .news-item-content p { 
        display: none; 
    }
}

@media (max-width: 576px) {
    .video-gallery-section {
        padding: 35px 0;
    }
    
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-gallery-link img {
        height: 180px;
    }
    
    .video-gallery-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .video-gallery-more {
        text-align: center;
    }
    
    .video-gallery-title {
        font-size: 22px;
    }
    
    .play-icon {
        width: 55px;
        height: 55px;
    }
    
    .play-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .video-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-search {
        display: none;
    }
    
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .photo-gallery-link img {
        height: 130px;
    }
    
    .photo-gallery-header {
        flex-direction: column;
        gap: 10px;
    }
}