/* style.css - تصميم احترافي مع دعم كامل للشاشات الصغيرة */

:root {
  --primary: #0a192f;
  --secondary: #172a45;
  --accent: #00f2fe;
  --accent-secondary: #4facfe;
  --accent-tertiary: #f093fb;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --bg-primary: #0a192f;
  --bg-secondary: #172a45;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: #dee2e6;
  --text-muted: #8892b0;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glass: 1px solid rgba(255, 255, 255, 0.15);
  --gradient-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(0, 242, 254, 0.3);
  --blur-sm: blur(4px);
  --blur-md: blur(8px);
  --blur-lg: blur(12px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  /* ألوان التوست */
  --toast-success: #2ed573;
  --toast-error: #ff4757;
  --toast-warning: #ffa502;
  --toast-info: #00f2fe;
}


[data-theme="light"] {
  --primary: #f8f9fa;
  --secondary: #e9ecef;
  --accent: #0066cc;
  --accent-secondary: #0099ff;
  --accent-tertiary: #cc33ff;
  --white: #1a1a2e;
  --gray-300: #4a4a6a;
  --gray-800: #e9ecef;
  --gray-900: #f8f9fa;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-glass: rgba(0, 0, 0, 0.01);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #666688;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-glass: 1px solid rgba(0, 0, 0, 0.08);
  --gradient-primary: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(0, 102, 204, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* إخفاء المؤشر المخصص في الموبايل */
@media (max-width: 992px) {

  .cursor,
  .cursor-follower {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* لوجو الجمعية في التحميل */
.preloader-logo-wrapper {
  margin-bottom: 10px;
  animation: preloaderLogoFloat 3s ease-in-out infinite;
}

@keyframes preloaderLogoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.preloader-logo-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 0 30px rgba(0, 242, 254, 0.5));
}

.preloader-logo-svg {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 0 30px rgba(0, 242, 254, 0.5));
}

/* اسم الجمعية */
.preloader-logo {
  font-size: clamp(1.2rem, 5vw, 2rem);
  font-weight: 900;
  margin-bottom: 10px;
}

.logo-text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

/* سبينر التحميل */
.preloader-spinner {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
}

.spinner-ring {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.spinner-ring:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--accent-secondary);
}

.spinner-ring:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--accent-tertiary);
}

/* شريط التقدم */
.loading-progress {
  width: 200px;
  height: 4px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  animation: loading 2s ease-in-out;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
}

@keyframes loading {
  0% {
    width: 0;
  }

  100% {
    width: 100%;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* Responsive Preloader */
@media (max-width: 768px) {

  .preloader-logo-img,
  .preloader-logo-svg {
    width: 130px;
    height: 130px;
  }

  .preloader-logo {
    font-size: 1.1rem;
  }

  .loading-progress {
    width: 160px;
  }
}

@media (max-width: 480px) {

  .preloader-logo-img,
  .preloader-logo-svg {
    width: 130px;
    height: 130px;
  }

  .preloader-logo {
    font-size: 0.9rem;
  }

  .loading-progress {
    width: 140px;
  }
}

.spinner-ring {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.spinner-ring:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--accent-secondary);
}

.spinner-ring:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--accent-tertiary);
}

.loading-progress {
  width: 200px;
  height: 3px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  animation: loading 2s ease-in-out;
}

@keyframes loading {
  0% {
    width: 0;
  }

  100% {
    width: 100%;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* Particles Background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-primary);
}

/* Top Bar */
.top-bar {
  background: var(--bg-secondary);
  backdrop-filter: var(--blur-md);
  border-bottom: var(--border-glass);
  padding: 8px 0;
  font-size: 0.85rem;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(46, 213, 115, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: var(--text-primary);
}

.pulse {
  width: 8px;
  height: 8px;
  background: #2ed573;
  border-radius: 50%;
  position: relative;
}

.pulse::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #2ed573;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.time-display {
  color: var(--text-secondary);
}

.top-bar-right {
  display: flex;
  align-items: center;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 8px;
  transition: var(--transition-fast);
  font-family: inherit;
  border-radius: var(--radius-sm);
}

.lang-btn:hover {
  color: var(--accent);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--bg-card);
}

.lang-separator {
  color: var(--border-color);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-secondary);
  backdrop-filter: var(--blur-lg);
  border-bottom: var(--border-glass);
  padding: 12px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
}

.logo-text h1 {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
}

.logo-text .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text p {
  font-size: 0.65rem;
  opacity: 0.8;
  color: var(--text-secondary);
}

/* القائمة الرئيسية */
.main-nav {
  display: flex;
  gap: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  position: relative;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--gradient-glass);
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-base);
  transform: translateX(-50%);
}

.nav-link.active .nav-indicator {
  width: 70%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-toggle,
.theme-toggle,
.mobile-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.search-toggle:hover,
.theme-toggle:hover {
  color: var(--accent);
  background: var(--bg-card);
}

/* مبدل الوضع */
.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle i {
  position: absolute;
  transition: var(--transition-base);
}

.theme-toggle .fa-sun {
  opacity: 0;
  transform: translateY(20px) rotate(180deg);
}

[data-theme="light"] .theme-toggle .fa-moon {
  opacity: 0;
  transform: translateY(-20px) rotate(-180deg);
}

[data-theme="light"] .theme-toggle .fa-sun {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* زر القائمة للموبايل */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  backdrop-filter: var(--blur-lg);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  width: 90%;
  max-width: 550px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 25px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.search-results {
  margin-top: 10px;
  max-height: 350px;
  overflow-y: auto;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-header {
  padding: 8px 12px;
  color: var(--accent);
  font-size: 0.85rem;
  border-bottom: var(--border-glass);
}

.search-result-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.search-result-item:hover {
  background: var(--gradient-glass);
}

.search-result-item mark {
  background: var(--accent);
  color: white;
  padding: 1px 4px;
  border-radius: 4px;
}

.search-close {
  position: absolute;
  left: 15px;
  top: 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 100px 0 60px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  animation: float-orb 20s ease-in-out infinite;
}

.glow-1 {
  background: var(--accent);
  top: -150px;
  right: -150px;
}

.glow-2 {
  background: var(--accent-secondary);
  bottom: -150px;
  left: -150px;
  animation-delay: -5s;
}

.glow-3 {
  background: var(--accent-tertiary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes float-orb {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -40px) scale(1.1);
  }

  66% {
    transform: translate(-40px, 40px) scale(0.9);
  }
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.hero-container-full {
  display: flex;
  justify-content: center;
  text-align: center;
}

.hero-content-full {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 15px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  margin-bottom: 25px;
  font-size: 0.85rem;
}

.hero-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
}

.title-line-1,
.title-line-2 {
  display: block;
}

.title-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-base);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  border: var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: var(--blur-sm);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(0, 242, 254, 0.1);
  transform: translateY(-3px);
}

.floating-elements-hero {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.float-card {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: float-card 6s ease-in-out infinite;
  font-size: 0.9rem;
}

@keyframes float-card {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.mouse {
  width: 22px;
  height: 35px;
  border: 2px solid var(--text-secondary);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 3px;
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 45px;
  padding: 0 15px;
}

.section-tag {
  display: inline-block;
  padding: 5px 16px;
  background: var(--gradient-glass);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  margin-bottom: 15px;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 15px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  max-width: 650px;
  margin: 0 auto;
}

/* About Section */
.about-section {
  padding: 70px 0;
}

.about-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.glass-card {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: var(--transition-base);
  height: 100%;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card-header i {
  font-size: 1.6rem;
  color: var(--accent);
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.glass-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9rem;
}

.values-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.value-tag {
  padding: 6px 14px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
}

.timeline-container {
  max-width: 750px;
  margin: 0 auto;
}

.timeline {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 15px;
}

.timeline-item {
  text-align: center;
  padding: 18px 22px;
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  min-width: 130px;
  transition: var(--transition-base);
}

.timeline-item .year {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 5px;
}

.timeline-item .desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.timeline-item.highlight {
  background: var(--gradient-primary);
}

.timeline-item.highlight .year,
.timeline-item.highlight .desc {
  color: white;
}

/* Technology Section */
.tech-section {
  padding: 70px 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.tech-card {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 18px;
  text-align: center;
  transition: var(--transition-base);
}

.tech-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent);
}

.tech-icon {
  width: 65px;
  height: 65px;
  margin: 0 auto 20px;
  background: var(--gradient-primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.tech-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.tech-card p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 0.85rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tech-tags span {
  padding: 3px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--accent);
}

/* Projects Section */
.projects-section {
  padding: 70px 0;
}

.projects-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: transparent;
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
  font-family: inherit;
  font-size: 0.85rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.project-featured {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px 25px;
  margin-bottom: 35px;
  position: relative;
}

.featured-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gradient-primary);
  padding: 5px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
}

.featured-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.featured-info h3 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: 12px;
}

.featured-desc {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.featured-stats {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.f-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.f-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.featured-progress {
  margin-bottom: 25px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: transparent;
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-glass:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

.preview-window {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: var(--border-glass);
}

.window-header {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border-bottom: var(--border-glass);
}

.window-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-header span:nth-child(1) {
  background: #ff5f56;
}

.window-header span:nth-child(2) {
  background: #ffbd2e;
}

.window-header span:nth-child(3) {
  background: #27c93f;
}

.window-content {
  padding: 18px;
}

.map-preview {
  height: 170px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(240, 147, 251, 0.1));
  border-radius: var(--radius-sm);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.project-card-modern {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 25px 16px;
  position: relative;
  transition: var(--transition-base);
}

.project-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.project-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  background: #2ed573;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
}

.project-status-badge.development {
  background: #ffbd2e;
}

.project-status-badge.planned {
  background: var(--text-muted);
  color: var(--bg-primary);
}

.project-icon-large {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  color: white;
}

.project-card-modern h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.project-card-modern p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 18px;
}

.project-meta {
  margin-bottom: 18px;
}

.progress-text {
  display: block;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.mini-progress {
  height: 3px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress div {
  height: 100%;
  background: var(--gradient-primary);
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Contact Section */
.contact-section {
  padding: 70px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 35px;
}

.contact-info-modern {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px 25px;
}

.info-header h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.info-header p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.info-items {
  margin-bottom: 25px;
}

.info-item {
  display: flex;
  gap: 15px;
  margin-bottom: 22px;
}

.info-icon {
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.info-content h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.info-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.info-content .sub {
  font-size: 0.7rem;
  color: var(--accent);
}

.social-modern {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
}

.social-btn:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
}

.contact-form-modern {
  background: var(--gradient-glass);
  backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px 25px;
}

.form-header h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.form-header p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.form-group {
  position: relative;
  margin-bottom: 22px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: var(--border-glass);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.form-group textarea {
  resize: none;
}

.form-group label {
  position: absolute;
  top: 12px;
  right: 0;
  color: var(--text-secondary);
  transition: var(--transition-base);
  pointer-events: none;
  font-size: 0.9rem;
}

.form-group input:focus~label,
.form-group input:valid~label,
.form-group textarea:focus~label,
.form-group textarea:valid~label {
  top: -8px;
  font-size: 0.7rem;
  color: var(--accent);
}

.focus-border {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-base);
}

.form-group input:focus~.focus-border,
.form-group textarea:focus~.focus-border {
  width: 100%;
}

.btn-submit {
  padding: 13px 30px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  font-family: inherit;
  position: relative;
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-submit:hover .btn-ripple {
  width: 300px;
  height: 300px;
}

/* Footer */
.footer-modern {
  background: var(--bg-secondary);
  backdrop-filter: var(--blur-lg);
  border-top: var(--border-glass);
  margin-top: 40px;
}

.footer-top {
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.footer-logo h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.footer-logo h3 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-logo p {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.brand-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 22px;
  line-height: 1.7;
}

.newsletter h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.newsletter-form {
  display: flex;
  position: relative;
}

.newsletter-form input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  outline: none;
  font-size: 0.85rem;
}

.newsletter-form button {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
}

.footer-links-group h4 {
  font-size: 1rem;
  margin-bottom: 18px;
}

.footer-links-group ul {
  list-style: none;
}

.footer-links-group li {
  margin-bottom: 10px;
}

.footer-links-group a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links-group a i {
  font-size: 0.6rem;
  opacity: 0.7;
}

.footer-links-group a:hover {
  color: var(--accent);
  padding-right: 4px;
}

.footer-bottom {
  padding: 22px 0;
  border-top: var(--border-glass);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.codex-signature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.design-text {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.codex-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #0077b5, #00a0dc);
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.codex-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
}

.codex-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.codex-link:hover .codex-glow {
  left: 100%;
}

.footer-extra a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================== POPUP MODAL STYLES ==================== */
.popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-modal.active {
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.popup-container {
  position: relative;
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  margin: 40px auto;
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popupSlide 0.3s ease;
}

@keyframes popupSlide {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-close {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10;
}

.popup-close:hover {
  background: var(--gradient-primary);
  color: white;
}

.popup-content {
  padding: 30px 25px;
  max-height: 85vh;
  overflow-y: auto;
}

.popup-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  color: white;
  margin-bottom: 15px;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.popup-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}

.popup-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.popup-description {
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.8;
}

.popup-features {
  list-style: none;
  margin-bottom: 25px;
}

.popup-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.popup-features li i {
  color: #2ed573;
}

.popup-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.popup-tech-stack span {
  padding: 5px 14px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  color: var(--accent);
}

.popup-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.popup-stat {
  text-align: center;
}

.popup-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.popup-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.popup-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.popup-btn {
  padding: 12px 28px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-base);
  cursor: pointer;
}

.popup-btn-outline {
  background: transparent;
  border: var(--border-glass);
  color: var(--text-primary);
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet */
@media (max-width: 992px) {
  .container {
    width: 92%;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 70px;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: auto;
    max-height: calc(100vh - 70px);
    background: var(--bg-secondary);
    backdrop-filter: var(--blur-lg);
    border: var(--border-glass);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 20px;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 999;
  }

  .main-nav.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    justify-content: flex-start;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-content {
    position: relative;
  }

  .about-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .top-bar-content {
    flex-direction: column;
    text-align: center;
  }

  .top-bar-left {
    justify-content: center;
  }

  .hero-section {
    padding: 80px 0 50px;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .floating-elements-hero {
    flex-direction: column;
    align-items: center;
  }

  .float-card {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .about-grid-new {
    grid-template-columns: 1fr;
  }

  .timeline {
    flex-direction: column;
    align-items: center;
  }

  .timeline-item {
    width: 100%;
    max-width: 280px;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .featured-content {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .codex-signature {
    justify-content: center;
  }

  .scroll-hint {
    display: none;
  }

  .popup-container {
    width: 95%;
    margin: 20px auto;
  }

  .popup-content {
    padding: 20px 15px;
  }

  .popup-title {
    font-size: 1.3rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    width: 94%;
  }

  .logo-text h1 {
    font-size: 1.1rem;
  }

  .logo-text p {
    font-size: 0.55rem;
  }

  .logo-img {
    width: 50px;
    height: 50px;
  }

  .header-actions {
    gap: 5px;
  }

  .search-toggle,
  .theme-toggle,
  .mobile-toggle {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .featured-stats {
    justify-content: center;
  }

  .project-featured {
    padding: 20px 15px;
  }

  .featured-badge {
    position: static;
    display: inline-flex;
    margin-bottom: 15px;
  }

  .contact-info-modern,
  .contact-form-modern {
    padding: 20px 18px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 3px;
}

/* تنسيقات إضافية لنموذج التواصل */
.form-note {
  text-align: center;
  opacity: 0.7;
}

.form-note i {
  margin-left: 3px;
}

/* تنسيق زر الموقع */
.social-modern .fa-map-marker-alt {
  color: #ff4757;
}

.social-btn:hover .fa-map-marker-alt {
  color: white;
}

/* تنسيقات حقول الهاتف */
input[type="tel"] {
  direction: ltr;
  text-align: right;
}

/* رسائل الخطأ في المتصفح */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-bottom-color: #ff4757;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
  border-bottom-color: #2ed573;
}

/* ضمان ظهور النصوص في قسم التواصل */
.info-content p {
  color: var(--text-secondary) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.info-content .sub {
  color: var(--accent) !important;
  font-size: 0.8rem;
  margin-top: 5px;
}

.info-item {
  align-items: flex-start !important;
}

.info-content h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
  position: fixed;
  top: 100px;
  left: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: auto;
}

/* للشاشات العربية RTL */
html[dir="rtl"] .toast-container {
  left: auto;
  right: 20px;
}

.toast {
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 15px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: slideIn 0.4s forwards;
  position: relative;
  overflow: hidden;
}

html[dir="rtl"] .toast {
  transform: translateX(-100%);
}

@keyframes slideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

html[dir="rtl"] .toast {
  animation: slideInRTL 0.4s forwards;
}

@keyframes slideInRTL {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.hiding {
  animation: slideOut 0.4s forwards;
}

@keyframes slideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

html[dir="rtl"] .toast.hiding {
  animation: slideOutRTL 0.4s forwards;
}

@keyframes slideOutRTL {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* شريط التقدم */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  animation: progressShrink 5s linear forwards;
}

@keyframes progressShrink {
  0% {
    width: 100%;
  }

  100% {
    width: 0%;
  }
}

/* أنواع التوست */
.toast.success {
  border-right: 4px solid #2ed573;
}

html[dir="rtl"] .toast.success {
  border-right: none;
  border-left: 4px solid #2ed573;
}

.toast.error {
  border-right: 4px solid #ff4757;
}

html[dir="rtl"] .toast.error {
  border-right: none;
  border-left: 4px solid #ff4757;
}

.toast.warning {
  border-right: 4px solid #ffa502;
}

html[dir="rtl"] .toast.warning {
  border-right: none;
  border-left: 4px solid #ffa502;
}

.toast.info {
  border-right: 4px solid var(--accent);
}

html[dir="rtl"] .toast.info {
  border-right: none;
  border-left: 4px solid var(--accent);
}

/* أيقونة التوست */
.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}

.toast.error .toast-icon {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
}

.toast.warning .toast-icon {
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
}

.toast.info .toast-icon {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent);
}

/* محتوى التوست */
.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.toast-message {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* زر الإغلاق */
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 5px;
  transition: var(--transition-fast);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Responsive Toast */
@media (max-width: 768px) {
  .toast-container {
    top: 80px;
    left: 10px;
    right: 10px;
    max-width: none;
    width: calc(100% - 20px);
  }

  html[dir="rtl"] .toast-container {
    left: 10px;
    right: 10px;
  }

  .toast {
    padding: 14px 16px;
  }

  .toast-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}