/*
Theme Name: Fast News Lite (Desktop List View)
Author: Custom AI
Version: 1.15
*/

:root {
    --primary-color: #dcb86f;
    --header-text: #222222;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #222;
    --meta-color: #666;
    --font-main: 'Vazirmatn', sans-serif;
    --space-md: 20px;
    --radius-md: 12px;
    --shadow-md: 0 2px 8px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-top: 70px;
    direction: rtl;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { opacity: 0.7; }

.container {
    max-width: 80rem;
    margin-right: auto;
    margin-left: auto;
    padding-left: 7px;
    padding-right: 7px;
}

@media screen and (max-width:1360px){
.container{
	width:90%;
}
}
@media screen and (max-width:1280px){
.container{
	width:95%;
}
}
@media screen and (max-width:640px){
.container{
	width:100%;
	padding-left: 0px;
    padding-right: 0px;
}
}

/* --- Header --- */
header {
    background-color: #ffffff;
    color: var(--header-text);
    padding: 5px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.brand { flex-grow: 1; display: flex; justify-content: center; }
.brand img { height: 65px; width: auto; display: block; }
.menu-icon { font-size: 1.8rem; cursor: pointer; padding: 5px; }

/* Social Icons */
.header-socials { display: flex; gap: 10px; align-items: center; }
.social-icon svg { width: 24px; height: 24px; fill: #333; transition: fill 0.3s; }
.social-icon:hover svg { fill: var(--primary-color); }

/* --- Sidebar Menu (Right) --- */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1001; display: none; opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

.mobile-sidebar {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
    background: #fff; z-index: 1002; transition: right 0.3s ease-in-out;
    padding: 20px; box-shadow: -2px 0 10px rgba(0,0,0,0.1); overflow-y: auto;
}
.mobile-sidebar.active { right: 0; }

.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.sidebar-logo img { width: 120px; height: auto; }
.close-btn { font-size: 2rem; cursor: pointer; color: #888; }

.sidebar-search { margin-bottom: 20px; position: relative; }
.sidebar-search input { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 25px; background: #f9f9f9; font-family: var(--font-main); }
.sidebar-search button { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; }

.mobile-nav ul { list-style: none; }
.mobile-nav ul li { border-bottom: 1px solid #f0f0f0; }
.mobile-nav ul li a { display: block; padding: 12px 5px; font-weight: 500; color: #333; }
.mobile-nav ul li a:hover { color: var(--primary-color); padding-right: 10px; }

/* --- Sidebar Social Icons Styling --- */
.sidebar-socials {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.socials-title {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 15px;
    font-weight: 700;
}

.socials-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.sb-icon:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.sb-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* --- رنگ‌های برند --- */
.sb-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.sb-icon.telegram {
    background-color: #229ED9;
}

.sb-icon.eitaa {
    background-color: #E46F2A;
}

.sb-icon.bale {
    background-color: #40C36C;
}

/* --- Container Layout --- */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

/* Global Card Styles */
.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: var(--shadow-md);
    border: 1px solid #eee;
    transition: transform 0.2s;
}
.post-cat { background: var(--primary-color); color: #222; padding: 2px 8px; font-size: 0.7rem; border-radius: 4px; display: inline-block; margin-bottom: 8px; font-weight: bold; }
.post-meta { font-size: 0.75rem; color: var(--meta-color); margin-top: auto; }

/* --- Featured Slider (Top 3) --- */
.featured-slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 10px;
    margin-bottom: 25px;
    scrollbar-width: none;
}
.featured-slider-wrapper::-webkit-scrollbar { display: none; }

.slider-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    position: relative;
}
.slider-item img { width: 100%; height: 180px; object-fit: cover; }
.slider-content { padding: 15px; }
.slider-title { font-size: 1rem; font-weight: 800; margin-bottom: 5px; line-height: 1.5; }

/* --- Slider Wrapper & Dots --- */
.slider-main-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 20;
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background-color: #888;
    transform: scale(1.2);
}

.dot.active {
    background-color: var(--primary-color);
    width: 25px;
    border-radius: 10px;
}

/* مخفی کردن نقاط در موبایل */
@media (max-width: 991px) {
    .slider-dots {
        display: none; 
    }
}

/* --- Standard List Posts --- */
.standard-post {
    display: flex;
    padding: 12px;
    gap: 15px;
    align-items: flex-start;
}

.standard-post img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.standard-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.standard-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* --- DESKTOP ADJUSTMENTS (From 992px and up) --- */
@media (min-width: 992px) {
    
    .container {
        max-width: 90%; 
    }

    .featured-slider-wrapper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding-bottom: 15px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        cursor: grab;
        user-select: none; 
    }

    .featured-slider-wrapper.active {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    /* تنظیمات تک اسلاید در دسکتاپ و تبلت */
    .slider-item {
        flex: 0 0 100%;
        scroll-snap-align: center;
        height: 220px;
        display: flex;
        flex-direction: row; 
        align-items: center;
        -webkit-user-drag: none;
    }

    .slider-item a {
        width: 50%;
        height: 100%;
        flex-shrink: 0;
        display: block;
        pointer-events: none;
        padding: 14px;
    }

    .slider-item img {
      
        object-fit: cover;
        pointer-events: none;
        border-radius: 8px;
    }

    .slider-content {
        width: 50%;
        padding: 20px;
        text-align: right;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start; 
        height: 100%;
    }

    .post-cat {
        width: auto;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    .slider-title {
        font-size: 1.8rem;
        line-height: 1.4;
        margin-bottom: 15px;
                

    }
    
    .slider-title a {
        width: 100%;
        pointer-events: auto;
        font-size: 20px;
        padding: 0px;
    }

    .post-meta {
        font-size: 0.9rem;
    }







    /* لیست پست‌های پایین */
    .standard-post {
        padding: 10px;
        align-items: center;
    }
    .standard-post img {
        width: 200px;
        height: 115px;
    }
    .standard-title {
        font-size: 16px;
    }
    .back-arrow-icon {
        margin-left: 10px;
    }
}

/* --- Single Page --- */
.back-arrow-icon { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 40px; 
    height: 40px; 
    cursor: pointer;
}
.back-arrow-icon svg {
    width: 28px; 
    height: 28px; 
    stroke: var(--header-text); 
    transition: stroke 0.3s;
}
.back-arrow-icon:hover svg {
    stroke: var(--primary-color);
}

.single-header { padding: 0 0 15px 0; }
.single-title { font-size: 1.5rem; font-weight: 900; line-height: 1.4; margin-bottom: 15px; }
.single-img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 20px; display: block; }
.single-body { line-height: 2; font-size: 1rem; text-align: justify; color: #333; }
.single-body p { margin-bottom: 20px; }
.single-body img { max-width: 100%; height: auto; border-radius: 8px; }
img.alignright {
	float:right;
	margin:0 0 1em 1em}
img.alignleft {
	float:left;
	margin:0 1em 1em 0}
img.aligncenter {
	display:block;
	margin-left:auto;
	margin-right:auto}
.alignright {
	float:right;
	}
.alignleft {
	float:left;
	}
.aligncenter {
	display:block;
	margin-left:auto;
	margin-right:auto}



#loading { text-align: center; padding: 20px; display: none; color: var(--meta-color); }

/* استایل دکمه‌های اشتراک‌گذاری */
.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff !important;
    transition: transform 0.2s, opacity 0.2s;
    padding: 0;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff !important;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* رنگ‌های دکمه‌ها */
.share-btn.telegram { background-color: #2ca5e0; }
.share-btn.whatsapp { background-color: #25D366; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.x-twitter { background-color: #000000; }

/* --- Post Footer Tools (Shortlink) --- */
.post-footer-tools {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.short-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    flex-wrap: wrap;
}

.short-link-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
}

.short-link-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    flex-grow: 1;
    max-width: 350px;
}

.short-link-wrapper input {
    border: none;
    background: transparent;
    padding: 8px 10px;
    width: 100%;
    font-family: monospace;
    font-size: 1rem;
    color: #555;
    direction: ltr;
}

.copy-btn {
    border: none;
    background: #f0f0f0;
    color: #333;
    padding: 8px 12px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    border-right: 1px solid #ddd;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
}

.copy-message {
    font-size: 0.8rem;
    color: #fff;
    background: #222;
    padding: 4px 10px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-message.show {
    opacity: 1;
}

@media (max-width: 480px) {
    .short-link-box {
        flex-direction: column;
        align-items: stretch;
    }
    .short-link-wrapper {
        max-width: 100%;
    }
    .copy-message {
        text-align: center;
    }
}

/* --- Comments Section --- */
.comments-area {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment-list li.comment {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.comment-list li.comment:last-child { border-bottom: none; }

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    border: 2px solid #eee;
}

.fn { font-weight: 700; font-style: normal; color: #333; }

.comment-metadata {
    font-size: 0.8rem;
    color: #888;
    margin-right: auto; 
}

.comment-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 10px;
}

.reply a {
    font-size: 0.8rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}
.reply a:hover { background: var(--primary-color); color: #fff; }

.comment-list .children {
    list-style: none;
    padding-right: 40px;
    margin-top: 20px;
    border-right: 2px solid #f0f0f0;
}

.comment-respond {
    margin-top: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.comment-reply-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.comment-form p { margin-bottom: 15px; }
.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 5px; color: #555; }

.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-main);
    background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary-color); }

.submit-btn, #submit {
    background: var(--header-text);
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-size: 1rem;
    font-family: var(--font-main);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
.submit-btn:hover, #submit:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .comment-list .children { padding-right: 15px; }
}

/* --- 404 Page --- */
.error-404-area { text-align: center; padding: 60px 20px; max-width: 700px; margin: 0 auto; }
.error-code { font-size: 8rem; font-weight: 900; color: var(--primary-color); line-height: 1; margin-bottom: 10px; text-shadow: 4px 4px 0px #eee; }
.error-title { font-size: 1.8rem; font-weight: 800; color: var(--header-text); margin-bottom: 15px; }
.error-desc { color: #666; font-size: 1rem; margin-bottom: 30px; line-height: 1.8; }

.error-search-box { position: relative; max-width: 400px; margin: 0 auto 30px auto; }
.error-search-box input { width: 100%; padding: 12px 15px; border: 2px solid #eee; border-radius: 50px; background: #f9f9f9; font-family: var(--font-main); }
.error-search-box button {
    position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
    background: var(--primary-color); border: none; width: 35px; height: 35px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff;
}
.back-home-btn {
    display: inline-block; background: var(--header-text); color: #fff; padding: 10px 25px; border-radius: 50px; font-weight: bold; transition: 0.3s;
}
.back-home-btn:hover { background: var(--primary-color); color: #fff; }

@media (max-width: 768px) {
    .error-code { font-size: 5rem; }
}

/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; background-color: #ffffff;
    display: flex; justify-content: space-around; align-items: center; height: 60px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08); z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #eee;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: #777; font-size: 0.75rem; width: 25%; height: 100%;
    transition: color 0.3s ease; position: relative;
}
.nav-icon svg { width: 24px; height: 24px; stroke-width: 2; margin-bottom: 4px; }
.nav-item.active, .nav-item:hover { color: var(--primary-color); }
.nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 40%; height: 3px; background-color: var(--primary-color);
    border-bottom-left-radius: 3px; border-bottom-right-radius: 3px;
}
.mobile-spacer { display: none; }

@media (min-width: 769px) {
    .mobile-bottom-nav { display: none; }
    .mobile-spacer { display: none !important; }
}
@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
    .mobile-spacer { display: block !important; height: 70px; }
}

/* --- Social Modal Styles --- */
.social-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.social-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.social-modal-box {
    background: #fff;
    width: 85%;
    max-width: 320px;
    border-radius: 15px;
    padding: 20px;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.social-modal-overlay.show .social-modal-box {
    transform: scale(1);
}

.social-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.social-modal-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.close-modal-btn {
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0 5px;
}

.modal-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    transition: transform 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.sb-icon:hover { transform: translateY(-3px); opacity: 0.9; }
.sb-icon svg { width: 26px; height: 26px; fill: #fff; }

/* رنگ‌ها */
.sb-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.sb-icon.telegram { background-color: #229ED9; }
.sb-icon.eitaa { background-color: #E46F2A; }
.sb-icon.bale { background-color: #40C36C; }

/* --- Main Layout Grid (Sidebar) --- */
.main-layout { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.sidebar-box { 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 12px; 
    padding: 15px; 
    margin-bottom: 20px; 
    box-shadow: var(--shadow-md); 
}

.widget-title { 
    font-size: 1rem; 
    font-weight: 800; 
    color: var(--header-text); 
    margin-bottom: 15px; 
    padding-bottom: 8px; 
    border-bottom: 2px solid var(--primary-color); 
}

.small-post-list { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.small-post { 
    display: flex; 
    align-items: flex-start; 
    gap: 10px; 
}

.small-post img { 
    width: 65px; 
    height: 65px; 
    object-fit: cover; 
    border-radius: 8px; 
    flex-shrink: 0; 
}

.small-post h3 { 
    font-size: 0.85rem; 
    font-weight: 700; 
    margin: 0; 
}

.small-post h3 a:hover { 
    color: var(--primary-color); 
}

/* Banner Ads */
.ad-banner { 
    display: block; 
    margin-bottom: var(--space-md); 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    transition: all 0.3s ease; 
}

.ad-banner:hover { 
    opacity: 0.9; 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md); 
}

.ad-banner img { 
    width: 100%; 
    transition: all 0.3s ease;     
    height: auto;
}

/* ================= RESPONSIVE LAYOUT ================= */

/* موبایل (پیش‌فرض) - فقط محتوای اصلی نمایش داده شود */
@media (max-width: 991px) {
    .desktop-sidebar { 
        display: none !important; 
    }
    
    .main-layout {
        display: block;
    }
    
    #content-container {
        width: 100%;
    }
}

/* دسکتاپ (992px و بالاتر) - نمایش سه ستون */
@media (min-width: 992px) { 
    .main-layout {
        display: grid;
        grid-template-columns: 25% 1fr 25%;
        gap: 20px;
        align-items: start; 
    }
    
    /* استایل برای محتوای اصلی */
    #content-container {
        width: 100%;
        min-width: 0; /* برای جلوگیری از overflow */
    }
    
    .desktop-sidebar { 
        display: block; 
    }
}