/* Import custom fonts (woff2 only) */
@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/IRANSansX-Regular.woff2') format('woff2');
}

@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/IRANSansX-Medium.woff2') format('woff2');
}

@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/IRANSansX-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Bahij Badiya';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/BahijBadiya-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Bahij Badiya';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/BahijBadiya-Bold.woff2') format('woff2');
}


/* ====================================================
   Section: Base Styles & Reset
   ==================================================== */

/* Apply consistent box-sizing model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Reset margins and padding for form elements */
button,
input,
select,
textarea {
    margin: 0;
    padding: 0;
}

/* Remove default borders and backgrounds from form elements */
button,
input,
select,
textarea {
    border: none;
    background: none;
}

/* Inherit font, color, and line-height for form elements */
button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    line-height: inherit;
}

/* Remove default outline and box-shadow on focus for form elements */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: none;
}

/* Disable default browser appearance for form elements */
button,
input,
select,
textarea {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Set cursor behavior for buttons and submit inputs */
button,
input[type="button"],
input[type="submit"] {
    cursor: pointer;
}

/* Remove extra controls from inputs (e.g., clear, spinner) */
input::-ms-clear,
input::-ms-reveal,
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide scrollbar for webkit browsers */
::-webkit-scrollbar {
    display: none;
}

/* Set default body font and margin */
body {
    font-family: IRANSansX, Tahoma, Arial, sans-serif;
    font-weight: 400;
    margin: 0;
}

/* Apply custom font and appearance for inputs */
input {
    -webkit-appearance: none;
    font-family: IRANSansX, Tahoma, Arial, sans-serif;
}

/* Style for anchor tags */
a {
    text-decoration: none;
    color: var(--color-black);
}

/* Inherit color for visited links */
a:visited {
    color: inherit;
}

/* Prevent user selection and dragging on images */
img {
    user-select: none;
    -webkit-user-drag: none;
}

/* Default style for <i> tags (often used for icons) */
i {
    font-size: 27px;
}

/* Wrapper grid layout */
.wrapper {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Header, main content, footer */
}

/* Style for form elements with flex display */
form {
    display: flex;
    width: -webkit-fill-available;
}

/* ====================================================
   Section: Conditional Pashto Font
   ==================================================== */

body.lang-ps,
body.lang-ps input {
    font-family: 'Bahij Badiya', Tahoma, Arial, sans-serif !important;
    font-weight: 400;
    margin: 0;
    font-size: 22px;
}

body.lang-ps .ad-price-time:last-child {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
}

/* ====================================================
   Section: Conditional English Styles (LTR)
   Applied when body has the 'lang-en' class
   ==================================================== */

body.lang-en {
    direction: ltr;
}

body.lang-en .side-menu {
    right: auto;
    left: -300px;
    transition: left 0.3s ease;
}

body.lang-en .side-menu.active {
    left: 0;
    right: auto;
}

body.lang-en.language-select span {
    margin-left: auto;
    margin-right: 5px;
}

body.lang-en .language-select i {
    margin-right: auto;
    margin-left: 5px;
}

body.lang-en .nav-bar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--color-border-light);
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
}

body.lang-en .ad-body {
    direction: rtl;
}


body.lang-en .browse-body {
    right: 0;
    left: auto;
}

body.lang-en .ad-container,
body.lang-en .ads-section {
    direction: rtl;
}

body.lang-en .browse-portion {
    direction: rtl;
}

body.lang-en .nav-container {
    direction: ltr;
}

body.lang-en .category-ul {
    direction: ltr;
}

body.lang-en.category-ul>li>i {
    margin-left: auto;
    margin-right: 8px;
}

body.lang-en .sub-menu {
    direction: ltr;
}

body.lang-en .sub-menu li {
    padding-left: 50px;
    padding-right: 20px;
}

body.lang-en .ad-price-time {
    padding: 10px 0 10px 10px;
}

body.lang-en .ad-description {
    direction: ltr;
}

body.lang-en .nav-bar-list {
    right: auto;
    left: 0;
}

body.lang-en .nav-container-div {
    direction: ltr;
}

body.lang-en.category-div {
    direction: ltr;
}

body.lang-en .main-browse {
    direction: ltr;
}

body.lang-en .rtlAgreement {
    direction: ltr;
}

body.lang-en .loginDiv {
    direction: ltr;
}

body.lang-en .info-section {
    direction: ltr;
    padding-right: auto;
    padding-left: 50px;
}

body.lang-en .welcomeDiv {
    direction: ltr;
}

body.lang-en .cityPickerDiv form {
    direction: ltr;
}

body.lang-en .bottom {
    direction: rtl;
}

#bottom-nav a.active-nav-link {
    color: #a3373f;
    transform: translateY(-2px);
}

/* ====================================================
   Section: Search Styles
   ==================================================== */

/* * کدهای CSS برای بخش جستجوی زنده
 */

/* ۱. والد اصلی برای کنترل موقعیت */
.search-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

#search-results,
#page-search-results {
    position: absolute;
    top: 98%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--color-primary);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;

    /* به صورت پیش‌فرض مخفی است */
    display: none;
}

/* کلاس جدید: این کلاس با جاوا اسکریپت اضافه می‌شود تا باکس را نمایش دهد */
#search-results.is-visible {
    display: block;
}

/* ۲. استایل اینپوت زمانی که باکس نتایج فعال است */
.search-bar.is-active {
    border-bottom-color: transparent;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}


/* ۳. استایل آیتم‌های داخل نتایج */
#search-results a,
#page-search-results a {
    direction: rtl;
    border-top: 1px solid var(--color-border-medium);
    display: block;
    /* برای اطمینان از اینکه کل فضا قابل کلیک است */
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
}

#search-results a:hover,
#page-search-results a:hover {
    background-color: #f7f7f7;
}

.search-result-item,
.search-no-result {
    display: block;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.search-result-item:last-child,
.search-no-result:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f7f7f7;
}

.search-result-item .in-category-text {
    color: #888;
    font-size: 12px;
    margin-right: 8px;
}

#search-indicator {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}


.search-container.htmx-request .fa-search {
    display: none;
}

.search-bar::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-bar::-webkit-search-cancel-button {
    height: 25px;
    width: 25px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999999'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    transition: transform 0.2s ease;
}

.search-bar::-webkit-search-cancel-button:hover {
    transform: scale(1.1);
}

/* ====================================================
   Section: Header Styles
   ==================================================== */

/* Header Layout */
.header {
    height: 68px;
    display: flex;
    border-bottom: 1px solid var(--color-border-light);
    background-color: var(--color-white);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    align-items: center;
    padding: 0 10px;
    direction: ltr !important;
}

#page-schema {
    display: none;
}

.about-header,
.ios-theme {
    background-color: rgba(255, 255, 255, 0.6) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header Section Layout (Left, Middle, Right) */
.left-section,
.middle-section,
.right-section {
    display: flex;
    align-items: center;
}

/* Hover effect for buttons in the middle section */
.middle-section button:hover {
    background-color: var(--color-background-hover);
}

/* Left Header Section */
.left-section {
    width: 300px;
    margin-left: 10px;
}

/* Logo image inside the left section */
.left-section img {
    height: 68px;
    cursor: pointer;
}

/* Middle Header Section (Search/City Select) */
.middle-section {
    width: 460px;
    margin: 0 60px;
}


/* Right Header Section (Navigation/Tools) */
.right-section {
    flex: 1;
    gap: 50px;
    height: 41px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Search Input in Middle Section */
.middle-section input {
    flex: 1;
    height: 41px;
    font-size: 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    text-align: center;
    z-index: 2;
    transition: all 0.2s ease;
    width: 100%;
    direction: rtl;
    border-right: none;
}

.middle-section input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Search Button in Middle Section */
.middle-section button {
    height: 41px;
    width: 50px;
    border: 1px solid var(--color-border-medium);
    background-color: var(--color-white);
    border-radius: 0 5px 5px 0;
    margin-left: -1px;
    cursor: pointer;
}

/* Bottom bar for mobile (initially hidden) */
.bottom {
    display: none;
}


/* ====================================================
   Section: Custom Select Component
   ==================================================== */

.select-container {
    position: relative;
    max-width: 150px;
    margin-left: 40px;
}

.custom-select {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-white);
    cursor: pointer;
    direction: ltr;
    box-sizing: border-box;
    max-height: 41px;
}

.custom-select i {
    color: var(--color-primary);
}

.search-form i {
    color: var(--color-icon-default);
}

/* Styles specific to custom select inside cityPickerDiv */
.cityPickerDiv .custom-select {
    transition: box-shadow 0.5s linear;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover effect for custom select inside cityPickerDiv */
.cityPickerDiv .custom-select:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Text span inside custom select */
.custom-select span {
    text-wrap: nowrap;
    font-size: 14px;
    color: var(--color-text-dark);
    flex-grow: 1;
    text-align: center;
}

/* Options dropdown list */
.options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    background-color: var(--color-white);
    display: none;
    z-index: 10;
}

/* Individual option item styles */
.options div {
    padding: 10px;
    font-size: 14px;
    color: var(--color-text-dark);
    cursor: pointer;
    text-align: center;
}

/* Hover effect for option items */
.options div:hover {
    background-color: var(--color-background-hover);
}

/* Display options when custom select is active */
.custom-select.active .options {
    display: block;
}


/* ====================================================
   Section: Language Select Component
   ==================================================== */

.language-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Span for language text */
.language-select span {
    margin-left: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Language options dropdown list */
.language-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: max-content;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    background-color: var(--color-white);
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Individual language option item styles */
.language-options div {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

/* Hover effect for language option items */
.language-options div:hover {
    background-color: var(--color-background-hover);
}

/* Display language options when language select is active */
.language-select.active .language-options {
    display: block;
}

/* Icon inside language select */
.language-select i {
    margin-right: 5px;
}


/* ====================================================
   Section: Side Menu (Hamburger)
   ==================================================== */

/* Overlay layer */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    z-index: 999;
}

/* Styles when overlay is active */
.overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Side menu drawer */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--color-white);
    transition: right 0.3s ease;
    z-index: 1000;
}

/* Styles when side menu is active (open) */
.side-menu.active {
    right: 0;
}

/* Disable transitions when body has 'menu-active' class */
body.menu-active .side-menu,
body.menu-active .overlay {
    transition: none;
}

/* Side menu content container */
.side-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Links inside side menu */
.side-menu-content a {
    color: var(--color-black);
    text-decoration: none;
    font-size: 18px;
    padding: 15px;
    text-align: center;
    width: 100%;
    transition: background-color 0.5s linear 50ms;
}

/* Hover effect for side menu links */
.side-menu-content a:hover {
    background-color: var(--color-primary-hover);
}

/* Hamburger menu icon */
.hamburger-menu {
    display: flex;
    cursor: pointer;
    font-size: 32px;
    height: 32px;
}

/* Override padding/margin for side menu links */
.side-menu-content a {
    padding: 15px 0;
    margin: 0;
}

/* Settings section layout (grid) */
.setting-section {
    display: grid;
    grid-template-columns: auto auto;
    margin-right: 30px;
    gap: 20px;
    height: 32px;
}

/* Styles for icons in the right header section */
.right-section i {
    font-size: 32px;
    color: var(--color-icon-default);
    transition: color 300ms linear 50ms;
}

/* Hover effect for icons in the right header section */
.right-section i:hover {
    color: var(--color-primary-hover);
}

/* Set cursor for divs in the right header section */
.right-section div {
    cursor: pointer;
}

/* Layout for the tool section (language picker, settings, etc.) */
.tool-section {
    display: flex;
    flex-direction: row;
    gap: 25px;
}

/* استایل گزینه‌های گزارش */
.report-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* فاصله بین گزینه‌ها */
    margin-bottom: 20px;
}

.report-options div {
    display: flex;
    align-items: center;
}

.report-options label {
    margin: 0 8px;
    /* فاصله متن از دکمه رادیویی */
    cursor: pointer;
}

/* استایل بخش توضیحات "سایر موارد" */
#other-reason-container {
    margin-top: 10px;
}

#other-reason-container textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    /* اجازه تغییر اندازه عمودی */
}

.honeypot {
    display: none;
}

/* استایل‌های کانتینر اصلی */
.no-posts-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 40vh;
    padding: 40px 20px;
    color: #888;
    width: 80%;
    position: absolute;
    left: 0;
}

.no-posts-image {
    width: 80%;
    max-width: 220px;
    height: auto;
    margin-bottom: 32px;
}

#saved,
#selfpost {
    top: 240px;
    width: 100%;
}

.no-posts-container h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #444;
    /* رنگ تیره‌تر برای عنوان */
    margin-bottom: 8px;
}

/* استایل متن توضیحات */
.no-posts-container p {
    font-size: 0.9rem;
    max-width: 320px;
    /* برای خوانایی بهتر در صفحات عریض */
    line-height: 1.6;
}

/* ====================================================
   Section: Navigation Bar Styles
   ==================================================== */

/* Overall navigation bar container */
.nav-bar {
    display: flex;
    flex-direction: row;
    height: 100%;
    position: fixed;
    right: 0;
    top: 69px;
    border-left: 1px solid var(--color-border-light);
    box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    width: 20%;
    min-width: 215px;
    max-width: 245px;
}

/* Inner container for navigation content */
.nav-container {
    width: 100%;
    padding: 20px;
    direction: rtl;
    overflow-y: auto;
}

/* Main category list */
.category-ul {
    list-style-type: none;
    padding: 0;
    color: var(--color-text-muted);
    overflow-y: auto;
}

/* Individual main category list items */
.category-ul>li {
    max-height: 1000px;
    min-height: 43px;
    padding: 0;
    position: relative;
    transition: all 0.3s ease;
}

/* Hover effect for main category list items */
.category-ul>li:hover {
    cursor: pointer;
    color: var(--color-primary);
}

/* Icon inside main category list items */
.category-ul>li>i {
    font-size: 18px;
    color: inherit;
    margin-left: 8px;
}

/* Anchor tags inside list items (inherit color) */
.category-ul li>a {
    color: inherit;
    text-decoration: none;
}

/* Sub-menus */
.sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    direction: rtl;
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease-in-out;
    overflow-y: auto;
}

/* Sub-menu list items */
.sub-menu li {
    padding: 5px 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 2px 0;
    transition: color 0.2s;
    font-size: 12px;
}

/* Hover effect for sub-menu list items */
.sub-menu li:hover {
    color: var(--color-primary);
}

/* Styles when sub-menu is active (shown) */
.sub-menu.show {
    display: block;
    max-height: 300px;
    margin-bottom: 20px;
}

/* Opacity/Height transitions for sub-menu */
.sub-menu {
    opacity: 0;
    height: 0;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.sub-menu.show {
    opacity: 1;
    height: auto;
}

/* Sub-menu list item specific padding/margin */
.sub-menu li {
    margin: 0;
    padding-left: 20px;
    padding-right: 50px;
    margin-bottom: 5px;
    color: var(--color-icon-default);
}

.category-ul .sub-menu a.active {
    color: #a3373f;
    /* رنگ اصلی سایت شما */
    font-weight: bold;
}

/* (اختیاری) استایل برای آیتم اصلی فعال */
.category-ul>li.active-main-item>a {
    color: #a3373f;
}

/* استایل برای تم تاریک */
@media (prefers-color-scheme: dark) {

    .category-ul .sub-menu a.active,
    .category-ul>li.active-main-item>a {
        color: #ff8a8a;
        /* یک رنگ قرمز روشن‌تر برای خوانایی بهتر */
    }
}

.sub-menu li.active-submenu-item {
    color: var(--color-primary);
}


.sub-menu li.active-submenu-item a {
    color: var(--color-primary);
}

/* Transition for category item height */
.category-item {
    transition: height 0.3s ease-in-out;
}

/* Hide scrollbars for nav-bar, category-ul, and sub-menu in webkit browsers */
.nav-bar::-webkit-scrollbar,
.category-ul::-webkit-scrollbar,
.sub-menu::-webkit-scrollbar {
    display: none;
}


/* ====================================================
   Section: Browse Body Styles
   ==================================================== */

/* Main container for Browse listings */
.browse-body {
    display: grid;
    grid-template-columns: auto auto;
    width: 77%;
    height: auto;
    padding: 60px 0 0 0;
    position: absolute;
    left: 0;
    direction: ltr;
    padding: 0 5px;
}

/* Individual ad listing body */
.ad-body {
    height: 170px;
    margin: 20px;
    border: 1px solid var(--color-border-medium);
    border-radius: 3px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 180px auto;
}

/* Ad title padding */
.ad-title {
    padding: 16px 10px 10px 10px;
}

/* Ad price and time section */
.ad-price-time {
    display: flex;
    justify-content: space-between;
    padding: 10px 10px 10px 0;
}

/* Style for the last element in ad-price-time */
.ad-price-time:last-child {
    color: var(--color-text-gray);
    font-size: 14px;
    white-space: nowrap;
}

/* Ad description container */
.ad-description {
    box-sizing: border-box;
    display: grid;
    direction: rtl;
    grid-template-rows: 125px auto;
}

/* Reset margin for paragraph in ad description */
.ad-description p {
    margin: 0;
}

/* Photo holder for ad image */
.photo-holder img {
    height: 150px;
    width: 150px;
    border-radius: 3px;
}

.photo-holder {
    height: 150px;
    width: 150px;
    border-radius: 3px;
    padding: 10px 10px 0 10px;
    display: grid;
    grid-template-rows: auto auto;
}

.status {
    position: relative;
    justify-self: center;
    bottom: 24px;
    color: #fff;
    width: 100%;
    border-radius: 0 0 3px 3px;
    text-align: center;
    background-color: rgb(94, 215, 94);
}

.pending {
    background-color: orange;
}

.rejected,
.deleted {
    background-color: red;
}

.expired {
    background-color: #555;
}

.ad-container,
.ads-section {
    direction: ltr;
    display: grid;
    grid-template-columns: auto auto;
}

.delete {
    grid-template-columns: auto auto;
    direction: rtl;
}

.check {
    direction: rtl;
    grid-template-columns: auto auto auto !important;
}

.deleted-ad,
.rejected-ad {
    grid-template-rows: auto auto;
    direction: rtl;
    margin-bottom: 70px;
}

.deleted-ad h2,
.deleted-ad h6,
.rejected-ad h2,
.rejected-ad>p,
.expired h2,
.expired h6 {
    margin: 0;
    color: var(--color-text-gray);
}

.edit-button,
.delete-button,
.approve-button,
.reject-button,
.block-button {
    width: 130px;
    height: 49px;
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 6px;
}

.delete-button,
.reject-button,
.block-button {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.approve-button {
    background-color: rgb(0, 132, 0);
    color: var(--color-white);
    border-color: rgb(0, 132, 0);
}

.edit-button p,
.delete-button p,
.approve-button p,
.reject-button p,
.block-button {
    margin: 0;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0;
    justify-content: space-evenly;
    align-items: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 50, 50, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.delete-form,
.reject-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.delete-form div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-form div label {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.modal.hidden {
    display: none;
}

.filter-error-message {
    color: #a3373f;
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    width: 100%;
    text-align: right;
    display: none;
}

.price-filter-input.invalid {
    border-color: #a3373f !important;
    box-shadow: 0 0 0 1px #a3373f;
}

.profile-info {
    display: grid;
    grid-template-columns: auto auto;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: 5px;
    margin-bottom: 20px;
    width: 70%;
    height: 100px;
}

.profile-info div:first-child {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-around;
    align-items: center;
}

.profile-info p {
    margin: 0;
}

.block-div {
    display: grid;
    grid-template-columns: 440px;
    grid-template-rows: auto auto;
    justify-content: center;
    text-align: center;
    width: 440px;
    justify-self: center;
    border: 1px solid var(--color-border-light);
    padding: 30px;
    border-radius: 6px;
}


/* Share Modal */
/* اضافه کردن یا اصلاح در style.css */

/* استایل برای محتوای مودال اشتراک گذاری (همانند قبل، اگر نیاز به تنظیم داری) */
#share-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: right;
    position: relative;
    overflow: hidden;
}

/* استایل برای هدر مودال (تیتر و دکمه بستن) */
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.share-modal-header p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.share-modal-header .close-share-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-muted);
}

.share-modal-header .close-share-modal:hover {
    color: var(--color-text-dark);
}


/* استایل برای قسمت گزینه‌های اشتراک گذاری */
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    justify-items: center;
}

/* استایل برای هر گزینه اشتراک گذاری (تلگرام، واتساپ و ...) */
.share-option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--color-text-dark);
    /* رنگ متن */
    font-size: 14px;
    transition: color 0.2s ease;
    cursor: pointer;
}

/* ** اصلاح اینجا برای رنگ طوسی خنثی آیکون ها در حالت عادی ** */
.share-option-item i {
    font-size: 30px;
    margin-bottom: 5px;
    color: var(--color-icon-default);
    /* استفاده از رنگ طوسی پیش فرض شما */
    transition: color 0.2s ease;
}

/* ** حذف یا کامنت کردن استایل های رنگ شبکه های اجتماعی خاص ** */
/*
.share-option-item[data-channel="telegram"] i { color: #229ED9; }
.share-option-item[data-channel="whatsapp"] i { color: #25D366; }
.share-option-item[data-channel="sms"] i { color: #41a6ff; }
.share-option-item[data-channel="copy"] i { color: #ffc107; }
*/


.share-option-item:hover {
    color: var(--color-primary);
    /* تغییر رنگ متن در هاور */
}

.share-option-item:hover i {
    color: var(--color-primary);
    /* تغییر رنگ آیکون به رنگ اصلی شما در هاور */
}


/* استایل برای پیغام "لینک کپی شد!" */
#copy-feedback {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10;
    display: none;
    /* به صورت پیش‌فرض مخفی */
    white-space: nowrap;
}

/* استایل دارک مود برای این عناصر را هم فراموش نکنید اگر استفاده می کنید */


.delete-cancel-div {
    display: grid !important;
    grid-template-columns: auto auto;
    margin-top: 30px;
}

.do-cancel-div {
    display: grid !important;
    grid-template-columns: auto auto;
    margin-top: 30px;
}


.delete-cancel-div button:last-child {
    background-color: #a3373f;
    color: #fff;
    height: 41px;
    border-radius: 6px;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px black;
    text-align: right;
    direction: rtl;
}

/* Radio buttons */

input[type="radio"] {
    width: 1em;
    height: 1em;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    margin-right: 0.5em;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

input[type="radio"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease-in-out;
}

input[type="radio"]:checked::after {
    background-color: var(--color-primary);
}

input[type="radio"]:checked {
    border-color: var(--color-primary);
}

/* ====================================================
   Section: Added Styles (Miscellaneous/Overrides)
   ==================================================== */

/* Define CSS variables */
:root {
    --phi: 1.68;
    --min-height: 3.25em;

    --color-primary: #a3373f;
    --color-primary-hover: #a3373f;
    --color-primary-rgb: 192, 57, 43;
    --color-white: #fff;
    --color-black: #000000;
    --color-border-light: #e5e5e5;
    --color-border-medium: #ccc;
    --color-background-hover: #f0f0f0;
    --color-icon-default: #959595;
    --color-text-dark: #333;
    --color-text-muted: rgba(0, 0, 0, .56);
    --color-text-secondary: #555;
    --color-text-gray: gray;
    --color-text-light-gray: #777;
    --header-height: 68px;
}

/* Main content area clearance below fixed header */
#main-content-area {
    padding-top: var(--header-height, 68px);
    min-height: calc(100vh - var(--header-height, 68px));
    box-sizing: border-box;
    width: 100%;
    position: relative;
}

/* Remove outline on body and input focus */
body:focus,
input:focus {
    outline: none;
}

/* Adjust padding for browse body */
.browse-body {
    padding-top: 0px !important;
    padding-bottom: 150px;
}

/* Navigation bar list styles */
.nav-bar-list {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    position: fixed;
    right: 0;
    top: 122px;
    overflow-y: auto;
    margin-top: 50px;
}

/* Navigation container div */
.nav-container-div {
    width: 100%;
    padding: 20px;
    direction: rtl;
}

/* Category list items inside nav-container-div */
.nav-container-div>.category-ul>li {
    display: flex;
    min-height: 55px !important;
    border-bottom: .5px solid var(--color-border-medium);
    align-items: center;
    justify-content: center;
}

/* Category div */
.category-div {
    position: relative;
    direction: rtl;
    padding: 9px;
    font-size: 25px;
    padding-right: 20px;
}


/* ====================================================
   Section: Login Page Styles
   ==================================================== */

/* Main container for browse/login page */
.main-browse {
    direction: rtl;
    position: relative;
    top: 0;
    height: auto;
    justify-content: center;
}

.loginForm {
    display: block;
}

.loginInput {
    height: var(--min-height);
    width: 12ch;
    box-sizing: border-box;
    font-size: 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    padding: .5em;
    text-align: left;
    direction: ltr;
    min-width: 200px;
    transition: border-color 0.5s linear 50ms;
}

.loginInput:focus {
    border-color: var(--color-primary);
}

.loginInput::-webkit-clear-button,
.loginInput::-webkit-outer-spin-button,
.loginInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.loginInput::-ms-clear {
    display: none;
}

.loginInput::placeholder {
    color: var(--color-text-dark-placeholder);
    font-size: .875rem;
    opacity: 1;
}

.loginButton {
    box-sizing: border-box;
    height: var(--min-height);
    width: calc(var(--min-height)*var(--phi));
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 6px;
    margin-top: 20px;
}

.rtlAgreement {
    direction: rtl;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light-gray);
    position: relative;
    margin-top: 210px;
    left: 50%;
    transform: translateX(-50%);
}

.rtlAgreement a {
    color: var(--color-primary);
    text-decoration: underline;
}

.otp-form {
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
}


/* ==================================
   بخش فرم ورود (نسخه اصلاح شده و آگاه از جهت)
   ================================== */

/* ۱. تعریف متغیرهای جهت برای حالت پیش‌فرض (LTR) */
:root {
    --slide-out-direction: -100%;
    /* خروج به چپ */
    --slide-in-direction: 100%;
    /* ورود از راست */
}

/* ۲. برعکس کردن متغیرها برای حالت راست‌به‌چپ (RTL) */
[dir="rtl"] {
    --slide-out-direction: 100%;
    /* خروج به راست */
    --slide-in-direction: -100%;
    /* ورود از چپ */
}

.login-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* باکس را به بالای صفحه می‌چسباند */
    padding: 5vh 20px;
    /* فاصله از بالا و طرفین صفحه */
    min-height: 80vh;
}

/* استایل اصلی برای باکس ورود */
.loginDiv {
    background-color: #ffffff;
    padding: 35px 40px;
    /* فاصله داخلی زیاد برای حس بهتر */
    border-radius: 16px;
    /* گوشه‌های کاملاً گرد و مدرن */
    border: 1px solid #ededed;
    /* یک حاشیه بسیار ظریف و روشن */
    width: 100%;
    max-width: 450px;
    /* محدود کردن عرض باکس در صفحات بزرگ */
    text-align: center;

    /* سایه چندلایه برای ایجاد حس شناور بودن */
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.04),
        0px 16px 24px rgba(0, 0, 0, 0.04);

    /* انیمیشن نرم برای تغییر تم */
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: 70px;
}

/* --- استایل‌های حالت تاریک --- */
@media (prefers-color-scheme: dark) {
    .loginDiv {
        background-color: #2c2c2e;
        /* پس‌زمینه تیره‌تر */
        border-color: #424245;
        /* حاشیه کمی روشن‌تر برای دیده شدن */

        /* سایه در حالت تاریک معمولاً کمتر دیده می‌شود اما به عمق کمک می‌کند */
        box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.2);
    }
}

.loginDiv {
    overflow: hidden;
}

.form-container {
    position: relative;
    min-height: 180px;
}

/* ۳. استفاده از متغیرها در استایل‌ها */
.form-view {
    width: 100%;
    position: absolute;
    top: 0;
    /* توجه: دیگر از left: 0 استفاده نمی‌کنیم تا با جهت‌های مختلف سازگار باشد */
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    opacity: 0;
    /* استفاده از متغیر برای جهت ورود */
    transform: translateX(var(--slide-in-direction));
    pointer-events: none;
    text-align: center;
}

.form-view.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.form-view.was-active {
    /* استفاده از متغیر برای جهت خروج */
    transform: translateX(var(--slide-out-direction));
}

.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
    margin-bottom: 20px;
}

.otp-input {
    width: 45px;
    height: 50px;
    font-size: 24px;
    text-align: center;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(163, 55, 63, 0.2);
}

.edit-phone-link {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    cursor: pointer;
}

/* ====================================================
   Section: Breadcrumbs Component Styles
   ==================================================== */
.diwall-breadcrumbs {
    width: 100%;
    max-width: 1280px;
    margin: 16px auto 12px auto;
    padding: 0 30px;
    box-sizing: border-box;
    direction: rtl;
}

body.lang-en .diwall-breadcrumbs,
html[dir="ltr"] .diwall-breadcrumbs {
    direction: ltr;
}

.diwall-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.diwall-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    color: #6b7280;
    line-height: 1.5;
}

.diwall-breadcrumbs a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.18s ease;
}

.diwall-breadcrumbs a:hover {
    color: var(--color-primary, #a3373f);
}

.diwall-breadcrumbs .sep {
    margin: 0 4px;
    color: #9ca3af;
    font-size: 0.75rem;
    opacity: 0.7;
}

.diwall-breadcrumbs [aria-current="page"] {
    color: #111827;
    font-weight: 500;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}

.classified-info .diwall-breadcrumbs {
    width: 70%;
    max-width: 100%;
    margin: 0 0 14px 0;
    padding: 0;
}

@media (max-width: 920px) {
    .diwall-breadcrumbs {
        margin: 10px auto 6px auto;
        padding: 0 16px;
    }
    .diwall-breadcrumbs li {
        font-size: 0.78rem;
    }
    .diwall-breadcrumbs [aria-current="page"] {
        max-width: 180px;
    }
}

/* ====================================================
   Section: Browse Item Detail Page Styles
   ==================================================== */

/* Container for browse item details */
.browse-portion {
    display: grid;
    grid-template-columns: 50% 50%;
    position: relative;
    top: 0;
    direction: ltr;
}

/* Info section for item details (RTL) */
.info-section {
    direction: rtl;
    box-sizing: border-box;
    padding-right: 50px;
}

/* Styles for category, type, price lines (flex layout) */
.ad-cat,
.ad-type,
.ad-condition,
.ad-price {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 70%;
    border-bottom: 1px solid var(--color-border-medium);
}

/* Paragraph within main ad title (color and font size) */
.ad-main-title p {
    color: var(--color-text-gray);
    font-size: 14px;
}

.ad-main-title>div {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
}

.quick-actions {
    display: flex;
    gap: 15px;
    color: #a3373f;
}

/* Width for main ad title and plain info sections */
.ad-main-title,
.plain-info {
    width: 70%;
}

/* Margin for plain info section */
.plain-info {
    margin: 60px 0;
}

.stats-count {
    display: grid;
    grid-template-columns: auto auto;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    width: 70%;
    justify-content: space-between;
    margin-bottom: 40px;
}

.stats-count div:last-child {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-content: center;
    align-self: center;
    align-items: center;
    gap: 10px;
}


/* ====================================================
   Section: Slider Styles
   ==================================================== */

/* Main container for the slider with fixed dimensions */
.slider-container {
    width: 400px;
    margin: 2rem auto;
    margin-bottom: 0;
    font-family: sans-serisf;
}

/* Slider wrapper */
.slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Container for the slides (flex layout for horizontal arrangement) */
.slides {
    display: flex;
    transition: transform 0.5s ease;
}

/* Individual slide image */
.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Navigation buttons (Previous/Next) */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    border: none;
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
}

/* Position of the previous button */
.prev {
    left: 0.5rem;
}

/* Position of the next button */
.next {
    right: 0.5rem;
}

/* Thumbnails container */
.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Individual thumbnail image */
.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    opacity: 0.6;
    margin: 0 0.25rem;
    border: 2px solid transparent;
    border-radius: 4px;
}

/* Active thumbnail style */
.thumb.active {
    opacity: 1;
    border-color: var(--color-text-dark);
}

/* Lightbox overlay */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

/* Image displayed inside the lightbox */
.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    cursor: zoom-in;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Close button for the lightbox */
.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
}

/* Save button style inside the lightbox */
#save-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}


/* ====================================================
   Section: Viewing Section Styles (Contact/Report)
   ==================================================== */

/* Container for contact and report options */
.viewing-section {
    box-sizing: border-box;
    text-align: center;
    display: grid;
    grid-template-rows: auto auto auto;
}

/* Contact button style */
.contact-button {
    width: 150px;
    height: 49px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 6px;
    margin-top: 20px;
}

/* Report link style */
.report a {
    text-decoration: underline;
    font-size: 12px;
}

/* Container for contact button and report link (grid layout) */
.contact-report {
    display: grid;
    grid-template-rows: 80px 30px;
    justify-content: space-evenly;
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #f9f9f9;
    justify-content: center;
}

.contact-number-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 15px;
}

.phone-number {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    direction: ltr;
    /* برای نمایش صحیح شماره */
}

.contact-div {
    justify-content: center;
}

.phone-number:hover {
    color: #a3373f;
    /* رنگ هاور */
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background-color: #f1f1f1;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.copy-button:hover {
    background-color: #e0e0e0;
}

.copy-button .fa-copy {
    font-size: 16px;
}

/* استایل برای زمانی که متن کپی می‌شود */
.copy-button.copied {
    background-color: #4CAF50;
    /* سبز */
    color: white;
}

/* ====================================================
   Section: Welcome Page Styles
   ==================================================== */

/* Main container for the welcome page */
.welcomeMain {
    display: grid;
    grid-template-rows: auto;
    place-items: center;
    height: 100vh;
}

/* Welcome div container */
.welcomeDiv {
    display: grid;
    grid-template-rows: auto auto auto;
    text-align: center;
    border: 1px solid var(--color-white);
    box-sizing: border-box;
    padding: 40px 40px 20px 40px;
    border-radius: 6px;
    direction: rtl;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Contact details section */
.contactDetails {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 10px;
    text-decoration: underline;
    color: var(--color-primary);
    border-top: 1px solid var(--color-border-light);
    padding-top: 1rem;
}

/* Container for logo and language picker */
.logoAndLanPicker {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 1.5rem;
}

/* City picker container div */
.cityPickerDiv {
    margin-bottom: 160px;
}

/* Form inside city picker div */
.cityPickerDiv form {
    display: grid;
    grid-template-rows: auto auto;
    justify-content: center;
    gap: 20px;
}

/* Select container inside city picker div */
.cityPickerDiv .select-container {
    margin: 0;
    justify-self: center;
}

/* ==================================
   بخش لینک‌های انتخاب شهر (صفحه ولکام)
   ================================== */

/* کانتینر اصلی برای لینک‌های شهر */
.city-links-container {
    display: grid;
    /* ایجاد یک گرید دو ستونه که در صفحات کوچک‌تر تک ستونه می‌شود */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    /* فاصله بین دکمه‌ها */
    width: 100%;
    max-width: 450px;
    /* حداکثر عرض کانتینر */
    margin: 20px auto 0;
    /* وسط‌چین کردن و فاصله از بالا */
}

/* استایل هر دکمه/لینک شهر */
.city-link {
    display: block;
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    /* رنگ متن در حالت روشن */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease-in-out;
    /* انیمیشن نرم برای تمام تغییرات */
}

/* افکت هاور (وقتی ماوس روی دکمه می‌رود) */
.city-link:hover,
.city-link:focus {
    background-color: #a3373f;
    /* رنگ اصلی شما */
    color: #ffffff;
    /* متن سفید */
    border-color: #a3373f;
    transform: translateY(-4px);
    /* افکت شناور شدن به سمت بالا */
    box-shadow: 0 6px 12px rgba(163, 55, 63, 0.2);
}

/* --- استایل‌های حالت تاریک --- */
@media (prefers-color-scheme: dark) {
    .city-link {
        background-color: #2c2c2e;
        /* پس‌زمینه تیره‌تر برای دکمه‌ها */
        border-color: #444;
        /* حاشیه کمی روشن‌تر */
        color: #f0f0f0;
        /* متن روشن */
    }
}

/* --- استایل واکنش‌گرا برای صفحات کوچک (موبایل) --- */
@media (max-width: 500px) {
    .city-links-container {
        /* گرید را به تک ستونه تغییر بده */
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ====================================================
   Section: Mobile Responsiveness (@media queries)
   ==================================================== */

/* Styles for screens up to 920px wide */
@media (max-width: 920px) {
    :root {
        --header-height: 56px;
    }

    .header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: var(--header-height, 56px) !important;
        padding: 0 14px !important;
    }

    /* Remove search bar from mobile header per requirement #4 */
    .middle-section,
    .other-middle-section {
        display: none !important;
    }

    main,
    .main-browse,
    .nav-container-div {
        margin-bottom: 160px;
    }

    .ad-container,
    .ads-section {
        padding: 0 20px 60px 20px;
        grid-template-columns: auto;
    }

    /* Show bottom bar for mobile */
    .bottom {
        display: none !important;
    }

    /* Hide ::before pseudo-element for elements with class 'pr' inside bottom bar */
    .bottom .pr::before {
        display: none !important;
    }

    /* Adjust layout for left section: single row logo and city selector */
    .left-section {
        width: auto !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .left-section img {
        height: 38px !important;
        width: auto !important;
    }

    .dashboard-info {
        padding: 20px 20px 5px 20px;
    }

    /* Position select container inline with logo */
    .select-container {
        position: static !important;
        margin: 0 !important;
        width: auto !important;
        right: auto !important;
    }

    .custom-select {
        height: 34px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    /* Hide navigation bar and right header section entirely */
    .nav-bar,
    .right-section {
        display: none !important;
    }

    /* Adjust browse body layout for mobile - content flows directly beneath fixed header */
    .browse-body {
        grid-template-columns: 90vw !important;
        display: block;
        width: 100% !important;
        padding: 0 20px;
        justify-content: center;
        padding-bottom: 60px;
        margin-top: 0 !important;
    }

    .main-container>div.filter-view {
        width: 95% !important;
    }

    .rejected-ad {
        box-shadow: none !important;
    }

    /* Adjust margin for ad body */
    .ad-body {
        margin: 4px 0 !important;
    }

    /* Adjust layout for browse item detail page */
    .browse-portion {
        display: grid;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
    }

    /* Make slider container take full width */
    .slider-container {
        width: 100%;
    }

    /* Adjust info section layout and padding */
    .info-section {
        padding-right: 0;
        display: grid;
        grid-template-rows: auto auto;
        grid-template-columns: 1fr;
        justify-items: center;
        margin-bottom: 150px;
    }

    /* Adjust width for classified info */
    .classified-info {
        width: 90%;
    }

    /* Make ad category, type, price lines take full width */
    .ad-cat,
    .ad-type,
    .ad-condition,
    .ad-price {
        width: 100%;
    }

    .classified-info .diwall-breadcrumbs {
        width: 100%;
        margin: 0 0 12px 0;
        padding: 0;
    }

    .plain-info {
        width: 90%;
    }

    .ad-main-title {
        width: 100%;
    }

    .plain-info {
        margin: 20px 0 180px 0;
    }

    .about-body {
        padding: 20px !important;
        gap: 60px !important;
    }

    .about-body>div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        text-align: center !important;
    }

    .about-body .info-even {
        grid-template-areas: "image" "text" !important;
    }

    .about-body .info-even .about-image {
        grid-area: image !important;
        /* تخصیص ناحیه به تصویر */
    }

    .about-body .info-even div:last-child {
        grid-area: text !important;
        /* تخصیص ناحیه به متن */
    }


    .about-body h1 {
        font-size: 24px !important;
        /* تنظیم اندازه فونت عنوان برای موبایل */
    }

    .about-body p,
    .about-body li {
        font-size: 16px !important;
        /* تنظیم اندازه فونت متن برای موبایل */
        text-align: justify !important;
        /* مرتب‌سازی متن */
        line-height: 1.8 !important;
    }

    .about-image img {
        width: 100% !important;
        /* عرض تصویر برابر با عرض والد */
        max-width: 250px !important;
        /* تعیین یک حداکثر عرض برای جلوگیری از بزرگ شدن بیش از حد */
        height: auto !important;
        /* ارتفاع خودکار برای حفظ نسبت تصویر */
        margin: 0 auto !important;
        /* وسط‌چین کردن تصویر */
    }

    .contact-footer>div:first-child {
        grid-template-columns: 1fr;
        gap: 30px !important;
    }

    .address-phone {
        padding: 20px !important;
        text-align: center;
    }

    .address-phone div {
        justify-content: center !important;
    }


    .header .right-section {
        width: 100% !important;
        justify-content: center !important;
    }

    .main-links {
        width: 100% !important;
        justify-content: space-around !important;
        /* ایجاد فاصله مساوی بین لینک‌ها */
        position: static !important;
        /* حذف position: absolute برای چیدمان بهتر */
    }

    /* Style for contact/report section on mobile */
    .contact-report {
        display: grid;
        grid-template-columns: auto auto;
        grid-template-rows: 50px;
        position: fixed;
        bottom: 44px;
        align-items: center;
        justify-items: center;
        justify-content: center;
        width: 100%;
        background-color: var(--color-white);
        box-sizing: border-box;
        padding: 9px 0;
        direction: rtl;
        height: 67px;
        justify-content: stretch;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    }

    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
        padding: 15px;
        margin: 20px 0;
    }

    div#contact-report-div.ios-theme {
        width: 85%;
        bottom: calc(64pt + env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        border-radius: 15px;
    }

    .deleted-ad {
        height: 80px;
        margin-bottom: 0;
        bottom: 44px;
        padding: 0 20px;
    }

    .ad-rejection-expiration-div {
        position: absolute;
        bottom: -10px;
        background-color: #fff;
        width: 100%;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    }

    /* Reset margin for contact button */
    .contact-button {
        margin: 0;
    }

    /* Adjust max-width for welcome div */
    .welcomeDiv {
        max-width: 370px;
    }

    /* Adjust position for city picker select container */
    .cityPickerDiv .select-container {
        position: relative;
        right: -5%;
    }

    /* Adjust margin for agreement text */
    .rtlAgreement {
        margin-top: 190px !important;
    }

}

/* Styles for screens up to 480px wide */
@media (max-width: 480px) {
    .block-div {
        grid-template-columns: 300px;
        width: 300px;
    }

    /* Adjust position for city picker select container */
    .select-container {
        margin-left: 0;
        right: 10px;
    }

    /* Adjust max height/width and font size for custom select */
    .custom-select {
        max-height: 41px;
        max-width: 128px;
        font-size: 10px;
    }

    .browse-body {
        padding: 0 5px;
        margin-top: 0 !important;
        padding-bottom: 80px;
    }

    /* Adjust max-width for welcome div */
    .welcomeDiv {
        max-width: 280px;
    }

    .fourOFourImage {
        max-height: 200px !important;
    }

    .dashboardDiv {
        padding: 0 !important;
    }

    .dashboard-info-phone {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .toggle-bar.fixed {
        position: fixed;
        width: 100%;
        right: 0;
        z-index: 1000;
        display: grid;
        justify-items: center;
        background-color: var(--color-white);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        align-items: center;
        height: 61px;
    }

    .ad-container,
    .ads-section {
        padding: 0 5px 60px 5px;
    }
}

/* ====================================================
   Section: Browse Body Styles
   ==================================================== */

/* Dashboard div styles */

.dashboardDiv {
    --header-height: 60px;
    display: grid;
    grid-template-rows: auto auto auto;
    width: 100%;
    margin-top: var(--header-height);
    padding: 0 60px;
    direction: rtl;
    gap: 20px;
}

.dashboard-info {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-border-light);
}

.dashboard-info-phone {
    display: flex;
    gap: 7px;
    font-weight: 700;
    font-size: 20px;
}

.dashboard-info-phone p {
    margin: 0;
}

.dashboard-info-phone p:first-child {
    color: var(--color-text-dark-placeholder);
}

.logout-div {
    display: grid;
    grid-template-rows: auto auto auto;
}

.logout-div button {
    width: 90px;
    height: 40px;
    border-radius: 20px;
    border-bottom: 1px solid var(--color-border-medium);
    align-self: center;
    background-color: var(--color-black);
    color: var(--color-white);
}

/* Toggles slider */

.toggle-bar {
    direction: rtl;
    justify-self: center;
    /*     transition: all 0.3s ease;
 */
}



.toggle-container {
    display: flex;
    position: relative;
    width: 80vw;
    background-color: var(--color-white);
    border-radius: 17px;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--color-white);
    height: 46px;
}

.toggle-option {
    flex: 1;
    padding: 10px;
    text-align: center;
    z-index: 1;
    transition: color 0.3s ease;
    color: #333;
}

.toggle-option.active {
    color: var(--color-white);
}

.toggle-slider {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 15px;
    transition: right 0.6s ease;
    z-index: 0;
    box-shadow:
        0 4px 8px rgba(var(--color-primary-rgb), 0.4),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ====================================================
   Section: Create Post Form Styles
   ==================================================== */

.create-post-container {
    width: 100%;
    max-width: 600px;
    /* Limits the width of the form on larger screens */
    margin: 40px auto;
    /* Centers the form and adds space */
    padding: 30px;
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    direction: rtl;
    box-sizing: border-box;
    height: 100%;
    display: grid;
    grid-template-rows: auto auto auto auto;
    justify-items: center;
}

.cat-determine {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    direction: rtl;
    position: absolute;
    font-size: 15px;
    color: var(--color-text-gray);
}

.cat-determine p {
    margin: 0;
    color: var(--color-primary);
}

.cat-determine a:hover {
    color: var(--color-text-dark);
    transition: color 1s linear;

}

.goingBack {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 20px;
}

.goingBack button {
    width: 130px;
    display: grid;
    height: 60px;
    justify-content: center;
    align-content: center;
}

.create-post-container h1 {
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: 10px;
    margin-top: 60px;
}

.create-post-container .form-description {
    text-align: center;
    color: var(--color-text-gray);
    margin-bottom: 30px;
}

.create-post-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    /* Creates space between form steps */
    width: 100%;
}

.form-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Space between label and input */
}

.form-step label {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.create-post-form input[type="text"],
.create-post-form input[type="number"],
.create-post-form textarea,
.price-filter-input {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.create-post-form input[type="text"]:focus,
.create-post-form input[type="number"]:focus,
.create-post-form textarea:focus,
.price-filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.price-filter-wrapper h6 {
    margin: 0;
}

.filter-button {
    height: 47px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}

.filter-buttons {
    margin-top: 10px;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-around;
}

.create-post-form textarea {
    resize: vertical;
    /* Allows vertical resizing */
}

.create-post-form input[type="file"] {
    font-size: 14px;
}

.create-post-form small {
    color: var(--color-text-light-gray);
    font-size: 12px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #8c2d34;
    /* A slightly darker shade for hover */
    transform: translateY(-2px);
}


/* ====================================================
   Section: About Us Styles
   ==================================================== */


/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .create-post-container {
        background-color: var(--color-dark-surface);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    }

    .create-post-container h1 {
        color: var(--color-dark-text);
    }

    .create-post-container .form-description {
        color: var(--color-dark-text-muted);
    }

    .form-step label {
        color: var(--color-dark-text-secondary);
    }

    .create-post-form input[type="text"],
    .create-post-form input[type="number"],
    .create-post-form textarea {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-dark);
        color: var(--color-dark-text);
    }

    .create-post-form input[type="text"]:focus,
    .create-post-form input[type="number"]:focus,
    .create-post-form textarea:focus {
        box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.3);
    }
}

/* ====================================================
   Section: Multi-Step Form Enhancements
   ==================================================== */

/* Step Indicators */
.step-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.step-indicator {
    width: 12px;
    height: 12px;
    background-color: var(--color-border-medium);
    border-radius: 50%;
    transition: background-color 0.4s ease, transform 0.4s ease;
}

.step-indicator.active {
    background-color: var(--color-primary);
    transform: scale(1.2);
}

/* Form Steps Container */
.form-steps-container {
    overflow: hidden;
    /* Helps with animations in the future if needed */
}

.form-step {
    display: none;
    /* Hide all steps by default */
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: flex;
    /* Show only the active step */
    flex-direction: column;
    gap: 8px;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.form-navigation button {
    width: 120px;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-navigation .secondary-btn {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
}

.form-navigation .secondary-btn:hover {
    background-color: #e0e0e0;
}

/* Error Message Styling */
.form-step .error-message {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 500;
    display: none;
    /* Hidden by default */
    margin-top: -4px;
}

.form-step input.invalid,
.form-step textarea.invalid {
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styling for the new price input section */
.price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    /* فاصله بین فیلد قیمت و انتخاب‌گر واحد پولی */
}

.price-input-wrapper input {
    flex-grow: 1;
    /* باعث می‌شود فیلد قیمت فضای باقی‌مانده را پر کند */
    text-align: left;
    /* اعداد بهتر است چپ‌چین باشند */
    direction: ltr;
}

.price-filter-wrapper {
    display: grid;
    grid-template-rows: auto auto auto;
}

.currency-selector {
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: left 0.5rem center;
    padding-left: 2rem;
    /* فضا برای آیکون فلش */
}

/* استایل برای متن پیش‌نمایش قیمت به حروف */
.price-text-preview {
    font-size: 13px;
    color: var(--color-text-gray);
    min-height: 20px;
    /* جلوگیری از پرش صفحه */
    margin-top: 5px;
    text-align: right;
    direction: rtl;
}

/* حذف فلش‌های بالا/پایین از اینپوت‌های عددی در مرورگرهای مختلف */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* ====================================================
   استایل‌های آپلودر تصویر جدید (نمایش اصلی + نوار بندانگشتی)
   ==================================================== */

/* کادر نمایش اصلی */
.main-preview-area {
    width: 100%;
    height: 300px;
    /* اندازه دلخواه شما */
    background-color: #f7f7f7;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-preview-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* تصویر را بدون برش و کامل نمایش می‌دهد */
}

/* نوار افقی برای تصاویر بندانگشتی */
.thumbnail-strip {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    overflow-x: auto;
    /* اجازه اسکرول افقی در صورت زیاد بودن تصاویر */
}

/* استایل هر تصویر بندانگشتی و دکمه افزودن */
.thumbnail-box,
.thumbnail-add-box {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    /* جلوگیری از کوچک شدن آیتم‌ها */
    border: 2px solid #ddd;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* تصویر را کامل و با برش احتمالی نمایش می‌دهد */
}

/* استایل تصویر بندانگشتی فعال (اصلی) */
.thumbnail-box.is-active {
    border-color: #a3373f;
    box-shadow: 0 0 5px rgba(163, 55, 63, 0.4);
}

/* استایل دکمه افزودن در نوار بندانگشتی */
.thumbnail-add-box {
    border-style: dashed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.thumbnail-add-box:hover {
    border-color: #a3373f;
    color: #a3373f;
}

.thumbnail-add-box .add-icon {
    font-size: 30px;
    font-weight: 400;
}

/* دکمه حذف روی هر تصویر بندانگشتی */
.delete-thumb-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: scale(0.8);
}

.thumbnail-box:hover .delete-thumb-btn {
    opacity: 1;
    transform: scale(1);
}

/* استایل برای دکمه افزودن در کادر اصلی (وقتی خالی است) */
.main-add-button {
    text-align: center;
    color: #888;
    cursor: pointer;
}

.main-add-button img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.main-add-button:hover {
    color: #a3373f;
}


/* فوتر آپلودر (راهنما و شمارنده) */
.image-uploader-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* ====================================================
   Section: Contact Us Page Styles
   ==================================================== */

.contact-body {
    padding: 60px 20px;
    background-color: var(--color-white);
    margin-top: 68px;
    /* فاصله از هدر ثابت */
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-page-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    overflow: hidden;
}

/* --- بخش اطلاعات تماس (ستون چپ) --- */
.contact-info-block {
    direction: rtl;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info-block h2 {
    font-size: 26px;
    margin-top: 0;
    margin-bottom: 15px;
}

.contact-info-block p {
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 30px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 16px;
}

.info-list i {
    font-size: 20px;
    width: 30px;
    margin-left: 15px;
}

.info-list a,
.info-list span {
    color: var(--color-white);
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

.social-links-contact-page {
    margin-top: auto;
    /* لینک‌ها را به پایین ستون می‌چسباند */
    padding-top: 20px;
}

.social-links-contact-page a {
    color: var(--color-white);
    margin: 0 12px;
    font-size: 22px;
    transition: opacity 0.3s;
}

.social-links-contact-page a:first-child {
    margin-right: 0;
}

.social-links-contact-page a:hover {
    opacity: 0.8;
}

.social-links svg,
.social-links-contact-page svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
}

/* --- بخش فرم تماس (ستون راست) --- */
.contact-form-block {
    padding: 40px;
    direction: rtl;
}

.contact-form-block h2 {
    font-size: 26px;
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    color: var(--color-black);
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(163, 55, 63, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #8c2d34;
    /* کمی تیره‌تر */
}

/* فیلد تله عسل برای جلوگیری از اسپم */
.honeypot {
    display: none;
}

/* --- واکنش‌گرایی برای موبایل --- */
@media (max-width: 920px) {
    .contact-page-container {
        grid-template-columns: 1fr;
        /* ستون‌ها روی هم قرار می‌گیرند */
    }

    .contact-info-block {
        border-radius: 12px 12px 0 0;
    }

    .contact-form-block {
        border-radius: 0 0 12px 12px;
    }

    .dashboardDiv {
        --header-height: 110px;
        margin-top: var(--header-height);
    }
}

@media (max-width: 768px) {

    /* --- استایل‌های مشترک برای صفحات شرایط و تماس با ما در موبایل --- */
    .terms-body,
    .contact-body {
        padding: 30px 15px;
        /* کاهش فاصله‌گذاری‌های کلی صفحه */
        margin-top: 60px;
        /* ممکن است ارتفاع هدر در موبایل کمتر باشد */
    }

    /* --- استایل‌های اختصاصی صفحه شرایط و ضوابط --- */
    .terms-container {
        padding: 25px 20px;
        /* کاهش فاصله داخلی کادر اصلی */
    }

    .terms-container h1 {
        font-size: 24px;
        /* کاهش اندازه عنوان اصلی */
    }

    .terms-container h2 {
        font-size: 20px;
        /* کاهش اندازه عناوین بخش‌ها */
    }

    .terms-container p,
    .terms-container li {
        font-size: 15px;
        /* کاهش اندازه متن برای خوانایی بهتر */
        line-height: 1.7;
    }

    /* --- استایل‌های اختصاصی صفحه تماس با ما --- */
    /* * این کد در مرحله قبل برای این صفحه ارائه شد،
     * اما برای اطمینان و کامل بودن، آن را اینجا نیز می‌آوریم.
     */
    .contact-page-container {
        grid-template-columns: 1fr;
        /* ستون‌ها روی هم قرار می‌گیرند */
    }

    .contact-info-block,
    .contact-form-block {
        padding: 30px;
    }

    .contact-info-block h2,
    .contact-form-block h2 {
        font-size: 22px;
    }
}

/* ====================================================
   Section: Dark Mode (@media queries)
   ==================================================== */

/* main links content container */
.main-links {
    display: grid;
    grid-template-columns: 120px 120px auto;
    direction: rtl;
    position: absolute;
    right: 0;
    height: 101%;
    box-sizing: border-box;
    align-items: center;
}

/* Links inside main links */
.main-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 20px 0;
    margin: 0;

}

.main-container {
    display: grid;
    grid-template-rows: auto auto;
}

.main-container>div.filter-view {
    display: grid;
    grid-template-columns: auto auto;
    min-width: 74%;
    position: fixed;
    left: 15px;
    top: 70px !important;
    align-items: center;
    z-index: 100;
    margin: 10px 0;
    background-color: rgba(163, 55, 63, 0.9);
    color: var(--color-white);
    border: 1px solid rgba(163, 55, 63, 0.3);
    border-radius: 8px;
    padding: 5px 20px;
    justify-content: space-between;
}

.main-container>div.filter-view>div:first-child {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 40px;
}

.main-container>div.filter-view>div:first-child>div:last-child {
    display: grid;
    grid-template-columns: auto auto auto auto;
    align-items: center;
    gap: 10px;
}

.price-filter-input {
    text-align: center !important;
}

.price-indicator {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.filter-view button {
    color: var(--color-primary);
    background-color: var(--color-white);
    padding: 7px;
    height: 28px;
    width: 28px;
    border-radius: 27px;
    align-content: center;
    display: grid;
}

.filter-view button i {
    font-size: 15px;
}

.filter-view p {
    margin: 0;
}

/* Hover effect for main links menu links */
.main-links a:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-white);
}

.contact-footer {
    display: grid;
    grid-template-rows: 410px auto;
    direction: rtl;
    padding-bottom: 0;
    background: var(--color-primary);
    color: var(--color-white);
}

.contact-footer>div:first-child {
    display: grid;
    grid-template-columns: 50% 50%;
    padding: 30px 20px;
}

.address-phone {
    display: grid;
    grid-template-rows: auto auto auto 170px;
    box-sizing: border-box;
    padding: 20px 40px;
}

/* ====================================================
   Section: Footer Quick Links Styles
   ==================================================== */

/* استایل کلی کانتینر دسترسی سریع */
.quick-links {
    direction: rtl;
    /* اطمینان از راست‌چین بودن */
    color: white;
}

/* استایل عنوان "دسترسی سریع" */
.quick-links h4 {
    font-size: 18px;
    font-weight: 700;
    /* کمی ضخیم‌تر برای تاکید */
    margin-bottom: 15px;
    /* فاصله از لیست لینک‌ها */
    padding-bottom: 10px;
    /* فاصله متن از خط زیرین */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    /* یک خط جداکننده شیک */
}

/* استایل لیست اصلی (ul) */
.quick-links ul {
    list-style-type: none;
    /* حذف نقطه‌های کنار لیست (مهم‌ترین بخش) */
    padding: 0;
    /* حذف فاصله داخلی پیش‌فرض */
    margin: 0;
}

/* استایل هر آیتم در لیست */
.quick-links li {
    margin-bottom: 12px;
    /* ایجاد فاصله عمودی بین لینک‌ها */
}

/* استایل خود لینک‌ها (a) */
.quick-links a {
    color: white;
    text-decoration: none;
    /* حذف زیرخط پیش‌فرض */
    font-size: 15px;
    opacity: 0.9;
    /* کمی شفافیت برای خوانایی بهتر */
    transition: all 0.3s ease;
    /* انیمیشن نرم برای حالت هاور */
}

/* استایل لینک‌ها در زمان هاور (وقتی ماوس روی آن‌ها می‌رود) */
.quick-links a:hover {
    opacity: 1;
    /* بازگشت به شفافیت کامل */
    padding-right: 5px;
    /* ایجاد یک حرکت کوچک به سمت راست */
}

.social-links {
    display: grid !important;
    grid-template-columns: repeat(6, auto) !important;
    padding-top: 15px !important;
    margin-top: 15px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.3);
}

.social-links a {
    color: white;
    margin: 0 10px;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ddd;
}

.address-phone i {
    font-size: 16px;
}

.address-phone div {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.copyright>div {
    height: 100%;
    display: grid;
    grid-template-rows: auto auto auto auto;
    justify-content: center;
    text-align: center;
}

.copyright {
    background-color: var(--color-black);
    padding: 0;
}

.copyright h6 {
    direction: ltr;
    margin: 0;
}

.copyright h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.about-body {
    margin-top: 75px;
    display: grid;
    grid-template-rows: auto auto auto;
    padding: 20px 60px;
    gap: 140px;
}

.about-image img {
    height: 290px;
}

.about-body>div {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 140px;
}

.about-body p {
    direction: rtl;
    line-height: 30px;
}

.info-even {
    direction: rtl;
}

.info-even div:last-child,
.info-odd div:last-child {
    direction: rtl;
}

/* ====================================================
   Section: Terms and Conditions Page Styles
   ==================================================== */

.terms-body {
    padding: 40px 20px;
    background-color: #f4f4f4;
    /* یک پس‌زمینه خنثی */
    margin-top: 68px;
    /* فاصله از هدر ثابت */
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    direction: rtl;
    /* اطمینان از راست‌چین بودن محتوا */
}

.terms-container h1 {
    text-align: center;
    font-size: 28px;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.terms-container .last-updated {
    text-align: center;
    color: var(--color-text-gray);
    margin-bottom: 30px;
    font-size: 14px;
}

.terms-container h2 {
    font-size: 22px;
    color: var(--color-primary);
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border-light);
}

.terms-container p,
.terms-container li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: justify;
}

.terms-container ul {
    list-style-position: inside;
    padding-right: 20px;
    /* ایجاد فاصله برای لیست */
}

.terms-container li {
    margin-bottom: 12px;
}

.terms-container a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.terms-container a:hover {
    text-decoration: underline;
}

.terms-container strong {
    font-weight: 700;
    color: var(--color-text-dark);
}

.disclaimer-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #fffbe6;
    /* رنگ زرد کم‌رنگ برای جلب توجه */
    border: 1px solid #ffe58f;
    border-radius: 6px;
    color: #8a6d3b;
}

.disclaimer-box p {
    margin: 0;
    color: #8a6d3b !important;
}

@media (max-width: 768px) {

    /* ۱. صفحه درباره ما (About Us) */
    .about-body {
        margin-top: 60px;
        /* کاهش فاصله از هدر */
        padding: 20px;
        /* کاهش پدینگ کلی */
        gap: 60px;
        /* کاهش فاصله زیاد بین بخش‌ها */
    }

    .about-body>div {
        grid-template-columns: 1fr;
        /* تبدیل گرید دو ستونه به تک ستونه */
        gap: 30px;
        /* کاهش فاصله بین عکس و متن */
        text-align: center;
        /* وسط‌چین کردن محتوا در حالت تک ستونه */
    }

    .about-body .about-image {
        /* برای چیدمان بهتر، عکس را در ردیف اول قرار می‌دهیم */
        order: -1;
    }

    .about-image img {
        height: auto;
        /* ارتفاع خودکار برای حفظ نسبت تصویر */
        max-width: 250px;
        /* محدود کردن عرض عکس */
        margin: 0 auto;
    }

    .about-body p {
        text-align: justify;
        /* حفظ تراز متن */
    }

    /* برعکس کردن چیدمان برای ردیف‌های زوج در موبایل دیگر لازم نیست */
    .info-even {
        direction: ltr;
        /* بازگرداندن به حالت پیش‌فرض */
    }

    .info-even div:last-child,
    .info-odd div:last-child {
        direction: rtl;
    }


    /* ۲. صفحه شرایط و ضوابط (Terms & Conditions) */
    .terms-body {
        padding: 20px 10px;
        /* کاهش پدینگ */
        margin-top: 60px;
    }

    .terms-container {
        padding: 20px 20px;
        /* کاهش پدینگ داخلی باکس */
    }

    .terms-container h1 {
        font-size: 24px;
        /* کاهش اندازه فونت عنوان اصلی */
    }

    .terms-container h2 {
        font-size: 20px;
        /* کاهش اندازه فونت عناوین بخش‌ها */
    }

    .terms-container p,
    .terms-container li {
        font-size: 15px;
        /* کمی کوچک‌تر کردن متن برای خوانایی بهتر */
    }


    /* ۳. فوتر (Footer) */
    .contact-footer>div {
        /* تبدیل چیدمان دو ستونه فوتر به تک ستونه */
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .contact-footer iframe {
        /* تضمین می‌کند که نقشه از کادر بیرون نزند */
        width: 100%;
        height: 250px;
    }

    .main-container>div.filter-view {
        margin-top: 140px;
    }
}

/* ====================================================
   Section: Admin Panel Styles
   ==================================================== */

.admin-panel-container {
    max-width: 1200px;
    margin: 100px auto 40px auto;
    /* فاصله از بالا (برای هدر) و پایین */
    padding: 0 20px;
    direction: rtl;
}

/* استایل نوار ناوبری پنل ادمین */
.admin-nav-bar {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 600px;
    /* می‌توانید عرض را تنظیم کنید */
    margin: 0 auto 30px auto;
    background-color: #f0f0f0;
    /* رنگ پس‌زمینه مشابه toggle-bar */
    border-radius: 12px;
    padding: 5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .admin-nav-bar {
        background-color: var(--color-dark-input-background);
        border: 1px solid var(--color-dark-border-medium);
    }
}


/* گزینه‌های ناوبری */
.admin-nav-option {
    flex: 1;
    padding: 12px 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    user-select: none;
    z-index: 1;
    transition: color 0.4s ease;
}

/* استایل گزینه فعال */
.admin-nav-option.active {
    color: var(--color-white);
}

@media (prefers-color-scheme: dark) {
    .admin-nav-option {
        color: var(--color-dark-text-secondary);
    }

    .admin-nav-option.active {
        color: var(--color-dark-text);
    }
}


/* اسلایدر متحرک زیر گزینه‌ها */
.admin-nav-slider {
    position: absolute;
    top: 5px;
    right: 5px;
    width: calc(100% / 3);
    /* چون سه گزینه داریم */
    height: calc(100% - 10px);
    background-color: var(--color-primary);
    border-radius: 8px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 0;
    box-shadow: 0 3px 10px rgba(var(--color-primary-rgb), 0.3);
}

/* کانتینر اصلی محتوای تب‌ها */
.admin-content-panes {
    position: relative;
}

/* هر بخش از محتوا */
.admin-content-pane {
    display: none;
    /* به صورت پیش‌فرض مخفی */
    animation: fadeIn 0.5s ease-in-out;
}

/* نمایش بخش فعال */
.admin-content-pane.active {
    display: block;
}

/* پیام برای تب‌های خالی */
.empty-pane-message {
    text-align: center;
    padding: 80px 20px;
    font-size: 18px;
    color: var(--color-text-gray);
    background-color: #fafafa;
    border: 1px dashed var(--color-border-light);
    border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
    .empty-pane-message {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-dark);
        color: var(--color-dark-text-muted);
    }
}

/* انیمیشن محو شدن برای نمایش نرم‌تر */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل برای آیتم‌های گزارش شده در لیست */
.reported-ad-item .photo-holder {
    position: relative;
    /* برای جای‌گذاری بج */
}

/* استایل بج تعداد گزارش */
.report-count-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.report-count-badge i {
    font-size: 12px;
}

/* استایل برای کادر خلاصه گزارشات ادمین */
.admin-report-summary {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    direction: rtl;
    width: 70%;
}

.admin-report-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #8a6d3b;
    border-bottom: 1px solid #ffe58f;
    padding-bottom: 10px;
}

.admin-report-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-report-summary li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #333;
}

.admin-report-summary li:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* ====================================================
   Section: Support Tickets Styles
   ==================================================== */

.tickets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* فاصله بین تیکت‌ها */
}

.ticket-item {
    background-color: #fff;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.ticket-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fafafa;
    border-bottom: 1px solid var(--color-border-light);
}

.ticket-sender-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-sender-info strong {
    font-size: 16px;
    color: var(--color-text-dark);
}

.ticket-sender-info a {
    font-size: 14px;
    color: var(--color-text-secondary);
    text-decoration: none;
}

.ticket-sender-info a:hover {
    text-decoration: underline;
}

.delete-ticket-btn {
    background-color: #28a745;
    /* رنگ سبز برای انجام شدن */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.delete-ticket-btn:hover {
    background-color: #218838;
    /* سبز تیره‌تر */
}

.ticket-phone {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #fdfdfd;
    border-bottom: 1px solid #f0f0f0;
}

.ticket-phone a {
    color: var(--color-primary);
}


.ticket-message {
    padding: 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.ticket-message p {
    margin: 0;
    white-space: pre-wrap;
    /* برای حفظ فاصله‌ها و خطوط جدید */
}

nav.ios-theme {
    width: 85%;
    bottom: calc(8pt + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    border-radius: 15px;
}

/* استایل‌های حالت تاریک */
@media (prefers-color-scheme: dark) {
    .ticket-item {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-dark);
    }

    .ticket-header {
        background-color: #222;
        /* کمی تیره‌تر از سطح */
        border-bottom-color: var(--color-dark-border-dark);
    }

    .ticket-sender-info strong {
        color: var(--color-dark-text);
    }

    .ticket-sender-info a {
        color: var(--color-dark-text-muted);
    }

    .ticket-phone {
        background-color: #202020;
        border-bottom-color: #2a2a2a;
    }

    .ticket-message {
        color: var(--color-dark-text-light);
    }
}


/* ===================================================================
   نوار ناوبری شیشه مایع (Liquid Glass) - نسخه واکنش‌گرا (Responsive)
   =================================================================== */

/* مرحله ۱: مخفی کردن نوار ناوبری به صورت پیش‌فرض (برای صفحه‌های بزرگ‌تر از ۹۲۰ پیکسل)
*/
nav.liquid-glass {
    display: none;
}

/* مرحله ۲: نمایش و اعمال استایل‌ها فقط برای صفحه‌هایی با عرض ۹۲۰ پیکسل یا کمتر
*/
@media (max-width: 920px) {

    /* ۱. موقعیت‌یابی و ساختار اصلی نوار */
    /* این کد روی تگ <nav id="bottom-nav" class="liquid-glass"> شما اعمال می‌شود */
    nav.liquid-glass {
        display: flex;
        flex-direction: row;
        direction: rtl;
        position: fixed;
        z-index: 1000;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(16pt + env(safe-area-inset-bottom));
        width: 92%;
        max-width: 380px;
        height: 60px;
        padding: 0 10px;
        justify-content: space-around;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.65) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        backdrop-filter: blur(16px) !important;
        border-radius: 30px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.15),
            inset 0 1px 1px rgba(255, 255, 255, 0.8);
        transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    }

    html[dir="ltr"] nav.liquid-glass,
    html[lang="en"] nav.liquid-glass {
        direction: ltr;
    }

    nav.liquid-glass a {
        color: rgba(0, 0, 0, 0.55);
        font-size: 22px;
        text-decoration: none;
        width: 44px;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.3s ease;
        border-radius: 50%;
    }

    nav.liquid-glass a.active,
    nav.liquid-glass a.active-nav-link {
        color: #a3373f !important;
        background-color: rgba(163, 55, 63, 0.12) !important;
        transform: scale(1.1);
    }

    nav.liquid-glass a[style*="color: #a3373f"] {
        transform: scale(1.1);
    }

    nav.liquid-glass a:not(.active):not(.active-nav-link):not([style*="color: #a3373f"]):hover {
        color: #000;
        background-color: rgba(0, 0, 0, 0.05);
    }

    .no-posts-container {
        width: 100%;
    }
}

/* کانتینر اصلی */
.category-selection-container {
    position: relative;
    overflow: visible;
    max-width: 900px;
    margin: 1.5rem auto 5rem;
    padding: 0 1rem;
    direction: ltr;
}

/* استایل مشترک برای هر دو صفحه (View) */
.category-view {
    width: 100%;
    direction: rtl;
}

/* مخفی کردن View غیرفعال */
.category-view:not(.active) {
    display: none !important;
}

.category-view.active {
    display: block !important;
    overflow: visible;
}

.view-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-black);
    font-size: 1.5rem;
}

/* استایل گرید کارت‌ها */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

/* استایل هر کارت */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background-color: var(--color-white);
    border: 1px solid #444;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-black);
    transition: background-color 0.2s, border-color 0.2s;
    text-align: center;
    height: 120px;
}

.category-card:hover {
    background-color: var(--color-background-hover);
    /**/
    border-color: #a3373f;
    /* رنگ اصلی شما */
}

.category-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #a3373f;
    /* رنگ اصلی شما */
}

.category-card span {
    font-size: 0.9rem;
    font-weight: bold;
}

/* استایل‌های صفحه زیرشاخه‌ها */
.view-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.back-button {
    background: none;
    border: none;
    color: var(--color-black);
    /**/
    font-size: 2rem;
    cursor: pointer;
    padding: 0 15px;
    position: absolute;
    right: 0;
}

#subcategory-title {
    flex-grow: 1;
    /* باعث می‌شود عنوان در مرکز قرار بگیرد */
}

.category-form {
    margin-bottom: 50px;
}

.category-form>form {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 80% auto;
    justify-content: center;
}

.category-form input {
    border: 1px solid var(--color-border-medium);
    padding: 10px 30px;
    text-align: center;
    border-radius: 0 8px 8px 0;
}

.category-form button {
    border: 1px solid var(--color-border-medium);
    border-right: none;
    padding: 0 20px;
    border-radius: 8px 0 0 8px;
}

.subcategory-list a {
    display: block;
    padding: 18px 15px;
    background-color: var(--color-white);
    /**/
    border: 1px solid #444;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--color-black);
    transition: background-color 0.2s, border-color 0.2s;
}

.subcategory-list a:hover {
    background-color: var(--color-background-hover);
    /**/
    border-color: #a3373f;
}

/* ===================================================================
   بخش استایل‌های مودال اطلاعات تماس (بر اساس ساختار کاربر)
   =================================================================== */

/* --- استایل پایه و ساختار کلی --- */

/* این کلاس را به div اصلی مودال خود اضافه کنید تا پس‌زمینه تیره و وسط‌چین شود */
/* .modal { ... } */

/* این کلاس را به کانتینر محتوای مودال بدهید */
.contact-modal-content {
    direction: rtl;
    width: 90%;
    max-width: 380px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 25px;
    text-align: center;
}

.contact-info-wrapper h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.contact-number-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid;
    /* رنگ توسط متغیر تعیین می‌شود */
    border-radius: 8px;
    padding: 8px;
    direction: ltr;
    /* برای نمایش صحیح شماره و دکمه کنار هم */
}

a.phone-number {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 0 15px;
    flex-grow: 1;
    /* فضای باقی‌مانده را می‌گیرد */
    text-align: center;
}

button.copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* جلوگیری از شکستن متن */
}

button.copy-button i {
    font-size: 16px;
}

/* استایل برای حالت "کپی شد" */
button.copy-button.copied {
    background-color: #28a745 !important;
    color: white !important;
}

/* استایل بخش لاگین */
.login-prompt-wrapper h3 {
    /* یک کلاس والد برای حالت لاگین نکرده در نظر بگیرید */
    font-size: 16px;
    margin: 0 0 25px 0;
}

.do-cancel-div {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.do-cancel-div>* {
    /* استایل مشترک برای دکمه و لینک */
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    text-decoration: none;
}

.do-cancel-div>a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* --- استایل‌های تم روشن (با متغیرهای :root) --- */
.contact-modal-content {
    background-color: var(--color-white);
}

.contact-info-wrapper h3,
.login-prompt-wrapper h3 {
    color: var(--color-text-dark);
}

.contact-number-container {
    background-color: #f9f9f9;
    border-color: var(--color-border-light);
}

a.phone-number {
    color: var(--color-primary);
}

button.copy-button {
    background-color: var(--color-background-hover);
    color: var(--color-text-dark);
}

.do-cancel-div button {
    background-color: var(--color-background-hover);
    color: var(--color-text-dark);
    border: 1px solid var(--color-border-medium);
}

.do-cancel-div a {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ===================================================================
   استایل برای چک‌باکس‌های سفارشی
   =================================================================== */
.form-step-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    margin-top: -5px;
    text-align: right;
    line-height: 1.6;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.checkbox-wrapper:hover {
    border-color: var(--color-primary);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
    /* مخفی کردن چک‌باکس اصلی */
}

.checkbox-wrapper label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    color: var(--color-text-dark);
}

.checkbox-wrapper label i {
    font-size: 22px;
    margin-left: 12px;
}

.checkbox-wrapper label .fa-whatsapp {
    color: #25D366;
}

.checkbox-wrapper label .fa-telegram {
    color: #229ED9;
}

/* ساخت چک‌باکس سفارشی */
.checkbox-wrapper label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border-medium);
    border-radius: 4px;
    margin-right: auto;
    /* چک‌باکس را به سمت چپ هل می‌دهد */
    transition: all 0.2s ease;
}

/* استایل وقتی چک‌باکس فعال است */
.checkbox-wrapper input:checked+label::before {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ساخت علامت تیک در داخل چک‌باکس */
.checkbox-wrapper input:checked+label::after {
    content: '';
    position: absolute;
    right: 25px;
    /* تنظیم موقعیت تیک */
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 7px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
}

/* استایل برای اعلان اطلاعات اجباری */
.mandatory-info {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.mandatory-info i {
    font-size: 20px;
    margin-left: 12px;
}

/* --- استایل‌های تم روشن --- */
.mandatory-info {
    background-color: #f0f8ff;
    /* یک آبی بسیار کم‌رنگ */
    color: #5b6a79;
    border: 1px solid #d1e7fd;
}

.mandatory-info i {
    color: #0d6efd;
}

/* --- استایل‌های تم تیره --- */
@media (prefers-color-scheme: dark) {
    .mandatory-info {
        background-color: rgba(13, 110, 253, 0.1);
        color: #a7caff;
        border: 1px solid rgba(13, 110, 253, 0.3);
    }

    .mandatory-info i {
        color: #58a6ff;
    }

    nav.liquid-glass {
        background-color: rgba(28, 28, 30, 0.7) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        backdrop-filter: blur(15px) !important;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 1px rgba(255, 255, 255, 0.1);
    }

    nav.liquid-glass a {
        color: rgba(255, 255, 255, 0.65);
    }

    nav.liquid-glass a.active,
    nav.liquid-glass a[style*="color: #a3373f"] {
        color: #ff6b6b;
    }

    nav.liquid-glass a:not(.active):not([style*="color: #a3373f"]):hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.08);
    }
}

.caution-info {
    background-color: rgba(163, 55, 63, 0.1);
    color: #a3373f;
    border: 1px solid rgba(163, 55, 63, 0.3);
}

.caution-info i {
    color: #a3373f;
}

/* --- استایل‌های حالت تیره --- */
@media (prefers-color-scheme: dark) {
    .form-step-description {
        color: var(--color-dark-text-secondary);
    }

    .checkbox-wrapper {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-dark);
    }

    .checkbox-wrapper label {
        color: var(--color-dark-text);
    }

    .checkbox-wrapper label::before {
        border-color: var(--color-dark-border-dark);
    }

    .checkbox-wrapper:hover {
        border-color: var(--color-primary);
    }
}

/* --- بازنویسی استایل‌ها برای تم تیره --- */
@media (prefers-color-scheme: dark) {
    .contact-modal-content {
        background-color: var(--color-dark-surface);
    }

    .contact-info-wrapper h3,
    .login-prompt-wrapper h3 {
        color: var(--color-dark-text);
    }

    .contact-number-container {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-dark);
    }

    a.phone-number {
        color: var(--color-dark-text);
    }

    button.copy-button {
        background-color: var(--color-dark-border-medium);
        color: var(--color-dark-text);
    }

    .do-cancel-div button {
        background-color: var(--color-dark-border-medium);
        color: var(--color-dark-text);
        border: 1px solid var(--color-dark-border-dark);
    }

    .do-cancel-div a {
        background-color: var(--color-primary);
        color: var(--color-white);
    }
}

/* استایل‌های پیش‌لودر */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #f8f9fa;
    /* یک رنگ سفید مایل به خاکستری برای پس‌زمینه */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* انیمیشن برای لوگو */
.preloader-logo {
    width: 80px;
    /* اندازه لوگو */
    height: auto;
    animation: pulse 1.5s infinite ease-in-out;
}


/* =======================================
   استایل نوار فیلتر برای موبایل (نسخه اصلاح شده)
   ======================================= */

/* این استایل‌ها فقط روی صفحات کوچک‌تر از 768px اعمال می‌شوند */
@media (max-width: 768px) {

    .filter-options {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: absolute;
        width: 100%;
        left: 0;
        top: 25px;
        padding: 8px 15px;
        background-color: var(--color-background-light, #f8f9fa);
        border-bottom: 1px solid var(--color-border-light, #e0e0e0);
        box-sizing: border-box;
    }

    /* استایل بخش دسته‌بندی (مثال: املاک > کرایی) */
    .filter-options .cat-determine {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        white-space: nowrap;
        position: relative;

    }

    .filter-options .cat-determine a {
        color: var(--color-text-secondary, #555);
        text-decoration: none;
        font-weight: 500;
    }

    .filter-options .cat-determine p {
        color: var(--color-text-gray, #888);
        margin: 0;
    }

    /* استایل جدید و مدرن برای دکمه فیلتر */
    .filter-options button#filter {
        display: flex;
        align-items: center;
        gap: 8px;
        /* فاصله بین آیکون و متن */
        padding: 8px 16px;
        background-color: #a3373f;
        /* رنگ اصلی شما */
        color: white;
        border: none;
        border-radius: 20px;
        /* گرد کردن کامل برای ظاهر مدرن */
        font-size: 14px;
        font-weight: bold;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.2s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .filter-options button#filter:hover {
        background-color: #8a2d34;
        /* رنگ تیره‌تر برای هاور */
        transform: scale(1.05);
    }

    .filter-options button#filter i {
        font-size: 12px;
    }

    /* --- استایل‌های حالت تاریک --- */
    @media (prefers-color-scheme: dark) {
        .filter-options {
            background-color: #2c2c2e;
            /* پس‌زمینه تیره‌تر برای نوار فیلتر */
            border-bottom-color: var(--color-border-dark, #3a3a3c);
        }

        .filter-options .cat-determine a {
            color: var(--color-text-light, #e0e0e0);
        }

        .filter-options .cat-determine p {
            color: var(--color-text-gray-dark, #888);
        }
    }
}

/* =======================================
   استایل مودال فیلتر (موبایل)
   ======================================= */

/* پس‌زمینه تیره و تمام صفحه مودال (Overlay) */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* کلید اصلی: محتوا را به پایین می‌چسباند */

    /* به صورت پیش‌فرض مخفی است */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

/* باکس اصلی محتوای مودال */
.filter-modal-content {
    background-color: var(--color-white, #ffffff);
    width: 100%;
    max-width: 500px;
    /* برای تبلت‌ها */
    padding: 20px;
    padding-top: 45px;
    /* فضای بیشتر در بالا برای دکمه بستن */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);

    /* انیمیشن نرم برای باز شدن از پایین */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

/* دکمه بستن مودال */
.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    /* برای RTL در سمت راست */
    background: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    color: #555;
}

[dir="ltr"] .close-modal-btn {
    right: auto;
    left: 15px;
    /* برای LTR در سمت چپ */
}


/* حالت باز شده مودال */
.filter-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.filter-modal.is-open .filter-modal-content {
    transform: translateY(0);
}


/* --- استایل‌های حالت تاریک --- */
@media (prefers-color-scheme: dark) {
    .filter-modal-content {
        background-color: #2c2c2e;
    }

    .close-modal-btn {
        background: #4a4a4e;
        color: #e0e0e0;
    }
}

/* پایان مدیا کوئری */

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}



/* ۳. جادوی اصلی: نمایش و مخفی کردن خودکار با HTMX */
/* HTMX به صورت خودکار کلاس 'htmx-request' را به تگ <body> اضافه می‌کند
   زمانی که یک درخواست در حال انجام است. ما از این کلاس برای نمایش لودر استفاده می‌کنیم.
*/
body:not(.htmx-request) #htmx-loader-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* Dark Mode Styles */

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-dark-background);
        color: var(--color-dark-text);
    }

    .header {
        background-color: var(--color-dark-surface);
        border-bottom-color: var(--color-dark-border-medium);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
        padding: 0 10px;
    }

    #search-results,
    #page-search-results {
        background-color: #2d2d2d;
        /* پس‌زمینه خاکستری تیره */
        border-color: #444;
        /* رنگ بوردر کمی روشن‌تر */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        /* سایه تیره‌تر */
    }

    #preloader {
        background-color: #181818;
        /* یک رنگ خاکستری بسیار تیره */
    }

    /* این کد رنگ لوگوی شما را در حالت تاریک برعکس می‌کند تا دیده شود */
    /* اگر لوگوی شما نسخه روشن جداگانه‌ای دارد، این بخش را حذف کنید */
    .preloader-logo {
        filter: invert(1) hue-rotate(180deg);
    }

    /* ۲. استایل آیتم‌های داخل نتایج در حالت تاریک */
    #search-results a,
    #search-results .search-no-result,
    #page-search-results a,
    #page-search-results .search-no-result {
        color: #e0e0e0;
        /* رنگ متن روشن */
        border-top-color: #444;
        /* رنگ خط جداکننده */
    }

    /* ۳. استایل هاور آیتم‌ها در حالت تاریک */
    #search-results a:hover,
    #page-search-results a:hover {
        background-color: #4a4a4a;
        /* پس‌زمینه هاور کمی روشن‌تر */
    }

    #htmx-loader-overlay {
        background-color: rgba(24, 24, 24, 0.7);
        /* پس‌زمینه تیره با ۷۰٪ شفافیت */
    }

    /* ۴. استایل متن "در دسته..." در حالت تاریک */
    .search-result-item .in-category-text {
        color: #999;
        /* رنگ خاکستری برای متن فرعی */
    }

    .about-header,
    .ios-theme {
        background-color: rgba(28, 28, 30, 0.7) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4) !important;
    }

    .nav-bar {
        border-left-color: var(--color-dark-border-medium);
        box-shadow: -4px 0 6px rgba(0, 0, 0, 0.5);
    }

    .category-card {
        background-color: var(--color-dark-input-background);
        color: var(--color-white);
    }

    .category-card:hover {
        background-color: var(--color-text-dark);
    }

    .subcategory-list a:hover {
        background-color: var(--color-dark-surface);
    }

    .subcategory-list a {
        background-color: var(--color-dark-input-background);
        color: var(--color-dark-text);

    }

    .price-filter-input {
        background-color: var(--color-dark-input-background);
        color: var(--color-white);
    }

    .back-button,
    .view-title {
        color: var(--color-dark-text);
    }

    a {
        color: var(--color-dark-text);
    }

    .right-section i {
        color: var(--color-dark-icon-default);
    }

    .right-section i:hover {
        color: var(--color-dark-text);
    }

    .middle-section input {
        border-color: var(--color-dark-border-dark);
        background-color: var(--color-dark-input-background);
        color: var(--color-dark-text);
    }

    .middle-section button {
        border-color: var(--color-dark-border-dark);
        background-color: var(--color-dark-input-background);
        color: var(--color-dark-text);
    }

    .middle-section button:hover {
        background-color: var(--color-dark-border-dark);
    }

    .toggle-container {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-surface);
    }

    .toggle-option {
        color: var(--color-dark-icon-default);
    }

    .custom-select,
    .language-options,
    .options {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-dark);
    }

    .options div {
        color: var(--color-dark-text-light);
    }

    .custom-select span {
        color: var(--color-dark-text);
    }

    .custom-select i {
        color: var(--color-primary);
    }

    .options div:hover,
    .language-options div:hover {
        background-color: var(--color-dark-border-medium);
    }

    .side-menu {
        background-color: var(--color-dark-surface);
    }

    .side-menu-content a {
        color: var(--color-dark-text);
    }

    .side-menu-content a:hover {
        background-color: var(--color-dark-border-medium);
    }

    .category-ul {
        color: var(--color-dark-text-muted);
    }

    .category-ul>li:hover {
        color: var(--color-dark-icon-default);
    }

    .toggle-bar.fixed {
        background-color: var(--color-dark-background);
    }

    .sub-menu li {
        color: var(--color-dark-text-secondary);
    }

    .sub-menu li:hover {
        color: var(--color-dark-icon-default);
    }

    .sub-menu li.active-submenu-item {
        color: var(--color-dark-icon-default);
    }

    .sub-menu li.active-submenu-item a {
        color: var(--color-dark-icon-default);
    }


    .ad-body {
        border-color: var(--color-dark-border-dark);
        background-color: var(--color-dark-surface);
    }

    .ad-description p {
        color: var(--color-dark-icon-default);
    }

    .ad-price-time:last-child {
        color: var(--color-dark-icon-default);
    }


    .browse-body .ad-body {
        background-color: var(--color-dark-surface);
        border: 1px solid var(--color-dark-border-medium);
    }

    #share-modal .modal-content,
    .modal-content {
        background: var(--color-dark-surface);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    }

    .share-modal-header {
        border-bottom-color: var(--color-dark-border-medium);
    }

    .share-modal-header p {
        color: var(--color-dark-text);
    }

    .share-modal-header .close-share-modal {
        color: var(--color-dark-text-muted);
    }

    .share-modal-header .close-share-modal:hover {
        color: var(--color-dark-text);
    }

    .share-option-item {
        color: var(--color-dark-text-secondary);
    }

    .contact-info-wrapper {
        background: var(--color-dark-surface);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    }

    .currency-selector {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-dark);
    }

    /* ** اصلاح اینجا برای رنگ طوسی خنثی آیکون ها در دارک مود ** */
    .share-option-item i {
        color: var(--color-dark-icon-default);
        /* استفاده از رنگ طوسی پیش فرض دارک مود */
    }

    /* ** حذف یا کامنت کردن استایل های رنگ شبکه های اجتماعی خاص در دارک مود ** */
    /*
       .share-option-item[data-channel="telegram"] i { color: #3fb0f0; }
       .share-option-item[data-channel="whatsapp"] i { color: #3ee077; }
       .share-option-item[data-channel="sms"] i { color: #6ab2ff; }
       .share-option-item[data-channel="copy"] i { color: #ffd740; }
       */

    .share-option-item:hover {
        color: var(--color-dark-text);
    }

    .share-option-item:hover i {
        color: var(--color-dark-text);
    }

    #copy-feedback {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--color-dark-text);
    }

    @media (max-width:920px) {
        .contact-report {
            background-color: var(--color-dark-surface);
        }
    }

    .ad-title,
    .ad-price-time,
    .ad-description {
        color: var(--color-dark-text);
    }

    .ad-description p {
        color: var(--color-dark-icon-default);
    }

    .ad-price-time:last-child {
        color: var(--color-dark-icon-default);
    }

    /* Adjust colors for specific elements in browse item details */
    .info-section {
        color: var(--color-dark-text);
    }

    .main-links a {
        color: var(--color-white);
    }

    .ad-cat,
    .ad-type,
    .ad-condition,
    .ad-price {
        border-bottom-color: var(--color-dark-border-dark);
    }

    .ad-main-title p {
        color: var(--color-dark-icon-default);
    }

    .diwall-breadcrumbs li {
        color: var(--color-dark-icon-default);
    }

    .diwall-breadcrumbs a {
        color: var(--color-dark-text);
    }

    .diwall-breadcrumbs a:hover {
        color: var(--color-primary);
    }

    .diwall-breadcrumbs [aria-current="page"] {
        color: var(--color-dark-text);
    }

    .diwall-breadcrumbs .sep {
        color: var(--color-dark-border-medium);
    }

    .plain-info {
        color: var(--color-dark-text);
    }

    /* Adjust colors for slider navigation and thumbnails */
    .prev,
    .next {
        background: rgba(255, 255, 255, 0.3);
        color: var(--color-dark-background);
    }

    .thumb {
        border-color: transparent;
    }

    .thumb.active {
        border-color: var(--color-dark-icon-default);
    }

    /* Adjust colors for lightbox and close button */
    .lightbox {
        background: rgba(0, 0, 0, 0.9);
    }

    .close {
        color: var(--color-dark-text);
    }

    #save-btn {
        background: var(--color-dark-border-medium);
        color: var(--color-dark-text);
    }

    /* Adjust colors for viewing section (contact/report) */
    .viewing-section {
        color: var(--color-dark-text);
    }

    .contact-button {
        background-color: var(--color-primary);
        color: var(--color-dark-text);
    }

    .report a {
        color: var(--color-dark-icon-default);
    }

    /* Adjust colors for welcome page */
    .welcomeMain {
        background-color: var(--color-dark-background);
    }

    .welcomeDiv {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-medium);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), 0 12px 24px rgba(0, 0, 0, 0.7);
        color: var(--color-dark-text);
    }

    .contactDetails {
        border-top-color: var(--color-dark-border-dark);
        color: var(--color-dark-icon-default);
    }

    .contactDetails a {
        color: var(--color-dark-icon-default);
    }

    /* Adjust colors for city picker */
    .cityPickerDiv .custom-select {
        background-color: var(--color-dark-surface);
        border-color: var(--color-dark-border-dark);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.4);
    }

    .cityPickerDiv .custom-select:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.5);
    }

    .cityPickerDiv .custom-select span {
        color: var(--color-dark-text);
    }

    .cityPickerDiv .custom-select i {
        color: var(--color-dark-icon-default);
    }

    /* Adjust colors for login page */
    .main-browse {
        background-color: var(--color-dark-background);
        color: var(--color-dark-text);
    }

    .loginInput {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-dark);
        color: var(--color-dark-text);
    }

    .loginInput:focus {
        border-color: var(--color-dark-icon-default);
    }

    #search-results,
    #page-search-results {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-medium);
        color: var(--color-dark-text-light);
    }

    #search-results a,
    #page-search-results a {
        border-color: var(--color-dark-border-dark);
    }

    .search-result-item {
        color: var(--color-dark-text);
    }

    .search-result-item:hover {
        background-color: var(--color-dark-border-dark);
    }

    .loginInput::placeholder {
        color: var(--color-dark-placeholder-text);
    }

    .loginButton {
        background-color: var(--color-primary);
        color: var(--color-dark-text);
    }

    .rtlAgreement {
        color: var(--color-dark-icon-default);
    }

    .rtlAgreement a {
        color: var(--color-dark-text);
    }

    .loginDiv {
        background-color: var(--color-dark-background);
        color: var(--color-dark-text);
    }

    .bottom {
        border-top-color: var(--color-dark-border-medium);
        background-color: var(--color-dark-surface);
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.5);
    }

    body.lang-en .nav-bar {
        border-right: 1px solid var(--color-dark-border-medium);
    }

    .logout-div button {
        background-color: var(--color-white);
        color: var(--color-black);
    }

    .dashboard-info {
        border-bottom-color: var(--color-dark-border-medium);
    }

    .dashboard-info-phone p:first-child {
        color: var(--color-dark-placeholder-text);
    }

    .terms-body {
        background-color: var(--color-dark-background);
    }

    .terms-container {
        background-color: var(--color-dark-surface);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .terms-container h1,
    .terms-container strong {
        color: var(--color-dark-text);
    }

    .terms-container p,
    .terms-container li {
        color: var(--color-dark-text-secondary);
    }

    .disclaimer-box {
        background-color: rgba(255, 229, 143, 0.1);
        border-color: rgba(255, 229, 143, 0.4);
    }

    .disclaimer-box p,
    .disclaimer-box strong {
        color: #fce5a3 !important;
    }

    CSS
    /* ====================================================
   Dark Mode Styles for Contact Us Page
   ==================================================== */


    .contact-body {
        background-color: var(--color-dark-background);
    }

    .contact-page-container {
        background-color: var(--color-dark-surface);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    /* بخش اطلاعات تماس (ستون قرمز) نیازی به تغییر ندارد چون ترکیب رنگش مناسب است */

    /* --- بخش فرم تماس --- */
    .contact-form-block h2 {
        color: var(--color-dark-text);
    }

    .form-group label {
        color: var(--color-dark-text-secondary);
    }

    .form-group input,
    .form-group textarea {
        background-color: var(--color-dark-input-background);
        border-color: var(--color-dark-border-dark);
        color: var(--color-dark-text);
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: var(--color-dark-placeholder-text);
    }

    .form-group input:focus,
    .form-group textarea:focus {
        border-color: var(--color-primary);
        /* box-shadow برای حالت دارک معمولا نیازی به تغییر ندارد چون بر اساس رنگ اصلی است */
    }

    .contact-body {
        background-color: var(--color-dark-background);
    }

    :root {
        --color-dark-background: #121212;
        --color-dark-surface: #1e1e1e;
        --color-dark-text: #e0e0e0;
        --color-dark-text-light: #fff;
        --color-dark-text-muted: rgba(224, 224, 224, .7);
        --color-dark-text-secondary: rgba(224, 224, 224, .5);
        --color-dark-icon-default: #b0b0b0;
        --color-dark-border-medium: #333;
        --color-dark-border-dark: #555;
        --color-dark-input-background: #222;
        --color-dark-placeholder-text: #777;
    }


}