/* Modern, minimal, professional design system */

:root {
  /* Brand color palette based on your logo */
  --primary-color: #1b2256;      /* Deep navy from logo */
  --primary-light: #2c3565;      /* Lighter version of navy */
  --primary-dark: #141a47;       /* Darker version of navy */
  
  --secondary-color: #1473b6;    /* Professional blue from logo */
  --secondary-light: #3d8bc9;    /* Lighter version of blue */
  --secondary-dark: #0f5a93;     /* Darker version of blue */
  
  --accent-color: #f39c12;       /* Warm amber - contrasts beautifully with blues */
  --accent-light: #f5b041;       /* Light amber */
  --accent-dark: #d68910;        /* Dark amber */
  
  
  --text-dark: #172734;          /* Charcoal Navy */
  --text-medium: #4a5568;        /* Medium gray */
  --text-light: #718096;         /* Light gray */
  --text-on-dark: rgba(255, 255, 255, 0.9);  /* High contrast white for dark backgrounds */
  --text-on-dark-muted: rgba(255, 255, 255, 0.7);  /* Muted white for dark backgrounds */
  --background-light: #f8fafc;   /* Very light blue-gray */
  --border-color: #e2e8f0;       /* Light border */
  --white: #ffffff;
  --success: #27ae60;            /* Professional green */
  --warning: var(--accent-color); /* Use accent color for warnings */
  --danger: #e74c3c;             /* Professional red */
  
  /* Typography - Classic serif + sans serif combination */
  --font-headings: 'Georgia', 'Times New Roman', Times, serif;           /* Serif for headings - authority & trust */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;  /* Sans serif for body - readability */
  --font-accents: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; /* Sans serif for buttons/nav - modern */
  
  /* Spacing scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Border radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 600; }
h3 { font-size: clamp(1.5rem, 2.75vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.25rem, 2.25vw, 1.5rem); font-weight: 600; }
h5 { font-size: clamp(1.125rem, 2vw, 1.25rem); font-weight: 600; }
h6 { font-size: clamp(1rem, 1.75vw, 1.125rem); font-weight: 600; }

/* Body text styles */
p, .lead, li, td, th {
  font-family: var(--font-body);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-medium);
  line-height: 1.6;
}

/* Modern navigation */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  transition: all 0.3s ease;
}

/* Navigation container adjustments */
.navbar .d-flex {
  flex-wrap: nowrap;
  gap: var(--space-xs);
}

.navbar .d-flex .btn {
  flex-shrink: 0;
  min-width: fit-content;
}

/* Navbar button alternating hover effect - only when hovering over outline button */
.navbar .btn-outline-primary:hover ~ .btn-primary {
  background: transparent;
  color: #172734;
  border: 2px solid #172734;
}

.navbar .btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Areas of expertise section alternating button hover effect */
.btn-outline-primary:hover ~ .btn-primary {
  background: transparent !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
}

/* Hero section alternating button hover effect - using container hover */
.hero-section .d-flex:has(.btn-outline-light:hover) .btn-light {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px) !important;
}

.navbar .btn-primary:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

.navbar-brand {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.375rem);
  color: #172734 !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
  max-width: 60%;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.navbar-brand .ampersand {
  color: #1072b6;
}

.nav-link {
  font-family: var(--font-accents);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-medium) !important;
  transition: all 0.3s ease;
  position: relative;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md) !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #ff6b47 !important;
  border-radius: 1px;
}

.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #ff6b47 !important;
  border-radius: 1px;
}

/* Modern buttons */
.btn {
  font-family: var(--font-accents);
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: #172734 !important;
  border: 2px solid #172734;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-light {
  background: white;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  background: var(--background-light);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
  background: white;
  color: var(--primary-color);
  border-color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Enhanced Hero Section - Using <img> tag approach for better LCP */
.hero-section {
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

/* Hero background image (actual <img> tag) */
.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Gradient overlay on top of image */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(25, 40, 56, 0.95) 0%, rgba(25, 40, 56, 0.8) 40%, rgba(20, 115, 182, 0.3) 70%, rgba(20, 115, 182, 0.1) 100%);
  z-index: 1;
}

/* Hero content above image and gradient */
.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-background-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom,
    rgba(20, 115, 182, 0.1) 0%,
    rgba(25, 40, 56, 0.3) 50%,
    rgba(25, 40, 56, 0.8) 100%);
  z-index: 1;
}

.hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,0.1), transparent);
  background-size: 300px 200px, 400px 300px, 200px 150px, 350px 250px;
  animation: particleFloat 20s linear infinite;
  z-index: 1;
}

@keyframes particleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

.hero-section .container {
  position: relative;
  z-index: 3;
}

.hero-content {
  animation: heroContentIn 1s ease-out;
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero badge */
.hero-badge {
  display: inline-block;
  background: rgba(243, 156, 18, 0.2);
  border: 1px solid rgba(243, 156, 18, 0.4);
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
}

/* Enhanced hero title */
.hero-title {
  font-family: var(--font-headings);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero-highlight {
  color: #ff6b47 !important;
  position: relative;
  display: inline-block;
  white-space: nowrap;
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
  text-decoration: none !important;
}

.hero-highlight:hover,
.hero-highlight:focus,
.hero-highlight:active,
.hero-highlight:visited {
  transform: scale(1.05);
  color: #ff8566 !important;
  text-decoration: none !important;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.hero-highlight:hover::after,
.hero-highlight:focus::after {
  opacity: 0.8;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

/* Hero stats */
.hero-stats {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: var(--space-xl);
}

.stat-item {
  padding: 0 1rem;
}

.stat-number {
  font-family: var(--font-headings);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced hero buttons */
.hero-cta-primary, .hero-cta-secondary {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.hero-cta-primary:hover .btn-shine,
.hero-cta-secondary:hover .btn-shine {
  left: 100%;
}

.hero-cta-primary:hover,
.hero-cta-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Hero visual elements */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-elements {
  position: relative;
  width: 300px;
  height: 300px;
}

.floating-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  animation: floatIcon 6s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.floating-icon:nth-child(1) {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
}

.floating-icon:nth-child(2) {
  top: 10%;
  right: 20%;
  animation-delay: 1s;
}

.floating-icon:nth-child(3) {
  bottom: 20%;
  right: 10%;
  animation-delay: 2s;
}

.floating-icon:nth-child(4) {
  bottom: 10%;
  left: 30%;
  animation-delay: 0.5s;
}

.floating-icon:nth-child(5) {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1.5s;
  background: rgba(243, 156, 18, 0.2);
  border-color: rgba(243, 156, 18, 0.4);
  color: var(--accent-color);
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 1;
  }
}

/* Modern cards */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  background: var(--white);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--space-xl);
}

.card-header {
  background: var(--background-light);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-lg) var(--space-xl);
}

/* Feature icons */
.feature-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  transition: all 0.3s ease;
}

.feature-icon:hover {
  transform: scale(1.05);
}

/* Forms */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(20, 115, 182, 0.1);
  outline: none;
}

.form-label {
  font-family: var(--font-accents);
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

/* Sections */
.py-5 {
  padding: var(--space-3xl) 0;
}

.bg-light {
  background: var(--background-light) !important;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-weight: 500;
}

.alert-success {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success);
}

.alert-danger {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger);
}

/* Badges */
.badge {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  letter-spacing: 0.02em;
}

.bg-primary {
  background: var(--primary-color) !important;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: var(--space-lg);
}

.breadcrumb-item {
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-light);
}

/* Footer */
footer {
  background: var(--background-light) !important;
  border-top: 1px solid var(--border-color);
  color: var(--text-medium);
}

/* Utilities */
.text-muted {
  color: var(--text-light) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.border-0 {
  border: none !important;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* CTA Section */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--secondary-color);
  opacity: 0.95;
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

/* Text color overrides for dark sections */
.hero-section .lead,
.cta-section .lead,
.bg-primary .lead {
  color: var(--text-on-dark) !important;
}

.hero-section .text-muted,
.cta-section .text-muted,
.bg-primary .text-muted,
.bg-secondary .text-muted {
  color: var(--text-on-dark-muted) !important;
}

.hero-section p,
.cta-section p,
.bg-primary p,
.bg-secondary p {
  color: var(--text-on-dark);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar (webkit) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Focus states for accessibility */
*:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.btn:focus,
.form-control:focus {
  outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .card-body {
    padding: var(--space-lg);
  }
  
  .py-5 {
    padding: var(--space-2xl) 0;
  }
}

/* Extra small screens - ensure brand name is fully visible */
@media (max-width: 480px) {
  .navbar-brand {
    font-size: clamp(0.9rem, 4vw, 1.125rem);
    max-width: 70%;
    line-height: 1.15;
  }
  
  /* Adjust navbar layout for very small screens */
  .navbar .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  
  .navbar .d-flex {
    gap: var(--space-xs);
  }
  
  .navbar .d-flex .btn {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
  }
}
/* ==========================================
   Enhanced Areas of Expertise Cards
   - Modern, engaging design with subtle animations
   - Improved visual hierarchy and interactivity
   ========================================== */

#areas-of-expertise {
  --ae-card-bg: #ffffff;
  --ae-card-fg: #172734;
  --ae-card-muted: #6b7280;
  --ae-card-accent: var(--secondary-color, #1473b6);
  --ae-card-border: rgba(17, 24, 39, 0.08);
  --ae-card-shadow: 0 1px 3px rgba(16,24,40,0.04), 0 8px 20px rgba(16,24,40,0.06);
  --ae-card-shadow-hover: 0 8px 16px rgba(16,24,40,0.08), 0 20px 32px rgba(16,24,40,0.12);
  --ae-card-radius: 16px;
  --ae-gap: 1.5rem;

  /* Subtle background for better card contrast */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

/* Dynamic divider positioned exactly on section boundary */
#areas-of-expertise::before {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  border-radius: 2px;
  opacity: 0.8;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Divider positions for different card hovers - only on larger screens */
@media (min-width: 992px) {
  #areas-of-expertise:has(.expertise-card[data-category="business"]:hover)::before {
    transform: translateX(-200px);
    background: linear-gradient(90deg, #1b2256 0%, #2c3565 100%);
    opacity: 1;
  }

  #areas-of-expertise:has(.expertise-card[data-category="property"]:hover)::before {
    transform: translateX(0px);
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    opacity: 1;
  }

  #areas-of-expertise:has(.expertise-card[data-category="investments"]:hover)::before {
    transform: translateX(200px);
    background: linear-gradient(90deg, #1473b6 0%, #3d8bc9 100%);
    opacity: 1;
  }
}

/* Single column divider effect - appears above each card */
@media (max-width: 991px) {
  /* Hide the main divider in single column */
  #areas-of-expertise::before {
    display: none;
  }

  /* Add margin between cards in single column */
  #areas-of-expertise .col-md-6.col-lg-4 {
    margin-bottom: 2rem;
  }

  /* Add individual dividers above each card */
  .expertise-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
  }

  .expertise-card[data-category="business"]:hover::before {
    opacity: 1;
    background: linear-gradient(90deg, #1b2256 0%, #2c3565 100%);
  }

  .expertise-card[data-category="property"]:hover::before {
    opacity: 1;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
  }

  .expertise-card[data-category="investments"]:hover::before {
    opacity: 1;
    background: linear-gradient(90deg, #1473b6 0%, #3d8bc9 100%);
  }
}


@media (prefers-color-scheme: dark) {
  #areas-of-expertise {
    --ae-card-bg: #0b1220;
    --ae-card-fg: #e5e7eb;
    --ae-card-muted: #9ca3af;
    --ae-card-accent: #60a5fa;
    --ae-card-border: rgba(255,255,255,0.08);
    --ae-card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 18px rgba(0,0,0,0.35);
    --ae-card-shadow-hover: 0 6px 16px rgba(0,0,0,0.35), 0 18px 28px rgba(0,0,0,0.45);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }
}

/* Enhanced grid spacing with centering for 3-card layout */
#areas-of-expertise .row.g-4 {
  --bs-gutter-x: calc(var(--ae-gap) * 1.2);
  --bs-gutter-y: var(--ae-gap);
  justify-content: center;
  padding: 2rem 0;
}

/* Enhanced expertise cards with sliding animations */
.expertise-card {
  position: relative;
  border-radius: var(--ae-card-radius) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  background: var(--ae-card-bg);
  box-shadow: var(--ae-card-shadow), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: visible;
}

/* Enhanced hover effect with scale */
.expertise-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--ae-card-shadow-hover);
  border-color: rgba(16, 114, 182, 0.6) !important;
}

.expertise-card:focus-within {
  outline: 2px solid var(--ae-card-accent);
  outline-offset: 2px;
}

/* Gradient overlay effect on hover */
.expertise-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(20, 115, 182, 0.02) 0%,
    rgba(20, 115, 182, 0.04) 50%,
    rgba(20, 115, 182, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.expertise-card:hover::before {
  opacity: 1;
}

/* Card body enhancement */
.expertise-card .card-body {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
}

/* Enhanced icon container with sliding animations */
.feature-icon-container {
  position: relative;
  display: inline-block;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.expertise-card .feature-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.expertise-card .feature-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Icon slides to top-left on hover */
.expertise-card:hover .feature-icon-container {
  transform: translate(-140px, -50px) scale(0.8);
}

/* Tablet/small laptop responsive */
@media (max-width: 991px) and (min-width: 768px) {
  .expertise-card:hover .feature-icon-container {
    transform: translate(-170px, -50px) scale(0.8);
  }
}

/* Mobile responsive - less left movement on smaller screens */
@media (max-width: 767px) {
  .expertise-card:hover .feature-icon-container {
    transform: translate(-130px, -50px) scale(0.8);
  }
}

.expertise-card:hover .feature-icon {
  transform: rotate(5deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.expertise-card:hover .feature-icon::before {
  opacity: 1;
}

.expertise-card .feature-icon i {
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Icon badge with sliding animation */
.icon-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #ff6b47;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(255, 107, 71, 0.3);
  letter-spacing: 0.02em;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

/* Badge slides to overlap icon lower-right on hover */
.expertise-card:hover .icon-badge {
  transform: translate(-130px, 55px) scale(1);
}

/* Enhanced typography with floating animation */
.expertise-card .card-title {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ae-card-fg);
  margin-bottom: 1rem !important;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Title floats upward and changes color on hover */
.expertise-card:hover .card-title {
  color: #ff6b47;
  transform: translateY(-60px);
}

/* Text container for overlapping front/back text */
.card-text-container {
  position: relative;
  height: auto;
  overflow: visible;
  flex: 1;
}

.expertise-card .card-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ae-card-muted);
  margin-bottom: 1.5rem !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Front text - visible by default */
.card-text-front {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Back text - hidden below */
.card-text-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

/* Text animations on hover */
.expertise-card:hover .card-text-front {
  opacity: 0;
  transform: translateY(-20px);
}

.expertise-card:hover .card-text-back {
  opacity: 1;
  transform: translateY(-60px);
}

/* Card footer info */
.card-footer-info {
  padding-top: 1rem;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  margin-top: auto;
}

.card-footer-info small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ae-card-accent) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.expertise-card:hover .card-footer-info small {
  opacity: 1;
}

/* Color variations for each card */
.expertise-card[data-category="business"] .feature-icon {
  background: linear-gradient(135deg, #1b2256 0%, #2c3565 100%);
}

.expertise-card[data-category="business"]:hover {
  border-color: #1b2256;
}

.expertise-card[data-category="property"] .feature-icon {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.expertise-card[data-category="property"]:hover {
  border-color: #27ae60;
}

.expertise-card[data-category="investments"] .feature-icon {
  background: linear-gradient(135deg, #1473b6 0%, #3d8bc9 100%);
}

.expertise-card[data-category="investments"]:hover {
  border-color: #1473b6;
}

.expertise-card[data-category="personal"] .feature-icon {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.expertise-card[data-category="personal"]:hover {
  border-color: #6c757d;
}

/* Staggered animation entrance */
.expertise-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.expertise-card:nth-child(1) { animation-delay: 0.1s; }
.expertise-card:nth-child(2) { animation-delay: 0.2s; }
.expertise-card:nth-child(3) { animation-delay: 0.3s; }
.expertise-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for 3-card layout */
@media (max-width: 991px) {
  /* Below 991px, stack all cards vertically */
  #areas-of-expertise .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .expertise-card .card-body {
    padding: 1.5rem 1.25rem !important;
  }

  .expertise-card .feature-icon {
    width: 56px;
    height: 56px;
  }

  .expertise-card .card-title {
    font-size: 1.1rem;
  }
}

/* Maintain consistent horizontal padding proportions */
@media (max-width: 768px) {
  #areas-of-expertise .container {
    /* Override Bootstrap's default padding increase at small screens */
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }

  /* Ensure the header text maintains consistent relative width */
  #areas-of-expertise .col-lg-8 {
    max-width: 90%;
    flex: 0 0 90%;
  }
}

@media (max-width: 480px) {
  .expertise-card .card-body {
    padding: 1.25rem 1rem !important;
  }

  .expertise-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

/* Dropdown toggle - override Bootstrap's default arrow styling */
.nav-link.dropdown-toggle::after {
  border: none;
  background: none;
}

/* Dropdown menu styles */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.dropdown-item {
  color: var(--text-dark);
  padding: 0.625rem 1.25rem;
  transition: all 0.2s ease;
  position: relative;
}

.dropdown-item:hover {
  background-color: rgba(27, 34, 86, 0.08);
  color: var(--primary-color) !important;
}

.dropdown-item:active {
  background-color: rgba(27, 34, 86, 0.12);
  color: var(--primary-color) !important;
}

/* Active dropdown item - just underline, not full background */
.dropdown-item.active {
  background-color: transparent !important;
  color: var(--primary-color) !important;
  font-weight: 500;
  position: relative;
}

.dropdown-item.active::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: var(--secondary-color);
  border-radius: 1px;
}

/* Still show hover effect on active item */
.dropdown-item.active:hover {
  background-color: rgba(27, 34, 86, 0.08) !important;
}

/* Dropdown hover functionality for desktop */
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }

  .navbar .dropdown > .dropdown-toggle:active {
    pointer-events: none;
  }
}

/* Card list items - slightly smaller font for better fit */
.card .list-unstyled li {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Top info bar */
.top-info-bar {
  font-size: 0.875rem;
  background-color: #f8f9fa !important;
}

.top-info-bar a {
  transition: color 0.2s ease;
}

.top-info-bar a:hover {
  color: var(--primary-color) !important;
}

.top-info-bar i {
  font-size: 0.85rem;
  opacity: 0.8;
}


/* Mobile responsiveness for top bar */
@media (max-width: 576px) {
  .top-info-bar .d-flex {
    font-size: 0.8rem;
  }

  .top-info-bar .gap-3 {
    gap: 0.75rem !important;
  }
}
