/* ============================================
   Header Styles - البورصجية نيوز
   تصميم بسيط واحترافي
   ============================================ */

/* ============================================
   Sticky Header - الهيدر الثابت
   ============================================ */
.site-header {
    position: relative;
    z-index: 100;
}

/* Sticky Navigation Bar */
.sticky-header {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.sticky-header.visible {
    top: 0;
    opacity: 1;
    visibility: visible;
}

.sticky-header .sticky-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

/* Sticky Logo */
.sticky-logo {
    display: flex;
    align-items: center;
}

.sticky-logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.sticky-logo:hover img {
    transform: scale(1.05);
}

/* Sticky Navigation */
.sticky-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sticky-nav-item {
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sticky-nav-item:hover,
.sticky-nav-item.active {
    background: var(--primary-color);
    color: #fff;
}

/* Sticky Actions */
.sticky-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-search-btn,
.sticky-menu-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    color: #555;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sticky-search-btn:hover,
.sticky-menu-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

/* Mobile Sticky Header */
@media (max-width: 992px) {
    .sticky-nav {
        display: none;
    }

    .sticky-header .sticky-content {
        padding: 6px 0;
    }

    .sticky-logo img {
        height: 35px;
    }
}

@media (max-width: 576px) {

    .sticky-search-btn,
    .sticky-menu-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .sticky-logo img {
        height: 35px;
    }
}

/* ============================================
   Sidebar Styles
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 15px;
    right: -320px;
    width: 280px;
    height: calc(100% - 30px);
    background: #fff;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-radius: 16px 0 0 16px;
    overflow: hidden;
}

.sidebar.active {
    right: 15px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--primary-color);
    color: #fff;
}

.sidebar-logo {
    font-size: 1.15rem;
    font-weight: 700;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item>a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
}

.sidebar-item>a i:first-child {
    width: 24px;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.sidebar-item>a i:last-child {
    margin-right: auto;
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.sidebar-item:hover>a {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
}

.sidebar-item:hover>a i:first-child {
    transform: scale(1.1);
}

.sidebar-item.open>a {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
}

.sidebar-item.open>a i:last-child {
    transform: rotate(180deg);
}

/* Submenu */
.sidebar-submenu {
    display: none;
    background: var(--bg-secondary);
}

.sidebar-item.open .sidebar-submenu {
    display: block;
}

.sidebar-submenu li a {
    display: block;
    padding: 13px 20px 13px 58px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-submenu li a::before {
    content: '';
    position: absolute;
    right: 38px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--border-dark);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.sidebar-submenu li a:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

.sidebar-submenu li a:hover::before {
    background: var(--primary-color);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.sidebar-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-social a i {
    transition: transform 0.3s ease;
}

/* Facebook */
.sidebar-social a[title="فيسبوك"]:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

/* Twitter */
.sidebar-social a[title="تويتر"]:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

/* YouTube */
.sidebar-social a[title="يوتيوب"]:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* Instagram */
.sidebar-social a[title="انستغرام"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #dc2743;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
}

/* Telegram */
.sidebar-social a[title="تليغرام"]:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.sidebar-social a:hover i {
    animation: iconPulse 0.4s ease;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   Header Top Bar
   ============================================ */
.header-top {
    background: var(--primary-color);
    color: #fff;
    padding: 6px 0;
    font-size: 0.8rem;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-datetime {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
}

.header-date,
.header-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.header-date {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.header-date:hover,
.header-time:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-date i,
.header-time i {
    font-size: 0.85rem;
    color: #fff;
    opacity: 0.9;
}

.header-time {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.header-top-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    opacity: 0.95;
    transition: opacity 0.2s;
}

.top-link:hover {
    opacity: 1;
    color: #fff;
}

.link-divider {
    opacity: 0.4;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-135deg, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

/* Facebook */
.social-link[title="فيسبوك"]:hover {
    background: #1877f2;
    border-color: #1877f2;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

/* Twitter/X */
.social-link[title="تويتر"]:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

/* YouTube */
.social-link[title="يوتيوب"]:hover {
    background: #ff0000;
    border-color: #ff0000;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

/* Instagram */
.social-link[title="انستغرام"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #dc2743;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.4);
}

/* Telegram */
.social-link[title="تليغرام"]:hover {
    background: #0088cc;
    border-color: #0088cc;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.social-link:hover i {
    animation: iconPulse 0.4s ease;
}

.social-link:hover {
    color: #fff;
}

/* ============================================
   Header Main Section
   ============================================ */
.header-main {
    background: var(--bg-primary);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo & Editor Section (Right Side) */
.logo-editor-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo img {
    height: 55px;
    width: auto;
}

/* Editor Info */
.editor-info {
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    border-right: 2px solid var(--primary-color);
}

.editor-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.editor-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

/* ============================================
   Search & Menu Section - Animated Search
   ============================================ */
.search-menu-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Newspaper Button - PDF Download */
.newspaper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: linear-gradient(-135deg, #ff1800 0%, #c0392b 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.newspaper-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.newspaper-btn:hover::before {
    left: 100%;
}

.newspaper-btn i {
    transition: transform 0.3s ease;
    z-index: 1;
}

.newspaper-btn:hover {
    width: 100px;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    color: #fff;
}

.newspaper-btn:hover i {
    transform: rotate(-10deg) scale(1.1);
    animation: newspaperFlip 0.6s ease;
}

.newspaper-label {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1;
}

.newspaper-btn:hover .newspaper-label {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

@keyframes newspaperFlip {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-15deg) scale(1.2);
    }

    50% {
        transform: rotate(5deg) scale(1.1);
    }

    75% {
        transform: rotate(-5deg) scale(1.05);
    }

    100% {
        transform: rotate(-10deg) scale(1.1);
    }
}

/* Search Container - Contains both toggle and expandable box */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* Search Form - Expandable */
.search-form-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    width: 44px;
    height: 44px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-form-wrapper.active {
    width: 300px;
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(54, 99, 151, 0.15);
}

/* Search Toggle Button - Moves with the bar */
.search-toggle {
    width: 44px;
    height: 44px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 50%;
    margin: 0px;
}

.search-toggle i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-toggle:hover {
    background: var(--primary-color);
    color: #fff;
}

.search-toggle:hover i {
    transform: rotate(-15deg) scale(1.1);
}

.search-form-wrapper.active .search-toggle {
    background: var(--primary-color);
    color: #fff;
}

.search-form-wrapper.active .search-toggle i {
    transform: rotate(90deg);
    animation: searchPulse 0.5s ease;
}

@keyframes searchPulse {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(45deg) scale(1.2);
    }

    100% {
        transform: rotate(90deg) scale(1);
    }
}

/* Search Input */
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.search-form-wrapper.active .search-input {
    width: 100%;
    opacity: 1;
    padding: 10px 12px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
}

/* Search Close Button */
.search-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 50%;
    margin: 2px;
    opacity: 0;
    transform: scale(0);
}

.search-form-wrapper.active .search-close {
    opacity: 1;
    transform: scale(1);
}

.search-close:hover {
    background: var(--bg-secondary);
    color: var(--secondary-color);
}

/* Sidebar Toggle */
.sidebar-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-135deg, #f9f4f4 0%, #f6fbff 100%);
    border-radius: 12px;
    color: #316595;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(49, 101, 149, 0.3);
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-toggle:hover::before {
    left: 100%;
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(49, 101, 149, 0.4);
}

.sidebar-toggle:hover i {
    animation: menuWiggle 0.5s ease;
}

@keyframes menuWiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* ============================================
   Mobile Search Dropdown
   ============================================ */
.mobile-search-dropdown {
    display: none !important;
    background: #fff;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile only - show dropdown */
@media (max-width: 992px) {
    .mobile-search-dropdown {
        display: none !important;
    }

    .mobile-search-dropdown.active {
        display: block !important;
        padding: 15px 0;
        max-height: 80px;
    }
}

.mobile-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-search-form:focus-within {
    border-color: var(--primary-color);
    background: #fff;
}

.mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 18px;
    font-size: 1rem;
    color: var(--text-primary);
}

.mobile-search-input::placeholder {
    color: var(--text-muted);
}

.mobile-search-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
    border-radius: 50%;
    margin: 2px;
}

.mobile-search-btn:hover {
    background: var(--primary-dark);
}

/* Mobile Search Toggle Button (in header on mobile) */
.mobile-search-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mobile-search-toggle i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-search-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.mobile-search-toggle:hover i {
    transform: rotate(-15deg) scale(1.1);
}

.mobile-search-toggle.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.mobile-search-toggle.active i {
    transform: rotate(90deg);
    animation: searchPulse 0.5s ease;
}

/* ============================================
   Header Ad Banner
   ============================================ */
.header-ad {
    background: var(--bg-secondary);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.ad-banner {
    max-width: 728px;
    margin: 0 auto;
}

.ad-link {
    display: block;
}

.ad-placeholder {
    width: 100%;
    height: 70px;
    background: linear-gradient(-135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px dashed var(--border-dark);
}

/* ============================================
   Navigation Menu - Premium Financial Style
   ============================================ */
.header-nav {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nav-item {
    position: relative;
}

/* Main Nav Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Underline Effect */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.7));
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.nav-item:hover .nav-link::before,
.nav-item.active .nav-link::before {
    width: 80%;
}

/* Chevron Icon */
.nav-link i.fa-chevron-down {
    font-size: 0.6rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-link i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Home Icon Animation */
.nav-link i.fa-home {
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-link i.fa-home {
    transform: scale(1.2);
    animation: homeWiggle 0.5s ease;
}

@keyframes homeWiggle {

    0%,
    100% {
        transform: scale(1.2) rotate(0deg);
    }

    25% {
        transform: scale(1.2) rotate(-5deg);
    }

    75% {
        transform: scale(1.2) rotate(5deg);
    }
}

/* Hover Background */
.nav-item:hover .nav-link,
.nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Dropdown Menu - Financial Style
   ============================================ */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

/* Dropdown Arrow */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 25px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Items */
.dropdown-menu li {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.nav-item:hover .dropdown-menu li {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Animation */
.nav-item:hover .dropdown-menu li:nth-child(1) {
    transition-delay: 0.05s;
}

.nav-item:hover .dropdown-menu li:nth-child(2) {
    transition-delay: 0.1s;
}

.nav-item:hover .dropdown-menu li:nth-child(3) {
    transition-delay: 0.15s;
}

.nav-item:hover .dropdown-menu li:nth-child(4) {
    transition-delay: 0.2s;
}

.nav-item:hover .dropdown-menu li:nth-child(5) {
    transition-delay: 0.25s;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Left Border Accent on Hover */
.dropdown-menu li a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.dropdown-menu li a:hover::before {
    transform: scaleY(1);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.dropdown-menu li a:hover {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, transparent 100%);
    color: var(--primary-color);
    padding-right: 25px;
}

/* Arrow Icon on Hover */
.dropdown-menu li a::after {
    content: '←';
    position: absolute;
    left: 15px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
    color: var(--primary-color);
}

.dropdown-menu li a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Breaking News Ticker
   ============================================ */
.breaking-news {
    background: var(--secondary-color);
    padding: 6px 0;
    overflow: hidden;
}

.breaking-news-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breaking-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: var(--secondary-color);
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
}

.ticker-wrapper {
    display: flex;
    gap: 40px;
    animation: ticker 25s linear infinite;
}

.ticker-item {
    flex-shrink: 0;
    color: #fff;
    font-size: 0.8rem;
    white-space: nowrap;
}

.ticker-item:hover {
    text-decoration: underline;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .nav-menu {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .logo-editor-section {
        gap: 15px;
    }

    .header-logo img {
        height: 48px;
    }

    .search-form-wrapper.active {
        width: 220px;
    }
}

@media (max-width: 768px) {

    .header-top-links,
    .header-social {
        display: none;
    }

    .header-datetime {
        width: 100%;
        justify-content: center;
        font-size: 0.75rem;
    }

    .header-main-content {
        gap: 10px;
    }

    .logo-editor-section {
        gap: 12px;
    }

    .header-logo img {
        height: 42px;
    }

    .editor-info {
        padding-right: 12px;
    }

    .editor-label {
        font-size: 0.6rem;
    }

    .editor-name {
        font-size: 0.85rem;
    }

    /* Hide desktop search, show mobile toggle */
    .search-container {
        display: none;
    }

    .mobile-search-toggle {
        display: flex;
    }

    .mobile-search-dropdown {
        display: block;
    }

    .header-ad {
        padding: 8px 0;
    }

    .ad-placeholder {
        height: 50px;
        font-size: 0.75rem;
    }

    .sidebar-toggle {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {

    /* إخفاء التوب هيدر على الموبايل */
    .header-top {
        display: none;
    }

    .header-logo img {
        height: 36px;
    }

    .editor-info {
        display: none;
    }

    .sidebar-toggle,
    .mobile-search-toggle {
        width: 38px;
        height: 38px;
    }

    /* ضبط شريط القوائم */
    .nav-menu {
        gap: 0;
        padding: 0 5px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari/Opera */
        width: 0;
        height: 0;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 0.78rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-link i {
        display: none;
    }

    /* ضبط الهيدر الرئيسي */
    .header-main {
        padding: 10px 0;
    }

    .header-main-content {
        gap: 8px;
    }

    /* ضبط الإعلان */
    .header-ad {
        padding: 6px 0;
    }

    .ad-placeholder {
        height: 45px;
        font-size: 0.7rem;
    }

    /* ضبط شريط النافبار */
    .header-nav {
        border-width: 2px;
    }

    /* إظهار العناصر المخفية وإخفاء المزيد dropdown */
    .nav-mobile-only {
        display: flex !important;
    }

    .nav-more-dropdown {
        display: none !important;
    }
}

/* ============================================
   Desktop: إخفاء العناصر الموبايل وإظهار المزيد
   ============================================ */
@media (min-width: 577px) {
    .nav-mobile-only {
        display: none !important;
    }

    .nav-more-dropdown {
        display: flex !important;
        position: relative;
        margin-right: 10px;
        padding-right: 10px;
    }

    /* خط فاصل قبل المزيد */
    .nav-more-dropdown::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 20px;
        background: rgba(255, 255, 255, 0.3);
    }
}