/* ملف: style.css */
/*-------------------------------------------------
   RESET & BASE
--------------------------------------------------*/
* {
  font-family: 'Cairo', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* خلفية بتدرج لوني يعطي مظهرًا جذابًا */
  background: linear-gradient(to right, #00f2fe, #4facfe);
  font-family: "Trebuchet MS", Tahoma, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* حاوية عامة لعناصر الصفحات */
.container {
  width: 95%;
  max-width: 1200px;
  margin: 50px auto;
  background: #fff;          /* خلفية بيضاء */
  padding: 30px;
  border-radius: 8px;
  /* ظل بسيط للعنصر */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow-x: auto; 
}

/* لعناوين الصفحات */
h1, h2, h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

/*-------------------------------------------------
   NAVIGATION BAR
--------------------------------------------------*/
.navbar {
  background: #2c3e50;
  padding: 15px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 30px;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  margin-right: 20px;
  font-weight: 600;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #ddd;
}

/*-------------------------------------------------
   NAVIGATION BAR
--------------------------------------------------*/
.navbar1 {
  background: #2c3e50;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

/* القائمة العادية لأجهزة الكمبيوتر */
.navbar1 .menu {
  list-style: none;
  display: flex;
}

.navbar1 .menu li {
  margin-right: 20px;
}

.navbar1 .menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.navbar1 .menu li a:hover {
  color: #ddd;
}

/* إخفاء أيقونة القائمة افتراضيًا على الشاشات الكبيرة */
.menu-icon {
  display: none;
}

/*-------------------------------------------------
   MOBILE STYLES - لأجهزة الجوال
--------------------------------------------------*/
@media (max-width: 768px) {
  /* إظهار أيقونة القائمة */
  .menu-icon {
    display: block;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
  }
  /* إخفاء القائمة العادية بشكل افتراضي */
  .navbar .menu {
    flex-direction: column;
    width: 100%;
    background: #2c3e50;
    position: absolute;
    top: 60px; /* ارتفاع الترويسة */
    left: 0;
    display: none;
  }
  /* عند تفعيل القائمة (إضافة class active) */
  .navbar .menu.active {
    display: block;
  }
  .navbar .menu li {
    margin: 0;
    border-bottom: 1px solid #444;
  }
  .navbar .menu li a {
    padding: 10px;
    display: block;
  }
}

/*-------------------------------------------------
   FORMS & INPUTS
--------------------------------------------------*/
label {
  display: block;
  margin: 15px 0 5px;
  font-weight: bold;
  color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}


/* تأثير عند التركيز على الحقل */
input:focus, textarea:focus {
  border-color: #45B649;
  box-shadow: 0 0 5px rgba(69, 182, 73, 0.3);
  
}

/*-------------------------------------------------
   BUTTONS
--------------------------------------------------*/
.btn {
  display: inline-block;
  padding: 12px 20px;
  background: #2c3e50; /* يمكنك استخدام تدرج لوني أيضاً */
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  margin-top: 15px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn:hover {
  background: #34495e;
  transform: scale(1.02);
}

button.btn {
  /* إذا تم استخدام العنصر <button> بدلاً من رابط <a> */
  appearance: none; /* إزالة تنسيق المتصفح الافتراضي */
}

/*-------------------------------------------------
   TABLES
--------------------------------------------------*/
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fafafa;
}

table th, table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

table th {
  background: #f0f0f0;
  font-weight: 700;
  color: #333;
}

table tr:nth-child(even) {
  background: #f9f9f9;
}

/*-------------------------------------------------
   MESSAGES / ERRORS / SUCCESS
--------------------------------------------------*/
.error {
  background: #ffdddd;
  border: 1px solid #f5c6cb;
  color: #e60000;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

/*-------------------------------------------------
   ADDITIONAL CLASSES (OPTIONAL)
--------------------------------------------------*/
header {
  text-align: center;
  padding: 30px 0;
  color: #2c3e50;
}

footer {
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  color: #fff;
  background: #2c3e50;
  position: relative;
}

/* لوضع عنصر مثل Box Card */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* عنـوان داخلي لـ .card */
.card h3 {
  margin-bottom: 10px;
  color: #2c3e50;
}

/*-------------------------------------------------
   RESPONSIVE DESIGN
--------------------------------------------------*/
@media (max-width: 768px) {
  .container {
    width: 95%;
    margin: 20px auto;
    padding: 15px;
  }
  
  .navbar a {
    margin-right: 10px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="file"] {
    font-size: 14px;
    padding: 10px;
  }
  
  .btn {
    font-size: 14px;
    padding: 10px 15px;
  }
  
  table th, table td {
    font-size: 12px;
    padding: 10px;
  }
}