/* المتغيرات الأساسية للألوان والخطوط */
:root {
  /* الألوان المحسنة للثيم الداكن */
  --primary-color: #00bcd4;
  /* أزرق سماوي حيوي للبروز */
  --secondary-color: #1e88e5;
  /* أزرق داكن ثانوي */
  --accent-color: #fdd835;
  /* أصفر ذهبي كلون بارز لجذب الانتباه */
  --text-main-light: #f0f0f0;
  /* نص رئيسي فاتح جداً */
  --text-secondary-light: #cccccc;
  /* نص ثانوي فاتح */

  --bg-dark-primary: #0a0e1a;
  /* خلفية أساسية أزرق داكن يميل للفحمي */
  --bg-dark-secondary: #0f1521;
  /* خلفية ثانوية أزرق داكن */
  --bg-dark-tertiary: #060a14;
  /* خلفية أغمق للفوتر أو أقسام خاصة */
  --card-bg-dark: rgba(15, 21, 33, 0.7);
  /* خلفية بطاقات داكنة مع شفافية */
  --border-dark: #1a2332;
  /* حدود متناسقة مع الأزرق الداكن */

  /* تدرجات لونية قوية وجذابة */
  --gradient-main-button: linear-gradient(90deg, #00bcd4 0%, #1e88e5 100%);
  --gradient-card-hover: linear-gradient(135deg, #1e88e5 0%, #00bcd4 100%);
  --gradient-hero-text: linear-gradient(45deg, #00bcd4, #1e88e5, #fdd835);
  --gradient-hero-video-border: linear-gradient(45deg, #00bcd4, #1e88e5);

  /* الظلال */
  --shadow-light: rgba(0, 0, 0, 0.2);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  /* زيادة قوة الظل */
  --shadow-glow: rgba(0, 188, 212, 0.6);
  /* ظل متوهج للزر الأساسي */

  --glass-bg-opacity: rgba(15, 21, 33, 0.6);
  /* خلفية معتمة للزجاجية تتناسب مع الأزرق الداكن */

  /* === z-index Scale (Unified) === */
  --z-base: 1;
  --z-sticky: 8;
  /* Sticky elements below header */
  --z-header: 10;
  --z-dropdown: 15;
  --z-overlay: 20;
  --z-modal: 30;
  --z-toast: 40;
  --z-chatbot: 45;
  /* Chatbot above most elements */
  --z-max: 50;
}

body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-dark-primary);
  color: var(--text-main-light);
  line-height: 1.5;
  overflow-x: hidden;
  /* direction: rtl; Removed to allow html[dir] to control direction */
}



body.no-scroll {
  overflow: hidden;
}


/* تأثير خلفية جزيئات خفيف (Pseudo-element for background animation) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(0, 188, 212, 0.04) 0%, transparent 50%),
    radial-gradient(circle at bottom left, rgba(30, 136, 229, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(10, 20, 40, 0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundPulse 15s infinite alternate ease-in-out;
}

@keyframes backgroundPulse {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 100% 100%;
  }
}

/* Header Styling */
header {
  background-color: var(--glass-bg-opacity);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 30px;
  box-shadow: 0 2px 10px var(--shadow-medium);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid var(--border-dark);
  margin: 10px auto;
  max-width: 1200px;
  border-radius: 25px;
  border: 1px solid rgba(0, 188, 212, 0.2);
}

header.scrolled {
  padding: 5px 30px;
  box-shadow: 0 1px 6px var(--shadow-strong);
  border-radius: 20px;
  margin: 5px auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 1px var(--shadow-light);
  transition: transform 0.3s ease;
}

.logo-text {
  color: var(--primary-color);
}

.logo-cap {
  color: var(--primary-color);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .25s ease;
  filter: drop-shadow(0 0 6px rgba(0, 188, 212, .25));
}

.logo:hover {
  transform: scale(1.01);
}

.logo:hover .logo-cap {
  transform: rotate(-12deg) scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main-light);
  font-size: 0.85rem;
  font-weight: 700;
  position: relative;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
  transform: translateY(-1px);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-color);
  border-radius: 1px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}

/* Mega menu for Courses (shared across pages) */
.nav-links .has-mega {
  position: relative;
}

.nav-links .has-mega>a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-end: 6px;
}

.nav-links .has-mega .mega-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 80px;
  width: min(920px, 90vw);
  background: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 18px;
  box-shadow: 0 18px 50px var(--shadow-strong);
  padding: 18px 22px;
  display: none;
  gap: 18px;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

/* .nav-links .has-mega:hover .mega-menu,
.nav-links .has-mega:focus-within .mega-menu {
  display: grid;
} */

.mega-menu .mega-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mega-menu .mega-col h4 {
  margin: 4px 0 10px;
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.1px;
}

.mega-menu .mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mega-menu .mega-col a {
  color: var(--text-secondary-light);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mega-menu .mega-col a i {
  font-size: 0.85rem;
  color: var(--primary-color);
}

.mega-menu .mega-col a:hover {
  color: var(--primary-color);
  transform: translateX(-2px);
}

@media (max-width: 1024px) {
  .nav-links .has-mega .mega-menu {
    display: none !important;
  }
}

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

.search-button {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-main-light);
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s ease, transform 0.2s ease;
}

.search-button:hover {
  color: var(--accent-color);
  transform: scale(1.05) rotate(2deg);
}

.btn {
  padding: 7px 18px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, letter-spacing 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.1px;
}

.btn.login {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
  box-shadow: 0 0 3px rgba(0, 188, 212, 0.08);
}

.btn.login:hover {
  background-color: var(--primary-color);
  color: var(--card-bg-dark);
  box-shadow: 0 4px 10px var(--shadow-glow);
  transform: translateY(-1px);
  letter-spacing: 0.4px;
}

/* Language Switcher Dropdown Styles */
.language-dropdown {
  position: relative;
  display: inline-block;
  margin-right: 10px;
  z-index: var(--z-dropdown);
}

.language-dropdown .dropdown-toggle {
  background-color: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  color: var(--text-main-light);
  padding: 6px 12px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.language-dropdown .dropdown-toggle:hover {
  background-color: var(--bg-dark-primary);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.2);
}

.language-dropdown .dropdown-toggle img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.language-dropdown .dropdown-toggle .fa-chevron-down {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}

.language-dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

.language-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  list-style: none;
  padding: 5px 0;
  margin-top: 8px;
  min-width: 130px;
  box-shadow: 0 8px 20px var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: var(--z-dropdown);
}

.language-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-dropdown .dropdown-menu li button {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  padding: 8px 12px;
  width: 100%;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.language-dropdown .dropdown-menu li button:hover {
  background-color: var(--bg-dark-primary);
  color: var(--primary-color);
}

.language-dropdown .dropdown-menu li button.active-lang {
  background-color: rgba(0, 188, 212, 0.1);
  color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 20px;
  cursor: pointer;
  z-index: var(--z-dropdown);
  position: relative;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 1.8px;
  background-color: var(--text-main-light);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Professional Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Professional Mobile Menu Panel - Centered - Charcoal Blue Theme */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  max-width: 420px;
  max-height: 100dvh;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(2, 6, 23, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px 0 0 18px;
  padding: 18px 18px 18px;
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  /* Slightly increased gap */
  margin: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(110%);
  opacity: 1;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  z-index: var(--z-modal);
}

/* Custom scrollbar for mobile nav */
.mobile-nav::-webkit-scrollbar {
  width: 4px;
}

.mobile-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.mobile-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.mobile-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-nav-overlay.active .mobile-nav {
  transform: translateX(0);
}

html[dir="rtl"] .mobile-nav-overlay {
  justify-content: flex-start;
}

html[dir="rtl"] .mobile-nav {
  right: auto;
  left: 0;
  border-radius: 0 18px 18px 0;
  transform: translateX(-110%);
}

html[dir="rtl"] .mobile-nav-overlay.active .mobile-nav {
  transform: translateX(0);
}

/* Professional Mobile Nav Header */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  /* Fainter border */
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main-light);
  font-weight: 800;
  font-size: 1.05rem;
}

.mobile-nav-logo i {
  color: var(--primary-color);
  font-size: 1.3rem;
}

.mobile-nav-divider {
  display: none;
  /* Removed redundant divider */
}

/* Professional Close Button */
.mobile-nav-close {
  position: relative;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  font-size: 1rem;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.mobile-nav-close:hover {
  background: rgba(0, 188, 212, 0.12);
  border-color: rgba(0, 188, 212, 0.32);
  color: var(--primary-color);
  transform: rotate(10deg) scale(1.02);
}

.mobile-nav-close:active {
  transform: rotate(10deg) scale(0.96);
}

/* Animated Menu Items */
.mobile-nav>a {
  color: rgba(226, 232, 240, 0.95);
  text-decoration: none;
  font-size: 0.95rem;
  /* Slightly smaller font */
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 12px 14px;
  margin-bottom: 4px;
  width: 100%;
  text-align: start;
  background: rgba(255, 255, 255, 0.03);
  /* Cleaner loop */
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.14);

  /* Animation Setup */
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-nav-overlay.active .mobile-nav>a {
  animation: slideInItem 0.4s forwards;
}

/* Stagger animations */
.mobile-nav-overlay.active .mobile-nav>a:nth-of-type(1) {
  animation-delay: 0.1s;
}

.mobile-nav-overlay.active .mobile-nav>a:nth-of-type(2) {
  animation-delay: 0.15s;
}

.mobile-nav-overlay.active .mobile-nav>a:nth-of-type(3) {
  animation-delay: 0.2s;
}

.mobile-nav-overlay.active .mobile-nav>a:nth-of-type(4) {
  animation-delay: 0.25s;
}

.mobile-nav-overlay.active .mobile-nav>a:nth-of-type(5) {
  animation-delay: 0.3s;
}

@keyframes slideInItem {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav>a::before {
  display: none;
  /* Removing the left bar for a cleaner look */
}

.mobile-nav>a i {
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.95);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: all 0.22s ease;
  flex-shrink: 0;
}

.mobile-nav>a:hover,
.mobile-nav>a:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.26);
}

.mobile-nav>a:hover i,
.mobile-nav>a:focus i {
  color: var(--primary-color);
  background: rgba(0, 188, 212, 0.12);
  border-color: rgba(0, 188, 212, 0.26);
}

.mobile-nav>a.active {
  background: rgba(0, 188, 212, 0.12);
  color: #fff;
  font-weight: 700;
  border-color: rgba(0, 188, 212, 0.28);
}

.mobile-nav>a.active i {
  color: var(--primary-color);
  background: rgba(0, 188, 212, 0.16);
  border-color: rgba(0, 188, 212, 0.28);
}

html[dir="rtl"] .mobile-nav>a {
  transform: translateX(10px);
}

html[dir="rtl"] .mobile-nav>a:hover,
html[dir="rtl"] .mobile-nav>a:focus {
  transform: translateX(0);
}

.mobile-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-phone,
.mobile-nav a[href^="tel:"] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 188, 212, 0.18) 0%, rgba(30, 136, 229, 0.14) 100%);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: rgba(240, 240, 240, 0.95);
  font-weight: 700;
  text-align: center;
}

.mobile-nav-phone i,
.mobile-nav a[href^="tel:"] i {
  color: var(--primary-color);
}

.mobile-nav-phone:hover,
.mobile-nav-phone:focus,
.mobile-nav a[href^="tel:"]:hover,
.mobile-nav a[href^="tel:"]:focus {
  background: linear-gradient(90deg, rgba(0, 188, 212, 0.24) 0%, rgba(30, 136, 229, 0.2) 100%);
  border-color: rgba(0, 188, 212, 0.4);
  color: #fff;
  transform: none;
}

html[dir="rtl"] .mobile-nav-phone,
html[dir="rtl"] .mobile-nav a[href^="tel:"] {
  direction: ltr;
}

/* Mobile Auth Buttons Section */
.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  /* Push to bottom if content is short */
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);

  /* Animation */
  opacity: 0;
  transform: translateY(10px);
}

.mobile-nav-overlay.active .mobile-auth-buttons {
  animation: slideUpFade 0.5s forwards 0.35s;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-auth-buttons .btn {
  width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 16px;
  /* Reduced padding */
  border-radius: 50px;
  /* Fully rounded */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: visible;
  /* Prevent clipping */
}

.mobile-auth-buttons .btn::before {
  display: none;
  /* Remove glimmer to prevent potential clipping issues if not needed or fix z-index */
}

/* Login Button Specifics - Centered, Smaller, No Clip */
.mobile-auth-buttons .btn.login {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #fff;
  width: 140px;
  /* Fixed smaller width */
  margin: 0 auto;
  /* Center horizontally */
  box-shadow: none;
  min-height: 40px;
  /* Ensure touch target */
}

.mobile-auth-buttons .btn.login:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-auth-buttons .btn i {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
  /* Ensure block model for layout */
  flex-shrink: 0;
  /* Prevent shrinking */
}

/* Professional Mobile Language Dropdown - Charcoal Theme */
.mobile-language-dropdown {
  display: block;
  /* Enabled */
  position: relative;
  width: 100%;
  margin: 10px 0;
  padding-top: 0;
  border-top: none;

  /* Animation */
  opacity: 0;
}

.mobile-nav-overlay.active .mobile-language-dropdown {
  animation: slideInItem 0.4s forwards 0.3s;
}

.mobile-language-dropdown .dropdown-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bdc3c7;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: none;
}

.mobile-language-dropdown .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-language-dropdown .dropdown-toggle .dropdown-toggle-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-language-dropdown .dropdown-toggle img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  /* Allow clicks to pass through to parent button */
}

.mobile-language-dropdown .dropdown-toggle span,
.mobile-language-dropdown .dropdown-toggle .dropdown-toggle-content {
  pointer-events: none;
  /* Allow clicks to pass through to parent button */
}

.mobile-language-dropdown .dropdown-toggle .fa-chevron-down {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.mobile-language-dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
  color: #60a5fa;
}

.mobile-nav-footer .mobile-language-dropdown {
  margin: 0;
}

.mobile-nav-footer .mobile-auth-buttons {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.mobile-language-dropdown .dropdown-menu {
  position: static;
  background: rgba(8, 16, 32, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  list-style: none;
  padding: 0;
  /* Collapsed padding */
  margin-top: 12px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  /* Collapsed height */
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.mobile-language-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 300px;
  /* Expand height */
  padding: 8px;
  /* Expand padding */
}

.mobile-language-dropdown .dropdown-menu li {
  margin-bottom: 4px;
}

.mobile-language-dropdown .dropdown-menu li:last-child {
  margin-bottom: 0;
}

.mobile-language-dropdown .dropdown-menu li button {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid transparent;
  color: #cbd5e1;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-language-dropdown .dropdown-menu li button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  transform: translateX(4px);
}

.mobile-language-dropdown .dropdown-menu li button.active-lang {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #60a5fa;
}

.mobile-language-dropdown .dropdown-menu li button img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

/* Professional Mobile User Dropdown - Dark Blue Theme */
.mobile-user-dropdown {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.mobile-user-dropdown .dropdown-toggle {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-user-dropdown .dropdown-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.mobile-user-dropdown .dropdown-toggle .fa-chevron-down {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.mobile-user-dropdown.active .dropdown-toggle .fa-chevron-down,
.mobile-user-dropdown.open .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
  color: #60a5fa;
}

.mobile-user-dropdown .dropdown-menu {
  position: static;
  background: rgba(8, 16, 32, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  list-style: none;
  padding: 8px;
  margin-top: 12px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.mobile-user-dropdown.active .dropdown-menu,
.mobile-user-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 300px;
  padding: 8px;
}

.mobile-user-dropdown .dropdown-menu li {
  margin-bottom: 4px;
}

.mobile-user-dropdown .dropdown-menu li:last-child {
  margin-bottom: 0;
}

.mobile-user-dropdown .dropdown-menu a,
.mobile-user-dropdown .dropdown-menu button {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid transparent;
  color: #cbd5e1;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.mobile-user-dropdown .dropdown-menu a i,
.mobile-user-dropdown .dropdown-menu button i {
  width: 20px;
  text-align: center;
  color: #60a5fa;
  opacity: 0.8;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mobile-user-dropdown .dropdown-menu a:hover,
.mobile-user-dropdown .dropdown-menu button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  transform: translateX(4px);
}

.mobile-user-dropdown .dropdown-menu a:hover i,
.mobile-user-dropdown .dropdown-menu button:hover i {
  opacity: 1;
  transform: scale(1.15);
}

/* Search Overlay HTML */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

/* Glass effect for header when search is active */
header.search-active {
  background-color: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 2px solid rgba(0, 188, 212, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  position: relative;
  z-index: var(--z-header);
  border: 2px solid rgba(0, 188, 212, 0.3);
  border-radius: 25px;
  animation: headerGlow 0.4s ease-out;
}

@keyframes headerGlow {
  0% {
    box-shadow: 0 2px 10px var(--shadow-medium);
    border-color: rgba(0, 188, 212, 0.2);
  }

  100% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 188, 212, 0.3);
  }
}

/* Additional blur effect for header elements when search is active */
header.search-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 188, 212, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: -1;
  border-radius: 25px;
}

/* Additional glow effect for header when search is active */
header.search-active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(0, 188, 212, 0.1), rgba(30, 136, 229, 0.1));
  border-radius: 27px;
  z-index: -2;
  opacity: 0.6;
}

/* Blur effect for header navigation elements when search is active */
header.search-active .nav-links,
header.search-active .header-actions,
header.search-active .user-profile-dropdown,
header.search-active .language-dropdown {
  filter: blur(1px);
  -webkit-filter: blur(1px);
  transition: filter 0.4s ease;
  opacity: 0.8;
  animation: fadeInBlur 0.4s ease-out;
}

@keyframes fadeInBlur {
  0% {
    filter: blur(0px);
    -webkit-filter: blur(0px);
    opacity: 1;
  }

  100% {
    filter: blur(1px);
    -webkit-filter: blur(1px);
    opacity: 0.8;
  }
}

/* Keep search button clear when search is active */
header.search-active .search-button {
  filter: none;
  -webkit-filter: none;
  opacity: 1;
  transform: scale(1.1);
  transition: all 0.3s ease;
  animation: searchButtonGlow 0.4s ease-out;
}

@keyframes searchButtonGlow {
  0% {
    transform: scale(1);
    color: var(--text-main-light);
  }

  100% {
    transform: scale(1.1);
    color: var(--primary-color);
  }
}

/* Logo stays clear when search is active */
header.search-active .logo {
  filter: none;
  -webkit-filter: none;
  opacity: 1;
  animation: logoGlow 0.4s ease-out;
}

@keyframes logoGlow {
  0% {
    color: var(--text-main-light);
  }

  100% {
    color: var(--primary-color);
  }
}

.search-bar {
  background-color: rgba(33, 38, 45, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px 30px;
  border-radius: 20px;
  display: flex;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 188, 212, 0.3);
  animation: searchSlideDown 0.4s ease-out;
}

@keyframes searchSlideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.search-bar input {
  flex-grow: 1;
  border: none;
  background: none;
  color: var(--text-main-light);
  font-size: 1.2rem;
  padding: 8px 15px;
  outline: none;
  font-family: 'Tajawal', sans-serif;
  margin-right: 15px;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  transform: scale(1.02);
}

.search-bar input::placeholder {
  color: var(--text-secondary-light);
  transition: color 0.3s ease;
}

.search-bar input:focus::placeholder {
  color: var(--primary-color);
}

.search-bar .close-search {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar .close-search:hover {
  color: var(--accent-color);
  background-color: rgba(253, 216, 53, 0.1);
  transform: scale(1.1);
}

/* Footer Styling */
footer {
  background-color: var(--bg-dark-tertiary);
  color: var(--text-main-light);
  padding: 40px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border-top: 1px solid var(--border-dark);
  margin-top: 70px;
  direction: rtl;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  max-width: 1000px;
  margin: auto;
  text-align: right;
}

.footer-section {
  flex: 1 1 200px;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 18px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 7px;
  font-weight: 900;
  line-height: 1.3;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 45px;
  height: 2.5px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-secondary-light);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  font-size: 0.95rem;
}

.footer-section ul li a:hover {
  color: var(--accent-color);
  transform: translateX(-2px);
}

.social-icons {
  display: flex;
  gap: 25px;
  margin-top: 30px;
  justify-content: center;
  /* وسطياً */
  align-items: center;
  flex-wrap: nowrap;
  /* صف أفقي واحد */
}

.social-icons a {
  color: var(--text-main-light);
  font-size: 1.6rem;
  margin: 0 3px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 55px;
  height: 55px;
  border-radius: 18px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-icons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.15) 25%,
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0.15) 75%,
      transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  border-radius: 18px;
}

.social-icons a:hover::before {
  transform: translateX(100%);
}

.social-icons a:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 188, 212, 0.6);
  backdrop-filter: blur(20px);
}

/* Facebook - أزرق فيسبوك احترافي */
.social-icons a[href*="facebook"] {
  background: linear-gradient(135deg,
      rgba(59, 89, 152, 0.15) 0%,
      rgba(59, 89, 152, 0.08) 50%,
      rgba(59, 89, 152, 0.03) 100%);
  border-color: rgba(59, 89, 152, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(59, 89, 152, 0.2);
}

.social-icons a[href*="facebook"]:hover {
  background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
  color: white;
  border-color: #3b5998;
  box-shadow:
    0 20px 40px rgba(59, 89, 152, 0.5),
    0 8px 16px rgba(59, 89, 152, 0.3);
  transform: translateY(-8px) scale(1.05);
}

/* Twitter - أزرق تويتر احترافي */
.social-icons a[href*="twitter"] {
  background: linear-gradient(135deg,
      rgba(0, 172, 238, 0.15) 0%,
      rgba(0, 172, 238, 0.08) 50%,
      rgba(0, 172, 238, 0.03) 100%);
  border-color: rgba(0, 172, 238, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 172, 238, 0.2);
}

.social-icons a[href*="twitter"]:hover {
  background: linear-gradient(135deg, #00acee 0%, #0088cc 100%);
  color: white;
  border-color: #00acee;
  box-shadow:
    0 20px 40px rgba(0, 172, 238, 0.5),
    0 8px 16px rgba(0, 172, 238, 0.3);
  transform: translateY(-8px) scale(1.05);
}

/* LinkedIn - أزرق لينكد إن احترافي */
.social-icons a[href*="linkedin"] {
  background: linear-gradient(135deg,
      rgba(0, 119, 181, 0.15) 0%,
      rgba(0, 119, 181, 0.08) 50%,
      rgba(0, 119, 181, 0.03) 100%);
  border-color: rgba(0, 119, 181, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 119, 181, 0.2);
}

.social-icons a[href*="linkedin"]:hover {
  background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
  color: white;
  border-color: #0077b5;
  box-shadow:
    0 20px 40px rgba(0, 119, 181, 0.5),
    0 8px 16px rgba(0, 119, 181, 0.3);
  transform: translateY(-8px) scale(1.05);
}

/* Instagram - تدرج إنستغرام احترافي */
.social-icons a[href*="instagram"] {
  background: linear-gradient(135deg,
      rgba(225, 48, 108, 0.15) 0%,
      rgba(253, 29, 29, 0.12) 25%,
      rgba(255, 193, 7, 0.12) 50%,
      rgba(225, 48, 108, 0.15) 100%);
  border-color: rgba(225, 48, 108, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(225, 48, 108, 0.2);
}

.social-icons a[href*="instagram"]:hover {
  background: linear-gradient(135deg,
      #e1306c 0%,
      #fd1d1d 25%,
      #fcb045 50%,
      #833ab4 75%,
      #5b51d8 100%);
  color: white;
  border-color: #e1306c;
  box-shadow:
    0 20px 40px rgba(225, 48, 108, 0.5),
    0 8px 16px rgba(225, 48, 108, 0.3);
  transform: translateY(-8px) scale(1.05);
}

/* تأثير إضافي للإنستغرام - تم إلغاؤه */

/* تأثيرات احترافية للأيقونات */
.social-icons a {
  animation: socialIconFloat 4s ease-in-out infinite;
}

.social-icons a:nth-child(1) {
  animation-delay: 0s;
}

.social-icons a:nth-child(2) {
  animation-delay: 0.3s;
}

.social-icons a:nth-child(3) {
  animation-delay: 0.6s;
}

.social-icons a:nth-child(4) {
  animation-delay: 0.9s;
}

@keyframes socialIconFloat {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  25% {
    transform: translateY(-2px) rotate(0.5deg);
  }

  50% {
    transform: translateY(-4px) rotate(0deg);
  }

  75% {
    transform: translateY(-2px) rotate(-0.5deg);
  }
}

/* تأثير النقر المحسن */
.social-icons a:active {
  transform: translateY(-4px) scale(0.98);
  transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.2);
}

/* تأثير الإضاءة عند التمرير */
.social-icons a:hover {
  animation-play-state: paused;
}

/* تحسين الخطوط والأيقونات */
.social-icons a i {
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.social-icons a:hover i {
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* تأثير إضافي للإنستغرام - دوران متوهج - تم إلغاؤه */

/* تأثير نبضة خفيفة للأيقونات - تم إلغاؤه */

/* تأثيرات إضافية احترافية */
.social-icons a {
  position: relative;
  z-index: 1;
}

/* تأثير الإضاءة الداخلية */
.social-icons a::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(0, 0, 0, 0.1) 100%);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.social-icons a:hover::before {
  opacity: 1;
}

/* تأثير الظل المتحرك */
.social-icons a {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* تأثير التوهج عند التمرير */
.social-icons a:hover {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(0, 188, 212, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تأثيرات خاصة لكل منصة */
.social-icons a[href*="facebook"]:hover {
  box-shadow:
    0 20px 40px rgba(59, 89, 152, 0.5),
    0 8px 16px rgba(59, 89, 152, 0.3),
    0 0 30px rgba(59, 89, 152, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-icons a[href*="twitter"]:hover {
  box-shadow:
    0 20px 40px rgba(0, 172, 238, 0.5),
    0 8px 16px rgba(0, 172, 238, 0.3),
    0 0 30px rgba(0, 172, 238, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-icons a[href*="linkedin"]:hover {
  box-shadow:
    0 20px 40px rgba(0, 119, 181, 0.5),
    0 8px 16px rgba(0, 119, 181, 0.3),
    0 0 30px rgba(0, 119, 181, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-icons a[href*="instagram"]:hover {
  box-shadow:
    0 20px 40px rgba(225, 48, 108, 0.5),
    0 8px 16px rgba(225, 48, 108, 0.3),
    0 0 30px rgba(225, 48, 108, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تأثير النبضة المستمرة */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.social-icons a:hover {
  animation: pulse 2s ease-in-out infinite;
}

/* تأثير التدرج المتحرك */
.social-icons a {
  background-attachment: fixed;
}

/* تحسين الاستجابة للشاشات الصغيرة */
@media (max-width: 480px) {
  .social-icons {
    gap: 20px;
    justify-content: center;
  }

  .social-icons a {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

.footer-bottom {
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid #4a4a4a;
  font-size: 0.85rem;
  color: var(--text-secondary-light);
}

/* NEW CSS for profile dropdown */
.user-profile-dropdown {
  position: relative;
  display: none;
  /* Hidden by default, shown when logged in */
  margin-right: 15px;
}

.user-profile-dropdown .dropdown-toggle {
  background-color: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  color: var(--text-main-light);
  padding: 8px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.user-profile-dropdown .dropdown-toggle:hover {
  background-color: var(--bg-dark-primary);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.2);
}

.user-profile-dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

.user-profile-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  list-style: none;
  padding: 5px 0;
  margin-top: 10px;
  min-width: 180px;
  box-shadow: 0 8px 20px var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 10;
}

.user-profile-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-profile-dropdown .dropdown-menu li button,
.user-profile-dropdown .dropdown-menu li a {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  padding: 10px 15px;
  width: 100%;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  /* For anchor tags */
}

.user-profile-dropdown .dropdown-menu li button:hover,
.user-profile-dropdown .dropdown-menu li a:hover {
  background-color: var(--bg-dark-primary);
  color: var(--primary-color);
}

.user-profile-dropdown .dropdown-menu li:last-child button,
.user-profile-dropdown .dropdown-menu li:last-child a {
  border-top: 1px solid var(--border-dark);
  /* Separator for logout */
  margin-top: 5px;
  padding-top: 10px;
  color: #f44336;
  /* Red color for logout */
}

.user-profile-dropdown .dropdown-menu li:last-child button:hover,
.user-profile-dropdown .dropdown-menu li:last-child a:hover {
  background-color: rgba(244, 67, 54, 0.1);
  color: #ff7961;
}

/* Mobile profile dropdown */
.mobile-profile-dropdown {
  display: none;
  /* Hidden by default */
  position: relative;
  width: 90%;
  margin-top: 15px;
  /* Space from nav links */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}

.mobile-profile-dropdown .dropdown-toggle {
  background-color: var(--bg-dark-primary);
  border: 1px solid var(--border-dark);
  color: var(--text-main-light);
  padding: 10px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mobile-profile-dropdown .dropdown-toggle:hover {
  background-color: var(--bg-dark-primary);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.2);
}

.mobile-profile-dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

.mobile-profile-dropdown .dropdown-menu {
  position: static;
  background-color: var(--bg-dark-secondary);
  border: none;
  border-top: 1px solid var(--border-dark);
  border-radius: 8px;
  list-style: none;
  padding: 0;
  margin-top: 10px;
  width: 100%;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.4s ease-out;
}

.mobile-profile-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 200px;
}

.mobile-profile-dropdown .dropdown-menu li button,
.mobile-profile-dropdown .dropdown-menu li a {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  padding: 10px 15px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.mobile-profile-dropdown .dropdown-menu li:last-child button,
.mobile-profile-dropdown .dropdown-menu li:last-child a {
  border-bottom: none;
  color: #f44336;
}

.mobile-profile-dropdown .dropdown-menu li button:hover,
.mobile-profile-dropdown .dropdown-menu li a:hover {
  background-color: var(--bg-dark-primary);
  color: var(--primary-color);
}

.mobile-profile-dropdown .dropdown-menu li:last-child button:hover,
.mobile-profile-dropdown .dropdown-menu li:last-child a:hover {
  background-color: rgba(244, 67, 54, 0.1);
  color: #ff7961;
}

/* Responsive Adjustments */
@media (min-width: 992px) {

  .nav-links,
  .header-actions .btn {
    display: flex;
  }

  .search-button {
    display: block;
  }

  .hamburger-menu {
    display: none;
  }

  .language-dropdown {
    display: inline-block;
  }

  .mobile-language-dropdown {
    display: none;
  }
}

@media (max-width: 991px) {
  header {
    padding: 8px 15px;
    margin: 8px 15px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }

  header.scrolled {
    padding: 5px 15px;
    margin: 5px 15px;
    border-radius: 15px;
  }

  /* Hide all desktop navigation and actions on mobile */
  .nav-links,
  .header-actions,
  .header-actions .btn,
  .header-actions .btn.login,
  #loginBtn,
  .search-button,
  .language-dropdown,
  .user-profile-dropdown {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }

  /* Logo styling for mobile */
  .logo {
    flex: 0 1 auto;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Hamburger menu - always visible and positioned at the end */
  .hamburger-menu {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: var(--z-dropdown) !important;
    flex-shrink: 0;
    margin-inline-start: auto;
  }
}

@media (max-width: 767px) {
  header {
    padding: 6px 8px;
    margin: 5px 10px;
    border-radius: 15px;
  }

  header.scrolled {
    padding: 4px 8px;
    margin: 3px 10px;
    border-radius: 12px;
  }

  .logo {
    font-size: 1.2rem;
    gap: 8px;
  }

  .logo-cap {
    font-size: 1rem;
  }

  .hamburger-menu {
    width: 22px;
    height: 18px;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: var(--z-dropdown) !important;
  }

  .hamburger-menu span {
    height: 1.5px;
    pointer-events: none;
  }

  .mobile-nav {
    width: 100%;
    max-width: none;
    border-radius: 0;
    padding-top: 40px;
    gap: 15px;
  }

  .mobile-nav>a {
    font-size: 0.9rem;
    padding: 4px 0;
    gap: 8px;
  }

  .mobile-nav>a i {
    font-size: 0.85rem;
  }

  .mobile-auth-buttons .btn {
    font-size: 0.88rem;
    padding: 8px 16px;
  }

  .mobile-auth-buttons .btn i {
    font-size: 0.82rem;
  }

  .mobile-language-dropdown {
    display: block;
  }

  .search-bar {
    width: 90%;
    padding: 10px 15px;
  }

  .search-bar input {
    font-size: 1rem;
    margin-right: 10px;
  }

  .search-bar .close-search {
    font-size: 1.2rem;
  }

  footer {
    padding: 15px 10px;
    gap: 12px;
  }

  .footer-section {
    flex-basis: 100%;
    text-align: center;
  }

  .footer-section h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .social-icons {
    justify-content: center;
    gap: 15px;
  }

  .social-icons a {
    font-size: 1.4rem;
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
  .logo {
    font-size: 1rem;
    gap: 6px;
  }

  .logo-cap {
    font-size: 0.9rem;
  }
}



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

.search-bar {
  background-color: var(--bg-dark-secondary);
  padding: 20px 30px;
  border-radius: 20px;
  display: flex;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 15px 40px var(--shadow-strong);
  border: 2px solid var(--border-dark);
  margin-bottom: 30px;
  position: relative;
}

.search-bar input {
  flex-grow: 1;
  border: none;
  background: none;
  color: var(--text-main-light);
  font-size: 1.3rem;
  padding: 15px 20px;
  outline: none;
  font-family: 'Tajawal', sans-serif;
  margin-right: 20px;
}

.search-bar input::placeholder {
  color: var(--text-secondary-light);
}

.search-bar .close-search {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 10px;
  border-radius: 50%;
}

.search-bar .close-search:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

/* Search Suggestions Styles */
.search-suggestions-container {
  width: 90%;
  max-width: 800px;
  position: relative;
  z-index: 10;
  margin-bottom: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.search-suggestions-container.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Search Results Styles */
.search-results-container {
  width: 100%;
  margin-bottom: 40px;
}

.search-results-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card-bg-dark);
  border-radius: 15px;
  border: 1px solid var(--border-dark);
}

.search-results-header h2 {
  color: var(--text-main-light);
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.results-count {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(0, 188, 212, 0.1);
  padding: 5px 15px;
  border-radius: 20px;
  display: inline-block;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.search-result-card {
  background: var(--card-bg-dark);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  transition: all 0.3s ease;
  position: relative;
}

.search-result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.search-result-card .course-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.search-result-card .course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-result-card:hover .course-image img {
  transform: scale(1.05);
}

.course-price-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-price-badge.free {
  background: linear-gradient(135deg, #fdd835 0%, #ffc107 100%);
  color: var(--bg-dark-primary);
  box-shadow: 0 2px 8px rgba(253, 216, 53, 0.3);
  border: 1px solid rgba(255, 193, 7, 0.3);
  position: relative;
  overflow: hidden;
}

.course-price-badge.free::before {
  content: "✨";
  margin-right: 4px;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(1.1) rotate(10deg);
    opacity: 0.8;
  }
}

/* تحسينات إضافية للعلامة المجانية */
.free-badge {
  background: linear-gradient(135deg, #fdd835 0%, #ffc107 100%);
  color: var(--bg-dark-primary);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  box-shadow: 0 2px 8px rgba(253, 216, 53, 0.3);
  border: 1px solid rgba(255, 193, 7, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  animation: freeBadgePulse 2s infinite;
}

.free-badge::before {
  content: "✨";
  font-size: 0.9em;
  margin-right: 2px;
  animation: sparkle 1.5s ease-in-out infinite;
}

.free-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(253, 216, 53, 0.4);
  background: linear-gradient(135deg, #ffc107 0%, #fdd835 100%);
}

@keyframes freeBadgePulse {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(253, 216, 53, 0.3);
  }

  50% {
    box-shadow: 0 2px 12px rgba(253, 216, 53, 0.5);
  }
}

/* تحسينات إضافية للعلامة المجانية في الكورسات */
.course h3 .free-badge {
  position: relative;
  z-index: 2;
}

.course h3 .free-badge::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #fdd835, #ffc107, #fdd835);
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

.course-price-badge.paid {
  background: var(--primary-color);
  color: var(--text-main-light);
}

.search-result-card .course-content {
  padding: 20px;
}

.search-result-card .course-title {
  color: var(--text-main-light);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.search-result-card .course-description {
  color: var(--text-secondary-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-card .course-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.search-result-card .course-instructor,
.search-result-card .course-category {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary-light);
  font-size: 0.9rem;
}

.search-result-card .course-instructor i,
.search-result-card .course-category i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

.search-result-card .course-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-result-card .tag {
  background: rgba(0, 188, 212, 0.1);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(0, 188, 212, 0.3);
}

.search-result-card .course-button {
  background: var(--gradient-main-button);
  color: var(--bg-dark-primary);
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.search-result-card .course-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 188, 212, 0.4);
}

.search-result-card .course-button i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.search-result-card .course-button:hover i {
  transform: translateX(-3px);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary-light);
}

.no-results i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.7;
}

.no-results h3 {
  color: var(--text-main-light);
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.no-results p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.suggestions-list {
  background-color: var(--bg-dark-secondary);
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow-strong);
  border: 1px solid var(--border-dark);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.suggestions-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main-light);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
  background-color: var(--primary-color);
  color: white;
  transform: translateX(5px);
}

.suggestion-item i {
  color: var(--primary-color);
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

.suggestion-item:hover i,
.suggestion-item.active i {
  color: white;
}

.suggestion-item span {
  font-size: 0.95rem;
  font-weight: 500;
}




/* Responsive Design for Search */
@media (max-width: 768px) {
  .search-overlay {
    padding-top: 80px;
  }

  .search-bar {
    width: 95%;
    padding: 15px 20px;
    margin-bottom: 20px;
  }

  .search-bar input {
    font-size: 1.1rem;
    padding: 12px 15px;
  }

  .search-suggestions-container {
    width: 95%;
  }

  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .search-results-header h2 {
    font-size: 1.5rem;
  }

  .search-result-card .course-content {
    padding: 15px;
  }

  .search-result-card .course-title {
    font-size: 1.2rem;
  }

  .search-result-card .course-meta {
    flex-direction: column;
    gap: 10px;
  }

}

@media (max-width: 480px) {
  .search-overlay {
    padding-top: 60px;
  }

  .search-bar {
    padding: 12px 15px;
  }

  .search-bar input {
    font-size: 1rem;
    padding: 10px 12px;
  }

}

/* ====================================
   تحسينات التجاوبية العامة
   ==================================== */

/* Medium Small Phones - 480px to 575px */
@media (min-width: 480px) and (max-width: 575px) {

  /* Courses page buttons */
  .search-result-card .course-button,
  .course-card .course-button {
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 25px;
    min-height: 42px;
  }
}

/* Tablets Portrait - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .btn {
    padding: 12px 22px;
    font-size: 0.95rem;
  }

  .button-primary {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 2rem;
  }

  footer {
    padding: 40px 25px 20px;
  }

  .footer-section {
    flex-basis: calc(50% - 20px);
  }
}

/* Large Phones - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
  :root {
    --font-size-base: 14px;
  }

  .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .button-primary {
    padding: 11px 22px;
    font-size: 0.9rem;
  }

  /* Courses page buttons */
  .search-result-card .course-button,
  .course-card .course-button {
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 25px;
    min-height: 42px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  footer {
    padding: 35px 20px 18px;
  }

  .footer-section {
    flex-basis: 100%;
    text-align: center;
  }

  .footer-section h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .social-icons {
    justify-content: center;
  }
}

/* Small Phones - 320px to 575px */
@media (max-width: 575px) {
  :root {
    --font-size-base: 14px;
  }

  * {
    -webkit-tap-highlight-color: rgba(0, 188, 212, 0.2);
  }

  body {
    font-size: 0.9rem;
    overflow-x: hidden;
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  .button-primary {
    padding: 10px 20px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Courses page - Join Now button smaller with bigger font */
  .search-result-card .course-button,
  .course-card .course-button {
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 25px;
    font-weight: 700;
    min-height: 42px;
  }

  .search-result-card .course-button i,
  .course-card .course-button i {
    font-size: 0.95rem;
    width: 16px;
    height: 16px;
  }

  .section-title {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .section-description {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  /* Footer Mobile */
  footer {
    padding: 30px 15px 15px;
  }

  .footer-content {
    flex-direction: column;
    gap: 25px;
  }

  .footer-section {
    flex-basis: 100%;
    text-align: center;
  }

  .footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .footer-section h4::after {
    right: 50%;
    transform: translateX(50%);
    width: 40px;
  }

  .footer-section p,
  .footer-section a {
    font-size: 0.85rem;
  }

  .footer-links {
    align-items: center;
  }

  .social-icons {
    justify-content: center;
    gap: 12px;
  }

  .social-icons a {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .footer-bottom {
    padding: 12px 15px;
    font-size: 0.8rem;
    text-align: center;
  }

  /* Responsive Images */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Prevent horizontal scroll */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Very Small Phones - Below 375px */
@media (max-width: 374px) {
  :root {
    --font-size-base: 13px;
  }

  .btn {
    padding: 9px 16px;
    font-size: 0.8rem;
  }

  .button-primary {
    padding: 9px 18px;
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .social-icons a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Already using dark theme, but can add adjustments here */
}

/* iOS Safari Fixes */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }

  .btn,
  .button-primary {
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 991px) and (orientation: landscape) {
  body {
    padding-top: 50px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  footer {
    padding: 25px 15px 12px;
  }
}

/* Container Max Widths */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .container {
    max-width: 540px;
  }
}

@media (max-width: 575px) {
  .container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* ====================================
   Elegant Mobile Icon Frames (Login / Explore)
   Applies to mobile header & mobile drawer links
   ==================================== */
@media (max-width: 991px) {

  /* Compact, elegant framed icons inside mobile nav and auth buttons */
  .mobile-nav a i,
  .mobile-auth-buttons .btn i,
  .header-actions .btn.login i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: none;
    font-size: 0.9rem;
    line-height: 1;
  }

  /* Subtle interactive refinement */
  .mobile-nav a:hover i,
  .mobile-auth-buttons .btn:hover i,
  .header-actions .btn.login:hover i {
    background: rgba(0, 188, 212, 0.12);
    border-color: rgba(0, 188, 212, 0.26);
  }

  /* Make the mobile auth button a touch more refined */
  .mobile-auth-buttons .btn.login {
    padding: 8px 16px;
    border-radius: 16px;
  }
}

/* Extra-small phones: make frames a touch smaller */
@media (max-width: 575px) {

  .mobile-nav a i,
  .mobile-auth-buttons .btn i,
  .header-actions .btn.login i {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    font-size: 0.85rem;
  }
}