/* Vazirmatn */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn[wght].woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    scroll-behavior: smooth;
    font-feature-settings: "ss01";
    unicode-bidi: plaintext !important;
}

.text-justify {
    text-align: justify;
}

/* سفارشی‌سازی اسکرول‌بار برای هماهنگی با برند */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #D62227;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b11b20;
}

header.wp-block-template-part{
    position: sticky;
    top: 0;
    z-index: 50;
}

h1 {
    font-size: 30px;
    font-weight: 900;
    color: oklch(20.8% .042 265.755);
    /*margin-bottom: 2rem;*/
}

@layer base {
    h2 {
        color: rgb(15 23 42);
    }
}
h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
}
h3 {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgb(15 23 42);
    margin-bottom: 2rem;
}

h4 {
    font-size: .87rem;
    font-weight: 900;
    color: rgb(15 23 42);
    margin-bottom: 2rem;
}

ul li + li {
    margin-top: 12px;
}

/* Elements*/
.styled-list {
    list-style: revert;
}

.spaced-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wp-block-column.boxed-icon {
    /*flex-grow:unset;*/
    flex-basis: unset !important;
    width: 48px !important;
    height: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 781px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column.boxed-icon {
        flex-basis: 48px !important;
        width: 48px !important;
        height: 48px !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
}

.ltr {
    direction: ltr;
    unicode-bidi: isolate;
    font-feature-settings: normal;
}

/*:root :where(.is-layout-flow) > *{*/
/*    margin: 0;*/
/*}*/

.hidden-sm-inline {
    display: none !important;
}

@media (min-width: 640px) {
    .hidden-sm-inline {
        display: inline-flex !important;
    }
}

.wp-block-separator {
    border-top-width: 1px;
}

/* انیمیشن باز شدن مگامنو */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-menu {
    display: flex;
}

.mobile-menu {
    display: none;
}

@media (max-width: 1095px) {
    .desktop-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }
}
@media (max-width: 1095px){

}
/* استایل تب‌های آکاردئون سوالات */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-content {
    max-height: 350px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* انیمیشن‌های پیشرفته SVG هیرو */
@keyframes floatEffect {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}

@keyframes dashSignal {
    to {
        stroke-dashoffset: -40;
    }
}

.animated-hero-svg {
    animation: floatEffect 6s ease-in-out infinite;
}

.glow-node {
    animation: pulseGlow 3s ease-in-out infinite;
}

.signal-line {
    stroke-dasharray: 8;
    animation: dashSignal 2s linear infinite;
}

/* تایپوگرافی محتوای مقاله */
.article-content h2 {
    font-size: 1.375rem;
    font-weight: 900;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-right: 1rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 4px;
    border-radius: 4px;
    background: #D62227;
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 2.1;
    margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
    color: #475569;
    font-size: 0.95rem;
    line-height: 2.1;
    margin-bottom: 1.25rem;
    padding-right: 1.25rem;
}

.article-content ul {
    list-style: none;
}

.article-content ul li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.7rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D62227;
}

.article-content ol {
    list-style: decimal;
    padding-right: 1.5rem;
}

.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: #D62227;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #fecaca;
    text-underline-offset: 3px;
}

.article-content blockquote {
    border-right: 4px solid #D62227;
    background: #fef2f2;
    border-radius: 0 1rem 1rem 0;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.9;
}

.article-content code {
    background: #f1f5f9;
    color: #D62227;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-family: monospace;
    direction: ltr;
    display: inline-block;
}

.article-content img {
    border-radius: 1rem;
    margin: 1.75rem 0;
    max-width: 100%;
    height: auto;
    margin: auto;
}

.article-content strong {
    color: #0f172a;
    font-weight: 800;
}

.article-content span {
    color: inherit !important;
}

.breadcrumbs a {
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #D62227;
}

.breadcrumbs .breadcrumb_last {
    color: rgb(71 85 105);
}

.article-content .wp-caption,
.article-content [id^="attachment_"] {
    max-width: 100% !important;
    margin: auto;
    /*width: 100% !important;*/
}

/* Yoast FAQ */
/* Container */
.schema-faq {
    max-width: 768px; /* معادل max-w-3xl */
    margin: 0 auto 4rem;
}

/* FAQ Item */
.schema-faq-section {
    border: 1px solid rgb(241 245 249);
    border-radius: 0.75rem;
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.5);
    margin-bottom: 1rem;
}

/* Question */
.schema-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 800;
    color: rgb(15 23 42);
}

/* Plus icon */
.schema-faq-question::after {
    content: '+';
    color: #D62227;
    font-size: 1.25rem;
    font-weight: 900;
    transition: transform .3s;
}

/* Answer */
.schema-faq-answer {
    display: none;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgb(100 116 139);
}

/* Open state */
.schema-faq-section.active .schema-faq-answer {
    display: block;
}

.schema-faq-section.active .schema-faq-question::after {
    transform: rotate(45deg);
}

/* Comment Section */
.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form-author,
.comment-form-email {
    margin: 0;
}

@media (min-width: 640px) {
    .comment-form-author,
    .comment-form-email {
        width: calc(50% - .5rem);
    }

    .comment-form-author {
        float: right;
    }

    .comment-form-email {
        float: left;
    }
}

.comment-form-comment,
.comment-form-cookies-consent,
.form-submit {
    clear: both;
}

.comment-form label {
    display: block;
    margin-bottom: .5rem;
    font-size: .75rem;
    font-weight: 700;
    color: rgb(71 85 105);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid rgb(226 232 240);
    border-radius: .75rem;
    background: #fff;
    font-size: .875rem;
    transition: .2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #D62227;
    box-shadow: 0 0 0 2px rgb(254 242 242);
}

.comment-form textarea {
    resize: none;
    min-height: 120px;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.comment-form-cookies-consent label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.comment-form .submit {
    padding: .75rem 2rem;
    border-radius: .75rem;
    background: rgb(2 6 23);
    color: white;
    font-size: .875rem;
    font-weight: 900;
    border: 0;
    cursor: pointer;
    transition: .2s;
}

.comment-form .submit:hover {
    background: #D62227;
}

#commentform .form-submit {
    display: flex;
    justify-content: flex-end;
}

/* pagination*/
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: all .2s ease;
    box-sizing: border-box;
}

.page-numbers:hover {
    border-color: #D62227;
    color: #D62227;
}

.page-numbers.current {
    background: #020617;
    border-color: #020617;
    color: #fff;
}

.page-numbers.dots {
    border: none;
    color: #94a3b8;
    pointer-events: none;
}

.prev.page-numbers,
.next.page-numbers {
    font-size: 13px;
    font-weight: 700;
}

.prev.page-numbers:hover,
.next.page-numbers:hover {
    border-color: #D62227;
    color: #D62227;
}

/* وقتی صفحه قبلی یا بعدی وجود ندارد */
.prev.page-numbers.disabled,
.next.page-numbers.disabled,
.page-numbers[aria-disabled="true"] {
    opacity: .4;
    pointer-events: none;
}

@media (max-width: 640px) {
    .page-numbers {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

.pagination .page-numbers {
    font-feature-settings: "ss01";
}

/* ====================== استایل فرم جستجوی وردپرس ====================== */

.searchform {
    position: relative;
    width: 100%;
}

.searchform > div {
    display: flex;
    align-items: center;
    position: relative;
}

/* فیلد متن */
.searchform #s {
    width: 100%;
    padding: 0.75rem 1.25rem;
    padding-left: 3rem; /* فضا برای دکمه سمت چپ */
    border-radius: 0.75rem;
    border: 1.5px solid #e2e8f0;
    background-color: #f8fafc;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    direction: rtl;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.searchform #s::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.searchform #s:focus {
    border-color: #D62227;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(214, 34, 39, 0.08);
}

/* دکمه جستجو */
.searchform #searchsubmit {
    position: absolute;
    left: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: none;
    background-color: #0f172a;
    color: #ffffff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0; /* مخفی کردن متن "جستجو" */
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-4.35-4.35M11 19a8 8 0 100-16 8 8 0 000 16z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1rem 1rem;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.searchform #searchsubmit:hover {
    background-color: #D62227;
}

.searchform #searchsubmit:focus-visible {
    outline: 2px solid #D62227;
    outline-offset: 2px;
}

/* لیبل screen reader - مخفی بصری ولی قابل دسترس */
.searchform .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Comment navigation*/

/* ====================== استایل صفحه‌بندی نظرات وردپرس ====================== */

.comment-navigation {
    margin-top: 2.5rem;
}

.comment-navigation .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.comment-navigation .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* دکمه‌های قبلی و بعدی */
.comment-navigation .nav-previous a,
.comment-navigation .nav-next a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid #e2e8f0;
    background-color: #ffffff;
    color: #475569;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.comment-navigation .nav-previous a:hover,
.comment-navigation .nav-next a:hover {
    border-color: #D62227;
    color: #D62227;
    background-color: #fff5f5;
}

/* آیکون قبلی (دیدگاه‌های کهنه‌تر) — فلش به راست */
.comment-navigation .nav-previous a::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: background-image 0.2s ease;
    flex-shrink: 0;
}

.comment-navigation .nav-previous a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23D62227'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
}

/* آیکون بعدی (دیدگاه‌های تازه‌تر) — فلش به چپ */
.comment-navigation .nav-next a::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19l-7-7 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: background-image 0.2s ease;
    flex-shrink: 0;
}

.comment-navigation .nav-next a:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23D62227'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19l-7-7 7-7'/%3E%3C/svg%3E");
}


/* Mobile menu*/
.acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.acc-panel.open {
    max-height: 600px;
}

.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-nav.open {
    max-height: 800px;
    overflow-y: auto;
}

#header-menu > div {
    flex-grow: 1;
    flex-basis: auto;
    width: auto;
}

.scale-105{
    position: relative;
}

.responsive-padding{
    padding-right: 90px;
}

@media (max-width: 781px) {
    .responsive-padding {
        padding: 0;
    }
}


@media (max-width: 1023px) {
    body {
        padding-bottom: 4.5rem;
    }
}
