/* RTL Styles */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .navbar-nav {
  padding-right: 0;
}

[dir="rtl"] .ml-1 {
  margin-left: 0;
  margin-right: 0.25rem;
}

[dir="rtl"] .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .ml-3 {
  margin-left: 0;
  margin-right: 0.75rem;
}

[dir="rtl"] .ml-4 {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .mr-1 {
  margin-right: 0;
  margin-left: 0.25rem;
}

[dir="rtl"] .mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .mr-3 {
  margin-right: 0;
  margin-left: 0.75rem;
}

[dir="rtl"] .mr-4 {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .pl-3 {
  padding-left: 0;
  padding-right: 0.75rem;
}

[dir="rtl"] .pr-4 {
  padding-right: 0;
  padding-left: 1rem;
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

[dir="rtl"] .float-right {
  float: left;
}

[dir="rtl"] .float-left {
  float: right;
}

[dir="rtl"] .navbar .dropdown-menu {
  right: 0;
  left: auto;
}

[dir="rtl"] .navbar .dropdown-menu-right {
  right: auto;
  left: 0;
}

/* Space utilities for RTL */
[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
  margin-right: calc(0.75rem * var(--tw-space-x-reverse));
  margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
}

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
  margin-right: calc(1rem * var(--tw-space-x-reverse));
  margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}

[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
  margin-right: calc(2rem * var(--tw-space-x-reverse));
  margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}

/* Additional custom styles */
.transition-transform {
  transition: transform 0.3s ease-in-out;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* Responsive sidebar for mobile */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
}

/* Chart container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Footer link hover effect */
.footer a:hover {
  color: #f59e0b;
}

/* Button focus styles for accessibility */
.btn:focus,
.form-control:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ef4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard card hover effect */
.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Smooth animations */
.smooth-transition {
  transition: all 0.3s ease-in-out;
}

/* Navigation active state */
.nav-active {
  color: #f59e0b; /* yellow-500 */
  font-weight: 600;
}

/* Dropdown active state */
.dropdown-active {
  background-color: #f3f4f6; /* gray-100 */
  color: #f59e0b; /* yellow-500 */
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #c5c5c5 #f1f1f1;
}

/* Improved subtext classes for better readability */
.subtext-primary {
  font-size: 1rem; /* text-base instead of text-sm */
  color: #374151; /* text-gray-700 instead of text-gray-600 */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.subtext-secondary {
  font-size: 1rem; /* text-base instead of text-sm */
  color: #4b5563; /* text-gray-600 instead of text-gray-500 */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.subtext-light {
  font-size: 1rem; /* text-base instead of text-sm */
  color: #e5e7eb; /* text-gray-200 instead of text-blue-100 */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.subtext-footer {
  font-size: 1rem; /* text-base instead of text-sm */
  color: #6b7280; /* text-gray-500 but slightly darker */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive image adjustments */
.about-story-image {
  max-width: 100%;
  height: auto;
}

/* Fix for mobile view grid layouts */
@media (max-width: 767px) {
  .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .grid.grid-cols-2.sm\:grid-cols-4 {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Ensure proper spacing on mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Fix for mission/vision cards on mobile */
  .grid.grid-cols-1.md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}