/* File: assets/css/vortex-header.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.vortex-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.vortex-header.vortex-hidden {
    transform: translateY(-100%);
}

.vortex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    direction: rtl;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

/* لوگو */
.vortex-logo {
    flex-shrink: 0;
    z-index: 1002; /* افزایش z-index برای نمایش بالاتر */
}

.vortex-logo img {
    width: 80px;
    height: auto;
    display: block;
    transition: width 0.3s ease;
}

/* منوی دسکتاپ */
.vortex-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.vortex-nav-list {
    list-style: none;
    display: flex;
    flex-direction: row;
    background-color: #F7F7F7;
    padding: 12px 25px;
    border-radius: 11px;
    gap: 28px;
    margin: 0;
}

.vortex-nav-item {
    position: relative;
}

.vortex-nav-item a {
    text-decoration: none;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    white-space: nowrap;
}

.vortex-nav-item a:hover {
    color: #3288C3;
    transform: translateY(-1px);
}

/* دکمه تماس */
.vortex-contact {
    background-color: #3288C3;
    padding: 11px 23px;
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: none;
    white-space: nowrap;
    z-index: 1002; /* افزایش z-index */
}

.vortex-contact:hover {
    background-color: #2a75a8;
    transform: translateY(-2px);
}

/* همبرگر منو */
.vortex-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102; /* افزایش z-index */
    position: relative;
}

.vortex-hamburger span {
    width: 100%;
    height: 3px;
    background-color: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.vortex-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.vortex-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.vortex-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.vortex-hamburger:focus {
    outline: none;
}

/* منوی موبایل - کاهش عرض */
.vortex-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%; /* کاهش از 85% به 70% */
    max-width: 280px; /* کاهش از 320px به 280px */
    height: 100vh;
    background-color: #ffffff;
    z-index: 1001; /* افزایش z-index */
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 80px 0 30px 0;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.vortex-mobile-menu.active {
    right: 0;
}

/* دکمه بستن منو */
.vortex-close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* افزایش z-index */
}

.vortex-close-menu::before,
.vortex-close-menu::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333333;
    transition: background-color 0.3s ease;
}

.vortex-close-menu::before {
    transform: rotate(45deg);
}

.vortex-close-menu::after {
    transform: rotate(-45deg);
}

.vortex-close-menu:hover::before,
.vortex-close-menu:hover::after {
    background-color: #3288C3;
}

.vortex-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vortex-mobile-item a {
    display: block;
    padding: 18px 25px;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}



.vortex-mobile-item a::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #3288C3;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vortex-mobile-item a:hover::after {
    opacity: 1;
}

.vortex-mobile-contact a {
    color: #3288C3 !important;
    font-weight: 600;
    text-align: center;
    /* background-color: #f0f9ff; */
    margin: 15px 25px;
    border-radius: 8px;
    /* border: 1px solid #3288C3; */
}

/* Overlay */
.vortex-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* افزایش z-index */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.vortex-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .vortex-nav-list {
        gap: 20px;
        padding: 10px 20px;
    }
   
    .vortex-nav-item a {
        font-size: 15px;
    }
   
    .vortex-logo img {
        width: 70px;
    }

    .vortex-contact {
        padding: 10px 20px;
        font-size: 15px;
    }
}

@media screen and (max-width: 768px) {
    .vortex-container {
        justify-content: space-between;
        padding: 12px 15px;
        gap: 15px;
    }
   
    /* مخفی کردن منوی دسکتاپ و دکمه تماس */
    .vortex-nav,
    .vortex-contact {
        display: none !important;
    }
   
    /* نمایش همبرگر منو */
    .vortex-hamburger {
        display: flex;
        order: -1;
    }
   
    .vortex-logo {
        order: 1;
        margin-right: auto;
    }
   
    .vortex-logo img {
        width: 60px;
    }

    .vortex-mobile-menu {
        width: 70%;
        max-width: 260px; /* کاهش بیشتر در تبلت */
    }
}

@media screen and (max-width: 480px) {
    .vortex-container {
        padding: 10px 12px;
    }

    .vortex-logo img {
        width: 50px;
    }
   
    .vortex-mobile-menu {
        width: 70%; /* حفظ یکنواختی */
        max-width: 240px; /* کاهش بیشتر در موبایل */
        padding: 70px 0 20px 0;
    }
   
    .vortex-mobile-item a {
        font-size: 15px;
        padding: 16px 20px;
    }

    .vortex-close-menu {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        z-index: 1010;
    }

    .vortex-hamburger {
        width: 28px;
        height: 20px;
    }
}

@media screen and (max-width: 360px) {
    .vortex-container {
        padding: 8px 10px;
    }

    .vortex-logo img {
        width: 45px;
    }

    .vortex-mobile-menu {
        width: 75%; /* کمی بیشتر برای موبایل‌های خیلی کوچک */
        max-width: 220px;
    }

    .vortex-mobile-item a {
        padding: 14px 18px;
        font-size: 14px;
    }
}

/* انیمیشن‌های اضافی */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.vortex-mobile-menu.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* اسکرول صاف */
html {
    scroll-behavior: smooth;
}

/* جلوگیری از اسکرول زمانی که منو باز است */
body.vortex-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* فاصله از بالای صفحه برای محتوا */
.elementor-location-header ~ .elementor-section:first-of-type,
.elementor-location-header ~ .elementor-top-section:first-of-type,
body:not(.elementor-editor-active) .elementor-section:first-of-type:not(.elementor-inner-section),
body:not(.elementor-editor-active) .elementor-top-section:first-of-type {
    padding-top: 80px !important;
}

/* در حالت ویرایش Elementor فاصله نباشه */
.elementor-editor-active .vortex-header {
    position: relative !important;
}

@media screen and (max-width: 768px) {
    .elementor-location-header ~ .elementor-section:first-of-type,
    .elementor-location-header ~ .elementor-top-section:first-of-type,
    body:not(.elementor-editor-active) .elementor-section:first-of-type:not(.elementor-inner-section),
    body:not(.elementor-editor-active) .elementor-top-section:first-of-type {
        padding-top: 65px !important;
    }
}

@media screen and (max-width: 480px) {
    .elementor-location-header ~ .elementor-section:first-of-type,
    .elementor-location-header ~ .elementor-top-section:first-of-type,
    body:not(.elementor-editor-active) .elementor-section:first-of-type:not(.elementor-inner-section),
    body:not(.elementor-editor-active) .elementor-top-section:first-of-type {
        padding-top: 60px !important;
    }
}

/* بهبود نمایش در حالت landscape موبایل */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .vortex-mobile-menu {
        padding-top: 60px;
    }
    
    .vortex-mobile-item a {
        padding: 12px 20px;
    }
}

/* بهبود performance برای انیمیشن‌ها */
.vortex-nav-item a,
.vortex-contact,
.vortex-hamburger span,
.vortex-mobile-menu {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}


















/* جلوگیری از تغییر رنگ دکمه همبرگر هنگام کلیک */
.vortex-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
    position: relative;
    outline: none !important; /* اضافه شده */
    -webkit-tap-highlight-color: transparent !important; /* برای موبایل */
}

.vortex-hamburger:active,
.vortex-hamburger:focus,
.vortex-hamburger:hover {
    outline: none !important;
    background: transparent !important;
}

.vortex-hamburger span {
    width: 100%;
    height: 3px;
    background-color: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* حالت active دکمه همبرگر - فقط انیمیشن */
.vortex-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: #333333 !important; /* تضمین حفظ رنگ */
}

.vortex-hamburger.active span:nth-child(2) {
    opacity: 0;
    background-color: #333333 !important;
}

.vortex-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: #333333 !important;
}

/* جلوگیری از تغییر رنگ هنگام hover */
.vortex-hamburger:hover span {
    background-color: #333333 !important;
}

/* دکمه بستن منو - جلوگیری از تغییر رنگ */
.vortex-close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.vortex-close-menu::before,
.vortex-close-menu::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333333;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.vortex-close-menu::before {
    transform: rotate(45deg);
}

.vortex-close-menu::after {
    transform: rotate(-45deg);
}

/* فقط در حالت hover رنگ آبی شود */
.vortex-close-menu:hover::before,
.vortex-close-menu:hover::after {
    background-color: #3288C3;
}

/* جلوگیری از تغییر رنگ هنگام کلیک/فعال */
.vortex-close-menu:active::before,
.vortex-close-menu:active::after,
.vortex-close-menu:focus::before,
.vortex-close-menu:focus::after {
    background-color: #333333 !important;
}

.vortex-close-menu:active,
.vortex-close-menu:focus {
    outline: none !important;
    background: transparent !important;
}

/* برای حالت‌های موبایل و تبلت */
@media screen and (max-width: 768px) {
    .vortex-hamburger {
        display: flex;
        order: -1;
    }
    
    .vortex-hamburger span {
        background-color: #333333 !important;
    }
}

@media screen and (max-width: 480px) {
    .vortex-close-menu {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        z-index: 1010;
    }
    
    .vortex-close-menu::before,
    .vortex-close-menu::after {
        width: 18px;
        height: 2px;
    }
}