/* الشريط العلوي المحسن */
	.top-header {
		background: linear-gradient(135deg, #0f2a1a 0%, #1b4d2b 100%);
		border-bottom: 2px solid #ffb74d;
		padding: 8px 0;
		position: relative;
		z-index: 1000;
		box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	}
	.logo-section {
		display: flex;
		align-items: center;
	}
	.logo-link {
		display: flex;
		align-items: center;
		gap: 3px;
		text-decoration: none;
		color: white !important;
		font-size: 20px;
		font-weight: 700;
		font-family: 'Cairo', sans-serif;
		transition: all 0.3s ease;
	}
	.logo-link:hover {
		color: #ffb74d !important;
		transform: scale(1.05);
	}
	.logo-link:visited {
		color: white !important;
	}
	.logo-link:active {
		color: white !important;
	}
	.logo-text {
		color: inherit;
		font-size: inherit;
		font-weight: inherit;
	}
	.top-logo {
		width: 35px;
		height: 35px;
		object-fit: contain;
		filter: brightness(1.2);
		transition: transform 0.3s ease;
	}
	.top-logo:hover {
		transform: scale(1.1);
	}
	.header-buttons {
		gap: 8px;
		display: flex;
		align-items: center;
	}
	.header-btn {
		background: rgba(255,255,255,0.1);
		border: 1px solid rgba(255,255,255,0.2);
		color: white;
		padding: 8px 16px;
		border-radius: 25px;
		font-size: 14px;
		font-weight: 700;
		cursor: pointer;
		transition: all 0.3s ease;
		backdrop-filter: blur(10px);
		display: flex;
		align-items: center;
		gap: 6px;
		white-space: nowrap;
		text-decoration: none;
	}
	.header-btn:hover {
		background: #ffb74d;
		color: #1e3a2f;
		transform: translateY(-2px);
		box-shadow: 0 4px 15px rgba(255,183,77,0.3);
		border-color: #ffb74d;
	}
	.header-btn.active {
		background: #ffb74d;
		color: #1e3a2f;
		border-color: #ffb74d;
	}
	.currency-panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
		border: 2px solid rgba(255,183,77,0.5);
		border-top: none;
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		box-shadow: 0 10px 30px rgba(0,0,0,0.5);
		z-index: 999999 !important;
		display: block;
	}
	.currency-panel.show {
		max-height: 600px !important;
		opacity: 1 !important;
		visibility: visible !important;
		display: block !important;
		border-bottom-left-radius: 8px;
		border-bottom-right-radius: 8px;
		transform: translateY(0) !important;
		overflow-y: auto !important;
	}
	.currency-panel-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15px 20px;
		border-bottom: 1px solid rgba(255,183,77,0.2);
		background: rgba(255,183,77,0.1);
		position: sticky;
		top: 0;
		z-index: 10;
	}
	.currency-panel-header h5 {
		color: #ffb74d;
		margin: 0;
		font-size: 18px;
		font-weight: 600;
	}
	.close-panel {
		background: none;
		border: none;
		color: #ffb74d;
		font-size: 18px;
		cursor: pointer;
		padding: 5px;
		border-radius: 50%;
		transition: all 0.3s ease;
		width: 30px;
		height: 30px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.close-panel:hover {
		background: rgba(255,183,77,0.2);
		transform: rotate(90deg);
	}
	.currency-panel-content {
		padding: 20px;
	}
	.currency-grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
		gap: 15px;
		margin-bottom: 15px;
	}
	.currency-item {
		background: rgba(255,255,255,0.05);
		border: 1px solid rgba(255,183,77,0.2);
		border-radius: 12px;
		padding: 15px;
		text-align: center;
		transition: all 0.3s ease;
		backdrop-filter: blur(10px);
	}
	.currency-item:hover {
		background: rgba(255,183,77,0.1);
		transform: translateY(-2px);
		box-shadow: 0 5px 15px rgba(255,183,77,0.2);
	}
	.currency-flag {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		margin-bottom: 8px;
		box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	}
	.currency-code {
		font-size: 16px;
		font-weight: 700;
		color: #ffb74d;
		margin-bottom: 4px;
	}
	.currency-rate {
		font-size: 14px;
		color: white;
		margin-bottom: 4px;
	}
	.currency-name {
		font-size: 12px;
		color: rgba(255,255,255,0.7);
	}
	.loading-spinner {
		text-align: center;
		padding: 40px;
		color: #ffb74d;
	}
	.update-time {
		color: rgba(255,255,255,0.6);
		font-size: 12px;
	}
	/* تحسين زر أسعار العملات */
	#currencyToggle {
		display: none !important;
	}
	@media (max-width: 992px) {
		#currencyToggle {
			display: flex !important;
			visibility: visible !important;
			opacity: 1 !important;
			position: relative !important;
			z-index: 1000 !important;
		}
		.currency-ticker-inline {
			display: none !important;
		}
		/* تأكد من أن البانل يعمل في الشاشات الصغيرة */
	.currency-ticker-inline {
		display: none !important;
	}
	/* تأكد من أن البانل يعمل في الشاشات الصغيرة */
	.currency-panel {
		z-index: 99999 !important;
	}
}
/* شريط العملات المباشر */
.currency-ticker-inline {
	overflow: hidden;
	white-space: nowrap;
	background: rgba(255,255,255,0.05);
	border-radius: 20px;
	padding: 4px 12px;
	border: 1px solid rgba(255,183,77,0.2);
	backdrop-filter: blur(10px);
	flex: 1;
	max-width: 45%;
	margin: 0;
	/* نفس الاتجاه لكل اللغات */
	direction: ltr !important;
	text-align: center !important;
	display: flex !important;
	align-items: center !important;
	height: 32px;
}
/* تغيير الاتجاه فقط للغة العربية */
[dir="rtl"] .currency-ticker-inline {
	direction: rtl !important;
	text-align: right !important;
}
.header-row {
	width: 100%;
	gap: 0;
	padding: 0 15px;
	justify-content: space-between;
}
[dir="rtl"] .header-row {
	justify-content: space-between;
}
.ticker-content-inline {
	display: flex;
	font-size: 13px;
    font-weight: bold;
	color: white;
	/* إلغاء الشريط العرضي ومنع التمرير */
	width: 100%;
	height: 100%;
	white-space: nowrap;
	justify-content: center;
	align-items: center;
	flex-wrap: nowrap;
	overflow: hidden;
	gap: 6px;
}
.ticker-item-inline {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin: 0 2px;
	padding: 1px 6px;
	background: rgba(255,183,77,0.1);
	border-radius: 10px;
	white-space: nowrap;
	font-size: 12px;
	flex-shrink: 0;
}
.ticker-item-inline .currency-flag-inline {
	width: 16px;
	height: 16px;
	border-radius: 50%;
}
/* حركة موحدة لكل اللغات */
@keyframes scrollTicker {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
/* إلغاء الحركة للغة العربية */
[dir="rtl"] .ticker-content-inline {
	/* لا توجد حركة - شريط ثابت */
	justify-content: center;
}
/* إصلاحات ضرورية */
.loading-inline {
	display: flex;
	align-items: center;
	gap: 8px;
	color: white;
	font-size: 13px;
}
.rate-inline {
	color: white;
	font-weight: bold;
}
@media (max-width: 1400px) {
	.currency-ticker-inline {
		max-width: 55%;
	}
}
@media (max-width: 1200px) {
	.currency-ticker-inline {
		max-width: 45%;
	}
}
@media (max-width: 992px) {
	.currency-ticker-inline {
		display: none !important;
	}
	#currencyToggle {
		display: flex !important;
	}
}
@media (max-width: 768px) {
	.header-btn {
		padding: 6px 12px;
		font-size: 12px;
	}
	.currency-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 10px;
	}
	.header-row {
		width: 100%;
		gap: 0;
		padding: 0 15px;
		justify-content: space-between;
	}
	[dir="rtl"] .header-row {
		justify-content: space-between;
	}
	.ticker-content-inline {
		display: flex;
		font-size: 13px;
        font-weight: bold;
		color: white;
		/* إلغاء الشريط العرضي ومنع التمرير */
		width: 100%;
		height: 100%;
		white-space: nowrap;
		justify-content: center;
		align-items: center;
		flex-wrap: nowrap;
		overflow: hidden;
		gap: 6px;
	}
	.ticker-item-inline {
		display: inline-flex;
		align-items: center;
		gap: 3px;
		margin: 0 2px;
		padding: 1px 6px;
		background: rgba(255,183,77,0.1);
		border-radius: 10px;
		white-space: nowrap;
		font-size: 12px;
		flex-shrink: 0;
	}
	.ticker-item-inline .currency-flag-inline {
		width: 16px;
		height: 16px;
		border-radius: 50%;
	}
	/* حركة موحدة لكل اللغات */
	@keyframes scrollTicker {
		0% { transform: translateX(0); }
		100% { transform: translateX(-50%); }
	}
	/* إلغاء الحركة للغة العربية */
	[dir="rtl"] .ticker-content-inline {
		/* لا توجد حركة - شريط ثابت */
		justify-content: center;
	}
	/* إصلاحات ضرورية */
	.loading-inline {
		display: flex;
		align-items: center;
		gap: 8px;
		color: white;
		font-size: 13px;
	}
	.rate-inline {
		color: white;
		font-weight: bold;
	}
	@media (max-width: 1400px) {
		.currency-ticker-inline {
			max-width: 55%;
		}
	}
	@media (max-width: 1200px) {
		.currency-ticker-inline {
			max-width: 45%;
		}
	}
	@media (max-width: 992px) {
		.currency-ticker-inline {
			display: none !important;
		}
		#currencyToggle {
			display: flex !important;
		}
	}
	@media (max-width: 768px) {
		.header-btn {
			padding: 6px 12px;
			font-size: 12px;
		}
		.currency-grid {
			grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
			gap: 10px;
		}
		.header-row {
			padding: 0 10px;
		}
	}
	@media (max-width: 576px) {
			.lang-btn.active {
				display: none !important;
			}
			.logo-text {
				display: none !important;
			}
			.logo-link {
				padding: 0;
				min-width: auto;
			}
			.top-logo {
				width: 35px;
				height: 35px;
			}
			/* ضمان مسافة متساوية في الشاشات الصغيرة جداً */
			.header-row {
				justify-content: space-between !important;
			}
			[dir="ltr"] .header-row {
				justify-content: space-between !important;
			}
			[dir="rtl"] .header-row {
				justify-content: space-between !important;
			}
	}
}