/* Frontend Styles */

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f8f9fa;
}

.navbar {
    background: linear-gradient(135deg, #2b4596 0%, #1f2f6b 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    
}
.navbar-brand img {
    max-height: 60px;
    transition: max-height 0.3s ease;
}

.sticky-top {
    position: sticky !important;
    top: 0;
    z-index: 1030;
}

/* تعديل z-index للعمود الجانبي في صفحة الوثائق */
.col-lg-4 .sticky-top {
    z-index: 1020;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 0;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/");
    float: left;
    padding-right: var(--bs-breadcrumb-item-padding-x, 0.5rem);
    color: #6c757d;
}

/* RTL Support for Breadcrumb */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: var(--bs-breadcrumb-item-padding-x, 0.5rem);
    padding-right: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

/* .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
} */

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}



.cardhome {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.cardhome:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.cardhome-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cardhome:hover .cardhome-img-top {
    transform: scale(1.05);
}


.btn-primary {
    background-color: #6f8ea8;
    border: 1px solid #6f8ea8;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #5f7e96;
    border-color: #5f7e96;
    color: #fff;
    box-shadow: none;
}

/* توحيد نص الهيدر ولونه */
.navbar .nav-link,
.navbar .navbar-brand,
.navbar .dropdown-item,
.lang-switch {
  color: #2b4596;
}

/* هوفر الهيدر */
.navbar .nav-link:hover,
.navbar .navbar-brand:hover,
.navbar .dropdown-item:hover,
.lang-switch:hover {
  color: #e9640a;
}

.footer {
    background: linear-gradient(135deg, #1f2f6b 0%, #2b3e6b 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer h5 {
    color: #ecf0f1;
    margin-bottom: 20px;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ecf0f1;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #2b4596 0%, #e9640a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: none;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2b4596;
    margin-bottom: 10px;
}

.stats-label {
    color: #6c757d;
    font-weight: 500;
}

.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-meta i {
    margin-right: 5px;
    color: #2b4596;
}

.badge-category {
    background: linear-gradient(135deg, #2b4596 0%, #e9640a 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.language-switcher {
    margin-left: 15px;
}

.language-switcher .btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    margin: 0 2px;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
}

.language-switcher .btn:hover,
.language-switcher .btn.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px 0;
    margin-top: 5px;
}

.dropdown-item {
    padding: 8px 20px;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 2px 10px;
}

.dropdown-item:hover {
    background-color: rgba(233, 100, 10, 0.12);
    color: #e9640a;
    transform: translateX(5px);
}

.dropdown-toggle::after {
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Navbar Dropdown Specific */
.navbar .dropdown-menu {
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
}

.navbar .dropdown-item {
    color: #2b4596;
    font-weight: 700;
    display: flex;
    font-size: 14px;
}

.navbar .dropdown-item:hover {
    background-color: rgba(233, 100, 10, 0.12);
    color: #e9640a;
}

/* Header Layout Improvements */
.navbar .container {
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Keep current desktop alignment, but fix mobile/tablet layout */
@media (max-width: 992px) {
    .navbar .container {
        justify-content: space-between !important; /* logo right, toggler left in RTL */
        width: 100%;
    }
    .navbar-brand {
        margin-right: 0 !important;
    }
    .navbar-toggler {
        margin-inline-start: auto; /* push toggler to the opposite edge */
    }
}

.navbar-brand {
    margin-right: 1rem !important;
}

.navbar-nav {
    margin-right: 0.5rem !important;
}

.navbar .d-flex {
    margin-left: 0 !important;
}

.navbar-collapse {
    flex-grow: 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* Sidebar Related Posts: consistent thumbnail + text layout (applies site-wide) */
/* ----------------------------------------------- */
.related-posts {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 30px;
}

.related-post-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  margin-bottom: 15px;
}

.related-post-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  color: inherit;
  text-decoration: none;
}

.related-thumb {
  width: 110px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.related-post-body {
  flex: 1;
  min-width: 0; /* allow text truncation without overflow */
}

.related-post-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.related-post-meta {
  font-size: 0.8rem;
  color: #666;
}

/* RTL: place thumbnail to the right and align text accordingly */
[dir="rtl"] .related-post-card {
  flex-direction: row; /* keep natural order */
}
[dir="rtl"] .related-thumb {
  order: 2; /* move image to the right */
}
[dir="rtl"] .related-post-body {
  order: 1;
  text-align: right;
}

@media (max-width: 576px) {
  .related-thumb {
    width: 95px;
    height: 62px;
  }
}

/* Header text: bold + 14px */
.navbar .nav-link,
.navbar .navbar-brand {
  font-weight: 700;
  font-size: 14px;
}

/* Dropdown items in header */
.navbar .dropdown-item {
  font-weight: 700;
  font-size: 14px;
}

/* Language switch button in header */
.lang-switch {
  font-weight: 700;
  font-size: 14px;
}

/* Unify all buttons site-wide to single calm color */
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark {
  background-color: #6f8ea8;
  border-color: #6f8ea8;
  color: #fff;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
  background-color: transparent;
  border-color: #6f8ea8;
  color: #6f8ea8;
}

/* Hover/focus unified behavior */
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-light:hover,
.btn-dark:hover,
.btn-secondary:focus,
.btn-success:focus,
.btn-danger:focus,
.btn-warning:focus,
.btn-info:focus,
.btn-light:focus,
.btn-dark:focus {
  background-color: #5f7e96;
  border-color: #5f7e96;
  color: #fff;
  box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover,
.btn-outline-info:hover,
.btn-outline-light:hover,
.btn-outline-dark:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:focus,
.btn-outline-success:focus,
.btn-outline-danger:focus,
.btn-outline-warning:focus,
.btn-outline-info:focus,
.btn-outline-light:focus,
.btn-outline-dark:focus {
  background-color: #5f7e96;
  border-color: #5f7e96;
  color: #fff;
  box-shadow: none;
}