/* Header Styles */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.75);
    /* نیمه‌شفاف */
    backdrop-filter: blur(8px);
    /* شیشه‌ای‌کردن */
    -webkit-backdrop-filter: blur(8px);
    /* سازگاری با Safari */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.4);
    /* نیمه‌شفاف */
    backdrop-filter: blur(4px);
    /* شیشه‌ای‌کردن */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 20px;
}

/* Logo Styles */
.logo-container {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.header.scrolled .logo-container {
    width: 50px;
    height: 50px;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    gap: 5px;
    overflow-x: auto;
    padding: 0 10px;
    color: #293241 !important;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-button {
    padding: 8px 12px;
    background: none;
    border: none;
    color: #293241 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-button:not(:last-child)::after {
    content: "|";
    color: #ddd;
    margin-right: 5px;
    margin-left: 5px;
}

.nav-button:hover {
    color: #2e53a1 !important;
}

.nav-button:active {
    color: #ff6318;
}

/* CTA Button */
.cta-container {
    flex-shrink: 0;
    margin-right: auto;
}

.cta-button {
    background-color: #ff6318;
    color: white !important;
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid #ff6318;
    text-decoration: none;
}

.cta-button:hover {
    color: #ff6318 !important;
}

@media (min-width: 1100px) {
    .cta-button:hover {
        background-color: white;
        border: 1px solid #2e53a1;
        color: #2e53a1;
        transform: translateY(-1px);
    }
}

.cta-button:active {
    background-color: #e55615;
    transform: translateY(0);
}

/* Mobile Buttons */
.mobile-buttons {
    display: none;
    align-items: center;
    gap: 5px;
}

.delivery-btn-mobile {
    background: none;
    border: none;
    color: #2e53a1 !important;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 0 !important;
    background-color: transparent !important;
}

.delivery-btn-mobile:active {
    color: #ff6318;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 22px;
    color: #2e53a1 !important;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
    border: 0 !important;
    background-color: transparent !important;
}

.mobile-menu-toggle:active {
    color: #ff6318;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 85%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background-color: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 12px 10px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-menu a:hover {
    color: #2e53a1;
    background-color: #f8f9fa;
    padding-right: 15px;
}

.mobile-menu a:active {
    color: #ff6318;
}

.mobile-menu .cta-mobile {
    background-color: #ff6318;
    color: white;
    border-radius: 15px;
    margin-top: 10px;
    text-align: center;
}

/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.popup {
    background: white;
    width: 750px;
    height: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    overflow: hidden;
    padding-top: 50px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.popup iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1002;
}

/* Responsive Design */
@media (max-width: 1100px) {

    .nav-links,
    .cta-container {
        display: none;
    }

    .mobile-buttons {
        display: flex;
    }

    body {
        padding-top: 70px;
    }

    .logo-container {
        width: 50px;
        height: 50px;
    }

    .header-container {
        justify-content: space-between;
        gap: 0;
    }

    .popup {
        width: 100%;
        height: 70%;
    }
}