html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* حل مشكلة الأزرار في الصفحة الرئيسية */
.btn-outline-light {
  color: #ffffff !important;
  border-color: #ffffff !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-outline-light:hover {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(255,255,255,0.3) !important;
}

.btn-outline-light:focus {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.5) !important;
}

.btn-outline-light:active {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
}

/* إصلاح زر إنشاء الحساب تحديداً */
a[href="/Account/Register"].btn-outline-light {
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  background-color: transparent !important;
  font-weight: 600 !important;
}

a[href="/Account/Register"].btn-outline-light:hover {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  transform: translateY(-2px) !important;
}

.btn-light:hover {
  color: #667eea !important;
  background-color: #f8f9fa !important;
  border-color: #f8f9fa !important;
}

/* تحسين ظهور قسم العرض الخاص */
.special-offer-section {
  position: relative;
  z-index: 1;
  min-height: 400px;
  visibility: visible !important;
  display: block !important;
}

.special-offer-section .badge-light-dark {
  background-color: rgba(255, 255, 255, 0.95) !important;
  color: #1e2129 !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  animation: pulse 2s infinite;
  visibility: visible !important;
  display: inline-block !important;
  text-shadow: none !important;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* إضافة حماية إضافية لأزرار الصفحة الرئيسية */
.landing-hero .btn-outline-light,
.py-10 .btn-outline-light,
div[style*="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"] .btn-outline-light {
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  background-color: transparent !important;
  text-decoration: none !important;
}

.landing-hero .btn-outline-light:hover,
.py-10 .btn-outline-light:hover,
div[style*="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"] .btn-outline-light:hover {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-2px) !important;
}

/* CSS مخصص لزر إنشاء حساب */
.register-btn {
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.register-btn:hover {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(255,255,255,0.3) !important;
}

.register-btn:focus,
.register-btn:active {
  color: #667eea !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.5) !important;
}

.register-btn i,
.register-btn span {
  color: inherit !important;
  transition: color 0.3s ease !important;
}

/* ===== Header Auth Buttons Fancy Styling ===== */

/* User Welcome Dropdown */
.btn-user-welcome {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 50px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
  min-width: 180px !important;
}

.btn-user-welcome:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
  color: white !important;
}

.user-avatar {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  line-height: 1.2;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.user-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

/* User Dropdown Menu */
.user-dropdown-menu {
  background: white !important;
  border: none !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  padding: 8px 0 !important;
  margin-top: 8px !important;
  min-width: 200px !important;
}

.user-dropdown-item {
  padding: 12px 20px !important;
  color: #2d3748 !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  border-radius: 0 !important;
}

.user-dropdown-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  transform: translateX(-5px) !important;
}

.user-dropdown-item.logout-item:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
}

/* Auth Buttons for Non-logged Users */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  padding: 10px 20px !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-login:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
  color: white !important;
}

.btn-outline-register {
  background: transparent !important;
  border: 2px solid #667eea !important;
  color: #667eea !important;
  padding: 8px 18px !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.btn-outline-register:hover {
  background: #667eea !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .btn-user-welcome {
    min-width: auto !important;
    padding: 6px 12px !important;
  }
  
  .user-info {
    display: none;
  }
  
  .auth-buttons {
    flex-direction: column;
    gap: 4px;
  }
  
  .btn-login, .btn-outline-register {
    padding: 6px 16px !important;
    font-size: 13px !important;
  }
}

/* Header Styling Enhancement */
.landing-header {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1) !important;
  transition: all 0.3s ease !important;
}

.landing-header.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Logo Enhancement */
.landing-header img {
  transition: transform 0.3s ease !important;
}

.landing-header img:hover {
  transform: scale(1.05) !important;
}

/* Navigation Menu Enhancement */
.menu-link {
  position: relative !important;
  transition: all 0.3s ease !important;
}

.menu-link:hover {
  color: #667eea !important;
}

.menu-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.menu-link:hover::after,
.menu-link.active::after {
  width: 80%;
}

/* إضافة تحسينات للنصوص داخل الأزرار */
.btn-outline-light i,
.btn-outline-light span {
  color: inherit !important;
}

/* تحسين visibility للعناصر */
.special-offer-section * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* إضافة تأثير خلفية متحركة */
.special-offer-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
  z-index: -1;
}

/* تحسين النصوص في قسم العرض الخاص */
.special-offer-section h2,
.special-offer-section .fs-5 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  color: #ffffff !important;
}

/* ===== إصلاح مشاكل رؤية النصوص في الصفحة الرئيسية ===== */

/* ضمان ظهور النصوص في القسم الرئيسي (Hero Section) */
div[style*="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"] h1,
div[style*="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"] h2,
div[style*="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"] p {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* ضمان ظهور النصوص في قسم المميزات */
.card h4,
.card span {
  color: #1e2129 !important;
}

.card h4 {
  font-weight: 700 !important;
}

.card span.text-gray-600,
.card span.fw-semibold {
  color: #5e6278 !important;
}

/* ضمان ظهور النصوص في قسم العروض (Special Offer) */
.special-offer-section h2,
.special-offer-section h3,
.special-offer-section .fs-5,
.special-offer-section .badge {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* ضمان ظهور النصوص في بطاقات الأسعار */
.special-offer-section .card h3,
.special-offer-section .card p,
.special-offer-section .card span {
  color: #1e2129 !important;
  text-shadow: none !important;
}

/* ضمان ظهور النصوص في قسم CTA */
div[style*="background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%)"] h3,
div[style*="background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%)"] .fs-5 {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* حماية النصوص من تأثير scroll والتغييرات الديناميكية */
body * {
  transition: color 0s !important; /* منع تغيير اللون عند التمرير */
}

/* استثناء العناصر التي تحتاج للانتقال السلس */
.btn,
a.menu-link,
.landing-header {
  transition: all 0.3s ease !important;
}

/* تحسين التباين للنصوص الداكنة على خلفية فاتحة */
h3.fs-2hx,
.text-gray-900,
h4.text-gray-800 {
  color: #1e2129 !important;
  font-weight: 700 !important;
}

.text-muted,
.text-gray-600 {
  color: #5e6278 !important;
}

/* ضمان أن الأزرار تحتفظ بألوانها الصحيحة */
.btn-light {
  color: #667eea !important;
  background-color: #ffffff !important;
}

.btn-warning {
  color: #1e2129 !important;
  background-color: #ffc107 !important;
}

/* حماية إضافية للنصوص البيضاء */
.text-white,
[class*="text-white"] {
  color: #ffffff !important;
}

/* Feature card hover effect - accessible version */
.feature-card-hover {
  transition: transform 0.3s ease !important;
}

.feature-card-hover:hover,
.feature-card-hover:focus {
  transform: translateY(-5px) !important;
}
