/*
Theme Name: MyKnowledgeBase
Theme URI: https://www.guido.site/themes
Version: 6.5
Requires PHP: 5.6
Requires at least: 5.2
Tested up to: 5.4
Author: Guido
Author URI: https://www.guido.site
Description: MyKnowledgeBase is a lightweight and mobile-friendly WordPress theme. Personalize your website via the Customizer in your dashboard and by using a custom post or page template. With 2 of the custom page templates you can transform your categories and posts into a Knowledge Base, FAQ, Wiki or Link Portal. It also contains multiple widget areas. Enjoy!
Tags: one-column, two-columns, right-sidebar, full-width-template, custom-background, custom-header, custom-menu, featured-images, footer-widgets, post-formats, sticky-post, blog, editor-style, microformats, translation-ready
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: myknowledgebase

This theme, like WordPress, is licensed under the GPL.
*/

/* RESET STYLESHEET */
@font-face {
    font-family: 'iranyekanwebregularfanum';
    src: url('https://decor-design.ir/wp-content/themes/myknowledgebase/fonts/eot/iranyekanwebregularfanum.eot') format('eot'), url('https://decor-design.ir/wp-content/themes/myknowledgebase/fonts/woff/iranyekanwebregularfanum.woff') format('woff'), url('https://decor-design.ir/wp-content/themes/myknowledgebase/fonts/ttf/iranyekanwebregularfanum.ttf') format('truetype');
}
@font-face {
    font-family: 'Farnaz';
    src: url('https://decor-design.ir/wp-content/themes/myknowledgebase/fonts/B Farnaz_0.ttf') format('truetype');
}

@font-face {
    font-family: "iransans";
    src: url("fonts/IRANSansWeb.woff");
}

* {
    font-family: 'iranyekanwebregularfanum', sans-serif;
}

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, 
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, 
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, 
article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    font-family: 'iranyekanwebregularfanum' !important;
    font-size:100%;
    font-style:inherit;
    font-weight:inherit;
    vertical-align:baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section {
    display:block;
}

body {
    line-height:1.7;
    text-align: right;
    direction: rtl;
    background-color: #F5F7FA;
    color: #1E293B;
}

ol, ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content:'';
    content:none;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* HTML */
html {-webkit-text-size-adjust:100%;}

/* BODY */
body { font-size:16px; }

/* CLEARINGS */
#header-first:after, #header-second:after, #header-third:after, #categories-three:after, #categories-four:after, .entry-content:after, .more:after, .post-nav:after, .comment-nav:after, #footer-widgets:after {content:''; display:block; height:0; clear:both;}

/* HEADINGS */
h1 {clear:both; margin:0 0 20px; font-size:2.4em; line-height:1.3; color: #0F172A; font-weight: 700; }
h2 {clear:both; margin:0 0 18px; font-size:1.9em; line-height:1.4; color: #0F172A; font-weight: 700; }
h3 {clear:both; margin:0 0 16px; font-size:1.55em; line-height:1.5; color: #0F172A; font-weight: 700; }
h4 {clear:both; margin:0 0 14px; font-size:1.3em; line-height:1.6; color: #1E293B; font-weight: 600; }
h5 {clear:both; margin:0 0 12px; font-size:1.1em; line-height:1.7; color: #1E293B; font-weight: 600; }
h6 {clear:both; margin:0 0 10px; font-size:0.9em; line-height:1.8; color: #64748B; font-weight: 600; }

/* LINKS AND HTML TAGS */
a {
    text-decoration:none; 
    color:#2563EB;
    transition: color 0.2s ease, background-color 0.2s ease;
    font-family: 'iranyekanweblightfanum';
}
a:hover {
    text-decoration:none;
    color: #1D4ED8;
}

strong, b {font-weight:bold;}
small {font-size:0.85em;}
big {font-size:1.15em;}
sub {vertical-align:sub; font-size:0.85em;}
sup {vertical-align:super; font-size:0.85em;}
ins, mark {font-weight:bold; background-color: #FEF3C7; text-decoration:none; color:#92400E; padding: 0.1em 0.3em; border-radius: 4px;}
cite, em, abbr, acronym {font-style:italic; color: #64748B;}

pre {margin:0 0 20px; padding:15px; white-space:pre-wrap; border:1px solid #E2E8F0; background-color: #F8FAFC; border-radius: 8px; font-size: 0.9em; direction: ltr; text-align: left;}
blockquote, q {margin:0 0 20px; padding: 15px 20px; display:block; font-size:1.15em; font-style:italic; border-right: 4px solid #FBBF24; background-color: #FFFBEB; border-radius: 0 8px 8px 0; color: #64748B;}
address {margin:0 0 20px; font-style:italic;}
p {margin:0 0 20px;}
hr {height:1px; background:#E2E8F0; border:0; margin:30px 0;}

/* ALIGNMENTS */
.alignright {float:right; display:inline; margin-left:1.5em;}
.alignleft {float:left; display:inline; margin-right:1.5em;}
.aligncenter {clear:both; display:block; margin-left:auto; margin-right:auto;}

/* TABLE AND LISTS */
table {margin:0 0 20px; border-collapse:collapse; width: 100%;}
table, th, td {border:1px solid #E2E8F0; padding:10px 12px;}
table th {font-weight:bold; background-color: #F1F5F9; color: #0F172A;}
table tr:nth-child(even) {background-color: #F8FAFC;}

ul {list-style:square; margin:0 20px 20px 0;}
ol {list-style:decimal; margin:0 20px 20px 0;}
li { margin: 8px 0; line-height: 1.7;}
li > ul, li > ol {margin:10px 0;}
dl {margin:0 0 20px;}
dt {font-weight:bold; color: #0F172A;}
dd {margin:0 0 20px 20px;}

/* INPUTS */
input, select, textarea {
    -webkit-appearance:none; 
    -moz-appearance:none; 
    border:1px solid #CBD5E1; 
    padding:10px 15px; 
    background:#fff; 
    color:#1E293B; 
    font-size:inherit; 
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="submit"], input[type="reset"], input[type="button"], button {
    cursor:pointer; 
    border:0; 
    padding:10px 20px; 
    background:#2563EB;
    color:#fff; 
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover, button:hover {
    background:#1D4ED8;
    transform: translateY(-1px);
}
input[type="submit"]:active, input[type="reset"]:active, input[type="button"]:active, button:active {
    transform: translateY(0);
}

input[type="checkbox"] {-webkit-appearance:checkbox; -moz-appearance:checkbox;}
input[type="radio"] {-webkit-appearance:radio; -moz-appearance:radio;}
select {-webkit-appearance:menulist; -moz-appearance:menulist; max-width:100%; background:#fff; color:#1E293B;}
button {font-size:inherit;}

/* INPUTS ON HEADER SECOND */
#header-second input, #header-second textarea {border:1px solid #E2E8F0; color:#1E293B;}
#header-second select {border:1px solid #E2E8F0; background-color: #fff;} 
#header-second input[type="submit"], #header-second input[type="reset"], #header-second input[type="button"], #header-second button {
    border:0; background:#FBBF24; color:#0F172A;
}
#header-second input[type="submit"]:hover, #header-second input[type="reset"]:hover, #header-second input[type="button"]:hover, #header-second button:hover {
    background:#F59E0B; color:#fff;
}

/* FOOTER */
#footer input, #footer textarea {border:1px solid #475569; color:#F1F5F9; background-color: #334155;}
#footer select {border:1px solid #475569; background-color: #334155; color: #F1F5F9;} 
#footer input[type="submit"], #footer input[type="reset"], #footer input[type="button"], #footer button {
    border:0; background:#FBBF24; color:#0F172A; font-weight: 600;
}
#footer input[type="submit"]:hover, #footer input[type="reset"]:hover, #footer input[type="button"]:hover, #footer button:hover {
    background:#FDE047; color:#0F172A;
}

/* ==========================================
   CONTAINER - عرض بیشتر و پدینگ صفر
   ========================================== */
#container {
    max-width:1300px;
    clear:both; 
    margin:0 auto; 
    padding:0;
}

/* ==========================================
   لایه اصلی محتوا و سایدبار با فاصله 1%
   ========================================== */
#main-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1%;
    padding: 0;
}

#content {
    width:70%;
    float:left; 
    padding:30px 0;
}

#content-full {
    width:100%; 
    clear:both; 
    padding:30px 0;
}

/* ==========================================
   HEADER FIRST - مشکی-سرمه‌ای
   ========================================== */
#header-first {
    clear:both; 
    padding:25px 20px 20px; 
    background: linear-gradient(135deg, #0F172A, #1E293B);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); 
    border-bottom: 3px solid #FBBF24;
}

/* HEADER FIRST LOGO */
.logo {
    width:100%;
    float:none;
    clear:both;
    text-align:center;
    padding: 0 0 15px 0;
}
.logo h1 {
    margin:0; 
    font-weight: 800;
}
.logo h1 a {
    text-decoration:none; 
    color: #FBBF24;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
    font-size: 1.1em;
}
.logo h1 a:hover {
    color:#FFFFFF;
    text-shadow: 0 2px 15px rgba(251, 191, 36, 0.5);
}
/* شعار سایت - بدون ایتالیک */
.logo .site-tagline {
    font-style: normal;
    font-size:1.05em; 
    color: #CBD5E1; 
    margin-top: 5px;
}

/* ==========================================
   HEADER FIRST MENU - پس‌زمینه مشکی
   ========================================== */
.nav-head {
    width:100%;
    float:none;
    clear:both;
    margin:5px 0 0; 
    text-align:center;
    padding: 10px 0;
    background: #111827;
    border-radius: 8px;
}
.nav-head ul {
    margin:0; 
    padding:0; 
    z-index:999; 
    list-style:none;
    display: inline-block;
}
.nav-head ul li {
    display:inline-block; 
    position:relative; 
    margin:0 0 0 12px;
    padding:0;
}
.nav-head ul li:last-child {
    margin-left: 0;
}
.nav-head ul li a {
    display:block; 
    padding:8px 12px; 
    text-decoration:none; 
    font-weight:600; 
    color: #FFFFFF;
    font-size: 1em;
    transition: color 0.2s ease;
    border-radius: 6px;
}
.nav-head ul li a:hover {
    color: #FBBF24;
    background: rgba(251, 191, 36, 0.1);
    text-decoration: none;
}
.nav-head .current-menu-item > a, 
.nav-head .current-menu-parent > a {
    color: #FBBF24;
    background: rgba(251, 191, 36, 0.1);
}

/* HEADER FIRST SUBMENU */
.nav-head ul ul {
    display:none; 
    position:absolute; 
    top:100%; 
    background-color: #1E293B; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.3); 
    border-radius: 8px; 
    padding: 10px 0; 
    min-width: 200px;
    border: 1px solid #334155;
}
.nav-head ul ul ul {
    display:none; 
    position:absolute; 
    top:0; 
    right:100%;
}
.nav-head ul ul a {
    width:auto; 
    padding:10px 20px; 
    background:transparent; 
    color:#CBD5E1; 
    text-align:right; 
    border-bottom: none; 
    white-space: nowrap;
}
.nav-head ul ul a:hover {
    background-color: #263348;
    color: #FBBF24;
}
.nav-head ul li:hover > ul {
    display:block;
}
.nav-head ul li ul li {
    margin:0; 
    display: block;
}

/* ==========================================
   HEADER FIRST MOBILE MENU
   ========================================== */
.mobile-nav-container {
    display:none;
    clear:both; 
    padding:10px 0 25px;
}

.mobile-nav-toggle {
    display:none;
    clear:both; 
    padding:15px 25px; 
    background:#2563EB; 
    color:#fff; 
    cursor:pointer; 
    border-radius: 12px; 
    text-align: center; 
    font-weight: 600; 
    font-size: 1.1em;
}
.mobile-nav-toggle:hover {
    background:#1D4ED8;
}

.mobile-nav {
    clear:both; 
    padding:15px 25px; 
    background:#1E293B; 
    border-radius: 0 0 12px 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.mobile-nav .subnav-toggle {
    float: left;
    display: block;
    margin: -42px 0 0 0;
    padding: 2px 15px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #FBBF24;
    background: #263348;
    border-radius: 6px;
    min-width: 35px;
    text-align: center;
}

.mobile-nav ul {
    list-style:none;
}
.mobile-nav ul li {
    margin:0;
    position: relative;
}
.mobile-nav ul li a {
    display:block; 
    margin:0 0 12px 0; 
    padding:0 50px 12px 0;
    border-bottom:1px solid #334155; 
    text-decoration:none; 
    color: #FFFFFF; 
    font-weight: 500;
    text-align: right;
}
.mobile-nav ul li a:hover {
    color: #FBBF24;
}

.mobile-nav .sub-menu {
    padding-right: 20px;
}
.mobile-nav .sub-menu li {
    margin:0;
}
.mobile-nav .sub-menu li a {
    color: #CBD5E1;
    font-size: 0.95em;
}
.mobile-nav .sub-menu li a:hover {
    color: #FBBF24;
}

/* HEADER SECOND */
#header-second {
    clear:both; 
    background-color: #F5F7FA; 
    padding: 30px 0;
}

/* HEADER SECOND HOMEPAGE IMAGE */
.image-homepage {
    width:49%; 
    float:left; 
    margin:0 0 20px; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.header-img {
    width:100%; 
    height:auto; 
    display:block; 
    transition: transform 0.3s ease;
}
.image-homepage:hover .header-img {
    transform: scale(1.03);
}

/* HEADER SECOND HOMEPAGE SIDEBAR */
.sidebar-homepage {
    width:49%; 
    float:right; 
    margin:0 0 20px; 
    padding:30px; 
    background: linear-gradient(135deg, #2563EB, #7C3AED); 
    color:#fff; 
    border-radius: 12px; 
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}
#header-second .widget {
    padding:0; 
    border:0; 
    margin-bottom: 20px;
}
#header-second .widget a {
    color:#FDE047; 
    font-weight: 600;
}
#header-second .widget a:hover {
    color:#fff;
}

/* ==========================================
   HEADER THIRD - نوار جستجو
   ========================================== */
#header-third {
    clear:both; 
    padding:15px 25px; 
    background-color: #fff; 
    border: 2px solid #E2E8F0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
}

#header-third .searchbar-title {
    margin:0; 
    color: #64748B; 
    font-weight: 500; 
    font-size: 1.1em;
    order: 1;
}

#header-third .search-form {
    padding:0; 
    display: flex; 
    width: auto;
    order: 2;
    margin-right: auto;
    margin-left: 0;
}

#header-third .search-field {
    padding:10px 15px; 
    border:2px solid #E2E8F0;
    border-left: none;
    background:#fff; 
    color:#1E293B; 
    border-radius: 0 8px 8px 0;
    transition: border-color 0.2s ease;
}

#header-third .search-field:focus {
    border-color: #2563EB;
    box-shadow: none;
    outline: none;
}

#header-third .search-submit {
    padding:10px 20px; 
    border:2px solid #2563EB;
    background:#2563EB; 
    color:#fff; 
    border-radius: 8px 0 0 8px; 
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#header-third .search-submit:hover {
    background:#1D4ED8;
    border-color: #1D4ED8;
}

/* ==========================================
   KNOWLEDGE BASE TEMPLATE
   ========================================== */
#categories-three, #categories-four {
    clear:both; 
    padding:25px 0 0;
}

/* کارت‌های دسته‌بندی - مثل کارت پست‌ها */
#categories-three .cat-list {
    width:30%; 
    margin:0 2% 30px 0; 
    padding:20px; 
    float:left; 
    background:#FFFFFF; 
    border-radius: 14px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
    border: 1px solid #E2E8F0; 
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}
#categories-four .cat-list {
    width:21.5%; 
    margin:0 2% 30px 0; 
    padding:20px; 
    float:left; 
    background:#FFFFFF; 
    border-radius: 14px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
    border: 1px solid #E2E8F0; 
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}
#categories-three .cat-list:hover, 
#categories-four .cat-list:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

#categories-three ul:nth-of-type(3n+1) {clear:left;}
#categories-three ul:nth-of-type(3n+3) {margin:0 0 30px 0;}
#categories-four ul:nth-of-type(4n+1) {clear:left;}
#categories-four ul:nth-of-type(4n+4) {margin:0 0 30px 0;}

.cat-name {
    margin:0 0 10px; 
    padding:0 0 15px; 
    list-style:none; 
    font-size:1.25em; 
    font-weight:700; 
    border-bottom:2px solid #FBBF24; 
    color: #0F172A;
}
.cat-name a {
    text-decoration:none; 
    color: inherit;
}
.cat-name a:hover {
    color:#2563EB; 
    text-decoration:none;
}

/* توضیحات دسته */
.cat-description {
    padding:12px 5px 0; 
    color: #64748B; 
    font-size: 0.95em; 
    line-height: 1.6;
    background: transparent;
}

.post-name {
    margin:0 0 0 20px;
}
.view-all {
    list-style:none; 
    margin:15px 0 0 20px; 
    padding:10px 0 0; 
    font-weight:600;
}
.view-all a {
    text-decoration:none; 
    color: #2563EB; 
    background-color: #EFF6FF; 
    padding: 8px 15px; 
    border-radius: 6px; 
    font-size: 0.9em; 
    transition: background-color 0.2s ease;
}
.view-all a:hover {
    background-color: #2563EB; 
    color:#fff; 
    text-decoration:none;
}

/* PAGE */
.page-title {
    margin:0 0 30px; 
    font-weight: 700; 
    color: #0F172A;
}
.blog-page-text {
    clear:both; 
    padding:0 0 30px; 
    color: #64748B; 
    font-size: 1.05em; 
    line-height: 1.8;
}
.archive-description {
    clear:both; 
    padding:5px 0 20px; 
    font-weight: 600; 
    color: #64748B;
}
.pagelink {
    clear:both; 
    padding:15px 0;
}

/* ==========================================
   POST - کارت‌های پست
   ========================================== */
.post-list {
    clear:both; 
    margin:0 0 25px; 
    border: 1px solid #E2E8F0; 
    padding: 18px 22px;
    border-radius: 14px; 
    background-color: #FFFFFF;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}
.post-list:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.post-single {
    clear:both; 
    background-color:#FFFFFF; 
    padding:25px 30px; 
    border-radius: 14px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
    box-sizing: border-box;
}

/* عناوین پست‌ها */
.post-title {
    margin:0 0 10px; 
    font-weight: 700; 
    font-size: 1.25em;
    line-height: 1.6;
}
.post-title a {
    color: #1E293B;
}
.post-title a:hover {
    color: #2563EB; 
    text-decoration:none;
}

.post-title-single {
    margin:0 0 20px; 
    font-weight: 700; 
    font-size: 30px;
    line-height: 1.6; 
    color: #1E293B;
}

.entry-content {
    clear:both; 
    padding:0 0 25px; 
    font-size: 1.05em; 
    line-height: 1.9; 
    color: #1E293B;
}
.entry-content p {
    margin-bottom: 18px;
}

.sticky-title {
    margin:12px 0 20px; 
    padding:5px 0; 
    border-top:2px solid #FBBF24; 
    border-bottom:2px solid #FBBF24; 
    text-align:center; 
    font-weight: 600; 
    color: #B45309;
    font-size: 0.95em;
}

.postmetadata {
    clear:both; 
    margin:15px 0; 
    padding:10px 18px; 
    background:#F8FAFC; 
    border:1px solid #E2E8F0; 
    border-radius: 10px;
    font-size: 0.9em;
    color: #64748B;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    box-sizing: border-box;
}

.more {
    clear:both; 
    padding:8px 0 15px; 
    display: flex; 
    justify-content: flex-end;
}
a.readmore {
    float:right; 
    padding:8px 20px; 
    background:#16A34A;
    color:#fff; 
    text-decoration:none; 
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
a.readmore:hover {
    background:#15803D; 
    transform: translateY(-2px);
    text-decoration:none;
}

/* POST FORMATS */
.format-aside .post-title, 
.format-image .post-title, 
.format-video .post-title, 
.format-gallery .post-title, 
.format-audio .post-title {
    font-size:1.15em;
}
.format-aside .post-title-single, 
.format-image .post-title-single, 
.format-video .post-title-single, 
.format-gallery .post-title-single, 
.format-audio .post-title-single {
    font-size:1.7em;
}
.format-image .postmetadata, 
.format-video .postmetadata, 
.format-gallery .postmetadata, 
.format-audio .postmetadata {
    font-style:italic;
}

/* POST NAV */
.post-nav {
    clear:both; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 0; 
    margin-top: 25px; 
    border-top: 1px solid #E2E8F0;
}
.nav-prev a, .nav-next a {
    padding:10px 20px; 
    background:#F1F5F9; 
    color: #1E293B;
    border-radius: 8px; 
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.nav-prev a:hover, .nav-next a:hover {
    background:#2563EB;
    color: #FFFFFF;
    text-decoration: none;
}

/* EDIT LINK */
.edit-link {
    clear:both; 
    margin:20px 0; 
    padding:10px 0; 
    text-align:center; 
    font-size: 0.9em;
}
.edit-link a {
    color: #2563EB; 
    font-weight: 600;
}

/* IMAGE AND VIDEO */
embed, iframe, object, video {
    max-width:100%; 
    border-radius: 12px;
}
img {
    max-width:100%; 
    height:auto; 
    border-radius: 8px;
}

img.alignright {
    float:right; 
    margin:0.4em 0 0.4em 1.5em; 
    border-radius: 12px;
}
img.alignleft {
    float:left; 
    margin:0.4em 1.5em 0.4em 0; 
    border-radius: 12px;
}
img.aligncenter {
    clear:both; 
    display:block; 
    margin:0.4em auto; 
    border-radius: 12px;
}

.list-image, .single-image {
    float:left; 
    margin:0.4em 1.5em 0.4em 0; 
    border-radius: 12px; 
    overflow: hidden;
}
.single-image {
    float: none; 
    margin: 0 0 20px 0; 
    text-align: center;
}

.wp-caption-text {
    text-align:center; 
    color: #64748B; 
    font-size: 0.9em; 
    margin-top: 5px;
}

.gallery-item {margin:0 0 10px !important;}
.gallery img {border:0 !important; border-radius: 8px;}
.gallery-caption {margin:0 !important;}

/* SEARCHFORM */
.search-form {
    padding:15px 0; 
    display: flex; 
    align-items: center;
}
.search-field {
    margin:0 5px 0 0; 
    flex-grow: 1;
}
.search-form .screen-reader-text {
    display:none;
}

/* ==========================================
   COMMENTS - اصلاح عرض برای جلوگیری از بیرون‌زدگی
   ========================================== */
#comments {
    clear:both; 
    margin-top: 35px;
    max-width: 100%;
    overflow: hidden;
}

.comment-list, .comment-list .children {
    list-style:none; 
    margin:0; 
    padding:0;
    max-width: 100%;
    box-sizing: border-box;
}

.comment-list li {
    margin:0; 
    padding:0;
    max-width: 100%;
    box-sizing: border-box;
}

.comment-list .children > li {
    margin:0 30px 0 0;
    max-width: calc(100% - 30px);
    box-sizing: border-box;
}

.comment-body {
    background:#FFFFFF; 
    border:1px solid #E2E8F0; 
    margin:0 0 20px; 
    padding:18px 22px; 
    border-radius:14px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    box-sizing: border-box;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.comment-content {
    padding:12px 0; 
    line-height: 1.8;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.comment-metadata .edit-link {
    display:block; 
    margin-top: 10px;
}

.comment-notes, .form-allowed-tags {
    padding:10px 0; 
    font-size:0.85em; 
    color: #64748B;
    max-width: 100%;
}

.comments-title, .comment-reply-title, .no-comments {
    margin:0 0 20px; 
    font-size:1.5em; 
    font-weight: 700; 
    color: #0F172A;
    padding-bottom: 12px;
    border-bottom: 2px solid #FBBF24;
    display: inline-block;
    max-width: 100%;
}

.comment-author {
    max-width: 100%;
}

.comment-author .avatar {
    margin:0 0 8px 12px; 
    border-radius: 50%; 
    float: right;
    max-width: 50px;
    height: auto;
}

.comment-metadata {
    padding:5px 0 0; 
    color: #64748B; 
    font-size: 0.9em;
    max-width: 100%;
}

.bypostauthor .comment-content {
    background-color: #F0FDF4; 
    padding: 12px; 
    border-radius: 8px;
}

.comment-awaiting-moderation {
    font-style:italic; 
    color: #F59E0B;
}

/* COMMENTS RESPOND */
#respond {
    clear:both; 
    padding:20px 25px 25px; 
    background-color: #F8FAFC; 
    border-radius: 14px; 
    margin-top: 25px;
    border: 1px solid #E2E8F0;
    box-sizing: border-box;
    max-width: 100%;
}

.comment-form {
    max-width: 100%;
    box-sizing: border-box;
}

.comment-form label {
    padding:0 0 8px; 
    display:block; 
    font-weight: 600; 
    color: #1E293B;
}

.comment-form textarea {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    box-sizing: border-box;
}

.comment-form input[type="text"], 
.comment-form input[type="email"], 
.comment-form input[type="url"] {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-sizing: border-box;
}

/* COMMENTS NAV */
.comment-nav {
    clear:both; 
    display: flex; 
    justify-content: space-between; 
    padding: 20px 0;
    max-width: 100%;
    box-sizing: border-box;
}
.comment-prev a, .comment-next a {
    padding: 8px 20px; 
    background: #F1F5F9; 
    border-radius: 8px; 
    color: #1E293B; 
    font-weight: 500;
    box-sizing: border-box;
}
.comment-prev a:hover, .comment-next a:hover {
    background: #2563EB; 
    color: #FFFFFF;
}

/* ==========================================
   SIDEBAR - پس‌زمینه سفید
   ========================================== */
#sidebar {
    width:28%;
    float:right; 
    padding:0;
    border-radius:14px;
    background-color: #FFFFFF;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
    margin-top: 30px;
    margin-right: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* WIDGETS */
.widget {
    margin:0; 
    padding: 20px; 
    border-bottom:1px solid #E2E8F0;
    box-sizing: border-box;
}
.widget:last-child {
    border-bottom: none;
}
.widgettitle {
    margin:-20px -20px 18px -20px; 
    padding: 15px 20px;
    color: #FFFFFF; 
    font-weight: 700; 
    font-size: 1.2em;
    background: #0F172A;
    display: block;
}

/* ==========================================
   لینک‌های سایدبار - رنگ‌های اختصاصی
   ========================================== */
#sidebar .widget a[href*="aparat"] {
    color: #E11D48;
}
#sidebar .widget a[href*="telegram"],
#sidebar .widget a[href*="t.me"] {
    color: #0284C7;
}
#sidebar .widget a[href*="bale"] {
    color: #16A34A;
}
#sidebar .widget a[href*="eitaa"] {
    color: #EA580C;
}

/* FOOTER */
#footer {
    clear: both;  
    background: #0F172A; 
    color: #CBD5E1;
    margin-top: 40px;
}
#footer a {
    color:#FBBF24; 
    transition: color 0.2s ease;
}
#footer a:hover {
    color:#FFFFFF;
}
.site-info {
    clear:both; 
    padding:20px; 
    text-align:center; 
    font-size: 0.95em; 
    border-top: 1px solid #1E293B;
}

/* FOOTER WIDGET AREA */
#footer-widgets {
    clear:both; 
    padding:25px 20px 0; 
    display: flex; 
    flex-wrap: wrap;
}
.footer-left {
    float:left; 
    width:32%; 
    margin:20px 0 0;
}
.footer-middle {
    float:left; 
    width:32%; 
    margin:20px 2% 0;
}
.footer-right {
    float:right; 
    width:32%; 
    margin:20px 0 0;
}
#footer .widget {
    border-bottom:1px solid #1E293B; 
    margin: 0 0 20px; 
    padding-bottom: 18px;
}
#footer .widgettitle {
    color:#FFFFFF; 
    border-bottom-color: #FBBF24;
    background: transparent;
    padding: 0 0 10px 0;
    margin: 0 0 15px 0;
}

/* ==========================================
   BLOG HEADER IMAGE
   ========================================== */
.blog-header-image-wrapper {
    margin: 25px auto;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}
.blog-header-image-wrapper a {
    display: block;
    position: relative;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.blog-header-image-wrapper a:hover {
    opacity: 0.95;
}
.blog-header-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    transition: transform 0.5s ease;
}
.blog-header-image-wrapper a:hover .blog-header-image {
    transform: scale(1.03);
}
.image-overlay-text {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    color: #FBBF24;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    z-index: 1;
    transition: background 0.3s ease;
}
.blog-header-image-wrapper a:hover .image-overlay-text {
    background: rgba(15, 23, 42, 0.95);
}

/* تصویر کوچک نوشته‌ها */
.post-thumbnail-single {
    margin-bottom: 25px;
    text-align: center;
    border-radius: 14px;
    overflow: hidden;
}
.post-thumbnail-single img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

/* ==========================================
   PAGINATION
   ========================================== */
.archive-pagination {
    clear: both;
    margin: 45px 0 20px;
    text-align: center;
    direction: rtl;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: #FFFFFF;
    color: #1E293B;
    text-decoration: none;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.archive-pagination .page-numbers:hover {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.archive-pagination .page-numbers.current {
    background: #16A34A;
    color: #FFFFFF;
    border-color: #16A34A;
    box-shadow: 0 3px 12px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

.archive-pagination .first,
.archive-pagination .last {
    background: #F8FAFC;
    border-color: #CBD5E1;
    font-weight: 500;
    min-width: 65px;
    font-size: 13px;
    color: #64748B;
}

.archive-pagination .first:hover,
.archive-pagination .last:hover {
    background: #EF4444;
    border-color: #EF4444;
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25);
}

.archive-pagination .prev,
.archive-pagination .next {
    background: #F8FAFC;
    border-color: #CBD5E1;
    font-weight: 500;
    min-width: 75px;
    font-size: 14px;
    color: #1E293B;
}

.archive-pagination .prev:hover,
.archive-pagination .next:hover {
    background: #FBBF24;
    border-color: #FBBF24;
    color: #0F172A;
    box-shadow: 0 6px 18px rgba(251, 191, 36, 0.3);
}

.archive-pagination .page-numbers:active {
    transform: translateY(0) scale(0.96);
}

.pagination-info {
    clear: both;
    text-align: center;
    margin: 12px 0 25px;
    color: #64748B;
    font-size: 13px;
    padding: 8px 18px;
    background: #F1F5F9;
    border-radius: 30px;
    border: 1px solid #E2E8F0;
    font-weight: 500;
    display: inline-block;
    width: auto;
}

.pagination-info::before {
    content: '📄 ';
    font-size: 14px;
    margin-left: 5px;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */
@media screen and (min-width:768px) and (max-width:1023px) {
    .logo {
        width:100%; 
        float:none;
        clear:both; 
        padding:0 0 15px; 
        text-align:center;
    }
    .nav-head {
        width:100%; 
        float:none;
        clear:both; 
        margin:5px 0 15px; 
        text-align:center;
    }
    .nav-head ul li {
        margin:0 8px;
    }
    
    #content {
        width: 65%;
    }
    
    #sidebar {
        width: 33%;
    }
    
    .blog-header-image-wrapper {
        margin: 20px auto;
    }
    .image-overlay-text {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .comment-list .children > li {
        margin:0 20px 0 0;
        max-width: calc(100% - 20px);
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media screen and (max-width:767px) {
    body.custom-background {
        background-image:none !important;
    }
    
    #container {
        width:94%;
        padding:0;
    }
    
    #content, #content-full {
        width:100%; 
        clear:both; 
        float:left; 
        padding:20px 0 30px;
    }
    
    #header-first {
        padding:20px 15px 15px;
    }
    
    .logo {
        width:100%; 
        float:none;
        clear:both; 
        padding:0 0 12px; 
        text-align:center;
    }
    .logo h1 a {
        font-size: 1em;
    }
    
    .nav-head {
        display:none;
    }
    
    .mobile-nav-container {
        display:block;
    }
    .mobile-nav-toggle {
        display:block;
    }
    
    .image-homepage {
        width:100%; 
        clear:both;
    }
    .sidebar-homepage {
        width:100%; 
        clear:both; 
        float:left; 
        margin-top: 20px;
    }
    
    #header-third {
        margin:0 0 25px; 
        padding:15px 20px; 
        flex-direction: column; 
        text-align: center;
    }
    #header-third .searchbar-title {
        width:100%; 
        clear:both; 
        text-align:center; 
        margin-bottom: 10px;
        order: 1;
    }
    #header-third .search-form {
        width:100%; 
        clear:both; 
        float:left; 
        padding:0; 
        justify-content: center;
        order: 2;
    }
    
    #categories-three .cat-list, 
    #categories-four .cat-list {
        width:45%;
    }
    
    .list-image, .single-image {
        max-width:50%;
    }
    
    #sidebar {
        width:100%; 
        clear:both; 
        float:left; 
        padding:0; 
        margin-right: 0; 
        margin-top: 20px;
    }
    
    #footer-widgets {
        padding:25px 20px 0; 
        flex-direction: column;
    }
    .footer-right, .footer-middle, .footer-left {
        width:100%; 
        clear:both; 
        float:left; 
        margin:0 0 20px;
    }
    
    .post-title-single {
        font-size: 24px;
    }
    
    .image-overlay-text {
        font-size: 15px;
        padding: 10px 18px;
        bottom: 15px;
        right: 15px;
    }
    
    .comment-list .children > li {
        margin:0 15px 0 0;
        max-width: calc(100% - 15px);
    }
    
    .comment-body {
        padding: 15px;
    }
    
    #respond {
        padding: 15px;
    }
    
    .archive-pagination {
        gap: 5px;
        margin: 30px 0 15px;
    }
    .archive-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 8px;
    }
    .archive-pagination .first, 
    .archive-pagination .last {
        display: none;
    }
    .archive-pagination .prev, 
    .archive-pagination .next {
        min-width: 55px;
        padding: 0 12px;
        font-size: 13px;
    }
    .pagination-info {
        font-size: 12px;
        padding: 6px 15px;
    }
}

@media screen and (max-width: 480px) {
    .archive-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
    .archive-pagination {
        gap: 4px;
    }
    
    .comment-list .children > li {
        margin:0 10px 0 0;
        max-width: calc(100% - 10px);
    }
    
    .comment-body {
        padding: 12px;
    }
}
/* ============================================
   ویجت پشتیبانی هوش فعال
   ============================================ */

.hooshefaal-support-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: inherit;
    direction: rtl;
}

.support-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0066cc, #004c99);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.support-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.55);
    background: linear-gradient(135deg, #0077e6, #005bb3);
}

.support-toggle-btn .support-icon {
    flex-shrink: 0;
}

.support-toggle-btn span {
    font-family: inherit;
}

/* Popup */
.support-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.support-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.support-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0066cc, #004c99);
}

.support-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
}

.support-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.support-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.support-popup-body {
    padding: 20px;
}

.support-intro {
    margin: 0 0 16px 0;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    font-family: inherit;
}

.support-link:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.support-link.telegram {
    background: #0088cc;
}

.support-link.telegram:hover {
    background: #0099e6;
}

.support-link.eitaa {
    background: #ff6b35;
}

.support-link.eitaa:hover {
    background: #ff7f50;
}

.support-link.phone {
    background: #28a745;
}

.support-link.phone:hover {
    background: #2dc653;
}

.support-link-icon {
    flex-shrink: 0;
}

/* رسپانسیو موبایل */
@media (max-width: 480px) {
    .hooshefaal-support-widget {
        bottom: 15px;
        right: 10px;
    }
    
    .support-toggle-btn {
        padding: 10px 16px;
        font-size: 13px;
        gap: 8px;
    }
    
    .support-toggle-btn span {
        font-size: 12px;
    }
    
    .support-popup {
        width: 280px;
        bottom: 65px;
        right: 0;
    }
}