 @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
      
      :root {
        --primary-color: #4a90e2;
        --secondary-color: #50b848;
        --error-color: #e53e3e;
        --success-color: #50b848;
        --text-color: #2d3748;
        --light-bg: #f5f7fa;
        --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
        --transition: all 0.3s ease;
      }
      
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
       
        body {
            font-family: 'CoconNextArabic-Regular', sans-serif !important;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
            color: #2d3748;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        
        .horizontal-layout {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
  
        .main-header {
            background: #ffffff;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            position: fixed;
            width: 100%;
            z-index: 1000;
           
        }
        
        .header-content {
            display: flex;
            flex-direction: row-reverse;
            justify-content: space-between;
            align-items: center;
            padding: 5px 30px;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .logo-section {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .logo-section img {
            height: 40px;
            object-fit: contain;
        }
        
        
        .logo-text {
            font-weight: 700;
            font-size: 1rem;
            color: #090a09 ;
        }
        
        .education-filiers {
    background: #f8f9fa; /* أو يمكنك استخدام background: inherit; */
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.filiers-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.filier-btn-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.filier-btn {
    border-radius: 8px;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background-color: transparent; /* خلفية شفافة أو نفس لون البودي */
    min-width: 200px;
    text-align: center;
    position: relative;
    border: 2px solid currentColor; /* الإطار بلون النص */
}

/* ألوان النصوص المضيئة */
.primary-btn {
    color: #007bff; /* أزرق مضيء */
}

.middle-btn {
    color: #28a745; /* أخضر مضيء */
}

.secondary-btn {
    color: #ff9800; /* برتقالي مضيء */
}

/* التأثير عند التحويم */
.filier-btn:hover {
    transform: translateY(-2px);
    box-shadow: none; /* بدون ظل أو أضف واحدًا خفيفًا لو أردت */
    
}
/* السهم ▼ بجانب كل زر */
.filier-btn::after {
    content: " ▼";
    font-size: 18px;
    margin-right: 6px;
    pointer-events: none;
}
.filier-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    min-width: 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 0;
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
}

        
        .subject-item {
            position: relative;
            margin-bottom: 0;
            border: 1px solid #e2e8f0;
            border-radius: 0;
            padding: 5px 15px;
            transition: all 0.3s;
            border-left: none;
            border-right: none;
            justify-content: space-between;
            align-items: center;
            color: #2d3748;
            text-decoration: none;
            font-weight: 600;
           
        }
        

        .subject-item:first-child {
            border-top: none;
        }

        .subject-item:last-child {
            border-bottom: none;
        }
        
        .subject-item a {
            text-decoration: none;
            color: #2d3748;
            display: block;
            width: 100%;
            height: 100%;
        }
        
        .subject-item:hover {
            background-color: #f8f9fa;
            border-color: #cbd5e0;
        }
        
        .subject-item::after {
            content: ">";
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #718096;
        }
        
        .levels-dropdown {
            display: none;
            position: absolute;
            right: 100%;
            top: 0;
            background-color: white;
            min-width: 230px;
            border-radius: 4px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            z-index: 101;
            padding: 10px;
            border: 1px solid #e2e8f0;
           
        }
        
        .subject-item:hover .levels-dropdown {
            display: block;
        }
        
        .levels-dropdown a {
            display: block;
            padding: 8px 15px;
            color: #2d3748;
            text-decoration: none;
            border-radius: 4px;
            margin: 3px 0;
            transition: all 0.2s;
        }
        
        .levels-dropdown a:hover {
            background-color: #edf2f7;
            padding-right: 20px;
        }
        
        .primary-dropdown .subject-item:hover {
            background-color: #ebf8ff;
            border-color: #90cdf4;
        }
        
        .middle-dropdown .subject-item:hover {
            background-color: #f0fff4;
            border-color: #9ae6b4;
        }
        
        .secondary-dropdown .subject-item:hover {
            background-color: #fffaf0;
            border-color: #fbd38d;
        }
        
        .dropdown-hidden-items {
            display: none;
        }
        
        .dropdown-more-btn {
            display: block;
            text-align: center;
            padding: 8px;
            margin-top: 5px;
            background: #f5f5f5;
            color: #555;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid #e2e8f0;
        }
        
        .dropdown-more-btn:hover {
            background: #e0e0e0;
        }
        
        .show-more-dropdown .dropdown-hidden-items {
            display: block;
            animation: fadeIn 0.3s ease-out;
        }
        
        .show-more-dropdown .dropdown-more-btn::after {
            
            font-size: 0.8em;
        }
        
      
      /* تحسينات قسم الملف الشخصي */
      .container {
        max-width: 800px;
        margin: 30px auto;
        padding: 0 20px;
        flex: 1;
        padding-top: 90px; /* يعوّض عن header الثابت */
      }

      
      
      .profile-header {
        background: white;
        border-radius: 12px;
        box-shadow: var(--card-shadow);
        padding: 30px;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        transition: var(--transition);
      }
      
      .profile-header:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
      }
      
      .avatar-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden; /* هذا السطر ضروري */
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  border-radius: 50%; /* تأكد من تطابق نصف القطر */
}

.avatar-container:hover .avatar-edit-overlay {
  opacity: 1;
}

.avatar-edit-overlay i {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.avatar-container:hover .avatar-edit-overlay i {
  transform: scale(1.2);
}

#avatarInput {
  display: none;
}
      .profile-name {
        font-size: 28px;
        font-weight: 700;
        margin: 10px 0;
        color: var(--primary-color);
      }
      
      .profile-content, .password-content {
        background: white;
        border-radius: 12px;
        box-shadow: var(--card-shadow);
        padding: 30px;
        margin-bottom: 20px;
        transition: var(--transition);
      }
      
      .profile-content:hover, .password-content:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
      }
      
      .section-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 20px;
        color: var(--primary-color);
        border-bottom: 2px solid #eee;
        padding-bottom: 10px;
      }
      
      .form-group {
        margin-bottom: 20px;
      }
      
      .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
      }
      
      .form-group input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-family: 'Tajawal', sans-serif;
        font-size: 16px;
        transition: var(--transition);
      }
      
      .form-group input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
      }
      
      .save-btn {
        background: linear-gradient(135deg, var(--primary-color) 0%, #005f99 100%);
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
        transition: var(--transition);
        width: 100%;
        font-weight: 600;
        margin-top: 10px;
      }
      
      .save-btn:hover {
        background: linear-gradient(135deg, #3a7bc8 0%, #004d7a 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      }
      
      .alert {
        padding: 12px 15px;
        border-radius: 6px;
        margin-bottom: 20px;
        display: none;
      }
      
      .alert-error {
        background: #fee2e2;
        color: var(--error-color);
        border: 1px solid #fca5a5;
        display: block;
      }
      
      .alert-success {
        background: #d1fae5;
        color: var(--success-color);
        border: 1px solid #6ee7b7;
        display: block;
      }
       .user-profile {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        position: relative;
      }
      
  .user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  }

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 10px;
  width: 180px;
  z-index: 1000;
}

.user-dropdown.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.user-dropdown a, 
.user-dropdown button {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: #2d3748;
  text-decoration: none;
  border-radius: 4px;
  gap: 8px;
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  cursor: pointer;
}

.user-dropdown a:hover, 
.user-dropdown button:hover {
  background-color: #f0f7ff;
  color: #4a90e2;
}

.user-dropdown button {
  color: #e53e3e;
}

.user-dropdown button:hover {
  color: #c53030;
}
      
  .footer {
  background: #2d3748;
  color: white;
  padding: 10px 3px;
  text-align: center;
  margin-top: 100px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.footer-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-left 15s linear infinite;
  will-change: transform;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* دعم الأجهزة الصغيرة */
@media (max-width: 768px) {
  .footer {
    font-size: 14px;
    padding: 8px 0;
  }

  .footer-track {
    animation-duration: 20s;
    font-size: 14px;
  }
}
     @media (max-width: 768px) {
  .header-content {
    padding: 10px 15px;
  }

  .container {
    padding: 180px 15px 0 15px; /* ✅ padding-top مضافة هنا */
  }


    .horizontal-sections {
        flex-direction: column;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    /* تحسين شريط التعليمات */
    .education-filiers {
        padding: 5px 0;
    }
    
    .filiers-container {
        flex-direction: column;
        gap: 5px;
        padding: 0 10px;
    }
    
    .filier-btn {
        min-width: 100%;
       
        font-size: 14px;
    }
    
    /* تحسين القوائم المنسدلة */
    .filier-dropdown {
        position: fixed;
        top: 170px;
        width: 100%;
        left: 5%;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        border: 1px solid #e2e8f0;
        margin-top: 5px;
        display: none;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.2s ease;
    }
    
    .filier-btn-container:focus-within .filier-dropdown,
    .filier-dropdown.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .levels-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 5px;
    }
    
        
        .profile-header, .profile-content, .password-content {
          padding: 20px;
        }
        .avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

        .avatar {
          width: 120px;
          height: 120px;
        }
      }
      
      @media (max-width: 480px) {
        .profile-name {
          font-size: 24px;
        }
        
        .section-title {
          font-size: 18px;
        }
        
      }
      
      /* تأثيرات الحركة */
      @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
      }
      
      .fade-in {
        animation: fadeIn 0.3s ease-out;
      }
      .badge {
  margin-left: 2px;
  font-size: 14px;
}

.badge.admin {
  color: gold;
}

.badge.star {
  color: orange;
}