/* Custom CSS for Arabic/RTL support and global styles */

/* RTL specific styles */
[dir="rtl"] {
  text-align: right;
  direction: rtl;
  unicode-bidi: embed;
}

/* Global styles */
body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
  unicode-bidi: embed;
}

/* Ensure all text elements align right in RTL */
p, div, span, li, td, th {
  text-align: right;
}

/* Video positioning */
.video-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-container button {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* RTL specific adjustments */
.dropdown-menu {
  text-align: right;
  right: 0;
  left: auto;
}

.breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
}

.modal-header .btn-close {
  margin: -0.5rem auto -0.5rem -0.5rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  text-align: right;
}

/* Header styles */
#header {
  z-index: 1050;
}

/* Mobile menu styles */
.offcanvas .nav-link {
  text-align: center;
  padding: 1rem;
}

.offcanvas .navbar-nav .nav-link {
  justify-content: center;
}

/* Ensure drawer buttons have consistent styling regardless of state */
.offcanvas .btn.btn-outline-primary {
  color: #212529 !important;
  background-color: transparent !important;
  border-color: #0d6efd !important;
}

.offcanvas .btn.btn-outline-primary:hover,
.offcanvas .btn.btn-outline-primary:focus,
.offcanvas .btn.btn-outline-primary:active,
.offcanvas .btn.btn-outline-primary.active {
  color: #212529 !important;
  background-color: transparent !important;
  border-color: #0d6efd !important;
  box-shadow: none !important;
}

/* Hero section - Removed yellow color */
.hero-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Card styles */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Cursor pointer for clickable elements */
.cursor-pointer {
  cursor: pointer;
}

/* Section spacing */
section {
  padding: 4rem 0;
}

/* FAQ accordion */
.accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: #0d6efd;
  font-weight: bold;
}

.accordion-button {
  text-align: right;
  padding: 1.25rem;
  font-size: 1.1rem;
}

.accordion-button::after {
  margin-right: auto;
  margin-left: 0;
  left: 1.25rem;
  right: auto;
}

.accordion-body {
  text-align: right;
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
}

.accordion-item {
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Contact form */
#contactForm .form-control,
#contactForm .form-select {
  padding: 0.75rem 1rem;
}

/* Footer - Fixed text color contrast and alignment */
footer {
  color: #fff;
}

footer ul {
  list-style: none;
  padding-right: 0;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: #e0e0e0 !important;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

footer ul li a:hover {
  color: #0d6efd !important;
}

footer .text-muted {
  color: #e0e0e0 !important;
}

footer h5 {
  color: #0d6efd; /* Changed to primary blue */
  text-align: right; /* Ensure proper alignment */
}

/* Ensure all footer text is light */
footer p, footer span, footer div {
  color: #e0e0e0 !important;
  text-align: right; /* Ensure proper alignment */
}

footer .text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
  text-align: right; /* Ensure proper alignment */
}

/* Footer column alignment */
footer .col-md-6, footer .col-lg-3 {
  text-align: right; /* Ensure columns align right */
}

/* Responsive text */
.text-responsive-xl {
  font-size: 1.75rem;
}

@media (min-width: 768px) {
  .text-responsive-xl {
    font-size: 2.25rem;
  }
}

@media (min-width: 992px) {
  .text-responsive-xl {
    font-size: 2.5rem;
  }
}

/* Animation utilities */
.animate-fade-in {
  animation: fade-in 0.5s ease-in-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom colors */
.bg-primary-light {
  background-color: rgba(37, 99, 235, 0.1);
}

.text-primary-light {
  color: #3b82f6;
}

/* Bootstrap theme customization - Set primary to blue and secondary to red */
:root {
  --bs-primary: #0d6efd; /* Blue */
  --bs-secondary: #dc3545; /* Red */
  --bs-success: #198754; /* Green */
  --bs-warning: #0d6efd;
  --bs-danger: #dc3545; /* Red - for errors */
  --bs-info: #0dcaf0; /* Cyan */
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-secondary {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.btn-success {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.btn-warning {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

.btn-warning:hover {
  background-color: #0b5ed7; /* Darker blue for hover */
  border-color: #0b5ed7; /* Darker blue for hover */
}

.btn-danger {
  background-color: var(--bs-danger);
  border-color: var(--bs-danger);
}

.alert-warning {
  background-color: rgba(13, 110, 253, 0.15);
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}

.text-warning {
  color: var(--bs-primary) !important;
}

.text-danger {
  color: var(--bs-danger) !important;
}

.bg-warning {
  background-color: var(--bs-primary) !important;
}

.bg-danger {
  background-color: var(--bs-danger) !important;
}

/* Hero section - Ensure no yellow is used */
.hero-section {
  background: linear-gradient(135deg, var(--bs-primary) 0%, #0b5ed7 100%);
}

.hero-section .btn-primary {
  background-color: var(--bs-secondary); /* Changed to red */
  border-color: var(--bs-secondary); /* Changed to red */
}

.hero-section .btn-primary:hover {
  background-color: #c82333; /* Darker red for hover */
  border-color: #c82333; /* Darker red for hover */
}

/* Enhanced tab styles with better spacing and animation */
.nav-pills .nav-link {
  transition: all 0.3s ease;
  font-weight: 600;
}

.nav-pills .nav-link.active {
  background-color: var(--bs-primary);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-pills .nav-link:hover:not(.active) {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary);
}

/* Enhanced tab content animation */
.tab-content {
  position: relative;
}

.tab-pane {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.tab-pane.fade:not(.show) {
  opacity: 0;
  transform: translateX(20px);
}

.tab-pane.fade.show {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced card container for tabs */
.card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Spacing improvements for tabs */
#serviceTabs .nav-item {
  margin: 0 5px;
}

#serviceTabs .nav-link {
  border-radius: 50px;
  min-width: 150px;
  text-align: center;
}

/* Container spacing */
.container.my-4 {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Enhanced modal styles */
.modal-content {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
}

/* Enhanced brand display */
.brand-item {
  transition: all 0.2s ease;
}

.brand-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button enhancements */
.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

/* Loading spinner */
.spinner-border {
  width: 2rem;
  height: 2rem;
}

/* Carousel styles */
.carousel-control-prev,
.carousel-control-next {
  width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(13, 110, 253, 0.5);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
}

.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Admin Panel Specific Styles */
.admin-sidebar {
  width: 250px;
}

@media (max-width: 767.98px) {
  .admin-sidebar {
    width: 100%;
    height: auto;
  }
  
  /* Ensure mobile menu is properly centered */
  .offcanvas .nav-link {
    text-align: center;
    padding: 1rem;
  }
  
  /* Center text in mobile menu items */
  .offcanvas .navbar-nav .nav-link {
    justify-content: center;
  }
  
  /* Ensure links are properly clickable */
  .offcanvas .nav-link {
    display: block;
    width: 100%;
  }
  
  /* Fix for logout button alignment */
  .offcanvas .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}