/* 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);
}

/* System-Wide Full-Width Layout Scale Override */
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-4xl {
  max-width: 100% !important;
}

.max-w-3xl {
  max-width: 99% !important;
}

/* Compact & Professional Spatial System Overrides */
section.py-16,
section.py-24,
.py-16,
.py-24 {
  padding-top: 2.75rem !important;
  padding-bottom: 2.75rem !important;
}

section.py-12,
.py-12 {
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
}

.hero-glow-bg {
  padding-top: 2.5rem !important;
  padding-bottom: 3rem !important;
}

/* Compact Card & Container Padding */
.rounded-card {
  padding: 0.05rem !important;
}

/* Grid Gap Compact Tuning */
.gap-8 {
  gap: 1.25rem !important;
}

.gap-10,
.gap-12 {
  gap: 1.5rem !important;
}

.mb-12 {
  margin-bottom: 1.5rem !important;
}

.mb-8 {
  margin-bottom: 1.25rem !important;
}

.mt-20 {
  margin-top: 2.5rem !important;
}

/* Compact Footer Spacing */
footer {
  padding-top: 2.5rem !important;
  padding-bottom: 1.75rem !important;
}

footer .mt-12 {
  margin-top: 1.75rem !important;
  padding-top: 1rem !important;
}

/* Map Dark Mode via CSS Filters (Free, no API Key needed) */
.map-dark-mode .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}
.map-dark-mode {
  background-color: #111111 !important;
}



