/* 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: #a855f7; /* purple-500 */
}

/* Button focus styles for accessibility */
.btn:focus,
.form-control:focus {
  outline: 2px solid #818cf8; /* indigo-400 */
  outline-offset: 2px;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ef4444; /* red-500 */
  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(139, 92, 246, 0.2); /* purple-500 with opacity */
}

/* Smooth animations */
.smooth-transition {
  transition: all 0.3s ease-in-out;
}

/* Navigation active state */
.nav-active {
  color: #a855f7; /* purple-500 */
  font-weight: 600;
}

/* Dropdown active state */
.dropdown-active {
  background-color: #f3f4f6; /* gray-100 */
  color: #a855f7; /* purple-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: #e0e7ff; /* light indigo 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: #c7d2fe; /* light indigo-300 instead of text-gray-500 */
  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;
  }
}

/* New styles for NexusWealth branding */
.card-hover {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.card-hover:hover::before {
  opacity: 1;
}

.icon-bounce {
  animation: icon-bounce 2s infinite;
}

@keyframes icon-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.testimonial-card, .blog-card, .team-member {
  transition: all 0.3s ease;
}

.testimonial-card:hover, .blog-card:hover {
  box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.1), 0 10px 10px -5px rgba(139, 92, 246, 0.04);
}

.team-member:hover {
  transform: translateY(-5px);
}

.cta-primary, .cta-secondary {
  transition: all 0.3s ease;
}

.cta-primary:hover, .cta-secondary:hover {
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2), 0 4px 6px -2px rgba(139, 92, 246, 0.1);
}