/* Local Font Fallbacks & Core CSS System */
:root {
  --font-geist: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --color-primary: #1d4ed8;
  --color-primary-hover: #1e40af;
}

/* Smooth Scrolling & Rendering Engine Optimizations */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-geist);
  background-color: #ffffff;
  color: #0f172a;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Offscreen Content Visibility Optimization (Bỏ qua render thẻ chưa cuộn tới) */
footer,
.offscreen-render-opt {
  content-visibility: auto;
  contain-intrinsic-size: 1px 400px;
}

/* Progressive Image Lazy Loading Skeleton Placeholder */
img[loading="lazy"] {
  background-color: #f1f5f9;
  transition: opacity 0.3s ease-in-out;
}

/* Hardware Accelerated GPU Animation Utilities */
.gpu-accelerated,
.hero-slide,
#contact-speed-dial {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Subtle Hero Glow Effect (Only in hero section) */
.hero-glow-bg {
  position: relative;
  background: #ffffff;
}

.hero-glow-bg::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 750px;
  height: 450px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.12) 0%, rgba(29, 78, 216, 0.03) 45%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

/* Rounded Border Specs */
.rounded-control {
  border-radius: 9px;
}

.rounded-card {
  border-radius: 12px;
}

/* Leaflet Map custom fixes */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  font-family: var(--font-geist) !important;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  line-height: 1.5 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Ultra-Sleek & Minimal Scrollbar for Dropdown Popups */
.custom-dropdown-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}
.custom-dropdown-scrollbar::-webkit-scrollbar {
  width: 3.5px;
}
.custom-dropdown-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-dropdown-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
.custom-dropdown-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}
