/* ================== التصميم العام ================== */
html,
body {
  font-family: "Tajawal", Arial, sans-serif;
}

body {
  background: #1c201e;
  min-height: 100vh;
}

/* ================== تصميم النافبار ================== */
.navbar-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

.navbar {
  background: #242021 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 0;
  border-radius: 0;
  z-index: 10;
  position: relative;
  padding: 16px 48px;
  transition: all 0.3s;
  border-bottom: 2px solid #0d5b57;
}

.navbar-brand,
.nav-link {
  color: #fff !important;
  transition: all 0.3s;
  font-weight: 500;
}

.nav-link.active {
  font-weight: 600;
  color: #0d5b57 !important;
  background: rgba(13, 91, 87, 0.15);
  border-radius: 8px;
  padding: 8px 20px;
  border-bottom: 2px solid #0d5b57;
  text-decoration: none;
  transition: all 0.3s;
}

.nav-link:hover {
  color: #0d5b57 !important;
  transform: translateY(-1px);
}

.logout-btn {
  background: transparent;
  color: #0d5b57;
  border: 2px solid #0d5b57;
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 600;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: #0d5b57;
  color: #fff;
  box-shadow: 0 0 20px rgba(13, 91, 87, 0.5);
  transform: translateY(-2px);
}

.logout-btn:active {
  transform: scale(0.95);
}

/* ================== أزرار المصادقة ================== */
#auth-buttons .btn {
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid;
}

#auth-buttons .btn-outline-primary {
  color: #0d5b57;
  border-color: #0d5b57;
  background: transparent;
}

#auth-buttons .btn-outline-primary:hover {
  background: rgba(13, 91, 87, 0.1);
  border-color: #0d5b57;
  color: #0d5b57;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(13, 91, 87, 0.3);
}

#auth-buttons .btn-primary {
  background: #0d5b57;
  border-color: #0d5b57;
  color: #fff;
}

#auth-buttons .btn-primary:hover {
  background: #0a4a47;
  border-color: #0a4a47;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(13, 91, 87, 0.5);
}

/* ================== النوافذ المنبثقة ================== */
.modal-content {
  border-radius: 12px;
  border: 1px solid #0d5b57;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  background: #242021;
}

.modal-header {
  border-bottom: 2px solid #0d5b57;
  padding: 20px 24px;
  background: #1c201e;
  border-radius: 12px 12px 0 0;
}

.modal-title {
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
}

.modal-body {
  padding: 24px;
  background: #242021;
}

.form-label {
  color: #fff;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-control {
  border-radius: 8px;
  border: 2px solid #0d5b57;
  padding: 12px 16px;
  max-width: 100%;
  width: 100%;
  background: #1c201e;
  color: #fff;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #0d5b57;
  box-shadow: 0 0 0 3px rgba(13, 91, 87, 0.25);
  background: #1c201e;
  color: #fff;
}

.modal .btn-primary {
  background: #0d5b57;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modal .btn-primary:hover {
  background: #0a4a47;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(13, 91, 87, 0.5);
}

.modal .btn-secondary {
  background: transparent;
  border: 2px solid #0d5b57;
  color: #0d5b57;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
}

.modal .btn-secondary:hover {
  background: rgba(13, 91, 87, 0.1);
  border-color: #0d5b57;
  color: #0d5b57;
}

.btn-close {
  filter: invert(1);
}

/* ================== تصميم البوستات ================== */
.post-card {
  background: #242021;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #0d5b57;
  margin-bottom: 24px;
  padding: 24px;
  transition: all 0.3s;
}

.post-card:hover {
  box-shadow: 0 8px 25px rgba(13, 91, 87, 0.4);
  transform: translateY(-4px);
  border-color: #0d5b57;
}

.post-author {
  font-weight: 600;
  color: #0d5b57;
}

.post-date {
  color: #888;
  font-size: 0.9em;
}

.post-title,
.post-body {
  color: #fff;
}

.post-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 8px;
  margin: 16px 0;
  transition: all 0.3s;
  border: 2px solid #0d5b57;
}

.post-image:hover {
  box-shadow: 0 0 25px rgba(13, 91, 87, 0.5);
}

.comments-toggle {
  color: #0d5b57;
  cursor: pointer;
  font-weight: 600;
  margin-top: 12px;
  display: inline-block;
  transition: all 0.3s;
}

.comments-toggle:hover {
  color: #0a4a47;
  text-decoration: underline;
  transform: translateX(5px);
}

.comments-section {
  display: none;
  background: #1c201e;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #0d5b57;
}

.comments-section.active {
  display: block;
}

.comment {
  margin-bottom: 12px;
  font-size: 0.95em;
  color: #ccc;
}

.comment-author {
  font-weight: 600;
  color: #0d5b57;
  margin-right: 6px;
}

.add-comment {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.add-comment input {
  flex: 1;
  border-radius: 8px;
  border: 2px solid #0d5b57;
  background: #242021;
  color: #fff;
  padding: 8px 14px;
}

.add-comment input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(13, 91, 87, 0.5);
}

.add-comment button {
  background: #0d5b57;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
  transition: all 0.3s;
}

.add-comment button:hover {
  background: #0a4a47;
  box-shadow: 0 0 15px rgba(13, 91, 87, 0.5);
}

/* ================== التاجات ================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tags .badge {
  font-size: 0.85em;
  padding: 6px 14px;
  border-radius: 6px;
  background: transparent;
  color: #0d5b57;
  border: 1px solid #0d5b57;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.tags .badge:hover {
  background: #0d5b57;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(13, 91, 87, 0.5);
}

/* ================== تصميم النافبار المتجاوب ================== */
.navbar .container-fluid {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0 !important;
}

.navbar-nav {
  flex-direction: row !important;
  gap: 24px;
  margin-bottom: 0 !important;
}

.container.mt-5 {
  margin-top: 60px !important;
}

/* ================== التصميم المتجاوب - موبايل ================== */
@media (max-width: 768px) {
  /* النافبار */
  .navbar {
    padding: 12px 16px !important;
  }

  /* اللوجو والاسم */
  .brand-modern {
    font-size: 1.1rem !important;
    gap: 6px !important;
    padding: 0 6px !important;
  }

  .brand-logo {
    width: 30px !important;
    height: 30px !important;
  }

  /* روابط النافبار */
  .navbar-nav {
    gap: 8px !important;
  }

  .nav-link {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
  }

  .nav-link.active {
    padding: 6px 12px !important;
  }

  /* أزرار تسجيل الدخول */
  #auth-buttons .btn {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
  }

  /* زر تسجيل الخروج */
  .logout-btn {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
  }

  /* صورة البروفايل في النافبار */
  .navbar .rounded-circle {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (max-width: 480px) {
  /* للشاشات الصغيرة جداً */
  .navbar {
    padding: 10px 12px !important;
  }

  .brand-modern {
    font-size: 0.95rem !important;
  }

  .brand-logo {
    width: 25px !important;
    height: 25px !important;
  }

  .nav-link {
    font-size: 0.75rem !important;
    padding: 5px 10px !important;
  }

  #auth-buttons .btn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }

  .logout-btn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }
}

/* ================== تصميم صفحة الملف الشخصي ================== */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.profile-header {
  background: #242021;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  margin-top: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #0d5b57;
  text-align: center;
  position: relative;
}

.profile-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0d5b57;
  box-shadow: 0 0 30px rgba(13, 91, 87, 0.5);
  margin-bottom: 20px;
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.profile-username {
  color: #0d5b57;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.profile-bio {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 24px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d5b57;
  display: block;
}

.stat-label {
  color: #888;
  font-size: 0.9rem;
}

.edit-profile-btn {
  background: #0d5b57;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.edit-profile-btn:hover {
  background: #0a4a47;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(13, 91, 87, 0.5);
}

.profile-tabs {
  background: #242021;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #0d5b57;
}

.nav-tabs {
  border-bottom: 2px solid #0d5b57;
  margin-bottom: 30px;
}

.nav-tabs .nav-link {
  border: none;
  color: #888;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
  color: #0d5b57;
  background: rgba(13, 91, 87, 0.1);
  border-bottom: 3px solid #0d5b57;
}

.nav-tabs .nav-link:hover {
  color: #0d5b57;
  background: rgba(13, 91, 87, 0.05);
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
}

.post-content {
  color: #fff;
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-body {
  word-break: break-word;
  white-space: pre-line;
}

.post-actions {
  display: flex;
  gap: 20px;
  color: #888;
  font-size: 0.9rem;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.3s;
}

.action-item:hover {
  color: #0d5b57;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}
.custom-alert {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #242021;
  color: #fff;
  padding: 18px 36px;
  border-radius: 12px;
  border: 2px solid #0d5b57;
  font-size: 1.1rem;
  box-shadow: 0 8px 30px rgba(13, 91, 87, 0.5);
  z-index: 9999;
  opacity: 0.98;
  transition: opacity 0.3s;
  text-align: center;
  font-family: "Tajawal", Arial, sans-serif;
}

.custom-alert-success {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  color: #fff;
}
.custom-alert-error {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
  color: #fff;
}

.custom-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}
.custom-modal-content {
  background: #242021;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  border: 2px solid #0d5b57;
  text-align: center;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
  color: #fff;
}
.custom-btn {
  margin: 0 10px;
  padding: 0.6rem 1.8rem;
  border: 2px solid;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.custom-btn.confirm {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}
.custom-btn.confirm:hover {
  background: #c0392b;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}
.custom-btn.cancel {
  background: transparent;
  border-color: #0d5b57;
  color: #0d5b57;
}
.custom-btn.cancel:hover {
  background: rgba(13, 91, 87, 0.1);
}

.rtl-info {
  direction: rtl;
  text-align: right;
}

/* مظهر عصري لاسم الموقع في النافبار */
.brand-modern {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff !important;
  font-family: "Cairo", "Tajawal", Arial, sans-serif;
  text-shadow: 0 0 15px rgba(13, 91, 87, 0.8);
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-modern:hover {
  transform: scale(1.03);
  text-shadow: 0 0 25px rgba(13, 91, 87, 1);
}
.brand-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(13, 91, 87, 0.8));
}

/* إزالة جميع تخصيصات #add-comment-form وحقل الإدخال وزر الإرسال وإرجاعها لتنسيق Bootstrap الافتراضي */
#add-comment-form {
  display: flex;
  gap: 0;
  align-items: center;
  padding: 0;
  margin-top: 16px;
  margin-bottom: 8px;
}
#add-comment-form input[type="text"] {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 1.1rem;
  border-radius: 12px;
  margin-left: 8px;
}
#add-comment-form button[type="submit"] {
  margin-right: 12px;
  margin-bottom: 0;
  margin-left: 8px;
}
#card-footer {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

/* إزالة الخط السفلي من اسم المستخدم داخل الروابط في البوستات */
a .post-author {
  text-decoration: none !important;
  color: #0d5b57 !important;
}

/* Loader Spinner Styles */
#global-loading-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  justify-content: center;
  align-items: center;
}
.loader-spinner {
  border: 6px solid #1c201e;
  border-top: 6px solid #0d5b57;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 30px rgba(13, 91, 87, 0.5);
}

#global-loading-overlay {
  background: rgba(28, 32, 30, 0.9) !important;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ================== نموذج إضافة منشور ================== */
#add-post-form {
  background: #242021;
  border: 1px solid #0d5b57;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#add-post-form input,
#add-post-form textarea {
  background: #1c201e;
  border: 2px solid #0d5b57;
  color: #fff;
  transition: all 0.3s;
}

#add-post-form input:focus,
#add-post-form textarea:focus {
  outline: none;
  box-shadow: 0 0 15px rgba(13, 91, 87, 0.5);
  border-color: #0d5b57;
}

#add-post-form button[type="submit"] {
  background: #0d5b57;
  border: none;
  font-weight: 600;
  transition: all 0.3s;
}

#add-post-form button[type="submit"]:hover {
  background: #0a4a47;
  box-shadow: 0 0 20px rgba(13, 91, 87, 0.5);
  transform: translateY(-2px);
}

/* ================== أزرار الحذف والتعديل ================== */
.btn-outline-danger {
  background: transparent !important;
  border: 2px solid #e74c3c !important;
  color: #e74c3c !important;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s;
  margin-right: 8px !important; /* مسافة بين زر الحذف والتعديل */
}

.btn-outline-danger:hover {
  background: #e74c3c !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

.btn-outline-primary.btn-sm {
  background: transparent !important;
  border: 2px solid #0d5b57 !important;
  color: #0d5b57 !important;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-primary.btn-sm:hover {
  background: #0d5b57 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(13, 91, 87, 0.5);
}

/* ================== تحسين container ================== */
.container {
  margin-top: 30px !important;
}

/* ================== تفاصيل البوست ================== */
.card {
  background: #242021 !important;
  border: 1px solid #0d5b57 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  border-radius: 12px !important;
}

.card-body {
  background: #242021;
  color: #fff;
}

.card-footer {
  background: #1c201e !important;
  border-top: 2px solid #0d5b57 !important;
}

.text-muted {
  color: #888 !important;
}

.fw-bold {
  color: #0d5b57 !important;
}

/* ================== تحسينات إضافية ================== */
::placeholder {
  color: #888 !important;
  opacity: 1;
}

input::placeholder,
textarea::placeholder {
  color: #888 !important;
}

/* ================== تحسينات صفحة البروفايل ================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-main {
  animation: fadeInUp 0.6s ease-out;
}

.stat-box {
  animation: fadeInUp 0.8s ease-out;
}

.post-card {
  animation: fadeInUp 0.7s ease-out;
}

/* تحسين grid للمنشورات على الشاشات الكبيرة */
@media (min-width: 768px) {
  #post-card-id {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
  }
}

/* ================== Responsive - البوستات والكاردات ================== */
@media (max-width: 768px) {
  /* Container */
  .container {
    padding: 0 16px !important;
    margin-top: 20px !important;
  }

  /* البوستات */
  .post-card {
    padding: 16px !important;
    margin-bottom: 16px !important;
    border-radius: 10px !important;
  }

  /* عنوان ونص البوست */
  .post-title {
    font-size: 1rem !important;
  }

  .post-body {
    font-size: 0.9rem !important;
  }

  /* صورة البوست */
  .post-image {
    max-height: 250px !important;
    margin: 12px 0 !important;
  }

  /* معلومات الكاتب */
  .post-author {
    font-size: 0.9rem !important;
    color: #0d5b57 !important;
  }

  .post-date {
    font-size: 0.8rem !important;
  }

  /* التاجات */
  .tags .badge {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
  }

  /* زر التعليقات */
  .comments-toggle {
    font-size: 0.85rem !important;
  }

  /* أزرار التعديل والحذف */
  .btn-outline-danger,
  .btn-outline-primary.btn-sm {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 4px !important;
  }

  .btn-outline-danger {
    right: 60px !important;
  }

  .btn-outline-primary.btn-sm {
    right: 10px !important;
  }

  /* نموذج إضافة منشور */
  #add-post-form {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }

  #add-post-form input,
  #add-post-form textarea {
    font-size: 0.9rem !important;
    padding: 10px 12px !important;
  }

  #add-post-form button[type="submit"] {
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
  }

  /* التعليقات */
  .comments-section {
    padding: 12px !important;
  }

  .comment {
    font-size: 0.85rem !important;
  }

  .add-comment input {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
  }

  .add-comment button {
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  /* للشاشات الصغيرة جداً */
  .container {
    padding: 0 12px !important;
  }

  .post-card {
    padding: 12px !important;
  }

  .post-title {
    font-size: 0.95rem !important;
  }

  .post-body {
    font-size: 0.85rem !important;
  }

  .post-image {
    max-height: 200px !important;
  }

  .btn-outline-danger,
  .btn-outline-primary.btn-sm {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
  }

  .btn-outline-danger {
    right: 50px !important;
  }

  #add-post-form {
    padding: 12px !important;
  }
}

/* ================== Responsive - صفحة تفاصيل البوست ================== */
@media (max-width: 768px) {
  /* الكاردات */
  .card {
    border-radius: 10px !important;
    margin-bottom: 16px !important;
  }

  .card-body {
    padding: 16px !important;
  }

  .card-header {
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
  }

  .card-footer {
    padding: 12px 16px !important;
  }

  /* معلومات الكاتب */
  #author-name {
    font-size: 0.95rem !important;
  }

  #post-date {
    font-size: 0.8rem !important;
  }

  /* عنوان ومحتوى البوست */
  #post-title {
    font-size: 1.1rem !important;
  }

  #post-body {
    font-size: 0.9rem !important;
  }

  /* صورة البوست */
  #post-image {
    max-height: 250px !important;
  }

  /* التعليقات */
  #comments-list .d-flex {
    flex-direction: row !important;
    align-items: flex-start !important;
  }

  #comments-list .rounded-circle {
    width: 32px !important;
    height: 32px !important;
  }

  #comments-list .fw-bold {
    font-size: 0.9rem !important;
  }

  #comments-list div {
    font-size: 0.85rem !important;
  }

  /* نموذج التعليق */
  #add-comment-form {
    flex-direction: column !important;
    gap: 10px !important;
  }

  #add-comment-form input {
    font-size: 0.9rem !important;
    padding: 10px 12px !important;
    margin: 0 !important;
  }

  #add-comment-form button {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    font-size: 0.9rem !important;
  }

  /* زر التعديل */
  #edit-post-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .card-body {
    padding: 12px !important;
  }

  #post-title {
    font-size: 1rem !important;
  }

  #post-body {
    font-size: 0.85rem !important;
  }

  #post-image {
    max-height: 200px !important;
  }

  #comments-list .rounded-circle {
    width: 28px !important;
    height: 28px !important;
  }
}

/* ================== Responsive - النوافذ المنبثقة (Modals) ================== */
@media (max-width: 768px) {
  /* Modal Dialog */
  .modal-dialog {
    margin: 10px !important;
    max-width: calc(100% - 20px) !important;
  }

  /* Modal Content */
  .modal-content {
    border-radius: 10px !important;
  }

  /* Modal Header */
  .modal-header {
    padding: 16px !important;
  }

  .modal-title {
    font-size: 1.1rem !important;
  }

  /* Modal Body */
  .modal-body {
    padding: 16px !important;
  }

  /* Form Labels */
  .modal-body .form-label {
    font-size: 0.9rem !important;
  }

  /* Form Inputs */
  .modal-body .form-control {
    font-size: 0.9rem !important;
    padding: 10px 12px !important;
  }

  /* Modal Footer */
  .modal-footer {
    padding: 12px 16px !important;
  }

  /* Modal Buttons */
  .modal .btn {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
  }

  /* Close Button */
  .btn-close {
    padding: 8px !important;
  }

  /* Custom Modal (تأكيد الحذف/الخروج) */
  .custom-modal-content {
    margin: 20px !important;
    padding: 20px 16px !important;
    max-width: calc(100% - 40px) !important;
  }

  .custom-modal-content p {
    font-size: 0.95rem !important;
  }

  .custom-btn {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .modal-dialog {
    margin: 5px !important;
    max-width: calc(100% - 10px) !important;
  }

  .modal-header {
    padding: 12px !important;
  }

  .modal-title {
    font-size: 1rem !important;
  }

  .modal-body {
    padding: 12px !important;
  }

  .modal-body .form-label {
    font-size: 0.85rem !important;
  }

  .modal-body .form-control {
    font-size: 0.85rem !important;
    padding: 8px 10px !important;
  }

  .modal .btn {
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
  }

  .custom-modal-content {
    padding: 16px 12px !important;
  }

  .custom-btn {
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
  }
}
