/* تحميل Google Material Icons - تعطيل لأنه يتطلب إنترنت */
/* @import url('https://fonts.googleapis.com/icon?family=Material+Icons'); */

/* ============================================
   أزرار الهيدر - تصميم بسيط بدون خلفية
   ============================================ */

.search-icon,
.menu-icon {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    overflow: visible;
    box-shadow: none;
}


/* تأثير الضوء المتحرك */
.search-icon::after,
.menu-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.search-icon:hover::after,
.menu-icon:hover::after {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* تأثير الخلفية عند المرور */
.search-icon::before,
.menu-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(43, 64, 73, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-icon:hover::before,
.menu-icon:hover::before {
    width: 120%;
    height: 120%;
}

/* حالة المرور */
.search-icon:hover,
.menu-icon:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(43, 64, 73, 0.12),
                0 4px 8px rgba(43, 64, 73, 0.08),
                0 0 0 4px rgba(43, 64, 73, 0.04);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%) !important;
}

/* حالة الضغط */
.search-icon:active,
.menu-icon:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(43, 64, 73, 0.1),
                0 2px 4px rgba(43, 64, 73, 0.06);
    transition: all 0.1s ease;
}

/* تنسيق أيقونات Material Icons */
.search-icon .material-icons,
.menu-icon .material-icons {
    font-size: 24px !important;
    color: #1f2937 !important;
    display: block !important;
    line-height: 1 !important;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    font-weight: 400;
    user-select: none;
}

/* تأثير الأيقونة عند المرور */
.search-icon:hover .material-icons,
.menu-icon:hover .material-icons {
    color: var(--primary-color) !important;
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(43, 64, 73, 0.2));
}

.search-icon:active .material-icons,
.menu-icon:active .material-icons {
    transform: scale(1.05) rotate(0deg);
}

/* تأثير Focus للوصولية */
.search-icon:focus,
.menu-icon:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(43, 64, 73, 0.1),
                0 4px 12px rgba(43, 64, 73, 0.15);
}

/* تأكيد ظهور أيقونات Material Icons */
.header-icons button .material-icons,
.material-icons {
    display: inline-block;
    font-family: 'Material Icons' !important;
    font-weight: 400 !important;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
}

/* تحسين للشاشات الصغيرة */
@media (max-width: 768px) {
    .search-icon,
    .menu-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .search-icon .material-icons,
    .menu-icon .material-icons {
        font-size: 22px !important;
    }
}

/* ============================================
   تنسيق موحد للهيدر
   ============================================ */

.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* ============================================
   القائمة الجانبية - تنسيق موحد
   ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    color: var(--primary-color);
    background: rgba(43, 64, 73, 0.1);
    transform: rotate(90deg);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: rgba(43, 64, 73, 0.05);
    color: var(--primary-color);
    padding-right: 25px;
}

.sidebar-nav a .material-icons,
.sidebar-nav a i {
    font-size: 20px;
}

.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: 9998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}
