body {
  font-family: 'Tajawal', sans-serif;
  background-color: #f9f7f0;
  color: #222;
  line-height: 1.5;
}

h4 {

  margin-top: 15px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /* التأكد من أن النافبار يظهر فوق العناصر الأخرى */
  background-color: #ffffff;
  /* التأكد من أن النافبار له خلفية */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  /* إضافة ظل للنافبار */
  border-bottom: 1px solid #cccccc96;
  /* الحفاظ على الحدود السفلية */
}

/* إضافة مسافة أعلى المحتوى ليتناسب مع النافبار الثابت */
body {
  padding-top: 80px;
  /* يمكنك تعديل هذا الرقم حسب ارتفاع النافبار */
}

.d-flex a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-divider {
  height: 1px;
  background-color: #ccc;
  margin: 0.5rem 1.5rem;
  opacity: 0.6;
}

.mainNavbar {
  background-color: #000000;
  box-shadow: 0 2px 6px rgba(40, 39, 39, 0.1);
}

.navbar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.navbar-nav .nav-link {
  color: #100f0f;
  font-size: 1rem;
  margin: 4px 1rem;
  font-weight: 400;
  padding: 0.5rem 2rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #fff;
  background-color: #470539c5;
  text-decoration: none;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 500;
  font-family: 'Tajawal', sans-serif;
  color: #8c4a21ca;
}

.hero {
  text-align: center;
  padding: 6rem 2rem;
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 600;
  animation: fadeInUp 0.8s ease-out;
}

.hero .highlight {
  color: #8c4a21ca;
}

.hero p {
  color: #6a6969;
  font-size: 1.2rem;
  font-weight: 400;
  margin: 1rem 2;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero .d-flex {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.btn-primary {
  background-color: #8c4a21ca;
  border: none;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  color: #fff;
}

.btn-primary:hover {
  background-color: #8c4a21ca;
  color: #fff;
  border: none;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:focus:active {
  background-color: #8c4a21ca !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.btn-outline-dark,
.btn-outline-dark-blog,
.btn-outline-dark-log {
  border-color: #0000003b;
  color: #131313ca;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.btn-outline-dark:hover,
.btn-outline-dark-blog:hover,
.btn-outline-dark-log:hover {
  background-color: #470539c5;
  color: #fff;
  border-color: transparent;
}

.btn-small {
  padding: 0.4rem 1rem;
  font-size: 1rem;
  border-color: transparent;
}

/* قسم التدوينات الأخيرة */
.section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.section .card-text {
  margin: 1rem 0;

}

.read-more-link {
  text-decoration: none;
  /* إزالة الخط السفلي */
  color: #8c4a21ca;
  /* إضافة مسافة صغيرة على اليسار */
}

/* القسم والعنوان */
.section-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  animation: fadeInUp 0.8s ease-out;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.step {
  background-color: #a7a4a43a;
  padding: 1.5rem 5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

.step .number {
  display: inline-block;
  background-color: #8c4a21ca;
  color: #fff;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  font-weight: 700;
  position: relative;
}

.step .number::before,
.step .number::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #8c4a21ca;
  animation: ripple 2s linear infinite;
}

.step .number::after {
  animation-delay: 1s;
}

@keyframes ripple {
  0% {
    width: 36px;
    height: 36px;
    opacity: 1;
  }
  100% {
    width: 56px;
    height: 56px;
    opacity: 0;
  }
}

.cta {
  text-align: center;
  padding: 2rem 3rem;
  animation: scaleIn 0.8s ease-out;
}

.section .card-title {
  color: #000000ca;
  /* لون مشابه للصورة */
  font-size: 1.3rem;
  /* تكبير الخط */
  font-weight: bold;
  padding: 0.1rem 0rem;
  margin-top: 10px;
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: scaleIn 0.5s ease-out;
  transform-origin: center;
  backface-visibility: hidden;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 20px rgba(140, 74, 33, 0.1);
}

.navbar-toggler {
  display: none;
  border: none;
  background: transparent;
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
  line-height: 1;
  color: #6c757d;
  border: 1px solid #6c757d;
  border-radius: 0.375rem;
}

.navbar-toggler:focus {
  text-decoration: none;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28108, 117, 125, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

@media (max-width: 768px) {
  .card {
    margin: 0.3rem 0; /* تقليل الهامش من 0.5rem إلى 0.3rem */
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .navbar-toggler:hover {
    background-color: transparent;
    color: #470539c5;
    border-color: #470539c5;
  }

  .navbar-collapse.show+.navbar-toggler {
    background-color: transparent;
    color: transparent;
    overflow-y: auto;     /* تمكين التمرير عند عرض القائمة */
    max-height: 100vh;     /* تحديد أقصى ارتفاع للقائمة */
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .navbar-toggler-icon {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-radius: 50%;
  }

  .navbar-nav .nav-link {
    width: 75%;
    padding: 0.1rem;
    text-align: center;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 4rem 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section {
    padding: 0 0.8rem;
    margin: 1rem auto; /* تقليل الهامش من 2rem إلى 1rem */
  }

  .card {
    margin: 0.3rem 0; /* تقليل الهامش من 0.5rem إلى 0.3rem */
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .card-body {
    padding: 1rem;
  }

  .card-title {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    line-height: 1.4;
  }

  .card-text {
    font-size: 0.95rem;
    margin: 0;
    padding: 0;
    line-height: 1.6;
  }

  /* تحسين الأزرار */
  .btn {
    width: 100%;
    margin: 0rem 1;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  /* تحسين الأقسام */
  .section-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem; /* تقليل الهوامش */
  }

  .steps {
    gap: 0.8rem; /* تقليل المسافة بين الخطوات */
    padding: 0 0.5rem;
  }

  .step {
    padding: 1rem; /* تقليل البادنج من 1.2rem إلى 1rem */
    margin: 0.3rem 0; /* تقليل الهامش من 0.5rem إلى 0.3rem */
  }

  /* تحسينات للأجهزة المحمولة */
  .d-flex {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .d-flex a {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .btn-outline-dark-log,
  .btn-primary {
    width: 100%;
    margin: 0.25rem 0;
  }
}

/* iPad Portrait Mode */
@media screen and (max-width: 820px) and (orientation: portrait) {    /* Navbar Responsive Behavior for iPad Portrait */
    .navbar-toggler {
        display: block !important;
        border: none;
        background: transparent;
        padding: 0.2rem 0.4rem;
        font-size: 1rem;
        line-height: 1;
        color: #6c757d;
        border: 1px solid #6c757d;
        border-radius: 0.375rem;
    }

    .navbar-toggler:focus {
        text-decoration: none;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
    }

    .navbar-toggler-icon {
        display: inline-block;
        width: 1.2em;
        height: 1.2em;
        vertical-align: middle;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28108, 117, 125, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100%;
    }

    .navbar-collapse {
        display: none;
    }

    .navbar-collapse.show {
        display: block;
        background-color: white;
        border-top: 1px solid #cccccc96;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin-bottom: 1rem;
    }

    .navbar-nav a {
        width: 100%;
        margin: 0.25rem 0;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .auth-buttons a {
        width: 100%;
        text-align: center;
    }

    /* Hero Section */
    .hero {
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        margin: 1.5rem 1rem;
    }

    /* Latest Posts */
    .section {
        padding: 1.5rem 1rem; /* تقليل البادنج من 2rem إلى 1.5rem */
    }

    .row {
        flex-direction: column;
    }

    .col-md-4 {
        width: 100%;
        margin-bottom: 1rem; /* تقليل الهامش من 1.5rem إلى 1rem */
    }

    .card {
        margin: 0;
    }

    /* Steps Section */
    .steps {
        grid-template-columns: 1fr;
        gap: 1rem; /* تقليل المسافة من 1.5rem إلى 1rem */
        padding: 0.8rem; /* تقليل البادنج من 1rem إلى 0.8rem */
    }

    .step {
        margin: 0;
        padding: 2rem;
    }

    /* CTA Section */
    .cta {
        padding: 3rem 1.5rem;
    }
}

/* iPad Landscape Mode */
@media screen and (min-width: 821px) and (max-width: 1180px) and (orientation: landscape) {
    /* Hero Section */
    .hero {
        padding: 5rem 2rem;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    /* Latest Posts */
    .section {
        padding: 3rem 2rem;
    }

    .col-md-4 {
        width: 33.333%;
        padding: 0 1rem;
    }

    .card {
        height: 100%;
    }

    /* Steps Section */
    .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        padding: 2rem;
    }

    .step {
        padding: 2.5rem;
    }

    /* CTA Section */
    .cta {
        padding: 4rem 2rem;
    }

    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1.2rem;
        margin: 0 0.3rem;
    }
}

/* تحسين قسم التدوينات الأخيرة */
.section .row .col-md-4 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.section .row .col-md-4:nth-child(1) {
    animation-delay: 0.2s;
}

.section .row .col-md-4:nth-child(2) {
    animation-delay: 0.4s;
}

.section .row .col-md-4:nth-child(3) {
    animation-delay: 0.6s;
}

/* إضافة مؤثرات حركية */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* تحسين تأثيرات التمرير */
.navbar {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* تحسين تأثيرات الأزرار */
.btn-primary, .btn-outline-dark, .btn-outline-dark-blog, .btn-outline-dark-log {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover, .btn-outline-dark:hover, .btn-outline-dark-blog:hover, .btn-outline-dark-log:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(140, 74, 33, 0.15);
}

/* تنسيق blockquote في عرض التدوينات */
.post-content blockquote {
    border-right: 4px solid #470539c5;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f9f7f0;
    border-radius: 4px;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}