/* Isolated Header Styles */
.ps-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    z-index: 999;
    transition: all 0.3s ease;
}

/* استایل هدر چسبان */
.ps-header--sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    animation: psSlideDown 0.4s ease forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@keyframes psSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.ps-navbar {
    padding: 15px 0 !important;
}

.ps-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.ps-logo-img {
    max-height: 50px;
    width: auto;
}

.ps-logo-text {
    font-size: 19px;
    font-weight: 700;
    color: #222222;
}

.ps-nav {
    display: flex;
    gap: 25px;
    padding-right: 0;
    margin: 0;
}

.ps-nav-item {
    list-style: none;
    position: relative;
}

.ps-nav-link {
    color: #444444 !important;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 0 !important;
    position: relative;
}

/* افکت خط زیرین ملایم هنگام هاور روی گزینه‌ها */
.ps-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #007aff;
    transition: width 0.3s ease;
}

.ps-nav-link:hover {
    color: #007aff !important;
}

.ps-nav-link:hover::after {
    width: 100%;
}

/* دکمه رزرو مشاوره دسکتاپ */
.ps-btn-primary {
    background-color: #007aff;
    color: #ffffff !important;
    padding: 11px 24px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.ps-btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    transform: translateY(-1px);
}

/* ساختار دکمه همبرگری مدرن */
.ps-toggle {
    display: none;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: transparent;
}

.ps-hamburger {
    width: 24px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.ps-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #333333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: right center;
}

/* انیمیشن تبدیل همبرگری به ضربدر */
.ps-hamburger--open span:nth-child(1) {
    transform: rotate(-45deg);
}

.ps-hamburger--open span:nth-child(2) {
    opacity: 0;
}

.ps-hamburger--open span:nth-child(3) {
    transform: rotate(45deg);
}

/* واکنش‌گرایی موبایل و تبلت */
@media (max-width: 991px) {
    .ps-toggle {
        display: block;
    }

    .ps-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.08);
        border-top: 1px solid #f5f5f5;
        max-height: 80vh;
        overflow-y: auto;
    }

    .ps-nav {
        flex-direction: column;
        gap: 8px;
    }

    .ps-nav-link {
        padding: 10px 12px !important;
        border-radius: 6px;
    }

    .ps-nav-link::after {
        display: none;
    }

    .ps-nav-link:hover {
        background-color: #f4f9ff;
    }
}

/* ============================================
   باکس جستجوی حرفه‌ای و کوچک (فقط مخصوص حالت موبایل)
   ============================================ */
@media (max-width: 991px) {
    .ps-search-form-mobile {
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .ps-search-box-mobile {
        position: relative;
        display: flex;
        align-items: center;
        background: #f5f7fa; /* پس‌زمینه خاکستری ملایم و هماهنگ */
        border: 1px solid #e4e7eb;
        border-radius: 25px; /* گوشه‌های کاملاً گرد و مدرن */
        padding: 2px;
        height: 42px;
        width: 100%;
        transition: all 0.3s ease;
    }

    /* افکت فوکوس روی فیلد سرچ */
    .ps-search-box-mobile:focus-within {
        background: #ffffff;
        border-color: #007aff;
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.06);
    }

    .ps-search-input-mobile {
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        outline: none;
        padding: 0 15px 0 45px; /* ایجاد فضا برای دکمه در سمت چپ فیلد بر اساس RTL */
        font-size: 13.5px;
        color: #333333;
        font-family: inherit;
    }

    .ps-search-input-mobile::placeholder {
        color: #a0aec0;
    }

    .ps-search-btn-mobile {
        position: absolute;
        left: 4px; /* دکمه در سمت چپ قرار دارد تا متن فارسی از راست شروع شود */
        top: 50%;
        transform: translateY(-50%);
        width: 34px;
        height: 34px;
        background: transparent;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666666;
        transition: all 0.3s ease;
    }

    .ps-search-box-mobile:focus-within .ps-search-btn-mobile {
        color: #007aff;
        background: #f0f7ff; /* تغییر رنگ آیکون و پس‌زمینه دکمه هنگام فوکوس */
    }
}