/* Custom properties */
:root {
  --primary: #00b4cc;
  --primary-light: #b3e8ef;
  --primary-dark: #008999;
  --secondary: #ff6b6b;
  --accent: #ffd166;
  --success: #06d6a0;
  --warning: #ffb347;
  --error: #ef476f;
  
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border-color: #e5e7eb;
  --border-color-light: #f3f4f6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-color-strong: rgba(0, 0, 0, 0.25);
}

html {
  scroll-behavior: smooth;
}

/* Dark mode colors */
.dark {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-color: #374151;
  --border-color-light: #4b5563;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-color-strong: rgba(0, 0, 0, 0.5);
  --primary-light: #1e3a3f;
}

/* Utility classes for our custom colors */
.text-primary {
  color: var(--primary);
}

.text-primary-dark {
  color: var(--primary-dark);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-primary-dark {
  background-color: var(--primary-dark);
}

.hover\:bg-primary-dark:hover {
  background-color: var(--primary-dark);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary);
}

.focus\:ring-primary-light:focus {
  --tw-ring-color: var(--primary-light);
}

.focus\:border-primary:focus {
  border-color: var(--primary);
}

.border-primary {
  border-color: var(--primary);
}

/* Dark mode toggle button */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px var(--shadow-color-strong);
}

.dark-mode-toggle iconify-icon {
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Enhanced tab styling for both light and dark modes */
.tab-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.tab-button {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: none;
  border-right: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  width: 100%;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}

.tab-button:last-child {
  border-right: none;
}

.tab-button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tab-button.active {
  background: var(--primary);
  color: white !important;
  box-shadow: 0 4px 12px rgba(0, 180, 204, 0.3);
  z-index: 10;
  font-weight: 600;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* FAQ Section with full light/dark mode compatibility */
.faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px var(--shadow-color);
  transform: translateY(-2px);
}

.faq-question {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: none;
  padding: 1.25rem;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-question:hover {
  background: var(--bg-secondary);
}

.faq-question iconify-icon {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.faq-answer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 3s infinite ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

::-webkit-scrollbar-thumb {
  background: #00b4cc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #008c9e;
}

.dark ::-webkit-scrollbar-thumb {
  background: #00d4f0;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #00a8c4;
}

/* Custom styles for FAQ section */
.faq-icon-active {
  transform: rotate(180deg);
}

/* Header scroll effect with proper light/dark mode support */
.header-scrolled {
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
}

.header-scrolled a {
  color: var(--text-primary) !important;
}

.header-scrolled a:hover {
  color: var(--primary) !important;
}

.header-scrolled .text-white {
  color: var(--text-primary) !important;
}

/* Homefinderpro link hover effect */
.group:hover span {
  color: var(--primary) !important;
}

.group:hover .group-hover\:text-primary,
.header-scrolled .group:hover span {
  color: var(--primary) !important;
}

/* Comprehensive dark mode overrides */
.dark .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}

.dark .bg-white {
  background-color: var(--bg-primary) !important;
}

.dark .bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

.dark .text-gray-800 {
  color: var(--text-primary) !important;
}

.dark .text-gray-700 {
  color: var(--text-secondary) !important;
}

.dark .text-gray-600 {
  color: var(--text-secondary) !important;
}

.dark .text-gray-500 {
  color: var(--text-tertiary) !important;
}

.dark .text-gray-300 {
  color: var(--text-secondary) !important;
}

.dark .text-gray-400 {
  color: var(--text-tertiary) !important;
}

.dark .text-green-600 {
  color: var(--success) !important;
}

.dark .text-blue-600 {
  color: var(--primary) !important;
}

.dark .text-purple-600 {
  color: var(--color-purple-300) !important;
}

.dark .border-gray-200 {
  border-color: var(--border-color) !important;
}

.dark .border-gray-300 {
  border-color: var(--border-color-light) !important;
}

.dark .border-gray-700 {
  border-color: var(--border-color) !important;
}

.dark .shadow-md {
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color) !important;
}

.dark .shadow-lg {
  box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color) !important;
}

.dark .shadow-2xl {
  box-shadow: 0 25px 50px -12px var(--shadow-color-strong) !important;
}

.dark .shadow-xl {
  box-shadow: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color) !important;
}

/* Mobile dropdown dark mode */
.dark #faq-tabs {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.dark #faq-tabs option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Mobile menu dark mode support */
.dark #mobile-menu {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

.dark #mobile-menu a {
  color: var(--text-primary) !important;
}

.dark #mobile-menu a:hover {
  color: var(--primary) !important;
}

/* Light mode specific overrides to ensure proper display */
html:not(.dark) .bg-gray-50 {
  background-color: #f9fafb !important;
}

html:not(.dark) .bg-white {
  background-color: #ffffff !important;
}

html:not(.dark) .bg-gray-100 {
  background-color: #f3f4f6 !important;
}

html:not(.dark) .text-gray-800 {
  color: #1f2937 !important;
}

html:not(.dark) .text-gray-600 {
  color: #4b5563 !important;
}

html:not(.dark) .text-gray-500 {
  color: #6b7280 !important;
}

html:not(.dark) .text-gray-300 {
  color: #d1d5db !important;
}

html:not(.dark) .text-gray-400 {
  color: #9ca3af !important;
}

html:not(.dark) .border-gray-200 {
  border-color: #e5e7eb !important;
}

html:not(.dark) .border-gray-300 {
  border-color: #d1d5db !important;
}

/* Contact section background adjustments */
.dark .bg-gray-900 {
  background-color: var(--bg-primary) !important;
}

.dark .text-white {
  color: var(--text-primary) !important;
}

/* Enhanced focus states for accessibility */
.dark .focus\:ring-blue-500:focus {
  --tw-ring-color: var(--primary);
}

.dark .focus\:border-blue-500:focus {
  border-color: var(--primary);
}

/* Override Flowbite styles as needed */
[data-collapse-toggle]:focus {
  outline: none;
}

/* Smooth transitions for dark mode */
* {
  transition: background-color 0.3s ease, fill 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Hero section background image dark mode overlay */
.dark #hero .absolute.inset-0 {
  background: rgba(0, 0, 0, 0.4);
}

/* Enhanced button styles for dark mode */
.dark .bg-primary-light {
  background-color: rgba(0, 180, 204, 0.2) !important;
}

.dark .hover\:bg-white\/10:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Cards and components dark mode improvements */
.dark .bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark .bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.dark .border-gray-700\/50 {
  border-color: rgba(75, 85, 99, 0.5) !important;
}

.dark .hover\:border-blue-500\/50:hover {
  border-color: rgba(0, 180, 204, 0.5) !important;
}

.dark .hover\:border-green-500\/50:hover {
  border-color: rgba(34, 197, 94, 0.5) !important;
}

.dark .hover\:border-purple-500\/50:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
}

/* Landlord About Section Dark Mode Compatibility */
.dark .bg-gradient-to-r.from-red-50.to-orange-50 {
  background: linear-gradient(to right, rgba(239, 68, 68, 0.1), rgba(251, 146, 60, 0.1)) !important;
}

.dark .border-l-4.border-red-500 {
  border-left-color: #ef4444 !important;
}

.dark .bg-gradient-to-r.from-green-50.to-blue-50 {
  background: linear-gradient(to right, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1)) !important;
}

.dark .border-l-4.border-green-500 {
  border-left-color: #22c55e !important;
}

.dark .text-red-600 {
  color: #f87171 !important;
}

.dark .text-green-600 {
  color: #4ade80 !important;
}

.dark .text-blue-600 {
  color: #60a5fa !important;
}

.dark .text-purple-600 {
  color: #a78bfa !important;
}

.dark .bg-green-100 {
  background-color: rgba(34, 197, 94, 0.2) !important;
}

.dark .bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

.dark .bg-purple-100 {
  background-color: rgba(147, 51, 234, 0.2) !important;
}

.dark .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}