@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-lao: 'Noto Sans Lao', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Mobile First & Responsive Touch Optimizations */
* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--font-lao);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Touch targets & Mobile UI comfort */
@media screen and (max-width: 640px) {
  h1 {
    line-height: 1.45 !important;
    letter-spacing: -0.01em;
  }
  h2 {
    line-height: 1.4 !important;
  }
  h3 {
    line-height: 1.4 !important;
  }
  p {
    line-height: 1.6 !important;
  }
  button, a {
    touch-action: manipulation;
  }
}

/* iOS Safe Area & Mobile sticky padding */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #sticky-mobile-bar {
    padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
  }
}

/* Ensure all images and media scale smoothly on mobile */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent auto-zoom on iOS inputs when focused (min 16px font-size) */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Lao Typography optimizations */
[lang="lo"] h1, 
[lang="lo"] h2, 
[lang="lo"] h3, 
[lang="lo"] h4, 
[lang="lo"] p, 
[lang="lo"] span, 
[lang="lo"] button, 
[lang="lo"] input, 
[lang="lo"] textarea {
  font-family: var(--font-lao);
  line-height: 1.6;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

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

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: #E2E8F0;
  height: 8px;
  border-radius: 9999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  background-color: #DC2626;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease-in-out;
}

input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  background-color: #991B1B;
}

/* Glow & Pulse Animation */
@keyframes cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }
}

.animate-cta-pulse {
  animation: cta-pulse 2.2s infinite;
}

@keyframes whatsapp-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

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

/* Before / After Slider Styling */
.before-after-wrapper {
  position: relative;
  overflow: hidden;
  user-select: none;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #FFFFFF;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 30;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.slider-handle::after {
  content: '◄►';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 2px solid #DC2626;
}

/* Subtle background patterns */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(220, 38, 38, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-dot-pattern {
  background-image: radial-gradient(rgba(220, 38, 38, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #8C1B20 0%, #DC2626 50%, #F59E0B 100%);
  z-index: 100;
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.6);
}

/* Back to Top Floating Button */
#back-to-top {
  position: fixed;
  bottom: 85px;
  right: 24px;
  z-index: 40;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 80px;
    right: 16px;
  }
}

/* Social Proof Notification Toast */
#social-proof-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 45;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

#social-proof-toast.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  #social-proof-toast {
    bottom: 75px;
    left: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
  }
}

/* Lightbox Modal */
#image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#image-lightbox.open {
  opacity: 1;
  visibility: visible;
}

#lightbox-content {
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#image-lightbox.open #lightbox-content {
  transform: scale(1);
}

/* Shimmer & Glow Effects */
.card-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.card-hover-effect {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(220, 38, 38, 0.1);
}

/* Ripple Pulse Animation for Hot Buttons */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 10%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
  transform: translate(-50%, -50%) scale(2);
  opacity: 1;
  transition: 0s;
}

/* ================= HERO SECTION ENHANCEMENTS ================= */
@keyframes heroBadgeFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes heroBadgeFloatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-badge-1 {
  animation: heroBadgeFloat 4s ease-in-out infinite;
}

.float-badge-2 {
  animation: heroBadgeFloatSlow 5s ease-in-out infinite 1s;
}

.float-badge-3 {
  animation: heroBadgeFloat 4.5s ease-in-out infinite 2s;
}

.bg-tech-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-ambient-glow {
  position: absolute;
  filter: blur(80px);
  pointer-events: none;
  border-radius: 9999px;
}

.hero-glass-feature {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-glass-feature:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-showcase-container {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 60px rgba(245, 158, 11, 0.15);
}
