/* =========================================
           1. Global Resets & Typography
========================================= */


/* Copper palette of the main meschi.ir app. dark-mode.css redefines it under
   .dark (on <html>), so anything built on these follows the colour theme. */
:root {
    --primary-100: #F6ECE9;
    --primary-200: #EAD1CB;
    --primary-300: #D9ACA2;
    --primary-400: #C78677;
    --primary-500: #B6624E;
    --primary-600: #A63F27;
    --primary-700: #8D3621;
    --primary-800: #762D1C;
    --primary-900: #4B1C12;
}

/* Theme roles. Use these in components rather than raw hex values;
   dark-mode.css gives each one its dark value. */
:root {
    color-scheme: light;
    --body-bg: #f9f9fb;
    --sidebar-bg: #ffffff;
    --hero-radius: 56px;
    --top-height: 53%;
    --right-width: 57%;
    --hero-bg: #f5e4df;
    --primary-color: var(--primary-500);
    --primary-text-color: #ffffff;
    --primary-hover-color: #f5e4df;
    --primary-hover-text-color: #7f4537;
    --primary-accent: #9b5342;
    --content-box-bg: #ffffff;
}

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

body {
    font-family: IranYekan, sans-serif;
    background-color: var(--body-bg);
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.text-bold {
    font-weight: 700;
}

.text-muted {
    color: #888;
    font-size: 12px;
}

.text-justify {
    text-align: justify;
}

.sticky {
    position: sticky;
}

.ellipsis-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dir-rtl {
    direction: rtl;
}

.dir-ltr {
    direction: ltr;
}

.bg-theme-primary {
    background: var(--primary-color) !important;
    color: var(--primary-text-color);
}

.bg-body {
    background: var(--body-bg) !important;
}

.no-border {
    border: none !important;
}

/* Utility Classes */
.section-divider {
    border-top: 3px dashed #d1d5db;
    margin: 40px 0;
    position: relative;
}

.section-divider .title-box {
    position: absolute;
    top: -16px;
    right: 0;
}

.section-title {
    display: inline-block;
    color: #111;
    padding: 0 16px 0 0;
    border-radius: 24px;
    font-weight: 700;
    position: relative;
    z-index: 10;
}

.section-title .bg-helper {
    right: 0;
    top: 0;
    content: '';
    position: absolute;
    width: calc(100% + 24px);
    display: block;
    height: 100%;
    background: var(--body-bg);;
}

.section-title .bg-helper-2 {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: var(--hero-bg);
    width: 48px;
    border-radius: 0 16px 16px 0;
    z-index: 9;
}

.section-title .title {
    position: relative;
    z-index: 11;
    font-size: 18px;
    line-height: 36px;
    margin: 0;
}

.section-title .title > span {
    font-weight: 500;
}

.section-title .title > strong {
    font-weight: 700;
}

.search-box button {
    margin-top: 2px;
    font-size: 20px;
}

/* =========================================
   2. Header Section
   ========================================= */
.main-header {
    background-color: #fff;
    padding: 16px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.main-header.sticky {
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    font-weight: 700;
    color: var(--primary-hover-text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SVG logo: fixed height, width from the file's own ratio (a Customizer logo may differ from 163x40). */
.logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 600;
    color: #555;
}

.main-nav a:hover {
    color: var(--primary-hover-text-color);
}

.header-actions .btn-login {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.main-nav-box {

}

.main-nav-box > ul {
    margin: 0 32px 0 0;
    padding: 0;
}


.main-nav-box > ul > li {
    padding: 8px;
    margin-left: 8px;
}

.main-nav-box > ul > li > a {
    font-weight: 400;
}

.main-nav-box > ul > li > a:hover {
    color: var(--primary-hover-text-color);
}

.main-nav-box > ul > li > ul {
    top: 100%;
}

.main-header .navbar-nav .nav-link {
    padding: 0;
}

.main-nav-box .dropdown-submenu {
    position: relative;
}

.main-nav-box .dropdown-item {
    font-weight: 400;
    font-size: 15px;
    padding: 8px 12px;
    line-height: 24px;
}

.main-nav-box .dropdown-item:hover {
    color: var(--primary-hover-text-color);
}

.dropdown-toggle::after {
    content: "\F057B";
    border-top: none;
    border-left: none;
    border-bottom: none;
    border-right: none;
    font-family: "iconsax";
    position: absolute;
    font-size: 12px;
    margin-right: 6px;
}

.dropdown-menu {
    border: 1px solid #f3f3f3;
    padding: 0;
    min-width: 200px;
}

.dropdown .dropdown-menu .dropdown-toggle::after {
    content: "\F28FB";
    border-top: none;
    border-left: none;
    border-bottom: none;
    border-right: none;
    font-family: "iconsax";
}
/* =========================================
   3. Hero section
   ========================================= */

.hero-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    border-radius: 40px;
    overflow: hidden;
    background-color: transparent;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hero-bg);
    border-radius: 40px;
    z-index: 1;
}

.hero-bg-cutout {
    position: absolute;
    bottom: -5px;
    left: -5px;
    width: 45%;
    height: 68%;
    background-color: #f4f7f9;
    border-top-right-radius: 70px;
    z-index: 2;
}

.bg-pattern-dots {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(#fff 2px, transparent 2px);
    background-size: 12px 12px;
    opacity: 0.35;
    z-index: 2;
    border-radius: 100%;
}

.bg-pattern-waves {
    position: absolute;
    bottom: -20px;
    right: 15%;
    width: 200px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' fill='none' stroke='%23ffffff' stroke-width='1.5' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 80px 20px;
    z-index: 2;
}

.star {
    position: absolute;
    background-color: #fff;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    z-index: 2;
    opacity: 0.9;
}

.star-large {
    width: 35px;
    height: 35px;
    top: 15%;
    right: 45%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.star-small-1 {
    width: 16px;
    height: 16px;
    bottom: 25%;
    right: 20%;
}

.star-small-2 {
    width: 12px;
    height: 12px;
    bottom: 10%;
    right: 5%;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 60px;
    gap: 40px;
}

/* Right Side: Text & Search */
.hero-text-area {
    flex: 1;
    padding-left: 24px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
    word-spacing: -4px;
}

.hero-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    text-align: center;

}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background-color: #f4f7f9;
    border-radius: 12px;
    padding: 5px 16px;
    height: 56px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: #2d3748;
    font-weight: 400;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-icon {
    width: 22px;
    height: 22px;
    fill: #a0aec0;
    cursor: pointer;
    margin-right: 16px;
}

.hero-footer-text {
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
}

.hero-cards-area {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-section .post-card {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 12px;
    display: flex;
    align-items: stretch;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
    height: 130px;
}

.hero-section .post-card:hover {
    transform: translateY(-3px);
}

.hero-section {
    position: relative;
}

.hero-section .shape-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hero-section .shape-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-height);
    background-color: var(--primary-color);
    border-radius: var(--hero-radius) var(--hero-radius) 0 var(--hero-radius);
}

.hero-section .shape-right {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--right-width);
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 0 var(--hero-radius) var(--hero-radius) var(--hero-radius);
}

.hero-section .shape-fillet {
    position: absolute;
    top: var(--top-height);
    right: var(--right-width);
    width: var(--hero-radius);
    height: var(--hero-radius);
    background: radial-gradient(
            circle at bottom left,
            transparent calc(var(--hero-radius) - 1px),
            var(--primary-color) var(--hero-radius)
    );
}

.hero-section .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 5px 0;
}

.hero-section .card-content .card-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 24px;
    margin-bottom: 12px;
}

.hero-section .card-content .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.hero-section .card-content .card-date {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}


.hero-section .card-image-wrapper {
    flex: 140px 0 0;
    height: 100%;
}

.hero-section .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* =========================================
   3.1 Hero section - v2 (Mosaic)
   ========================================= */

.hero-v2 {
    --hero-v2-gap: 20px;
    --hero-v2-radius: 24px;
    --hero-v2-radius-lead: 36px;
    --hero-v2-row: clamp(170px, 18vw, 224px);
    width: 100%;
}

.hero-v2-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    grid-template-rows: repeat(2, var(--hero-v2-row));
    gap: var(--hero-v2-gap);
}

.hero-v2-grid--lead-only {
    grid-template-columns: 1fr;
    grid-template-rows: calc(var(--hero-v2-row) * 2 + var(--hero-v2-gap));
}

.hero-v2-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--hero-v2-radius);
    /*background-color: #0f172a;*/
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-v2-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.hero-v2-card--lead {
    grid-column: 1;
    grid-row: 1 / span 2;
    border-radius: var(--hero-v2-radius-lead);
}

/* تصویر پس‌زمینه کارت */
.hero-v2-card-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-v2-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-v2-card:hover .hero-v2-card-media img {
    transform: scale(1.06);
}

/* سایه‌ی روی تصویر برای خوانا شدن عنوان */
.hero-v2-card-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
            to top,
            rgba(9, 9, 20, 0.92) 0%,
            rgba(9, 9, 20, 0.7) 28%,
            rgba(9, 9, 20, 0.26) 58%,
            rgba(9, 9, 20, 0.04) 100%
    );
}

.hero-v2-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    background-color: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 24px;
}

.hero-v2-card-badge:hover {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
}

.hero-v2-card-body {
    position: relative;
    z-index: 2;
    padding: 18px 20px 20px;
    text-align: right;
}

.hero-v2-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.9;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-v2-card-title a {
    color: #ffffff;
}

/* کل کارت را قابل کلیک می‌کند (بج دسته‌بندی روی آن باقی می‌ماند) */
.hero-v2-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-v2-card--lead .hero-v2-card-badge {
    top: 20px;
    right: 20px;
    font-size: 12px;
    padding: 9px 16px;
}

.hero-v2-card--lead .hero-v2-card-body {
    padding: 26px 28px 28px;
}

.hero-v2-card--lead .hero-v2-card-title {
    font-size: 21px;
    line-height: 1.8;
    -webkit-line-clamp: 2;
}

.hero-v2-card-excerpt {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 400;
    line-height: 2;
    color: rgba(255, 255, 255, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   4. Categories Icons
   ========================================= */

.cat-box {
    margin: 88px 0;
}

.categories-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.category-item {
    text-align: center;
    cursor: pointer;
}

.category-item .link {
    display: block;
    width: 100%;
    border-radius: 32px;
    background: transparent;
    padding: 16px;
}

.category-item .link:hover {
    background: var(--primary-color);
}

.category-item .link:hover span {
    color: var(--primary-text-color);
}

.category-icon {
    width: 75px;
    height: 75px;
    background: #fff;
    border-radius: 100%;
    margin: 0 auto 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    text-align: center;
    font-size: 28px;
    padding: 0;
}

.category-icon > i {
    line-height: 75px;
}

.category-item span {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

/* =========================================
   5. Post Grid (Cards)
   ========================================= */

.posts-box {
    margin-bottom: 88px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
    padding: 16px;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.post-content {
    margin-top: 16px;
}

.post-badge {
    background: #edf2f7;
    color: #4a5568;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
}

.img-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-block;
    background: var(--primary-color);
    padding: 2px 8px;
    line-height: 17px;
    min-width: 32px;
    color: var(--primary-text-color);
    white-space: nowrap;
    font-size: 11px;
    border-radius: 18px;
    font-weight: 500;
}

.post-title {
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0 12px 0;
    color: #111;
}

.post-title > a {
    text-decoration: none;
    color: #111;
}

.post-title > a:hover {
    color: var(--primary-accent);
}

.post-excerpt {
    font-size: 12px;
    color: #718096;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

/* :not(body) — WordPress adds "author" to <body> on author archives */
.author:not(body) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #4a5568;
    font-weight: 700;
}

.posts-box .author > img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.btn-more {
    display: inline-block;
    padding: 12px 24px;
    margin: 56px auto 0;
    text-align: center;
    background: var(--primary-color);
    color: var(--primary-text-color);
    border-radius: 24px;
    font-weight: 700;
    font-size: 13px;
}

.btn-more:hover {
    background: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
}

/* =========================================
   6. Banners
   ========================================= */
.banners-row {
    display: flex;
    margin: 88px 0;
}

.banner {
    flex: 1;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.banner > img {
    width: 100%;
    border-radius: 24px;
}

/* =========================================
   7. Tabs Section
   ========================================= */
.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.tab-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 8px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 700;
    color: #4a5568;
    font-family: inherit;
}

.tab-btn.active {
    background: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
    border-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* -----------------------------------------------------------------------
   Carousel space reservation (CLS)

   owl.carousel.css hides .owl-carousel until the script adds .owl-loaded,
   and the script is enqueued in the footer. Between first paint and Owl
   booting, every carousel on the page is therefore 0px tall and everything
   below it sits too high — then the row pops in and shoves the page down.

   These rules lay the raw markup out as a single clipped row at the same
   item width Owl will use, so the block already occupies its final height
   at first paint. All of it stops applying the moment Owl adds .owl-loaded.

   The widths mirror the `responsive` maps in assets/js/scripts.js: with
   gap:16px, calc(100%/N - 12px) reproduces Owl's item width exactly.
   Keep the two in sync if the carousel options change.
   ----------------------------------------------------------------------- */
.posts-box .owl-carousel:not(.owl-loaded),
.cat-box .owl-carousel:not(.owl-loaded) {
    display: flex;
    gap: 16px;
    overflow: hidden;
    /* Owl appends .owl-nav — an unstyled, in-flow block exactly one line tall —
       underneath the stage, so leave a line for it. */
    padding-bottom: 22px;
    padding-bottom: 1lh;
}

.posts-box .owl-carousel:not(.owl-loaded) > *,
.cat-box .owl-carousel:not(.owl-loaded) > * {
    flex: 0 0 auto;
}

/* .posts-box — items: 1 / 1.5 / 2 / 3 / 3 / 4 */
.posts-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 1 - 12px); }

@media (min-width: 420px) {
    .posts-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 1.5 - 12px); }
}

@media (min-width: 576px) {
    .posts-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 2 - 12px); }
}

@media (min-width: 767px) {
    .posts-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 3 - 12px); }
}

@media (min-width: 1200px) {
    .posts-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 4 - 12px); }
}

/* .cat-box — items: 2 / 2.5 / 3 / 4 / 6 / 8 */
.cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 2 - 12px); }

@media (min-width: 420px) {
    .cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 2.5 - 12px); }
}

@media (min-width: 576px) {
    .cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 3 - 12px); }
}

@media (min-width: 767px) {
    .cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 4 - 12px); }
}

@media (min-width: 991px) {
    .cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 6 - 12px); }
}

@media (min-width: 1200px) {
    .cat-box .owl-carousel:not(.owl-loaded) > * { width: calc(100% / 8 - 12px); }
}

/* =========================================
   8. Hot Tags
   ========================================= */
.tags-section {
    background: var(--primary-hover-color);
    padding: 24px 16px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 88px 0;
}

.tags-title {
    font-weight: 800;
    color: var(--primary-hover-text-color);
    margin-left: 24px;
    font-size: 18px;
    line-height: 24px;
    white-space: nowrap;
}

.tag-item {
    background: #fff;
    padding: 4px 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #4a5568;
}

.tag-item:hover {
    background: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
}

/* =========================================
   9. Multimedia Grid (CSS Grid)
   ========================================= */
.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
    margin-top: 32px;
}

.media-large {
    grid-row: span 2;
}

.media-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

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

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

/* =========================================
   10. Footer
   ========================================= */
.site-footer {
    background: #fff;
    padding-top: 50px;
    margin-top: 50px;
}

.footer-grid {
    margin-bottom: 32px;
}

.footer-col .footer-col-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #2d3748;
}

.footer-col ul {
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 13px;
    color: #718096;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.badge-box {
    border: 1px solid #edf2f7;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.footer-bottom .social-media a {
    display: flex;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    --tw-text-opacity: 1;
    color: #fff;
    --tw-bg-opacity: 1;
    background-color: var(--primary-color);
    border-radius: 100%;
    margin-right: 8px;
    justify-content: center;
}

.footer-bottom i {
    font-size: 16px;
}

.footer-bottom {
    background: var(--hero-bg);
    color: #111;
    text-align: center;
    padding: 16px 0;
    font-size: 12px;
    font-weight: 700;
}

.footer-bottom,
.footer-bottom span,
.footer-bottom p {
    font-size: .75rem;
    line-height: 1.6;
    font-weight: 400;
}

.footer-bottom .footer-contact-title {
    display: block;
}


/* =========================================
   11. Sidebar
   ========================================= */

aside .inner-box {
    background: var(--sidebar-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    border-radius: 16px;
}

aside .inner-box.sticky {
    position: sticky;
    top: 88px;
}

aside .section-title .title {
    font-size: 16px;
}

aside .section-title .bg-helper {
    background: var(--sidebar-bg);
}

/* =========================================
   12. FAQ
   ========================================= */

.faq-box {
    margin: 88px 0 64px 0;
}

.faq-box .accordion-button {
    background: var(--hero-bg);
    border: none;
    font-weight: 600;
    font-size: 15px;
}

.faq-box .accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    box-shadow: none;
}
.faq-box .accordion-item {
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}
.faq-box .accordion-button::after {
    filter: invert(0.5);
}

/* =========================================
   13. Widget
   ========================================= */

/*post widget*/
.widget .post-card {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 12px;
    display: flex;
    align-items: stretch;
    gap: 16px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.widget .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 5px 0;
}

.widget .card-content .card-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 24px;
    margin-bottom: 12px;
}

.widget .card-content .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.widget .card-content .card-date {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}

.widget .card-image-wrapper {
    flex: 140px 0 0;
    height: 100%;
}

.widget .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* category widget */

.widget-category {

}

.widget-category .widget-content {
    padding-top: 32px;
    margin-top: 16px;
}

.widget-category .widget-content .list {
    list-style: none;
}

.widget-category .widget-content .list .item {
    display: block;
    position: relative;
    padding-left: 32px;
    margin-bottom: 8px;
}

.widget-category .widget-content .list .item::before {
    content: "\F79FC";
    font-family: "iconsax";
    position: absolute;
    left: 0;
    top: -4px;
    bottom: 0;
    width: 20px;
    height: 20px;
    color: var(--primary-hover-text-color);
    font-size: 20px;
    text-align: center;
}

.widget-category .widget-content .list .item > a {
    font-size: 15px;
    line-height: 24px;
    font-weight: 500;
    color: #111;
}

.widget-category .widget-content .list .item > a:hover {
    color: var(--primary-hover-text-color);
}

/* =========================================
   14. Content
   ========================================= */

.content-box .inner-box {
    background: var(--content-box-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    border-radius: 16px;
}

.content-box .inner-box .content {
    padding: 24px;
    position: relative;
}

.content-box .inner-box .content p {
    text-align: justify;
    font-size: 15px;
    font-weight: 500;
    line-height: 24px;
}

.content-box .inner-box .content ul {
    padding: 0 16px 0 0;
    list-style: disc;
}

.content-box .inner-box .content ul > li {
    text-align: justify;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
}

.content-box .inner-box .content a {
    color: var(--primary-color);
    border-bottom: 1px dashed var(--primary-color);
}

.content-box .inner-box .content a:hover {
    color: var(--primary-hover-text-color);
    border-bottom: 1px dashed var(--primary-hover-text-color);
}

.content-box .inner-box .content h6 {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.content-box .inner-box .content h6 b,
.content-box .inner-box .content h6 strong,
.content-box .inner-box .content h6 span {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
}

.content-box .inner-box .content h5 {
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
}

.content-box .inner-box .content h5 b,
.content-box .inner-box .content h5 strong,
.content-box .inner-box .content h5 span {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 26px !important;
}

.content-box .inner-box .content h4 {
    font-size: 19px;
    font-weight: 700;
    line-height: 28px;
}

.content-box .inner-box .content h4 b,
.content-box .inner-box .content h4 strong,
.content-box .inner-box .content h4 span {
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 28px !important;
}

.content-box .inner-box .content h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
}

.content-box .inner-box .content h3 b,
.content-box .inner-box .content h3 strong,
.content-box .inner-box .content h3 span {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 30px !important;
}

.content-box .inner-box .content h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
}

.content-box .inner-box .content h2 b,
.content-box .inner-box .content h2 strong,
.content-box .inner-box .content h2 span {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
}

.content-box .inner-box .content h1 {
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.content-box .inner-box .content h1 b,
.content-box .inner-box .content h1 strong,
.content-box .inner-box .content h1 span {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
}

.content-box .inner-box .content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

.content-box .inner-box .content figure {
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
    text-align: center;
}

.content-box .inner-box .content figure img {
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
}

.content-box .inner-box .content blockquote {
    padding: 24px 16px;
    width: 100%;
    display: block;
    background: var(--hero-bg);
    border-radius: 8px;
    position: relative;
    margin: 32px 0;
}

.content-box .inner-box .content blockquote > p {
    margin-bottom: 0;
}

.content-box .inner-box .content blockquote::before,
.content-box .inner-box .content blockquote::after {
    width: 32px;
    height: 32px;
    display: block;
    content: "\F3798";
    font-family: "iconsax";
    font-size: 32px;
    line-height: 32px;
    color: var(--primary-hover-text-color);
    position: absolute;
}

.content-box .inner-box .content blockquote::before {
    top: -16px;
    left: 16px;
}

.content-box .inner-box .content blockquote::after {
    bottom: -16px;
    right: 16px;
    transform: rotate(180deg);
}

.content-box .inner-box .content video {
    max-width: 100%;
    height: auto;
}

.source-box i {
    font-size: 16px;
    color: #94a3b8;
    height: 24px;
    display: block;
    line-height: 24px;
}

.share-box {
    margin-top: 32px;
}

.social-share-buttons {
    padding: 0;
    margin: 0;
}

.social-share-buttons .title{
    line-height: 40px;
    margin-left: 8px;
}

.social-share-buttons .share-btn {
    font-size: 20px;
    width: 40px;
    display: inline-block;
    height: 40px;
    border-radius: 8px;
    color: #ffffff;
    margin-right: 8px;
    text-align: center;
    padding: 10px 8px;
    border: none !important;
}

a.share-btn:nth-child(6) {
    margin-right: 0;
}

.social-share-buttons .share-btn:hover {
    opacity: 0.9;
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.share-telegram {
    background: #0088cc;
}

.share-x {
    background: #1da1f2;
}

.share-facebook {
    background: #1877f2;
}

.share-instagram {
    background: #e4405f;
}

.share-linkedin {
    background: #0077b5;
}

.share-whatsapp {
    background: #25d366;
}

.share-copy {
    background: var(--primary-color);
}

.social-share-buttons .share-btn > i {
    color: #ffffff;
    font-size: 20px;
    display: block;
    height: 20px;
}

.cta-box {
    margin-bottom: 16px;
}

.cta-box .row {
    border-radius: 16px 56px 56px 16px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.cta-box .price-box {
    border-radius: 0 56px 55px 0;
}

.content-box .inner-box .cta-box .cta-link {
    background: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
    padding: 8px 16px;
    border-radius: 16px;
    display: inline-block;
}

.post-excerpt > p{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.main-title {
    padding: 16px;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

/* The featured image fills its box. Its width/height attributes only give the
   aspect ratio: WordPress caps them at $content_width (640px), which on wide
   screens would otherwise leave the image narrower than the column. */
.post-thumbnail img {
    width: 100%;
    height: auto;
}

.breadcrumb-item {
    font-size: 14px;
}


.metadata .post-date {
    line-height: 32px;
}

.metadata .post-date i {
    font-size: 20px;
}

.metadata .post-meta .author img{
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* RatingPress stars in the share row (single.php .rate-box), opposite the share buttons. */
.share-box .rate-box {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.share-box .rate-box .ratingpress {
    margin: 0;
    gap: 4px 10px;
}

.share-box .rate-box .rp-legend {
    font-size: 12px;
    white-space: nowrap;
}

.share-box .rate-box .rp-message {
    font-size: 12px;
    text-align: end;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef0f2;
    background-color: #fff;
}

.table-responsive-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin: 0;
}

/* Only tables with many columns are too wide to squeeze onto a phone; those scroll. */
.table-responsive-wrapper table:has(tr > :nth-child(5)) {
    min-width: 560px;
}

.table-responsive-wrapper table td,
.table-responsive-wrapper table th {
    padding: 8px 12px;
    border: 1px solid #f1f3f5;
    color: #495057;
    font-size: 14px;
    vertical-align: middle;
}

/* Header row: a real <thead>, otherwise the first row of the body. */
.table-responsive-wrapper table thead > tr > *,
.table-responsive-wrapper table > tbody:first-child > tr:first-child > *,
.table-responsive-wrapper table > colgroup + tbody > tr:first-child > *,
.table-responsive-wrapper table > caption + tbody > tr:first-child > * {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-responsive-wrapper table tbody tr:nth-child(even) > td {
    background-color: #fdfdfe;
}

.table-responsive-wrapper table tbody tr:not(:first-child):hover > td {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease-in-out;
}

.table-responsive-wrapper table td[width],
.table-responsive-wrapper table th[width] {
    width: auto !important;
}

/* Pasted content wraps cell text in <p>; drop the article's paragraph
   spacing, justification and sizing inside cells. */
.content-box .inner-box .content .table-responsive-wrapper p,
.content-box .inner-box .content .table-responsive-wrapper li {
    margin: 0 0 4px;
    text-align: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.content-box .inner-box .content .table-responsive-wrapper p:last-child {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .table-responsive-wrapper {
        margin: 1.5rem 0;
    }

    .table-responsive-wrapper table td,
    .table-responsive-wrapper table th {
        padding: 8px 6px;
        font-size: 13px;
        line-height: 1.7;
    }
}

/* Core comment form (comments.php → comment_form()). Colours for dark mode
   are in dark-mode.css. */
.comment-form p {
    margin-bottom: 12px;
}

.comment-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.comment-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.comment-form textarea {
    display: block;
    width: 100%;
    max-width: 560px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #fff;
    color: #111;
    font: inherit;
}

.comment-form textarea {
    max-width: none;
    min-height: 140px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(182, 98, 78, 0.18);
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form .comment-form-cookies-consent label {
    display: inline;
    margin: 0;
    font-weight: 400;
}

.comment-form input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.comment-form input[type="submit"] {
    padding: 10px 28px;
    border: none;
    border-radius: 24px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.comment-form input[type="submit"]:hover {
    background-color: var(--primary-hover-color);
    color: var(--primary-hover-text-color);
}

.wc_comm_submit,
#wpd-field-submit-0_0,
.ql-editor {
    font-family: IranYekan, sans-serif !important;
}

/* Table of contents (Easy Table of Contents) — an accordion: the header
   toggles the list (see scripts.js). The background comes from the plugin's
   settings and is deliberately not set here. */
#ez-toc-container {
    border-radius: 16px;
    border: 1px solid #e5e5e5 !important;
    display: block;
    padding: 14px 20px;
}

/* Closed by default. scripts.js runs from the footer, so without this the full
   list would paint open and then snap shut, shoving the article up. Only with
   JavaScript (the .js class on <html>), so the list is never unreachable, and
   not when the plugin's own toggle is on — that one has its own initial state.
   Once scripts.js takes over, its inline display wins over this rule. */
.js #ez-toc-container:not(:has(.ez-toc-toggle, .ez-toc-js-icon-con, input[type="checkbox"])) > nav {
    display: none;
}

#ez-toc-container .ez-toc-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0 !important;
}

#ez-toc-container .ez-toc-title-container[role="button"] {
    cursor: pointer;
    user-select: none;
}

#ez-toc-container .ez-toc-title-container[role="button"]:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 4px;
    border-radius: 4px;
}

#ez-toc-container .ez-toc-title-container[role="button"]::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-inline-start: auto;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: translateY(2px) rotate(225deg);
    transition: transform .2s ease;
}

#ez-toc-container.is-collapsed .ez-toc-title-container::after {
    transform: translateY(-2px) rotate(45deg);
}

#ez-toc-container .ez-toc-title-toggle:empty {
    display: none;
}

div#ez-toc-container .ez-toc-title {
    font-weight: 700 !important;
    margin: 0;
}

#ez-toc-container nav {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    display: grid;
    grid-template-rows: 1fr;
    border-top: 1px solid rgba(0, 0, 0, .06);
    transition: grid-template-rows .3s ease, border-color .3s ease;
}

#ez-toc-container nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#ez-toc-container nav ul ul {
    margin: 8px 0 0;
}

#ez-toc-container nav li {
    position: relative;
    margin: 0 0 8px;
    padding-right: 16px;
    text-align: start;
}

#ez-toc-container nav li:last-child {
    margin-bottom: 0;
}

#ez-toc-container nav li,
#ez-toc-container nav li a {
    line-height: 1.8;
}

#ez-toc-container nav li a {
    display: block;
}

/* The bullet: a filled square for a main heading, an outlined one below it. */
#ez-toc-container nav li::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 0;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--primary-accent);
}

#ez-toc-container nav ul ul li::before {
    box-sizing: border-box;
    background: transparent;
    border: 1.5px solid var(--primary-accent);
}

#ez-toc-container nav ul ul li a {
    font-weight: 400;
}

.ez-toc-link:hover {
    text-decoration: none !important;
    /*color: var(--primary-hover-color) !important;*/
}

#ez-toc-container a:visited {
    color: #111;
}

/* Archive & search */

.page-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 36px;
    margin-bottom: 0;
    width: 100%;
    text-align: center;
    color: #111;
}

.archive-description p {
    margin-bottom: 0;
}

.breadcrumb {
    flex-wrap: nowrap;
}

.breadcrumb-item {
    white-space: nowrap;
}

.breadcrumb-item:not(.active) {
    flex-shrink: 0;
}

.breadcrumb-item.active {
    /*overflow: hidden;*/
    /*text-overflow: ellipsis;*/
    min-width: 0;
}

.breadcrumb-box > nav {
    overflow: auto;
}

.breadcrumb-box > nav::-webkit-scrollbar {
    display: none;
}
.breadcrumb-box > nav {
    scrollbar-width: none;
}

.author-box {
    background-color: var(--primary-hover-color);
    padding: 16px 16px 24px 16px;
    border-radius: 16px;
    margin-bottom: 32px;
    margin-top: 48px;
}

.author-box .author-details {}

.author-box .author-label {
    font-size: 12px;
    font-weight: 300;
}

.author-box .name {
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
}

.author-box .bio {

}

.author-box .author-avatar {
    padding-top: 8px;
    margin-left: 16px;
}

.author-box .author-avatar > img {
    height: auto;
    display: block;
    width: 128px;
    border-radius: 100%;
}

.header-ads-banner picture {
    display: block;
}

/* width/height attributes reserve the space; height:auto keeps the aspect ratio. */
.header-ads-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* widget silver price */

.silver-widget {
    direction: rtl;
    background-color: var(--primary-hover-color);
    /*border: 1px solid var(--primary-hover-color);*/
    border-radius: 12px;
}

.silver-widget .live-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.silver-widget .change-badge {
    background-color: #fff0f0;
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: bold;
}

.silver-widget .change-badge.positive {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

.silver-widget .currency {
    font-size: 17px;
    color: #222 !important;
    font-weight: 700;
}

#slv-price {
    font-size: 1.8rem;
    color: #222 !important;
}

.silver-widget .text-secondary {

}

#slv-datetime {
    font-size: 12px;
    color: #6c757d;
}

.silver-widget .buy-btn {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.silver-widget .buy-btn:hover {
    background-color: #111111;
    color: var(--primary-hover-color);
}

.top-1 {
    top: -4px;
}

*::selection {
    color: #000;
    background-color: var(--primary-hover-color);
}

.custom-pagination .page-link {
    color: #555;
    font-size: 14px;
    line-height: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #00000021 !important;
}

.custom-pagination .active > .page-link, .page-link.active {
    z-index: 3;
    /* Bootstrap's active colour is white, unreadable on the pale tint. */
    color: var(--primary-hover-text-color);
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
}

div#ez-toc-container ul li a {
    border-bottom: none !important;
}

.custom-box {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #333;
    background: #edf6ff;
}

.custom-box.box-info {
    background: #edfffb;
}

.custom-box.box-note {
    background: #edf6ff;
}
.custom-box.box-warning {
    background: #fff7ed;
}

.custom-box.text-justify,
.custom-box.text-justify p { text-align: justify; }
.custom-box.text-right,
.custom-box.text-right p   { text-align: right; }
.custom-box.text-left,
.custom-box.text-left p    { text-align: left; }
.custom-box.text-center,
.custom-box.text-center p  { text-align: center; }

.archive.author *::selection {
    background-color: #e2c0b8;
}

.archive.author .author-box {
    position: relative;
}

.archive.author .author-box .author-avatar {
    padding-top: 0;
}
/* Collapsed to three whole lines; scripts.js adds .is-clamped only when the
   text is actually cut, and reveals the read-more button. */
.archive.author .author-box .bio {
    font-size: 14px;
    line-height: 24px;
    max-height: 72px;
    overflow: hidden;
    margin: 0;
    position: relative;
}

.archive.author .author-box .bio.active {
    max-height: none;
}

.archive.author .author-box .bio.is-clamped:not(.active)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 24px;
    background: linear-gradient(to bottom, transparent, var(--primary-hover-color));
    pointer-events: none;
}

.archive.author .author-box .read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.archive.author .author-box .read-more i {
    font-size: 16px;
    transition: transform 0.2s ease-in-out;
}

.archive.author .author-box .read-more.active i {
    transform: rotate(180deg);
}

.archive.author .author-box .author-avatar > img {
    width: 88px;
    max-width: 88px;
    margin-top: 8px;
}

/* Side by side with the bio (d-md-flex): center the avatar vertically. */
@media (min-width: 768px) {
    .archive.author .author-box .author-avatar {
        align-self: center;
    }

    .archive.author .author-box .author-avatar > img {
        margin-top: 0;
    }
}

.author-top-box {
    padding: 8px 12px 8px 12px;
    border-left: #eeeeee 1px solid;
}

.author-top-box:last-child {
    border-left: none;
}

.author-top-box  a,
.author-top-box  p {
    color: #555;
    font-size: 13px;
    line-height: 24px;
}

.author-top-box  .author-avatar {
    margin-left: 8px;
}

.author-top-box  .author-avatar img{
    width: 48px;
    height: 48px;
    border-radius: 100%;
}

.thick-badge {
    width: 24px;
    height: 24px;
}

.masoud-karimkhani-avatar {
    min-width: 88px;
}

.icon.linkedin {
    background: url(../img/social-icon-4.svg)  no-repeat center center;
    background-size: contain;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 4px;
}

.education-box {
    padding: 24px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    font-size: 14px;
}

.education-box .title {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    margin-bottom: 8px;
    color: #333;
}

.education-box ul {
    list-style: disc;
    padding-right: 24px;
}

.education-box ul > li {
    font-size: 14px;
    line-height: 24px;
    margin-bottom: 4px;
}

.bio.extra-bio {
    font-size: 14px;
    color: #333;
    line-height: 24px;
    text-align: justify;
    padding: 0 0 0 8px;
}

.author-box-masoud-karimkhani{
    border-radius: 48px 16px !important;
}

.meschi-popup .auto-close-btn {
    top: 16px;
    left: 16px;
    display: block;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    border-radius: 100%;
    color: #000;
    border: none;
    text-align: center;

}

.meschi-popup.auto-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.meschi-popup .auto-modal-box {
    background: #fff;
    border-radius: 24px;
    max-width: 650px;
    width: 92%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: all 0.4s ease;
    position: relative;
}

.meschi-popup .popup-banner {
    border-radius: 16px;
}

.published-time-box p{
    color: #555;
}

.published-time-box i {
    font-size: 20px;
    margin-left: 4px;
    color: #555;
}

/* ==========================================================================
   Article body — cap excessive font weight
   Text manually bolded in the editor, or pasted from Word / Google Docs,
   carries inline font-weight (800 / 900 / bolder) and foreign font-families
   that the browser faux-bolds. This renders certain headings, bold runs and
   table cells far heavier than the theme hierarchy (which tops out at 700),
   breaking the visual harmony. The rules below force the theme font and cap
   the weight so bold text stays bold without becoming excessively thick.
   ========================================================================== */

/* Neutralise foreign fonts from pasted content — fallback fonts the browser
   can't load are faux-bolded and look much heavier than IranYekan. */
.content-box .inner-box .content [style],
.content-box .inner-box .content font {
    font-family: IranYekan, sans-serif !important;
}

/* Cap the heaviest inline weights down to the theme maximum (700).
   Only heavy values are targeted, so normal / lighter text is left untouched. */
.content-box .inner-box .content [style*="font-weight: 800"],
.content-box .inner-box .content [style*="font-weight:800"],
.content-box .inner-box .content [style*="font-weight: 900"],
.content-box .inner-box .content [style*="font-weight:900"],
.content-box .inner-box .content [style*="font-weight: bolder"],
.content-box .inner-box .content [style*="font-weight:bolder"] {
    font-weight: 700 !important;
}

/* =========================================
   15. Error 404
   ========================================= */
.error-404-hero {
    position: relative;
    overflow: hidden;
    background: var(--content-box-bg);
    border-radius: 40px;
    padding: 56px 40px 48px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* دو لکه مسی، هم‌خانواده با شکل‌های هیرو صفحه اصلی */
.error-404-hero::before,
.error-404-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.error-404-hero::before {
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: var(--hero-bg);
}

.error-404-hero::after {
    bottom: -140px;
    left: -110px;
    width: 280px;
    height: 280px;
    background: rgba(182, 98, 78, 0.12);
}

.error-404-inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
}

.error-404-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: ltr;
    font-size: 96px;
    line-height: 1;
    font-weight: 800;
    color: #111;
    margin-bottom: 24px;
}

/* صفرِ ۴۰۴ به شکل سکه مسی */
.error-404-code .coin {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d7a99e 0%, var(--primary-color) 45%, #924e3e 100%);
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.45),
                0 10px 24px rgba(146, 78, 62, 0.28);
}

.error-404-title {
    margin-bottom: 12px;
}

.error-404-text {
    font-size: 14px;
    line-height: 28px;
    color: #4a5568;
    margin-bottom: 32px;
}

.error-404-search {
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 32px;
}

.error-404-search button {
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
    color: #a0aec0;
    cursor: pointer;
}

.error-404-search button:hover {
    color: var(--primary-accent);
}

.error-404-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* btn-more در بخش‌های دیگر فاصله بالای زیادی دارد؛ اینجا کنار دکمه دوم می‌نشیند */
.error-404-actions .btn-more {
    margin: 0;
}

.btn-outline {
    display: inline-block;
    padding: 12px 24px;
    text-align: center;
    background: #fff;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-weight: 700;
    font-size: 13px;
}

.btn-outline:hover {
    background: var(--primary-hover-color);
    border-color: var(--primary-color);
    color: var(--primary-hover-text-color);
}

.error-404-cats {
    margin: 56px 0;
}

/* =========================================
   16. Empty state (content-none)
   ========================================= */
/* داخل .post-grid رندر می‌شود؛ همه ستون‌ها را می‌گیرد */
.empty-state {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    background: var(--content-box-bg);
    border-radius: 40px;
    padding: 48px 40px 40px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* همان لکه‌های مسی کارت ۴۰۴ */
.empty-state::before,
.empty-state::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.empty-state::before {
    top: -120px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: var(--hero-bg);
}

.empty-state::after {
    bottom: -140px;
    left: -110px;
    width: 260px;
    height: 260px;
    background: rgba(182, 98, 78, 0.12);
}

.empty-state-inner {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: 0 auto;
}

/* دو برگه خالی روی هم و ذره‌بین مسی */
.empty-state-icon {
    position: relative;
    width: 112px;
    height: 104px;
    margin: 0 auto 24px;
}

.empty-state-sheet {
    position: absolute;
    top: 6px;
    left: 18px;
    width: 64px;
    height: 80px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eee3df;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    transform: rotate(-8deg);
}

.empty-state-sheet + .empty-state-sheet {
    left: 30px;
    transform: rotate(4deg);
    background: repeating-linear-gradient(
            to bottom,
            transparent 0 18px,
            #f3e9e6 18px 22px
    ) 12px 6px / calc(100% - 24px) 54px no-repeat, #fff;
}

.empty-state-lens {
    position: absolute;
    right: 4px;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d7a99e 0%, var(--primary-color) 45%, #924e3e 100%);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.4),
                0 8px 18px rgba(146, 78, 62, 0.28);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.empty-state-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 34px;
    color: #111;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 14px;
    line-height: 28px;
    color: #4a5568;
    margin-bottom: 28px;
}

.empty-state-search {
    max-width: 440px;
    margin: 0 auto 28px;
    background-color: #f4f7f9;
    transition: border-color .15s ease, background-color .15s ease;
}

.empty-state-search:focus-within {
    border-color: var(--primary-color);
    background-color: #fff;
}

.empty-state-search input {
    min-width: 0;
}

.empty-state-search button {
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
    color: #a0aec0;
    cursor: pointer;
}

.empty-state-search button:hover {
    color: var(--primary-accent);
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-state-actions .btn-more {
    margin: 0;
}

.empty-state-cats {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed #eadbd6;
}

.empty-state-cats-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-hover-text-color);
    margin-bottom: 12px;
}

.empty-state-cats-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.empty-state-cats-list .tag-item {
    background: var(--body-bg);
    border: 1px solid #f0e6e3;
    font-size: 14px;
}

.empty-state-cats-list .tag-item:hover {
    background: var(--primary-hover-color);
    border-color: var(--primary-color);
}
/* ==========================================================================
   Search — the header icon and its modal
   The icon sits in .header-actions on desktop and next to the menu button on
   mobile, where .header-actions is tucked inside the offcanvas drawer.
   ========================================================================== */

.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #eee;
    border-radius: 50%;
    background-color: #fff;
    color: #111;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-search:hover,
.btn-search:focus-visible {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--primary-text-color);
}

.btn-search .is-search {
    transform: translateY(2px);
}

.header-mobile-actions {
    gap: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.search-modal .modal-header {
    border-bottom: 1px solid #f1f1f1;
    padding: 16px 20px;
}

.search-modal .modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.search-modal .modal-body {
    padding: 20px;
}

.search-modal-field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background-color: #fafafa;
    padding: 6px 14px;
    transition: border-color .15s ease, background-color .15s ease;
}

.search-modal-field:focus-within {
    border-color: var(--primary-color);
    background-color: #fff;
}

.search-modal-field > .is-search {
    flex: none;
    color: #9a9a9a;
    font-size: 20px;
    line-height: 1;
}

.search-modal-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 0;
    color: #111;
    font: inherit;
}

.search-modal-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.search-modal-submit {
    flex: none;
    border: none;
    border-radius: 24px;
    background-color: var(--primary-color);
    padding: 9px 22px;
    color: var(--primary-text-color);
    font-weight: 700;
    cursor: pointer;
}

.search-modal-submit:hover {
    background-color: #a45846;
}

@media (max-width: 575.98px) {
    .search-modal-field {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .search-modal-submit {
        width: 100%;
    }
}
