/* Website Styles for Real Estate - Bootstrap 5 with Dark/Light Theme Support
 *
 * THEME SYSTEM DOCUMENTATION:
 * ===========================
 *
 * This stylesheet implements a comprehensive dark/light theme toggle system using:
 * - CSS custom properties (variables) for theme colors
 * - data-theme attribute on document element for theme switching
 * - Smooth transitions between themes (0.3s ease)
 * - localStorage persistence for user preference
 * - System preference detection as fallback
 * - WCAG 2.1 AA contrast compliance for both themes
 *
 * THEME STRUCTURE:
 * ----------------
 * - Light theme: Default CSS variables in :root
 * - Dark theme: Override variables in [data-theme="dark"]
 * - Theme toggle: JavaScript in website.js handles switching
 * - Persistence: User preference saved to localStorage
 *
 * THEME VARIABLES:
 * ----------------
 * --bg-body: Main body background
 * --bg-light: Light background sections
 * --bg-card: Card/modal backgrounds
 * --bg-section: Section backgrounds
 * --bg-navbar: Navigation bar background
 * --text-primary: Primary text color
 * --text-secondary: Secondary text color
 * --text-muted: Muted text color
 * --border-color: Border colors
 * --shadow-*: Box shadow variations
 * --input-*: Form input colors
 *
 * USAGE:
 * ------
 * Use CSS variables instead of hardcoded colors:
 * ✅ color: var(--text-primary);
 * ❌ color: #1e293b;
 *
 * Add transitions for smooth theme switching:
 * transition: color 0.3s ease, background-color 0.3s ease;
 *
 * @version 3.1.0 - Added comprehensive theme system
 * @author Real Estate Team
 * @updated 2025-08-25 - Implemented dark/light theme toggle
 */

/* Modern Hero Carousel Styles */
.hero-section {
  height: 70vh;
  min-height: 600px;
}

@media (max-width: 768px) {
  .hero-section {
    /* Remove fixed height constraints to allow content to flow naturally */
    height: auto;
    min-height: 100vh; /* Ensure full viewport coverage */
    padding: 2rem 0 3rem 0; /* Add padding for proper spacing */
  }
}

.modern-carousel {
  overflow: hidden;
}

.modern-carousel .carousel-slide {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.modern-carousel .carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
}

.carousel-dot:hover {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

/* Root Variables - Light Theme (Default) */
:root {
  /* Brand Colors - Consistent across themes */
  --primary-color: #000080;
  --primary-hover: #0000cd;
  --primary-light: #e0e7ff;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #000080;

  /* Theme-specific Colors - Light Theme */
  --bg-body: #ffffff;
  --bg-light: #ffffff;
  --bg-card: #ffffff;
  --bg-section: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.95);
  --bg-navbar-scrolled: rgba(255, 255, 255, 0.98);
  --bg-mobile-menu: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  --bg-hero: linear-gradient(135deg, #000080 0%, #0000cd 100%);

  /* Text Colors - Light Theme */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  /* Border and Shadow Colors - Light Theme */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-navbar: 0 2px 20px rgba(0, 0, 0, 0.1);

  /* Form and Input Colors - Light Theme */
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-focus: var(--primary-color);
  --input-text: #1f2937;
  --input-placeholder: #9ca3af;

  /* Legacy support */
  --light-color: #f8fafc;
  --dark-color: #1e293b;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  /* Theme-specific Colors - Dark Theme */
  --bg-body: #0f172a;
  --bg-light: #1e293b;
  --bg-card: #1e293b;
  --bg-section: #0f172a;
  --bg-navbar: rgba(30, 41, 59, 0.95);
  --bg-navbar-scrolled: rgba(30, 41, 59, 0.98);
  --bg-mobile-menu: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --bg-hero: linear-gradient(135deg, #000080 0%, #0000cd 100%);

  /* Text Colors - Dark Theme */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --text-white: #ffffff;

  /* Border and Shadow Colors - Dark Theme */
  --border-color: #334155;
  --border-light: #475569;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-navbar: 0 2px 20px rgba(0, 0, 0, 0.3);

  /* Form and Input Colors - Dark Theme */
  --input-bg: #334155;
  --input-border: #475569;
  --input-focus: var(--primary-color);
  --input-text: #f8fafc;
  --input-placeholder: #94a3b8;

  /* Legacy support */
  --light-color: #1e293b;
  --dark-color: #f8fafc;
}

/* Dark mode overrides for visibility */
[data-theme="dark"] .bg-white {
  background-color: var(--bg-section) !important;
}

[data-theme="dark"] .top-header {
  color: var(--text-white) !important;
}

/* Professional Global Styles with Theme Support */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Professional Typography Scale */
.display-1 { font-size: 5rem; font-weight: 800; line-height: 1.1; }
.display-2 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; }
.display-3 { font-size: 4rem; font-weight: 700; line-height: 1.2; }
.display-4 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; }
.display-5 { font-size: 3rem; font-weight: 700; line-height: 1.2; }

h1, .h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2, .h2 { font-size: 2rem; font-weight: 600; line-height: 1.3; }
h3, .h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
h4, .h4 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
h5, .h5 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h6, .h6 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }

/* Professional spacing */
.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Ripple effect for buttons */
.btn {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Professional text utilities */
.text-gradient {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Newsletter Form Transitions */
.newsletter-form {
  transition: all 0.3s ease;
}

.newsletter-form.newsletter-loading {
  opacity: 0.8;
  transform: scale(0.98);
}

.newsletter-form.newsletter-success {
  animation: newsletter-success 0.6s ease;
}

@keyframes newsletter-success {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background-color: rgba(16, 185, 129, 0.1); }
  100% { transform: scale(1); }
}

.newsletter-form .form-control {
  transition: all 0.3s ease;
}

.newsletter-form .btn {
  transition: all 0.3s ease;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Top Header Section */
.top-header {
  font-size: 0.875rem;
  z-index: 1051;
  height: 45px;
  min-height: 45px;
  background-color: var(--primary-color) !important;
  color: var(--light-color) !important;
}

.top-header .hover-opacity {
  transition: opacity 0.3s ease;
}

.top-header .hover-opacity:hover {
  opacity: 0.7;
}

/* Mobile optimizations for top header */
@media (max-width: 767.98px) {
  .top-header {
    height: auto;
    min-height: 40px;
    padding: 0.5rem 0 !important;
  }

  .top-header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .top-header .small {
    font-size: 0.8rem;
  }

  .top-header i {
    font-size: 0.8rem;
  }

  /* Ensure content is centered and visible on mobile */
  .top-header .d-flex {
    gap: 0.5rem;
  }

  .top-header .me-3 {
    margin-right: 0.75rem !important;
  }
}

/* Enhanced Navigation with Theme Support */
.navbar {
  backdrop-filter: blur(10px);
  background: var(--bg-navbar) !important;
  box-shadow: var(--shadow-navbar);
  transition: all 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 70px;
  z-index: 1050;
}

.navbar.scrolled {
  background: var(--bg-navbar-scrolled) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(0, 0, 128, 0.1);
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
}

/* Modern Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Modern Mobile Slide-out Menu with Theme Support */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-mobile-menu);
  color: var(--text-primary);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, color 0.3s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.mobile-menu.show {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: linear-gradient(135deg, #000080 0%, #0000cd 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 128, 0.3);
}

.mobile-menu-brand {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.mobile-menu-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.mobile-menu-content {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav {
  margin-bottom: 2rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease, color 0.3s ease, background 0.3s ease;
  font-weight: 500;
  font-size: 1.1rem;
}

.mobile-nav-link:hover {
  background: linear-gradient(135deg, rgba(0, 0, 128, 0.1) 0%, rgba(0, 0, 128, 0.05) 100%);
  color: var(--primary-color);
  transform: translateX(8px);
}

.mobile-nav-link i {
  width: 24px;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.mobile-menu-actions {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Adjust spacing when only Contact Us button is present */
.mobile-menu-actions .btn:last-child {
  margin-bottom: 0;
}

.mobile-user-section {
  margin-top: 1rem;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(0, 0, 128, 0.1) 0%, rgba(0, 0, 128, 0.05) 100%);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--primary-color);
}

.mobile-user-info i {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

/* Enhanced Mobile Navigation Toggle */
.navbar-toggler.modern-hamburger {
  border: none !important;
  background: transparent !important;
  padding: 0.75rem !important;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
}

/* Fallback for modern-hamburger without navbar-toggler */
.modern-hamburger {
  border: none;
  background: transparent;
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.navbar-toggler.modern-hamburger:focus,
.modern-hamburger:focus {
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.3) !important;
  outline: none !important;
}

.navbar-toggler.modern-hamburger:hover,
.modern-hamburger:hover {
  background-color: rgba(37, 99, 235, 0.1) !important;
  transform: scale(1.05);
}

.navbar-toggler.modern-hamburger:active,
.modern-hamburger:active {
  transform: scale(0.95);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  margin: 2px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Hamburger Animation */
.navbar-toggler.modern-hamburger.active .hamburger-line:nth-child(1),
.modern-hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler.modern-hamburger.active .hamburger-line:nth-child(2),
.modern-hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-toggler.modern-hamburger.active .hamburger-line:nth-child(3),
.modern-hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Ripple effect for touch feedback */
.modern-hamburger::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.modern-hamburger:active::after {
  width: 60px;
  height: 60px;
}

/* Mobile Menu Responsive Styles */
@media (max-width: 575.98px) {
  .mobile-menu {
    width: 100vw;
    max-width: 100vw;
  }

  .mobile-menu-content {
    padding: 1.5rem 1rem;
  }

  .mobile-nav-link {
    padding: 0.875rem;
    font-size: 1rem;
  }

  .mobile-menu-header {
    padding: 1.25rem 1rem;
  }

  .mobile-menu-brand {
    font-size: 1.125rem;
  }
}

/* Mobile menu visibility controls */
@media (max-width: 991.98px) {
  .navbar-toggler.modern-hamburger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-menu,
  .mobile-menu-overlay {
    display: flex;
  }
}

@media (min-width: 992px) {
  .mobile-menu,
  .mobile-menu-overlay,
  .modern-hamburger {
    display: none !important;
  }
}

/* Touch and Accessibility Enhancements */
.mobile-nav-link:focus,
.mobile-menu-close:focus,
.modern-hamburger:focus {
  outline: 3px solid rgba(30, 58, 138, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .mobile-menu {
    border: 2px solid var(--dark-color);
  }

  .mobile-nav-link {
    border: 1px solid transparent;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:focus {
    border-color: var(--primary-color);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-overlay,
  .hamburger-line,
  .mobile-nav-link {
    transition: none;
    animation: none;
  }

  .modern-hamburger:hover,
  .mobile-nav-link:hover {
    transform: none;
  }
}

/* Theme Toggle Button Styles */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  color: var(--text-primary);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: 3px solid rgba(30, 58, 138, 0.5);
  outline-offset: 2px;
}

.theme-toggle i {
  transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(180deg);
  position: absolute;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Mobile theme toggle adjustments */
@media (max-width: 991.98px) {
  .mobile-theme-toggle {
    width: 100%;
    height: 48px;
    border-radius: 0.75rem;
    justify-content: flex-start;
    padding: 0 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 128, 0.1);
    border-color: var(--primary-color);
  }

  .mobile-theme-toggle:hover {
    background: var(--primary-color);
  }

  .mobile-theme-toggle .theme-text {
    margin-left: 0.75rem;
    font-weight: 500;
  }
}

/* Dashboard sidebar theme toggle */
.theme-toggle-sidebar {
  background: none !important;
  border: none !important;
  color: inherit !important;
  text-align: left;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.theme-toggle-sidebar:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: inherit !important;
}

.theme-toggle-sidebar:focus {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

.theme-toggle-sidebar .nav-icon {
  position: relative;
  width: 20px;
  margin-right: 1rem;
  text-align: center;
}

.theme-toggle-sidebar .sun-icon,
.theme-toggle-sidebar .moon-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.theme-toggle-sidebar .sun-icon {
  opacity: 1;
}

.theme-toggle-sidebar .moon-icon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle-sidebar .sun-icon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle-sidebar .moon-icon {
  opacity: 1;
}

/* Theme-aware utility classes */
.bg-theme-light {
  background-color: var(--bg-light) !important;
  transition: background-color 0.3s ease;
}

.bg-theme-card {
  background-color: var(--bg-card) !important;
  transition: background-color 0.3s ease;
}

.text-theme-primary {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

.text-theme-secondary {
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
}

.text-theme-muted {
  color: var(--text-muted) !important;
  transition: color 0.3s ease;
}

.border-theme {
  border-color: var(--border-color) !important;
  transition: border-color 0.3s ease;
}

/* Update Bootstrap utility overrides for theme support */
.bg-light {
  background-color: var(--bg-light) !important;
  transition: background-color 0.3s ease;
}

.text-muted {
  color: var(--text-muted) !important;
  transition: color 0.3s ease;
}

.text-dark {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

.border-light {
  border-color: var(--border-light) !important;
  transition: border-color 0.3s ease;
}

/* Modal theme support */
.modal-content {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.modal-header {
  border-bottom-color: var(--border-color);
  transition: border-color 0.3s ease;
}

.modal-footer {
  border-top-color: var(--border-color);
  transition: border-color 0.3s ease;
}

/* Dropdown theme support */
.dropdown-menu {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.dropdown-item {
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

.dropdown-divider {
  border-top-color: var(--border-color);
}

/* Toast theme support */
.toast {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.toast-header {
  background-color: var(--bg-light);
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}

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

/* Smooth theme transitions */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease !important;
}

/* Testimonial theme support */
.testimonial-card {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.testimonial-card .card-body {
  color: var(--text-primary);
}

.testimonial-card .text-muted {
  color: var(--text-muted) !important;
}

/* Property card theme support */
.property-card {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.property-card .card-title {
  color: var(--text-primary);
}

.property-card .card-text {
  color: var(--text-secondary);
}

/* Section backgrounds */
.bg-section {
  background-color: var(--bg-section) !important;
  transition: background-color 0.3s ease;
}

/* Footer theme support (if exists) */
.footer {
  background-color: var(--bg-section, #0f172a);
  color: var(--text-primary, #f8fafc);
  border-top: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

/* Table theme support */
.table {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.table th,
.table td {
  border-color: var(--border-color);
  transition: border-color 0.3s ease;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
  background-color: var(--bg-light);
  transition: background-color 0.3s ease;
}

/* Alert theme support */
.alert {
  border-color: var(--border-color);
  transition: all 0.3s ease;
}

/* Badge theme support */
.badge {
  transition: all 0.3s ease;
}

/* Pagination theme support */
.page-link {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.page-link:hover {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-item.disabled .page-link {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-muted);
}

/* Dark mode support is now handled via data-theme attribute */



.navbar-collapse {
  border-radius: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-primary) !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem;
  transition: all 0.2s ease, color 0.3s ease, background-color 0.3s ease;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
  background: var(--primary-color);
  color: white !important;
}

/* Button Enhancements */
.btn {
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  min-height: 44px; /* Touch-friendly minimum */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0000cd);
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 128, 0.4);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
}

/* Card Enhancements with Theme Support */
.card {
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
  background-color: #f8fafc;
  border-radius: 0.5rem 0.5rem 0 0;
  width: 100%;
  display: block;
}

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

/* Enhanced property image styles */
.property-image-hover {
  transition: transform 0.3s ease, opacity 0.3s ease;
  background-color: #f8fafc;
  min-height: 250px;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* Loading state for images */
.property-image-hover[data-loading="true"] {
  opacity: 0.7;
  background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Error state for images */
.property-image-hover[data-error="true"] {
  background-color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 48px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.875rem;
}

/* Mobile optimizations for property images */
@media (max-width: 768px) {
  .card-img-top,
  .property-image-hover {
    height: 200px;
    min-height: 200px;
  }

  /* Disable hover effects on touch devices */
  .card:hover .card-img-top,
  .card-hover:hover .property-image-hover {
    transform: none;
  }
}

@media (max-width: 576px) {
  .card-img-top,
  .property-image-hover {
    height: 180px;
    min-height: 180px;
  }
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Professional Shadow System */
.shadow-xs { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06); }
.shadow { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06); }
.shadow-xl { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06); }
.shadow-2xl { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1); }

/* Professional Border Radius System */
.rounded-xs { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.375rem; }
.rounded { border-radius: 0.5rem; }
.rounded-md { border-radius: 0.625rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.25rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-4xl { border-radius: 2rem; }

/* Professional Backdrop Effects */
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur { backdrop-filter: blur(8px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

/* Professional Gradient Backgrounds */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0000cd 100%);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #64748b 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.bg-gradient-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0000cd 50%, #000080 100%);
}

/* Professional Glass Morphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Professional Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(0, 0, 128, 0.3);
}

/* Professional Spacing System */
.section-padding { padding: 5rem 0; }
.section-padding-sm { padding: 3rem 0; }
.section-padding-lg { padding: 7rem 0; }

/* Professional Badge Styles */
.badge {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 2rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-color), #0000cd);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.3);
}

.badge-success {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Professional Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Professional Focus States */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.2);
}

/* Professional Dividers */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 2rem 0;
}

.divider-vertical {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border-color), transparent);
  margin: 0 2rem;
}

/* Mobile-First Form Styles with Theme Support */
.form-control,
.form-select {
  border-radius: 0.75rem;
  border: 2px solid var(--input-border);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  min-height: 44px; /* Touch-friendly */
  background-color: var(--input-bg);
  color: var(--input-text);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 128, 0.15);
  transform: translateY(-1px);
  outline: none;
}

.form-control:hover,
.form-select:hover {
  border-color: var(--border-color);
}

.form-control::placeholder {
  color: var(--input-placeholder);
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Large form controls for better mobile experience */
.form-control-lg,
.form-select-lg {
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  min-height: 48px;
  border-radius: 0.875rem;
}

/* Input group enhancements */
.input-group .form-control {
  border-radius: 0.75rem 0 0 0.75rem;
}

.input-group .btn {
  border-radius: 0 0.75rem 0.75rem 0;
}

/* Textarea specific styles */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Form validation styles */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.15);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success-color);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.15);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%) !important;
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Property Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.property-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.property-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 10;
}

.property-price {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 1.125rem;
  font-weight: 700;
  z-index: 10;
}

/* Form Enhancements - Consolidated with Mobile-First Form Styles */
/* Note: Main form styles are defined in Mobile-First Form Styles section above */

/* Footer Enhancements */
.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Footer Typography */
footer p {
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

footer a {
  font-size: 16px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

footer small,
footer .small {
  font-size: 12px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

footer h5 {
  font-size: 16px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

/* Footer Responsive Typography */
@media (max-width: 767.98px) {
  footer p {
    font-size: 12px;
  }

  footer a,
  footer h5 {
    font-size: 14px;
  }

  footer small,
  footer .small {
    font-size: 12px;
  }
}

/* Enhanced Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-bounce-slow {
  animation: bounceSlow 2s ease-in-out infinite;
}

/* Loading States */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

/* Hover Transitions */
.transition-all {
  transition: all 0.3s ease;
}

.transition-colors {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-transform {
  transition: transform 0.3s ease;
}

.transition-opacity {
  transition: opacity 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    transform: translateY(30px); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0); 
    opacity: 1; 
  }
}

@keyframes slideInLeft {
  from { 
    transform: translateX(-30px); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounceSlow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Scale and Zoom Effects */
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer Enhancements */
.hover-primary {
  transition: color 0.3s ease, transform 0.2s ease;
}

.hover-primary:hover {
  color: var(--primary-color) !important;
  transform: translateX(3px);
}

.newsletter-form .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 128, 0.25);
  border-color: var(--primary-color);
}

.newsletter-form .form-control::placeholder {
  color: #adb5bd;
}

/* Homepage Enhancements */
.text-gradient {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.property-image-hover {
  transition: transform 0.3s ease;
}

.card-hover:hover .property-image-hover {
  transform: scale(1.05);
}

.carousel-dot {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  transition: all 0.3s ease;
}

.carousel-dot:hover,
.carousel-dot.carousel-dot-active {
  background: rgba(255, 255, 255, 1) !important;
}

.hover-bg-opacity-50:hover {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Property Actions */
.property-actions {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-hover:hover .property-actions {
  opacity: 1;
}

.property-actions .btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.property-actions .btn:hover {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .property-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Enhanced mobile button styles */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-height: 48px;
    min-width: 48px;
    border-radius: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
  }

  .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-height: 40px;
    min-width: 40px;
  }

  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 52px;
  }

  /* Icon improvements for mobile */
  .fas, .far, .fab {
    font-size: 1rem;
  }

  .btn .fas, .btn .far, .btn .fab {
    font-size: 0.9rem;
  }

  /* Navigation button improvements */
  .navbar-toggler {
    padding: 0.5rem;
    border: none;
    min-height: 44px;
    min-width: 44px;
  }

  .navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* Property action buttons */
  .property-actions .btn {
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    font-size: 1rem;
  }

  /* Footer responsive adjustments */
  footer .col-lg-4,
  footer .col-lg-2 {
    margin-bottom: 2rem;
  }

  /* Social media buttons */
  .social-links .btn {
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    border-radius: 50%;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .card-body {
    padding: 1rem;
  }

  .property-badge,
  .property-price {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  /* Enhanced mobile button styles for extra small screens */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
    border-radius: 0.75rem;
  }

  .btn-sm {
    padding: 0.625rem 1rem;
    font-size: 14px;
    min-height: 44px;
  }

  /* Icon size adjustments */
  .fas, .far, .fab {
    font-size: 1rem;
  }

  .btn .fas, .btn .far, .btn .fab {
    font-size: 0.875rem;
  }

  /* Mobile-specific property actions */
  .property-actions {
    opacity: 1;
  }

  .property-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  /* Contact form button improvements */
  .contact-form .btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    min-height: 52px;
  }

  /* Pagination improvements */
  .pagination .page-link {
    padding: 0.75rem;
    min-height: 44px;
    min-width: 44px;
    font-size: 0.875rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .property-actions {
    opacity: 1;
  }

  .card-hover:hover .property-image-hover {
    transform: none;
  }

  .btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--dark-color);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .text-gradient {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--warning-color);
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-fade-in,
  .animate-slide-up,
  .animate-slide-in-left,
  .animate-slide-in-right,
  .animate-fade-in-up,
  .animate-bounce-slow {
    animation: none;
  }

  .property-image-hover,
  .card-hover:hover .property-image-hover {
    transform: none !important;
  }

  .loading-pulse,
  .loading-spinner {
    animation: none;
  }
}

/*
 * Testimonials Section Styles with Dark/Light Theme Support
 *
 * FIXED ISSUES:
 * - Replaced hardcoded colors with CSS custom properties for theme compatibility
 * - Fixed "What Our Clients Say" text visibility in dark theme (was using var(--dark-color))
 * - Fixed "Client Testimonials" text visibility in dark theme (was using var(--dark-color))
 * - Updated background gradients to use theme-compatible variables
 * - Ensured WCAG 2.1 AA contrast compliance in both light and dark themes
 *
 * THEME VARIABLES USED:
 * - var(--text-primary): Main text color (adapts to theme)
 * - var(--bg-card): Card background color (adapts to theme)
 * - var(--bg-light): Light background sections (adapts to theme)
 * - var(--bg-section): Section background color (adapts to theme)
 * - var(--border-color): Border colors (adapts to theme)
 *
 * @updated 2025-08-25 - Fixed dark theme text visibility issues
 */
.testimonials-section {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-section) 100%);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="testimonial-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23e2e8f0" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23testimonial-pattern)"/></svg>') repeat;
  opacity: 0.5;
  z-index: 1;
}

.testimonials-section .container {
  position: relative;
  z-index: 2;
}

.testimonial-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 2rem;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--info-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.testimonial-card:hover::before {
  transform: scaleX(1);
}

.testimonial-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(0, 0, 128, 0.15);
  background-color: var(--bg-card);
  border-color: var(--primary-color);
}

.testimonial-quote {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  font-style: italic;
}

.testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  font-family: Georgia, serif;
  opacity: 0.3;
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar-wrapper {
  position: relative;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  transition: all 0.3s ease;
}

.testimonial-avatar-initials {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  border: 3px solid var(--primary-light);
  position: relative;
  overflow: hidden;
}

/* Color variations for different testimonials */
.testimonial-avatar-initials[data-initials="RK"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.testimonial-avatar-initials[data-initials="PS"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.testimonial-avatar-initials[data-initials="AD"] {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.testimonial-avatar-initials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar-initials::before {
  opacity: 1;
}

.testimonial-card:hover .testimonial-avatar {
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 128, 0.3);
}

.testimonial-info h5 {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.testimonial-role {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.testimonial-stars {
  color: #fbbf24;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Responsive Design for Testimonials */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-quote {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .testimonial-quote::before {
    font-size: 3rem;
    top: -0.75rem;
    left: -0.25rem;
  }

  .testimonial-avatar {
    width: 50px;
    height: 50px;
  }

  .testimonial-avatar-initials {
    font-size: 1rem;
  }

  .testimonial-info h5 {
    font-size: 1rem;
  }

  .testimonial-role {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .testimonials-section {
    padding: 3rem 0;
  }

  .testimonial-card {
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .testimonial-quote {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Touch Device Optimizations for Testimonials */
@media (hover: none) and (pointer: coarse) {
   .testimonial-card:hover {
     transform: none;
     box-shadow: 0 8px 30px rgba(30, 58, 138, 0.1);
   }

  .testimonial-card:hover .testimonial-avatar {
    transform: none;
  }
}

/* High Contrast Mode Support for Testimonials */
@media (prefers-contrast: high) {
  .testimonial-card {
    background: white;
    border: 2px solid var(--dark-color);
  }

  .testimonial-quote::before {
    opacity: 0.8;
  }
}

/* Reduced Motion Support for Testimonials */
@media (prefers-reduced-motion: reduce) {
  .testimonial-card,
  .testimonial-avatar,
  .testimonial-card::before {
    transition: none !important;
  }

  .testimonial-card:hover {
    transform: none !important;
  }

  .testimonial-card:hover .testimonial-avatar {
    transform: none !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .property-actions,
  footer,
  .testimonials-section {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .hero-section {
    background: none !important;
    color: black !important;
  }
}

/* ========================================
   ENHANCED MOBILE-FIRST RESPONSIVE DESIGN
   ======================================== */

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
  /* Typography optimizations for very small screens */
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }

  .display-5, .display-6 {
    font-size: 1.5rem;
  }

  /* Container padding for very small screens */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Navigation improvements */
  .navbar-brand {
    font-size: 1.25rem;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  /* Button optimizations for touch */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-sm {
    min-height: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .btn-lg {
    min-height: 48px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  /* Card optimizations */
  .card {
    margin-bottom: 1.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Property card specific */
  .property-card .card-body {
    padding: 1rem 0.875rem;
  }

  .property-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  /* Form optimizations */
  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem 1rem;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Modal optimizations */
  .modal-dialog {
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  /* Footer adjustments */
  .footer {
    padding: 2rem 0;
  }

  .footer .col-lg-3,
  .footer .col-lg-2 {
    margin-bottom: 1.5rem;
  }

  /* Testimonial cards for very small screens */
  .testimonial-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .testimonial-quote {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .testimonial-author h5 {
    font-size: 1rem;
  }

  .testimonial-role {
    font-size: 0.8rem;
  }
}

/* Touch-Friendly Enhancements */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .btn:hover,
  .card:hover,
  .property-card:hover {
    transform: none;
  }

  /* Increase touch targets */
  .nav-link,
  .btn,
  .form-control,
  .form-select {
    min-height: 44px;
  }

  /* Improve tap highlighting */
  .btn,
  .nav-link,
  .card-link {
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.1);
  }

  /* Better touch feedback */
  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .property-card:active {
    transform: scale(0.99);
    transition: transform 0.1s ease;
  }
}

/* Landscape orientation optimizations for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    /* Allow natural content flow in landscape mode */
    height: auto;
    min-height: 100vh;
    padding: 1.5rem 0 2rem 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .modal-dialog {
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Optimize testimonials for landscape */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .testimonial-card {
    padding: 0.875rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images and icons for retina displays */
  .property-image,
  .testimonial-avatar,
  .hero-bg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Contact Form Mobile Optimizations
 *
 * This section contains comprehensive mobile responsiveness fixes for contact forms
 * throughout the website, with special attention to the homepage "Get In Touch" form.
 *
 * Key improvements:
 * - Fixed form field visibility issues on mobile devices
 * - Enhanced touch-friendly form controls with proper sizing
 * - Improved button alignment and responsiveness
 * - iOS zoom prevention with 16px font size
 * - Proper spacing and padding for mobile screens
 *
 * @author White Rock Realtor Team
 * @version 2.0 - Enhanced mobile responsiveness
 * @since 2025-08-20
 */
@media (max-width: 768px) {
  /* Contact section spacing - ensures proper vertical rhythm on mobile */
  .contact-section {
    padding: 2rem 0 !important;
  }

  /* Contact form container - optimized padding for mobile screens */
  .contact-form-container {
    padding: 1.5rem !important;
    margin-bottom: 2rem;
  }

  /* Bootstrap Grid Mobile Enhancements for Hero Section */
  .hero-section .row {
    margin: 0; /* Remove negative margins that can cause overflow */
  }

  .hero-section .col-lg-8,
  .hero-section .col-lg-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Ensure proper stacking order on mobile */
  .hero-section .col-lg-8 {
    order: 1; /* Hero content first */
    margin-bottom: 1rem;
  }

  .hero-section .col-lg-4 {
    order: 2; /* Contact form second */
  }

  /* Homepage Get In Touch form mobile fixes
   * These styles specifically target the hero section contact form
   * to ensure proper visibility and spacing on mobile devices */
  .hero-section .col-lg-4 {
    margin-top: 2rem; /* Adds breathing room between hero content and form */
    margin-bottom: 2rem; /* Ensure bottom spacing for form visibility */
  }

  .hero-section .bg-white {
    padding: 1.5rem !important; /* Optimized padding for mobile */
    margin: 0 1rem 2rem 1rem; /* Side margins and bottom margin for better spacing */
    max-width: 100%; /* Ensure form doesn't overflow */
    box-sizing: border-box; /* Include padding in width calculation */
  }

  /* Form elements mobile optimization
   *
   * Critical fixes for form field visibility and usability on mobile devices:
   * - 48px minimum height ensures touch-friendly interaction (WCAG 2.1 AA compliance)
   * - 16px font size prevents iOS Safari from zooming when focusing inputs
   * - Full width with proper box-sizing prevents layout issues
   * - Consistent border radius and styling across all form elements
   */
  .form-control,
  .form-select {
    min-height: 48px !important; /* Touch-friendly minimum size */
    font-size: 16px !important; /* Prevents iOS zoom - critical for UX */
    padding: 0.875rem 1rem !important; /* Comfortable padding for touch */
    border-radius: 0.75rem !important; /* Modern rounded corners */
    border: 2px solid #e2e8f0 !important; /* Visible border for clarity */
    width: 100% !important; /* Full width for mobile layout */
    box-sizing: border-box !important; /* Prevents overflow issues */
    display: block !important; /* Ensures proper block-level behavior */
    margin-bottom: 0.75rem !important; /* Consistent spacing between fields */
    background-color: #fff !important; /* Ensure white background */
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none; /* Remove default styling */
  }

  .form-control:focus,
  .form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
  }

  /* Form labels */
  .form-label {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
  }

  /* Contact form button */
  .contact-form .btn-primary {
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: 0.875rem 2rem !important;
    width: 100% !important;
  }

  /* Homepage Get In Touch form button */
  #getInTouchForm .btn {
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    margin-top: 0.5rem !important; /* Add top margin for better spacing */
    margin-bottom: 1rem !important; /* Ensure bottom spacing */
    display: block !important; /* Ensure proper block display */
    text-align: center !important; /* Center button text */
  }

  /* View All buttons alignment and responsiveness */
  .text-center .btn {
    min-width: 200px !important;
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }

  .text-center .btn-lg {
    min-width: 250px !important;
    padding: 1rem 2rem !important;
    font-size: 1.125rem !important;
    min-height: 52px !important;
  }

  /* Contact info cards */
  .contact-info-item {
    margin-bottom: 1.5rem !important;
  }

  .contact-info-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }
}

/* Extra small devices contact form */
@media (max-width: 576px) {
  .contact-form-container {
    padding: 1rem !important;
    border-radius: 1rem !important;
  }

  .contact-section .container {
    padding: 1rem !important;
  }

  /* Hero section container adjustments for extra small devices */
  .hero-section .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .hero-section .col-lg-8,
  .hero-section .col-lg-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Homepage Get In Touch form for extra small devices */
  .hero-section .bg-white {
    padding: 1rem !important;
    margin: 0 0.5rem 2rem 0.5rem; /* Add bottom margin */
    border-radius: 1rem !important;
    max-width: calc(100% - 1rem); /* Ensure proper width calculation */
  }

  .hero-section .col-lg-4 {
    margin-top: 1.5rem;
    margin-bottom: 2rem; /* Ensure bottom spacing */
  }

  /* Ensure form elements are fully visible */
  #getInTouchForm .form-control,
  #getInTouchForm .form-select {
    margin-bottom: 0.75rem !important;
    min-height: 50px !important; /* Slightly larger for very small screens */
  }

  #getInTouchForm .btn {
    margin-top: 0.75rem !important;
    margin-bottom: 1rem !important;
    min-height: 50px !important; /* Larger touch target for small screens */
  }

  .form-control,
  .form-select {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }

  .contact-info-item h5 {
    font-size: 1rem !important;
  }

  .contact-info-item p {
    font-size: 0.875rem !important;
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
  /* Larger focus indicators for WCAG 2.1 AA compliance */
  .btn:focus,
  .form-control:focus,
  .form-select:focus,
  .nav-link:focus {
    outline: 3px solid rgba(59, 130, 246, 0.6) !important;
    outline-offset: 2px !important;
  }

  /* Enhanced focus indicators for Get In Touch form */
  #getInTouchForm .btn:focus,
  #getInTouchForm .form-control:focus,
  #getInTouchForm .form-select:focus {
    outline: 3px solid rgba(59, 130, 246, 0.8) !important;
    outline-offset: 3px !important;
  }

  /* Better contrast for small text - WCAG AA compliant */
  .text-muted {
    color: #6c757d !important;
  }

  /* Ensure minimum text size for readability */
  small, .small {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
  }

  /* Ensure form labels are properly associated and visible */
  .form-label {
    color: #374151 !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
  }

  /* High contrast mode support */
  @media (prefers-contrast: high) {
    #getInTouchForm .form-control,
    #getInTouchForm .form-select {
      border: 3px solid #000000 !important;
    }

    #getInTouchForm .btn-primary {
      background-color: #000000 !important;
      border-color: #000000 !important;
      color: #ffffff !important;
    }
  }
}

/* Animation optimizations for mobile */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .btn,
  .card,
  .property-card {
    transition: none;
    animation: none;
  }
}

/* Specific mobile screen size optimizations */
/* iPhone SE and similar (320px) */
@media (max-width: 320px) {
  .hero-section .bg-white {
    margin: 0 0.25rem 2rem 0.25rem !important;
    padding: 0.75rem !important;
  }

  #getInTouchForm .form-control,
  #getInTouchForm .form-select {
    font-size: 16px !important;
    min-height: 52px !important; /* Larger for very small screens */
  }

  #getInTouchForm .btn {
    min-height: 52px !important;
    font-size: 1rem !important;
  }
}

/* iPhone 6/7/8 and similar (375px) */
@media (min-width: 321px) and (max-width: 375px) {
  .hero-section .bg-white {
    margin: 0 0.5rem 2rem 0.5rem !important;
    padding: 1rem !important;
  }
}

/* iPhone 6/7/8 Plus and similar (414px) */
@media (min-width: 376px) and (max-width: 414px) {
  .hero-section .bg-white {
    margin: 0 0.75rem 2rem 0.75rem !important;
    padding: 1.25rem !important;
  }
}

/* Additional mobile form enhancements for better visibility */
@media (max-width: 768px) {
  /* Ensure form container is always visible */
  #getInTouchForm {
    position: relative;
    z-index: 10;
    background: transparent;
  }

  /* Improve form field contrast and visibility */
  #getInTouchForm .form-control,
  #getInTouchForm .form-select {
    background-color: #ffffff !important;
    border: 2px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  }

  #getInTouchForm .form-control:focus,
  #getInTouchForm .form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff !important;
  }

  /* Ensure button is always visible and accessible */
  #getInTouchForm .btn-primary {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  }

  #getInTouchForm .btn-primary:hover,
  #getInTouchForm .btn-primary:focus {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
  }
}

/* Dark mode support is now handled via data-theme attribute */

.clip-img {
  /* clip-path: inset(5px 5px 5px 5px); crop edges: top right bottom left */
  object-fit: cover;
  border-radius: 10%;
}