/* ============================================================
   Ultra Premium 2026 — Full Modern Theme CSS (Fixed & Complete)
   RTL/LTR Real Support — WPGlobus Compatible
   Author: Onel Group
   ============================================================ */

/* =========================
   Global fonts & reset
   ========================= */

@font-face {
    font-family: 'WYekan';
    src: url('https://creavitiran.com/wp-content/themes/onel-ads99/fonts/vazir.eot');
    src: url('https://creavitiran.com/wp-content/themes/onel-ads99/fonts/vazir.eot?#iefix') format('embedded-opentype'),
         url('https://creavitiran.com/wp-content/themes/onel-ads99/fonts/vazir.woff') format('woff'),
         url('https://creavitiran.com/wp-content/themes/onel-ads99/fonts/vazir.ttf') format('truetype'),
         url('https://creavitiran.com/wp-content/themes/onel-ads99/fonts/vazir.svg#vazir') format('svg');
    font-weight: normal;
    font-style: normal;
    unicode-range: U+0600-06FF;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

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

html, body {
    max-width: 100%;
    background-color: #f5f5f7;
    color: #222;
}

/* RTL */
html[dir="rtl"] body {
    font-family: 'WYekan', sans-serif;
    direction: rtl;
    text-align: right;
}

/* LTR */
html[dir="ltr"] body {
    font-family: 'Roboto', sans-serif;
    direction: ltr;
    text-align: left;
}

a {
    text-decoration: none;
    color: #1f2933;
    transition: color 0.2s ease;
}

a:hover {
    color: #d4af37;
}

ul {
    list-style: none;
}

/* =========================
   Theme colors
   ========================= */
 
 
 /* =========================
   Header + Menu Ultra Premium
   ========================= */

/* رنگ‌ها */
:root {
    --gold: #d4af37;
    --gold-soft: #f7e9b5;
    --blue-deep: #1e3a8a;
    --bg-light: #f5f5f7;
    --bg-white: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
}

/* هدر کلی */
.header-wrapper {
    position: relative;
    width: 100%;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* نوار بالا */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 24px;
    background: var(--bg-white);
    color: #4b5563;
    font-size: 13px;
    border-bottom: 1px solid var(--border-soft);
}

html[dir="rtl"] .header-top {
    flex-direction: row-reverse;
}

html[dir="ltr"] .header-top {
    flex-direction: row;
}

.header-lang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-lang img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}

/* سرچ بالا */
.header-search-top form {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 260px;
}

.header-search-top input[type="text"] {
    width: 100%;
    height: 32px;
    border-radius: 16px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    padding: 0 12px;
    font-size: 13px;
}

.header-search-top input::placeholder {
    color: #9ca3af;
}

.header-search-top button {
    position: absolute;
    right: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--blue-deep), var(--gold));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}

html[dir="ltr"] .header-search-top button {
    left: 4px;
    right: auto;
}
 

.header-logo img {
    max-height: 52px;
    width: auto;
}

/* منوی اصلی */
.header-nav {
    flex: 1;
}

.header-nav .menu-list {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 16px;
    font-weight: 500;
}

 

.menu-item {
    position: relative;
}

/* لینک‌ها */
.menu-item > a {
    position: relative;
    padding: 8px 6px;
    color: var(--text-main);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* زیرخط طلایی دقیق زیر متن */
.menu-item > a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.2s ease;
}

/* RTL: از راست */
html[dir="rtl"] .menu-item > a::after {
    right: 0;
    left: auto;
}

/* LTR: از چپ */
html[dir="ltr"] .menu-item > a::after {
    left: 0;
    right: auto;
}

/* Hover لینک‌ها */
.menu-item:hover > a {
    color: var(--gold);
    text-shadow: 0 0 4px rgba(212, 175, 55, 0.4);
}

.menu-item:hover > a::after {
    width: 100%;
}

/* Active */
.menu-item.active > a {
    color: var(--gold);
}

.menu-item.active > a::after {
    width: 100%;
}

/* =========================
   Dropdown
   ========================= */

.menu-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    min-width: 220px;
    background: var(--bg-white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.18s ease;
    z-index: 999;
}

html[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

html[dir="ltr"] .dropdown-menu {
    left: 0;
    right: auto;
}

.menu-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu ul {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #374151;
    transition: background 0.18s ease, color 0.18s ease;
}

.dropdown-menu li a:hover {
    background: #fdf6e3;
    color: var(--gold);
}

/* =========================
   Mega menu دسکتاپ
   ========================= */

.menu-item.mega {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-white);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    border-radius: 16px;
    padding: 20px 24px;
    display: none;
    gap: 24px;
    z-index: 998;
}

html[dir="rtl"] .mega-menu {
    direction: rtl;
}

html[dir="ltr"] .mega-menu {
    direction: ltr;
}

/* Hover‑Intent با کلاس active */
.menu-item.mega.active .mega-menu {
    display: flex;
}

/* ستون چپ */
.mega-left {
    flex: 0 0 260px;
    border-inline-end: 1px solid var(--border-soft);
    padding-inline-end: 16px;
}

html[dir="ltr"] .mega-left {
    border-inline-start: 1px solid var(--border-soft);
    border-inline-end: none;
}

.mega-left h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.mega-left ul li {
    margin-bottom: 6px;
}

.mega-left ul li a {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mega-left ul li a::after {
    content: "›";
    font-size: 11px;
    color: #9ca3af;
}

html[dir="rtl"] .mega-left ul li a::after {
    transform: scaleX(-1);
}

/* ستون راست */
.mega-right {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.mega-item {
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mega-item a {
    display: block;
    color: inherit;
}

.mega-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.mega-item span {
    display: block;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: var(--text-main);
}

.mega-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

/* =========================
   Mobile full-screen menu
   ========================= */

.header-mobile-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-main);
}

/* اوورلی تمام صفحه */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
}

/* کانتینر منوی موبایل */
.mobile-menu-panel {
    position: fixed;
    inset: 0;
    background: #f3f4f6;
    padding: 16px 20px;
    overflow-y: auto;
}

/* منوی موبایل داخل پنل */
.mobile-menu-panel .menu-list {
    flex-direction: column;
    gap: 10px;
}

/* لینک‌ها در موبایل */
.mobile-menu-panel .menu-item > a {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 17px;
}

/* زیرمنوها در موبایل */
.mobile-menu-panel .menu-item.open .dropdown-menu,
.mobile-menu-panel .menu-item.open .mega-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    margin-top: 6px;
    padding: 4px 0 8px;
    display: block;
}

 

  
/* =========================
   Content blocks / cards
   ========================= */

.mainindex,
.home-div-home,
.container {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 16px;
}

.contentdivpage,
.discription,
.headersingle,
.userbio {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    padding: 16px 18px;
    margin: 12px 0;
    border: 1px solid var(--border-soft);
}

/* کارت‌های لیست محصولات / آگهی‌ها */

.State-article,
.State-articlea {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-soft);
    position: relative;
    margin: 10px 0;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.State-article:hover,
.State-articlea:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.img-post-state {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-soft);
}

.State-h2,
.State-a-h2 {
    font-size: 15px;
    font-weight: 600;
    padding: 10px 12px 4px;
    color: var(--text-main);
}

.State-p {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 12px 10px;
}

/* =========================
   Search block
   ========================= */

.divsearch {
    width: 100%;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-soft);
    padding: 12px 18px;
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inputsearch {
    height: 38px;
    min-width: 220px;
    flex: 1;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0 10px;
    font-size: 14px;
}

.buttonsearch {
    height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--blue-deep), var(--gold));
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.buttonsearch:hover {
    transform: translateY(-1px);
}

/* =========================
   Footer
   ========================= */

footer {
    margin-top: 32px;
    background: #111827;
    color: #9ca3af;
    padding: 24px 0 16px;
}

#footer-sidebar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

#footer-sidebar1,
#footer-sidebar2,
#footer-sidebar3 {
    flex: 1 1 260px;
    min-width: 220px;
    font-size: 13px;
}

#footer-sidebar h4 {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 8px;
}

#footer-sidebar ul li {
    margin-bottom: 4px;
}

#footer-sidebar ul li a {
    color: #9ca3af;
    font-size: 13px;
}

#footer-sidebar ul li a:hover {
    color: var(--gold);
}

footer span {
    display: block;
    text-align: center;
    font-size: 12px;
    margin-top: 12px;
    color: #6b7280;
}

/* =========================
   Animations
   ========================= */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu,
.mega-menu {
    animation: fadeInDown 0.25s ease-out; 
}

/* =========================
   Helpers
   ========================= */

.cleardiv {
    clear: both;
}

.error {
    color: #ef4444;
    text-decoration: underline;
}
