@charset "UTF-8";

@import '../fonts/all.css';
@import './theme.css';
@import './dependencies/swiper.min.css';
@import './dependencies/duDialog.min.css';
@import './ui.css';

* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) var(--border-color);
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    min-height: 100vh;
}

a {text-decoration: none;}
textarea {resize: vertical}
select {
    color: var(--text-primary);
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
}
figcaption {
    padding: 12px;
    font-size: 13px;
    color: var(--silent-color);
}

/* هدر */
header {
    background-color: var(--header-bg);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--accent-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--text-primary);
    z-index: 1002;
}
.logo i {
    color: var(--accent-gold);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1002;
}
.icon-btn {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: none;
    border: none;
    transition: 0.2s;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover {
    color: var(--accent-gold);
}
.icon-btn i.fa-moon,
.icon-btn i.fa-sun {
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.search-box {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    padding: 6px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    margin: 0 10px;
    width: 140px;
}
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #000000d4;
    padding: 1rem;
    display: none;
}
.search-overlay #close-search-overlay {
    font-size: 1.5rem;
    color: red;
    cursor: pointer;
}
.search-overlay form {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}
.search-overlay input {
    height: 60px;
    font-size: 1.2rem;
}
.search-overlay button {
    width: 70px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--accent-gold);
    color: black;
    border-radius: 5px;
    font-size: 1.3rem;
}

/* منوی دسکتاپ */
.nav-desktop {
    display: flex;
    align-items: center;
}
.menu-tree {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu-tree > li {
    position: relative;
}
.menu-tree > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease;
    text-decoration: none;
}
.menu-tree > li > a:hover,
.menu-tree > li.active > a {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
}
.menu-tree > li > a > i:first-child {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}
.dropdown-arrow {
    font-size: 0.7rem;
    margin-right: -0.2rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}
.menu-tree > li:hover > a .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}
.menu-tree > li.has-dropdown:hover > .dropdown-menu,
.menu-tree > li.has-dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dropdown-menu > li {
    margin: 0.15rem 0;
}
.dropdown-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li.active > a {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    padding-right: 1.2rem;
}
.dropdown-menu > li > a > i {
    width: 18px;
    text-align: center;
    color: var(--accent-gold);
    font-size: 0.85rem;
}
.menu-tree > li.has-dropdown::before {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 0.5rem;
    background: transparent;
}

/* منوی موبایل */
.hamburger-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    z-index: 2000;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mobile-menu-overlay.active {
    left: 0;
}
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}
.mobile-menu-header span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.close-mobile-menu {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--accent-gold);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.close-mobile-menu:hover {
    background: var(--accent-gold);
    color: #000;
}
.mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.mobile-menu-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-menu-tree > li {
    margin-bottom: 0.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.mobile-menu-tree > li.active {
    border-color: rgba(212, 175, 55, 0.3);
}
.mobile-menu-item {
    display: flex;
    align-items: center;
}
.mobile-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-link > i:first-child {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    color: var(--accent-gold);
    font-size: 0.8rem;
}
.mobile-link > span {
    flex: 1;
}
.mobile-menu-tree > li.active > .mobile-menu-item .mobile-link > i:first-child {
    background: var(--accent-gold);
    color: #000;
}
.mobile-submenu-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    flex: 1 0 auto;
    min-width: 60px;
    padding: 15px;
    text-align: right;
}
.mobile-submenu-toggle i {
    transform: rotate(-90deg);
}
.mobile-submenu-toggle.active i {
    transform: rotate(-180deg);
}
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-submenu.open {
    max-height: 500px;
}
.mobile-submenu > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.mobile-submenu > li:last-child {
    border-bottom: none;
}
.mobile-submenu > li > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-submenu > li > a > i {
    font-size: 0.6rem;
    color: var(--accent-gold);
    opacity: 0.7;
}
.mobile-submenu > li > a:hover,
.mobile-submenu > li.active > a {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
    padding-right: 1.25rem;
}
.mobile-submenu > li.active > a > i {
    opacity: 1;
}
body.light-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
body.light-mode .mobile-menu-tree > li {
    background: #f8f8f8;
}
body.light-mode .mobile-submenu {
    background: rgba(0, 0, 0, 0.03);
}
[dir=rtl] .dropdown-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}
[dir=rtl] .dropdown-menu > li > a:hover {
    padding-right: 0.9rem;
    padding-left: 1.2rem;
}
[dir=rtl] .mobile-menu-overlay {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--border-color);
}
[dir=rtl] .mobile-menu-overlay.active {
    right: 0;
}
[dir=rtl] .mobile-submenu > li > a {
    padding-right: 2.5rem;
    padding-left: 1rem;
}
[dir=rtl] .mobile-submenu > li > a:hover {
    padding-left: 1.25rem;
    padding-right: 2.5rem;
}
[dir=rtl] .dropdown-arrow {
    margin-right: 0;
    margin-left: -0.2rem;
}
[dir=rtl] .mobile-submenu-toggle {
    text-align: left;
}
[dir=rtl] .mobile-submenu-toggle i {
    transform: rotate(90deg);
}
[dir=rtl] .mobile-submenu-toggle.active i {
    transform: rotate(180deg);
}

/* انتخاب زبان */
.lang-container {
    position: relative;
}
.lang-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.lang-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}
.lang-dropdown-menu {
    position: absolute;
    top: 130%;
    right: 0;
    background-color: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 140px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1005;
}
[dir="rtl"] .lang-dropdown-menu {
    right: auto;
    left: 0;
}
.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.lang-option:hover {
    background-color: var(--dropdown-hover);
    color: var(--accent-gold);
}

/* --- آمار فلزات --- */
.metal-bar {
    background-color: var(--bg-sidebar);
    padding: 12px 0;  /* padding افقی حذف شد */
    display: flex;
    gap: 30px;
    overflow: hidden;  /* مخفی کردن اسکرول‌بار */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: relative;
    width: 100%;
}
.metal-bar-track {
    display: flex;
    gap: 30px;
    animation: scroll-infinite 30s linear infinite;
    padding: 0 2rem;  /* padding به داخل منتقل شد */
}
.metal-bar:hover .metal-bar-track {
    animation-play-state: paused;
}
.metal-bar-track:hover {
    animation-play-state: paused;
}
.metal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex-shrink: 0;  /* جلوگیری از فشرده شدن */
    cursor: pointer;
    transition: opacity 0.2s;
}
.metal-item:hover {
    opacity: 0.8;
}
.metal-tag {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    color: #000;
    font-size: 0.8rem;
}
.metal-gold { background: #d4af37; }
.metal-silver { background: #c0c0c0; }
.metal-platinum { background: whitesmoke; color: #333; }
.metal-palladium { background: #b5b5b5; color: #333; }
.metal-default { background: silver; }
.trend-up { color: var(--color-green); }
.trend-down { color: var(--color-red); }

/* لایه اصلی */
.container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 25px;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}
.container main.fullscreen {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0; left: 0;
    z-index: 999999;
    padding: 1rem;
    background: var(--bg-body);
    overflow: auto;
}
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 1rem;
}
.tabs-left {
    display: flex;
    gap: 5px;
    flex-shrink: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tabs-right {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    padding: 0 10px 10px;
    flex-shrink: 0;
    font-size: 1.5rem;
    flex-wrap: wrap;
    justify-content: end;
    max-width: 40%;
}
.tabs-right i {
    cursor: pointer;
    transition: 0.3s;
}
.tabs-right i:hover {
    color: var(--accent-gold);
}
.tab-btn {
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    white-space: nowrap;
}
.tab-btn.active {
    background: var(--accent-gold);
    color: #000;
}
.tab-content {
    background: var(--bg-card);
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: auto;
}
[dir="rtl"] .tab-content {
    text-align: right;
}

/* ------- جدول آیتم ها ------- */
.grid-row-layout {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 10px;
}
.list-header {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: bold;
}
.stock-row {
    font-size: 0.9rem;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: 0.2s;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.stock-row:last-child {
    border-bottom: unset;
}
.stock-row:hover {
    background-color: var(--bg-body);
    border-radius: 0.6rem;
}
body.light-mode .stock-row:hover {
    background-color: #f5f5f5;
}
.stock-text h4 {
    color: var(--text-dark-on-light);
    font-weight: 700;
    width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-text:hover h4 {
    width: auto;
}
.stock-text span {
    font-size: 0.8rem;
    color: var(--text-secondary)
}
.price-info {
    color: var(--text-dark-on-light);
    font-weight: 700;

    span {
        font-size:0.75rem;
    }
}
.stock-save {
    font-family: 'Font Awesome 6 Pro';
    font-size: 1.2rem;
    font-style: normal;

    &::before {
        content: '\f004';
    }
    &.saved::before {
        content: '\f004';
        font-weight: bold;
        color: var(--color-red);
    }
}
.stock-symbol {
    display: flex;
    gap: 10px;
    align-items: center;
}
.stock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
}
[dir="rtl"] .price-info {
    text-align: left;
}
.table-bottom-actions {
    width: 100%;
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;

    &.show {
        display: flex;
    }
    select {
        width: 10rem;
        height: 2.5rem;
        padding: 0 0.5rem;
        cursor: pointer;
    }
}

/* ---------- صفحه بندی ---------- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}
.pagination {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    font-size: 0.9rem;
}
.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: 0.25s;
    user-select: none;
    cursor: pointer;
}
.pagination a {
    text-decoration: none;
    background: transparent;
}
.pagination a:hover {
    background: var(--accent-gold);
    color: #000;
}
.pagination .active {
    background: var(--accent-gold);
    color: #000;
    font-weight: 700;
    cursor: default;
}
.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}
.pagination .arrow {
    font-size: 1.1rem;
}

/* سایدبار */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.widget-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    color: var(--text-primary);
}
.gauge-status {
    background: var(--color-green);
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* ویجت ترس و طمع */
.fear-greed-widget {
    position: relative;
    text-align: center;
}
.fg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.fg-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}
.fg-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.chart-container {
    position: relative;
    width: 100%;
    height: 230px !important;
    margin: 0 auto;
}
.fg-overlay {
    width: 100%;
    position: absolute;
    text-align: center;
    margin: auto;
    bottom: 2rem;
}
.fg-value-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    position: relative;
    bottom: 0.5rem;
}
.fg-status-text {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-secondary);
    position: relative;
    top: 2.5rem;
}

/* رنگ‌بندی داینامیک متن وضعیت */
.status-extreme-fear { color: var(--color-red); }
.status-fear { color: #ff9800; }
.status-neutral { color: var(--text-secondary); }
.status-greed { color: var(--accent-gold); }
.status-extreme-greed { color: var(--color-green); }

/* ------- شروع صفحه اخبار ------- */
.container-news {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 25px;
    padding: 30px 1rem;
    max-width: 1400px;
    margin: 0 auto;
}
.news-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* اسلایدر hero*/
.hero-news {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}
.hero-slider {
    position: relative;
    height: 400px;
}
.hero-slide {
    position: relative;
    inset: 0;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-caption {
    position: absolute;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    color: #fff;
    padding: 30px;
    width: 100%;
    bottom: 0;
    height: auto;
}
.hero-caption .cat-tag {
    display: inline-block;
    background: var(--accent-gold);
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.hero-caption h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: white;
}
.hero-caption .meta {
    font-size: .8rem;
    color: #ccc;
    display: flex;
    gap: 0.5rem;
}
.hero-dots {
    position: absolute;
    bottom: 30px;
    gap: 8px;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}
.swiper-pagination {
    gap: 0 !important;
}
.swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .5) !important;
    cursor: pointer !important;
    transition: .3s !important;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: var(--accent-gold) !important;
}

/* فید اخبار  */
.news-feed h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--text-primary);
}
#news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.news-card {
    height: 225px;
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: .3s;
}
.news-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, .15);
}
.news-card img {
    width: 320px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}
.news-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-card-body h3 {
    font-size: 1.1rem;
    margin: 8px 0;
    color: var(--text-dark-on-light);
}
.news-card-body p {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.cat-tag {
    align-self: flex-start;
    background: var(--accent-gold);
    color: #000;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: .7rem;
    font-weight: 700;
}
.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .75rem;
    color: var(--text-secondary);
    margin-top: 10px;
}
.news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.news-meta .generator {
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: wrap;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    white-space: normal;
}
.load-more-btn {
    margin: 30px auto 0;
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: .3s;
}
.load-more-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

/* سایدبار */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.ad-widget .ad-banner {
    width: 100%;
    max-width: 100%;
    height: 250px;
}
.top-news {
    list-style: none;
}
.top-news li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.top-news a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: .9rem;
    flex: 1;
}
.top-news small {
    color: var(--text-secondary);
    font-size: .75rem;
}
.live-feed .live-item {
    border-left: 3px solid var(--color-green);
    padding-left: 10px;
    margin-bottom: 15px;
}
.live-feed p {
    font-size: .85rem;
    margin-bottom: 4px;
}
.live-feed small {
    font-size: .7rem;
    color: var(--text-secondary);
}
/* ------- پایان صفحه اخبار ------- */

/* ------- شروع صفحه تماس باما ------- */
.contact-wrapper {
    padding: 40px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 35px;
}
.contact-info-box {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}
.contact-info-box h2,
.contact-info-box h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.info-item i {
    font-size: 1.2rem;
    color: var(--accent-gold);
    width: 24px;
    text-align: center;
}
.info-item span {
    font-size: .8rem;
    color: var(--text-secondary);
}
.info-item strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
}
.social-bar {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}
.social-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--accent-gold);
    color: #000;
    border-radius: 50%;
    font-size: 1.1rem;
    transition: .3s;
}
.social-bar a:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
}
.social-bar img {
    width: 20px;
    height: 20px;
}

/* ------- فرم ------- */
.contact-form-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}
.contact-form-box h2 {
    margin-bottom: 25px;
    font-size: 1.4rem;
    color: var(--text-dark-on-light);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.input-group label {
    margin-bottom: 6px;
    font-size: .9rem;
    color: var(--text-secondary);
}
.input-group input,
.input-group textarea {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
    transition: .3s;
}
.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent-gold);
}
.g-recaptcha {
    margin-top: 8px;
}
.submit-btn {
    background: var(--accent-gold);
    color: #000;
    font-size: var(--text-sm);
    font-weight: 700;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: .3s;
}
.submit-btn:hover {
    background: var(--accent-gold-hover);
}

/* ---------- صفحه نوشته ---------- */
.single-post-container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 25px;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}
.post-content-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.post-cover {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}
.post-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid var(--border-color);
}
.post-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark-on-light);
    line-height: 1.4;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.post-meta-item i {
    color: var(--accent-gold);
}
.post-excerpt {
    padding: 10px 30px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border: 2px solid var(--accent-gold);
    border-top: 0;
    background: var(--bg-body);
    margin: 0 30px;
    border-radius: 0 0 8px 8px;
}
.post-body {
    padding: 30px;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-primary);
}
.post-body h2, .post-body h3, .post-body h4 {
    margin: 1.5rem 0 1rem;
    color: var(--text-dark-on-light);
}
.post-body p {
    margin-bottom: 1rem;
}
.post-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}
.comments-section {
    padding: 30px;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
.comment-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.comment-author {
    font-weight: 700;
    color: var(--text-dark-on-light);
}
.comment-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.comment-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}
.comment-reply-btn {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
}
.comment-reply {
    margin-right: 60px;
    margin-top: 15px;
}
.comment-form {
    margin-top: 30px;
}
.comment-form textarea {
    width: 100%;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-family);
}
.comment-form-actions {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}
.comment-form .submit-btn {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.comment-form .submit-btn:hover {
    background: var(--accent-gold-hover);
}
.comment-form #cancel-reply-comment {
    display: none;
    background: var(--secondary-color);
}
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.widget-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    color: var(--text-primary);
}
.widget-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}
.widget-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.widget-card li:last-child {
    border-bottom: none;
}
.widget-card a {
    color: var(--text-primary);
    text-decoration: none;
    transition: 0.2s;
}
.widget-card a:hover {
    color: var(--accent-gold);
}
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}
.post-nav-item {
    flex: 1;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.post-nav-item:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.post-nav-item.prev {
    text-align: right;
}
.post-nav-item.next {
    text-align: left;
}
.post-nav-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.post-nav-item strong {
    height: 60%;
    display: block;
    margin-top: 4px;
    font-size: 0.95rem;
}
.single-post-container .taginput-wrap {
    background: unset !important;
    border:none;padding:0;min-height:auto;
}

/* ---------- صفحه 404 ---------- */
.error-404-box {
    text-align: center;
    padding: 2.5rem 2rem;
    max-width: 520px;
    width: 90%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    position: relative;
    margin: 2rem auto;
    left: 0; right: 0;
}
.error-404-icon {
    font-size: 7rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    line-height: 1;
}
.error-404-title {
    font-size: 2rem;
    margin-bottom: .75rem;
    color: var(--text-dark-on-light);
}
.error-404-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}
.error-404-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--accent-gold);
    color: #000;
    padding: .6rem 1.6rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s;
}
.error-404-btn:hover {
    background: var(--accent-gold-hover);
}
.error-404-icon {
    animation: float 3s ease-in-out infinite;
}

/* فوتر */
.main-footer {
    background-color: var(--bg-footer);
    color: var(--text-footer-head);
    padding: 50px 2rem 20px;
    margin-top: auto;
    border-top: 4px solid var(--accent-gold);
}
.footer-content {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin: 0 auto 40px;
}
.footer-col h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
.footer-col p {
    color: var(--text-footer-body);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-sidebar);
    color: var(--text-primary);
    outline: none;
}
.newsletter-form button {
    background-color: var(--accent-gold);
    color: #000;
    font-weight: bold;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.social-links i {
    font-size: 1.2rem;
    color: var(--text-footer-body);
    cursor: pointer;
    transition: 0.3s;
}
.social-links img {
    width: 20px;
    height: 20px;
}
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border-footer);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-footer-body);
}
.footer-links a {
    color: var(--text-footer-body);
    text-decoration: none;
    margin-left: 15px;
}
[dir="rtl"] .footer-links a {
    margin-left: 0;
    margin-right: 15px;
}
.footer-about-us {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* مدال مرکز ثابت */
.filter-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}
.filter-box {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    border-radius: 0.6rem;
}
.filter-box-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    height: 50px;
    z-index: 1;
    padding: 1rem;
    border-radius: inherit;
}
.close-modal {
    color: var(--accent-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: .25s;
}
.close-modal:hover {
    opacity: .7;
}

/*  ردیف فیلتر */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    padding: 0.5rem 1rem;
}
.filter-row input,
.filter-row select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: .9rem;
    flex: 1 1 0;
    min-width: 0;
}

/* select سفارشی */
.custom-select {
    position: relative;
    flex: 1 1 0;
}
.custom-select select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* دکمه‌های +/- */
.btn-icon {
    background: var(--accent-gold);
    color: #000;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: .25s;
}
.btn-icon:hover {
    background: #b59020;
}

/* actions */
.filter-actions {
    width: 100%;
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
    padding: 1rem;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}
.filter-actions button {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}
.filter-actions button#resetFilters {
    background: var(--secondary);
}

.dominance-widget {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.dominance-widget h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}
.dominance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.dominance-widget .stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.dominance-widget .legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* نقطه‌های رنگی */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot.btc { background-color:  #f7931a; }
.dot.eth { background-color: #4c6ef5; }
.dot.others { background-color: var(--text-secondary); }

/* مقدار درصد بزرگ */
.dominance-widget .value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    font-family: sans-serif; /* برای نمایش بهتر اعداد انگلیسی */
}

/* نوار پیشرفت (Progress Bar) */
.dominance-progress-container {
    height: 8px;
    width: 100%;
    /* استفاده از رنگ بوردر برای پس‌زمینه نوار خالی */
    background-color: var(--border-color);
    border-radius: 4px;
    display: flex;
    overflow: hidden; /* برای گرد شدن گوشه‌های نوارهای داخلی */
}
.progress-bar-segment {
    height: 100%;
    transition: width 0.5s ease-in-out;
}

/* رنگ‌بندی سگمنت‌های نوار */
.progress-bar-segment.btc { background-color: #f7931a; }
.progress-bar-segment.eth { background-color: #4c6ef5; }
.progress-bar-segment.others { background-color: var(--text-secondary); }

/* بخش تغییرات (آیکون و درصد کوچک) */
.trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: sans-serif;
}
/* استفاده از رنگ‌های سبز و قرمز موجود در سیستم */
.trend.up { color: var(--color-green); }
.trend.down { color: var(--color-red); }

.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}
.form-group .form-input {
     width: 100%;
     border: 1px solid var(--border-color);
     border-radius: 6px;
     color: var(--text-light-on-dark);
     font-size: 0.85rem;
     transition: all 0.2s;
 }
.form-group .form-input.with-icon {
    padding: 12px 15px 12px 45px;
}
html[dir=rtl] .form-group .form-input.with-icon {
    padding: 12px 45px 12px 15px;
}
.form-group .form-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}
.form-group .form-input:focus + i {
    color: var(--accent-gold);
}
.input-wrapper {
    position: relative;
}
.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: 0.3s;
}
[dir=rtl] .input-wrapper i {
    left: auto;
    right: 15px;
}
.input-wrapper i.secondary-icon {
    right: 1rem;
    left: unset;
}
html[dir=rtl] .input-wrapper i.secondary-icon {
    left: 1rem;
    right: unset;
}
.captcha-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;

    .input-wrapper {
        width: 100%;
    }
}

/* آکاردئون دسته‌بندی */
.category-accordion ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-accordion ul ul {
    padding-right: 15px;
    border-right: 1px solid var(--border-color);
    margin-right: 10px;
}
[dir="ltr"] .category-accordion ul ul {
    padding-right: 0;
    padding-left: 15px;
    border-right: none;
    border-left: 1px solid var(--border-color);
    margin-right: 0;
    margin-left: 10px;
}
.category-accordion li {
    margin-bottom: 5px;
}
.widget-card .category-accordion li {
    padding: unset !important;
}
.category-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    transition: 0.3s;
}
.category-accordion summary::-webkit-details-marker {
    display: none;
}
.category-accordion a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 8px 0;
    flex-grow: 0;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.category-accordion .leaf-link {
    display: block;
    padding: 8px 0;
}
.category-accordion li.active *,
.category-accordion a:hover {
    color: var(--accent-gold);
    padding-right: 5px;
}
.category-accordion .count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}
.category-accordion .arrow {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    margin: 0 5px;
}
.category-accordion details[open] > summary .arrow {
    transform: rotate(180deg);
    color: var(--accent-gold);
}
.category-accordion details[open] > ul {
    animation: slideDown 0.3s ease-in-out;
}

/* ---------- اطلاعیه وبسایت ---------- */
.announcement-bar {
    width: 100%;
    padding: 12px 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}
.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    text-align: center;
}
.announcement-text {
    line-height: 1.5;
}
.announcement-link {
    padding: 4px 14px;
    border: 1px solid;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.announcement-link:hover {
    opacity: 0.8;
}
.announcement-close {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.announcement-close:hover {
    opacity: 1;
}
[dir="rtl"] .announcement-close {
    right: auto;
    left: 2rem;
}
.announcement-bar.hidden {
    display: none;
}

/* ---------- پاپ‌آپ‌ها ---------- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}
.popup-overlay.active {
    display: flex;
    opacity: 1;
}
.popup-overlay.position-center { align-items: center; justify-content: center; }
.popup-overlay.position-top-left { align-items: flex-start; justify-content: flex-start; }
.popup-overlay.position-top-right { align-items: flex-start; justify-content: flex-end; }
.popup-overlay.position-bottom-left { align-items: flex-end; justify-content: flex-start; }
.popup-overlay.position-bottom-right { align-items: flex-end; justify-content: flex-end; }
.popup-overlay.position-top-bar,
.popup-overlay.position-bottom-bar {
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
}
.popup-overlay.position-top-bar { align-items: flex-start; }
.popup-overlay.position-bottom-bar { align-items: flex-end; }
.popup-container {
    position: relative;
    background: var(--popup-bg, var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    color: var(--popup-text, var(--text-primary));
}
.popup-overlay.active .popup-container {
    transform: scale(1);
}
.popup-container.size-small { width: 300px; }
.popup-container.size-medium { width: 500px; }
.popup-container.size-large { width: 700px; }
.popup-container.size-full {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
}
.popup-overlay.position-top-bar .popup-container,
.popup-overlay.position-bottom-bar .popup-container {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    display: flex;
    align-items: center;
}
.popup-bar {
    width: 100%;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.popup-bar .popup-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.popup-bar .popup-content {
    flex: 1;
    padding: 0;
}
.popup-bar .popup-title {
    font-size: 1rem;
    margin-bottom: 4px;
}
.popup-bar .popup-text {
    font-size: 0.85rem;
}
.popup-bar .popup-link {
    margin-top: 0;
    white-space: nowrap;
}
.popup-image {
    width: 100%;
    display: block;
}
.popup-content {
    padding: 24px;
}
.popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--popup-text, var(--text-primary));
}
.popup-text {
    color: var(--popup-text, var(--text-secondary));
    line-height: 1.6;
    margin-bottom: 16px;
}
.popup-text p:last-child {
    margin-bottom: 0;
}
.popup-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--accent-gold);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}
.popup-link:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
}
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 100;
    pointer-events: auto;
}
.popup-close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(90deg);
}
.popup-container.theme-light {
    --popup-bg: #ffffff;
    --popup-text: #1a1a1a;
    background: #ffffff;
}
.popup-container.theme-light .popup-title {
    color: #1a1a1a;
}
.popup-container.theme-light .popup-text {
    color: #555;
}
.popup-container.theme-light .popup-close {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}
.popup-overlay.anim-fadeIn .popup-container { animation: popupFadeIn 0.3s ease; }
.popup-overlay.anim-slideInUp .popup-container { animation: popupSlideInUp 0.4s ease; }
.popup-overlay.anim-slideInDown .popup-container { animation: popupSlideInDown 0.4s ease; }
.popup-overlay.anim-slideInLeft .popup-container { animation: popupSlideInLeft 0.4s ease; }
.popup-overlay.anim-slideInRight .popup-container { animation: popupSlideInRight 0.4s ease; }
.popup-overlay.anim-zoomIn .popup-container { animation: popupZoomIn 0.3s ease; }
.popup-overlay.anim-bounceIn .popup-container { animation: popupBounceIn 0.5s ease; }
.popup-overlay.closing {
    opacity: 0;
    pointer-events: none;
}
.popup-overlay.closing .popup-container {
    transform: scale(0.9);
    opacity: 0;
}
.popup-overlay.closing.anim-fadeOut .popup-container {
    animation: popupFadeOut 0.3s ease forwards;
}
.popup-overlay.closing.anim-slideOutUp .popup-container {
    animation: popupSlideOutUp 0.4s ease forwards;
}
.popup-overlay.closing.anim-slideOutDown .popup-container {
    animation: popupSlideOutDown 0.4s ease forwards;
}
.popup-overlay.closing.anim-slideOutLeft .popup-container {
    animation: popupSlideOutLeft 0.4s ease forwards;
}
.popup-overlay.closing.anim-slideOutRight .popup-container {
    animation: popupSlideOutRight 0.4s ease forwards;
}
.popup-overlay.closing.anim-zoomOut .popup-container {
    animation: popupZoomOut 0.3s ease forwards;
}
.popup-overlay.closing.anim-bounceOut .popup-container {
    animation: popupBounceOut 0.5s ease forwards;
}

@keyframes popupFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popupFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popupSlideInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes popupSlideInDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes popupSlideInLeft { from { transform: translateX(-50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes popupSlideInRight { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes popupZoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes popupBounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes popupFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes popupSlideOutUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-50px); opacity: 0; }
}
@keyframes popupSlideOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(50px); opacity: 0; }
}
@keyframes popupSlideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-50px); opacity: 0; }
}
@keyframes popupSlideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(50px); opacity: 0; }
}
@keyframes popupZoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.5); opacity: 0; }
}
@keyframes popupBounceOut {
    0% { transform: scale(1); opacity: 1; }
    20% { transform: scale(1.1); }
    100% { transform: scale(0.3); opacity: 0; }
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 992px) {
    .container {
        display: block;
        padding: 20px 1rem;
    }
    .sidebar {
        margin-top: 1rem;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .hamburger-btn {
        display: block;
    }

    .container-news {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        margin-top: 25px;
    }

    .single-post-container {
        grid-template-columns: 1fr;
    }

    .nav-desktop {
        display: none;
    }
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
}
@media (min-width: 993px) {
    .mobile-menu-overlay,
    .mobile-backdrop {
        display: none !important;
    }
}
@media (max-width: 600px) {
    .filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        font-size: 0.8rem;        /* فونت کلی کوچک‌تر */
    }
    .filter-row input,
    .filter-row select {
        font-size: 0.8rem;
        padding: 5px 7px;         /* پدینگ کمتر → ارتفاع کمتر */
    }
    .custom-select::after { font-size: 0.6rem; }
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .post-cover {
        height: 240px;
    }
    .post-header, .post-excerpt, .post-body, .comments-section {
        padding: 20px 15px;
    }
    .post-title {
        font-size: 1.4rem;
    }
    .post-nav {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }

    .search-box input {
        width: 80px;
    }

    .ad-section {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }

    .tab-btn {
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    .tabs-right {
        gap: 10px;
    }
    .tab-content {
        padding: 10px;
    }

    .container-news {
        padding: 0;
        margin: 1rem 0;
    }
    .news-main, .news-sidebar {
        width: 90%;
        position: relative;
        margin: auto;
    }
    .hero-slider {
        height: 250px;
    }
    .hero-caption {
        padding: 10px 10px 20px;

        h2 {
            font-size: 16px;
        }
        p {
            font-size: 12px;
        }
    }
    .news-card {
        height: auto;
        flex-direction: column;
    }
    .news-card img {
        width: 100%;
        height: 250px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }

    .announcement-bar {
        padding: 12px 1rem;
        font-size: 0.85rem;
    }
    .announcement-content {
        flex-direction: column;
        gap: 10px;
        padding: 0 30px;
    }
    .announcement-close {
        right: 1rem;
    }
    [dir="rtl"] .announcement-close {
        right: auto;
        left: 1rem;
    }

    .popup-container.size-small,
    .popup-container.size-medium,
    .popup-container.size-large {
        width: calc(100vw - 32px);
        margin: 16px;
    }
    .popup-bar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .popup-bar .popup-link {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .captcha-container {
        flex-direction: column-reverse;
    }
}
@media (max-width: 480px) {
    .grid-row-layout {
        min-width: 700px;
    }

    .metal-bar {
        font-size: 0.75rem;
        gap: 15px;
        padding: 10px 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .search-box {
        padding: 5px 8px;
    }
    .search-box form {
        display: none;
    }

    .lang-flag {
        width: 20px;
        height: 14px;
    }

    .table-bottom-actions {
        align-items: unset;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;

        .pagination-wrapper .pagination {
            width: 100%;
        }
    }
}
@media (min-width: 1400px) {
    header {
        padding: 0 12rem;
    }
}