/* Rounded corners for navbar across all pages (all sides) */
.navbar {
  border-radius: 12px;
  overflow: hidden;
}

.navbar .nav-links {
  border-radius: inherit;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 245, 245, 0.95);
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 1500;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: navbarFadeIn 0.8s ease-out;
  border-radius: 12px !important;
  overflow: hidden;
    
    /* Advanced Glow and Shadow */
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 1px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 0 50px rgba(0, 166, 81, 0.1);
    
    /* Animated Border */
    background: 
      linear-gradient(135deg, 
        rgba(245, 245, 245, 0.95) 0%,
        rgba(250, 250, 250, 0.98) 50%,
        rgba(245, 245, 245, 0.95) 100%);
    background-size: 200% 200%;
    animation: 
      navbarGlow 4s ease-in-out infinite,
      navbarFloat 6s ease-in-out infinite;
    
    /* Glass Morphism */
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

  /* Hide mobile hamburger by default on desktop; show via media query */
  .mobile-menu-toggle {
    display: none;
  }

/* Ensure mobile header row matches index across all pages */
.navbar-flex-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
}

@media (max-width: 900px) {
  .navbar-flex-mobile {
    width: 100%;
  }
}

.logo {
  height: 50px;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0; /* ensure left alignment, no auto-centering */
}

.contact-bar {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Keep navbar in a single row by reducing spacing on narrower screens */
@media (max-width: 1200px) {
  .nav-links { gap: 12px; }
  .nav-links a { padding: 8px 12px; font-size: 16px; }
  .language-toggle { padding: 6px 10px; font-size: 16px; }
}

@media (max-width: 1024px) {
  .nav-links { gap: 8px; }
  .nav-links a { padding: 6px 10px; font-size: 15px; }
  .language-toggle { padding: 6px 10px; font-size: 15px; }
}

/* Enhanced Nav Links Effects */
.nav-links a {
    position: relative;
    padding: 10px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
  font-size: 18px;
    letter-spacing: 1.2px;
    white-space: nowrap;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 !important;
    
    /* Enhanced Glass Effect */
    background: 
      linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 245, 245, 0.85) 100%);
    backdrop-filter: blur(15px) saturate(180%);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.08),
      inset 0 2px 0 rgba(255, 255, 255, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.3);
    
    /* 3D Transform */
    transform-style: preserve-3d;
    perspective: 1000px;
    
    /* Magnetic Effect */
    position: relative;
    overflow: hidden;
    
    /* Smooth Entrance Animation */
    animation: navLinkEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.nav-links a:nth-child(1) { animation-delay: 0.1s; }
.nav-links a:nth-child(2) { animation-delay: 0.2s; }
.nav-links a:nth-child(3) { animation-delay: 0.3s; }
.nav-links a:nth-child(4) { animation-delay: 0.4s; }

/* Admin Link Styling */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px) rotate(90deg);
}

.admin-link i {
    font-size: 18px;
}

.nav-links a:hover {
    /* Enhanced 3D Transform */
    transform: 
      translateY(-8px) 
      rotateX(-10deg) 
      rotateY(3deg) 
      scale(1.08);
    
    letter-spacing: 1.8px;
    color: #222;
    
    /* Magical Glow */
    box-shadow: 
      0 20px 60px rgba(0, 166, 81, 0.4),
      0 10px 30px rgba(0, 119, 255, 0.2),
      0 5px 15px rgba(0, 0, 0, 0.1),
      inset 0 2px 0 rgba(255, 255, 255, 0.9),
      0 0 0 2px rgba(0, 166, 81, 0.3),
      0 0 80px rgba(0, 166, 81, 0.3);
    
    /* Animated Background */
    background: 
      linear-gradient(135deg, 
        rgba(0, 166, 81, 0.15) 0%,
        rgba(0, 119, 255, 0.12) 30%,
        rgba(255, 152, 0, 0.08) 60%,
        rgba(138, 43, 226, 0.1) 100%);
    background-size: 300% 300%;
    animation: magicalGradient 2s ease infinite;
}

/* Magical Shimmer Effect */
.nav-links a::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: 
    linear-gradient(
      45deg,
      transparent 25%,
      rgba(255, 255, 255, 0.8) 40%,
      rgba(0, 166, 81, 0.3) 50%,
      rgba(255, 255, 255, 0.8) 60%,
      transparent 75%
    );
  transform: translateX(-200%) translateY(-200%) rotate(45deg);
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
}

.nav-links a:hover::after {
  transform: translateX(200%) translateY(200%) rotate(45deg);
  opacity: 1;
}

/* Floating Orb Effect */
.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: 
      linear-gradient(90deg, 
        transparent 0%,
        #00A651 25%,
        #0077ff 50%,
        #ff9800 75%,
        transparent 100%);
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
    border-radius: 0;
    filter: blur(0.5px);
}

/* Globe Animation */
.language-toggle {
    background: linear-gradient(45deg, #00A651, #0077ff);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Prompt', sans-serif;
  font-size: 18px;
    transition: all 0.3s ease;
    
    /* Enhanced Gradient */
    background: 
      linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
    background-size: 400% 400%;
    animation: 
      languageGradient 3s ease infinite,
      languageFloat 2s ease-in-out infinite;
    
    /* Glass Effect */
    backdrop-filter: blur(10px);
    box-shadow: 
      0 8px 25px rgba(0, 166, 81, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
    
    /* 3D Effect */
    transform-style: preserve-3d;
}

.language-toggle i {
  font-size: 18px;
}

.language-toggle:hover {
    transform: translateY(-2px);
    
    /* Enhanced Hover */
    transform: 
      translateY(-5px) 
      rotateX(-10deg) 
      rotateY(5deg) 
      scale(1.1);
    box-shadow: 
      0 15px 35px rgba(0, 166, 81, 0.4),
      0 5px 15px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: 
      languageGradient 3s ease infinite,
      buttonPulse 0.6s ease;
}

.rotate-animation {
    animation: rotateButton 0.5s ease;
}

@keyframes rotateButton {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateGlobe {
    from {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    to {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes globeSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes globeSpinHover {
    0% {
        transform: rotate(0deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1.3);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}

/* Active Link Style */
.nav-links a.active {
    background: linear-gradient(120deg, 
        rgba(0, 166, 81, 0.15), 
        rgba(0, 119, 255, 0.15));
    color: #00A651;
    font-weight: 600;
}

/* Enhanced Link Entrance Animation */
.nav-links a {
  animation: linkEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
  opacity: 0;
  transform: translateY(30px) scale(0.8);
}

.nav-links a:nth-child(1) { --index: 1; }
.nav-links a:nth-child(2) { --index: 2; }
.nav-links a:nth-child(3) { --index: 3; }
.nav-links a:nth-child(4) { --index: 4; }
.nav-links a:nth-child(5) { --index: 5; }

@keyframes linkEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotateX(-90deg);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(1.05) rotateX(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

/* Magical Floating Orb Effect */
.nav-links a::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #00A651, #0077ff);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(0, 166, 81, 0.8);
  animation: orbFloat 3s ease-in-out infinite;
}

.nav-links a:hover::before {
  opacity: 1;
  transform: scale(1);
  animation: orbGlow 1s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { 
    transform: translateX(0) translateY(0) scale(0.8);
    box-shadow: 0 0 15px rgba(0, 166, 81, 0.6);
  }
  25% { 
    transform: translateX(100px) translateY(-5px) scale(1);
    box-shadow: 0 0 25px rgba(0, 119, 255, 0.8);
  }
  50% { 
    transform: translateX(200px) translateY(0) scale(0.9);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.7);
  }
  75% { 
    transform: translateX(150px) translateY(5px) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 166, 81, 0.9);
  }
}

@keyframes orbGlow {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.8);
  }
  50% { 
    transform: scale(1.5);
    box-shadow: 0 0 40px rgba(0, 119, 255, 1);
  }
}

/* Enhanced Link Hover Animation */
.nav-links a:hover {
  animation: 
    linkMagic 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    linkFloat 2s ease-in-out infinite;
}

@keyframes linkMagic {
  0% {
    transform: translateY(-3px) rotateX(-5deg) rotateY(2deg) scale(1.05);
  }
  25% {
    transform: translateY(-8px) rotateX(-10deg) rotateY(5deg) scale(1.1);
  }
  50% {
    transform: translateY(-5px) rotateX(-3deg) rotateY(-2deg) scale(1.08);
  }
  75% {
    transform: translateY(-7px) rotateX(-7deg) rotateY(3deg) scale(1.12);
  }
  100% {
    transform: translateY(-6px) rotateX(-5deg) rotateY(2deg) scale(1.1);
  }
}

@keyframes linkFloat {
  0%, 100% { 
    transform: translateY(-6px) rotateX(-5deg) rotateY(2deg) scale(1.1);
  }
  50% { 
    transform: translateY(-10px) rotateX(-8deg) rotateY(4deg) scale(1.12);
  }
}

/* Contact Items Enhancement */
.contact-item {
    font-family: 'Prompt', sans-serif;
    letter-spacing: 0.8px;
    padding: 8px 15px;
    transition: all 0.4s ease;
    background: #00A651;
    opacity: 0.5;
}

/* หมุนไอคอนโลกเมื่อ hover หรือ active */
.language-toggle i.fa-globe {
    transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.language-toggle:hover i.fa-globe,
.language-toggle:focus i.fa-globe,
.language-toggle.active i.fa-globe {
    animation: globeSpin 0.7s linear;
}

/* ===== ADVANCED NAVBAR EFFECTS ===== */

/* Navbar Enhanced Effects */
.navbar {
  /* Enhanced Glow and Shadow */
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 1px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 50px rgba(0, 166, 81, 0.1);
  
  /* Animated Background */
  background: 
    linear-gradient(135deg, 
      rgba(245, 245, 245, 0.95) 0%,
      rgba(250, 250, 250, 0.98) 50%,
      rgba(245, 245, 245, 0.95) 100%);
  background-size: 200% 200%;
  animation: 
    navbarGlow 4s ease-in-out infinite,
    navbarFloat 6s ease-in-out infinite;
  
  /* Glass Morphism */
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Advanced Nav Links Effects */
.nav-links a {
  /* Enhanced Glass Effect */
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.9) 0%,
      rgba(245, 245, 245, 0.8) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 166, 81, 0.05);
  
  /* 3D Transform */
  transform-style: preserve-3d;
  perspective: 1000px;
  overflow: hidden;
}

/* Shimmer Effect */
.nav-links a::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s;
}

.nav-links a:hover::after {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Enhanced Language Toggle */
.language-toggle {
  background: 
    linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
  background-size: 400% 400%;
  animation: 
    languageGradient 3s ease infinite,
    languageFloat 2s ease-in-out infinite;
  
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 25px rgba(0, 166, 81, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform-style: preserve-3d;
}

/* Keyframe Animations */
@keyframes navbarGlow {
  0%, 100% { 
    background-position: 0% 50%;
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 0 50px rgba(0, 166, 81, 0.1);
  }
  50% { 
    background-position: 100% 50%;
    box-shadow: 
      0 15px 40px rgba(0, 0, 0, 0.15),
      0 0 70px rgba(0, 119, 255, 0.15);
  }
}

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

@keyframes languageGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes languageFloat {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-3px) rotateZ(1deg); }
}

/* ===== RESPONSIVE DESIGN FOR NAVBAR ===== */

/* Large screens (1400px and up) */
@media (min-width: 1400px) {
  .navbar {
    padding: 25px 30px;
  }
  .nav-links {
    gap: 25px;
  }
  .nav-links a {
    padding: 12px 24px;
    font-size: 16px;
  }
  .language-toggle {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
  .navbar {
    padding: 22px 25px;
  }
  .nav-links {
    gap: 22px;
  }
  .nav-links a {
    padding: 11px 22px;
    font-size: 15px;
  }
  .language-toggle {
    padding: 9px 18px;
    font-size: 15px;
  }
}

/* Medium Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .navbar {
    padding: 20px 20px;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    padding: 10px 18px;
    font-size: 14px;
    letter-spacing: 1px;
  }
  .language-toggle {
    padding: 8px 16px;
    font-size: 14px;
  }
  .logo {
    height: 45px;
  }
}

/* Large Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .navbar {
    padding: 18px 15px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
  }
  
  .logo {
    height: 42px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 15px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 50px;
    height: 50px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
  }
}

/* Tablet (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  .navbar {
    padding: 15px 10px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 38px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 50px;
    height: 50px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 70px 15px 30px 15px;
  }
  
  .nav-links.mobile-menu a {
    width: 120px;
    height: 120px;
    font-size: 11px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 24px;
    margin-bottom: 6px;
  }
}

/* Mobile Large (481px - 575px) */
@media (max-width: 575px) and (min-width: 481px) {
  .navbar {
    padding: 12px 8px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 35px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 48px;
    height: 48px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 20px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 65px 12px 25px 12px;
  }
  
  .nav-links.mobile-menu a {
    width: 110px;
    height: 110px;
    font-size: 10px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 22px;
    margin-bottom: 5px;
  }
}

/* Mobile Medium (361px - 480px) */
@media (max-width: 480px) and (min-width: 361px) {
  .navbar {
    padding: 10px 5px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 32px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 8px;
  }
  
  .language-toggle i {
    font-size: 12px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 45px;
    height: 45px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 18px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 60px 10px 20px 10px;
  }
  
  .nav-links.mobile-menu a {
    width: 100px;
    height: 100px;
    font-size: 9px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 20px;
    margin-bottom: 4px;
  }
  
  .mobile-language-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 15px;
    margin-top: 10px;
    background: linear-gradient(45deg, #00A651, #0077ff);
    color: white;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    transition: all 0.3s ease;
  }
  
  .mobile-language-toggle:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #0077ff, #00A651);
  }
}

/* Mobile Small (≤360px) */
@media (max-width: 360px) {
  .navbar {
    padding: 8px 3px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 28px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 4px 6px;
    font-size: 9px;
    border-radius: 6px;
  }
  
  .language-toggle i {
    font-size: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 42px;
    height: 42px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 16px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 55px 8px 15px 8px;
  }
  
  .nav-links.mobile-menu a {
    width: 90px;
    height: 90px;
    font-size: 8px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 18px;
    margin-bottom: 3px;
  }
  
  .mobile-menu-close {
    width: 40px;
    height: 40px;
    font-size: 16px;
    top: 20px;
    right: 20px;
  }
}

/* ===== MOBILE LANGUAGE TOGGLE ===== */

/* Mobile Language Section */
.mobile-language-section {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Mobile Language Toggle Button */
.mobile-language-toggle {
  background: linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
  background-size: 400% 400%;
  animation: languageGradient 3s ease infinite;
  
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Prompt', sans-serif;
  font-size: 18px;
  font-weight: 600;
  
  /* Glass Effect */
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 166, 81, 0.4),
    inset 0 2px 15px rgba(255, 255, 255, 0.2);
  
  /* 3D Effect */
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border for better visibility */
  border: 2px solid rgba(255, 255, 255, 0.3);
  
  /* Animation entrance */
  transform: translateY(30px);
  opacity: 0;
  animation: 
    mobileLanguageEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards,
    languageGradient 3s ease infinite;
}

.mobile-language-toggle i {
  font-size: 20px;
  transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.mobile-language-toggle:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 15px 40px rgba(0, 166, 81, 0.6),
    inset 0 2px 20px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.mobile-language-toggle:hover i.fa-globe {
  animation: globeSpin 0.7s linear;
}

.mobile-language-toggle:active {
  transform: translateY(-2px) scale(1.02);
}

/* Mobile Language Text */
.mobile-lang-text {
  font-weight: bold;
  letter-spacing: 1px;
}

/* Mobile Language Entrance Animation */
@keyframes mobileLanguageEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Menu Navigation Links - Updated to work with language toggle */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20010; /* above navbar which is 1500 */
  backdrop-filter: blur(5px);
}
.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  z-index: 20011; /* above navbar */
  overflow-y: auto;
  transition: right 0.3s ease-in-out;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}
@media (max-width: 360px) {
  .mobile-language-toggle {
    padding: 10px 20px;
    font-size: 14px;
    gap: 8px;
  }
  
  .mobile-language-toggle i {
    font-size: 16px;
  }
  
  .mobile-language-section {
    margin-top: 20px;
  }
}

/* ===== MOBILE SPECIFIC OPTIMIZATIONS ===== */

/* Hide complex animations on mobile for better performance */
@media (max-width: 768px) {
  .navbar {
    animation: none;
    backdrop-filter: blur(10px);
  }
  
  .nav-links a {
    animation: none !important;
    backdrop-filter: blur(5px);
  }
  
  .nav-links a::after {
    display: none;
  }
  
  .language-toggle {
    animation: languageFloat 2s ease-in-out infinite;
  }
}

/* Ensure proper touch targets on mobile */
@media (max-width: 575px) {
  .nav-links a,
  .language-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Ultra-wide screens optimization */
@media (min-width: 1920px) {
  .navbar {
    padding: 30px 40px;
    max-width: none;
    margin: 0;
  }
  .nav-links {
    gap: 30px;
  }
  .nav-links a {
    padding: 15px 30px;
    font-size: 18px;
  }
  .language-toggle {
    padding: 12px 24px;
    font-size: 18px;
  }
}

/* เพิ่มเติมสำหรับ mobile toggle system */
.nav-links a:hover::before {
    transform: scaleX(1);
    filter: blur(0px);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: linear-gradient(135deg, 
    rgba(0, 166, 81, 0.95), 
    rgba(0, 119, 255, 0.95));
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 
    0 8px 32px rgba(0, 166, 81, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: toggleBounce 2s ease-in-out infinite;
}

.mobile-nav-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 12px 40px rgba(0, 166, 81, 0.6),
    inset 0 2px 15px rgba(255, 255, 255, 0.3);
  animation: toggleGlow 1s ease-in-out infinite;
}

.mobile-nav-toggle:active {
  transform: scale(0.95) rotate(-2deg);
}

/* Toggle Button Icon */
.mobile-nav-toggle::before,
.mobile-nav-toggle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-toggle::before {
  transform: translate(-50%, -8px);
  box-shadow: 0 8px 0 white, 0 16px 0 white;
}

.mobile-nav-toggle::after {
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* Toggle Button Active State */
.mobile-nav-toggle.active::before {
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: none;
}

.mobile-nav-toggle.active::after {
  transform: translate(-50%, -50%) rotate(-45deg);
  opacity: 1;
}

/* Toggle Button Animations */
@keyframes toggleBounce {
  0%, 100% { 
    transform: scale(1) translateY(0);
  }
  50% { 
    transform: scale(1.05) translateY(-2px);
  }
}

@keyframes toggleGlow {
  0%, 100% { 
    box-shadow: 
      0 12px 40px rgba(0, 166, 81, 0.6),
      inset 0 2px 15px rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 
      0 16px 50px rgba(0, 119, 255, 0.8),
      inset 0 2px 20px rgba(255, 255, 255, 0.4);
  }
}

/* Mobile Menu Overlay */
.nav-links.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg,
    rgba(0, 0, 0, 0.95),
    rgba(0, 166, 81, 0.1),
    rgba(0, 119, 255, 0.1));
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  grid-template-columns: none !important;
  padding: 60px 20px;
}

.nav-links.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

/* Mobile Menu Links */
.nav-links.mobile-menu a {
  font-size: 2rem !important;
  font-weight: bold;
  text-align: center;
  margin: 0;
  padding: 20px 40px !important;
  border-radius: 20px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.1),
    rgba(0, 166, 81, 0.2)) !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: none !important;
  width: 280px;
  max-width: 80vw;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 2px 10px rgba(255, 255, 255, 0.1) !important;
}

.nav-links.mobile-menu.active a {
  transform: translateY(0);
  opacity: 1;
  animation: mobileSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--mobile-index, 0) * 0.1s);
}

.nav-links.mobile-menu a:nth-child(1) { --mobile-index: 1; }
.nav-links.mobile-menu a:nth-child(2) { --mobile-index: 2; }
.nav-links.mobile-menu a:nth-child(3) { --mobile-index: 3; }
.nav-links.mobile-menu a:nth-child(4) { --mobile-index: 4; }
.nav-links.mobile-menu a:nth-child(5) { --mobile-index: 5; }

.nav-links.mobile-menu a:hover {
  background: linear-gradient(135deg,
    rgba(0, 166, 81, 0.3),
    rgba(0, 119, 255, 0.3)) !important;
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05) translateY(-5px);
  box-shadow: 
    0 15px 40px rgba(0, 166, 81, 0.4),
    inset 0 2px 15px rgba(255, 255, 255, 0.2) !important;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(90deg);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Mobile Menu Animations */
@keyframes mobileSlideIn {
  0% {
    transform: translateY(50px) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateY(-10px) scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Enhanced Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  /* Hide nav-links on mobile */
  .navbar .nav-links {
    display: none !important;
  }
}

/* Ensure the mobile hamburger appears inside the top navbar and is styled */
@media (max-width: 768px) {
  .navbar {
    position: relative;
    padding-right: 70px; /* room for the hamburger */
  }

  /* Prefer the existing mobile toggle button but when placed inside .navbar use this styling */
  .navbar .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00A651, #0077ff);
    color: #ffffff;
    border: none;
    font-size: 18px;
    box-shadow: 0 8px 25px rgba(0, 166, 81, 0.25);
    cursor: pointer;
  }

  /* Make sure the icon inside is centered and visible */
  .navbar .mobile-menu-toggle i {
    font-size: 20px;
    line-height: 1;
  }

  /* If there is a floating mobile-menu-toggle elsewhere, keep it usable but less prominent */
  .mobile-menu-toggle { right: 12px; top: 12px; }
}

/* CSS Hamburger (3 lines) inside the mobile toggle button */
.hamburger {
  display: block;
  position: relative;
  width: 22px;
  height: 16px;
}
.hamburger, .hamburger::before, .hamburger::after {
  box-sizing: border-box;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.hamburger::before { top: 0; }
.hamburger::after { bottom: 0; }
.hamburger { background: white; height: 3px; top: 50%; transform: translateY(-50%); border-radius: 2px; transition: background 0.28s ease, opacity 0.28s ease; }

/* Active state -> morph to X */
.mobile-menu-toggle.active .hamburger { background: transparent; }
.mobile-menu-toggle.active .hamburger::before { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active .hamburger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 480px) {
  .mobile-nav-toggle {
    width: 55px;
    height: 55px;
    top: 15px;
    right: 15px;
  }
  
  .nav-links.mobile-menu a {
    font-size: 1.8rem !important;
    padding: 18px 35px !important;
    width: 260px;
  }
  
  .mobile-menu-close {
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

/* ===== SIMPLIFIED NAVBAR BUTTONS (flat style) ===== */
/* Removes neumorphic "raised" look + rounded pills, unifies language button, and keeps text dark */
.navbar {
  --kps-nav-btn-bg: rgba(255, 255, 255, 0.92);
  --kps-nav-btn-bg-hover: rgba(245, 245, 245, 0.96);
  --kps-nav-btn-border: rgba(0, 0, 0, 0.18);
  --kps-nav-btn-border-hover: rgba(0, 0, 0, 0.28);
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.75);
}

.navbar .nav-links a,
.navbar .language-toggle {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  gap: 8px;

  color: var(--kps-nav-btn-text) !important;
  background: var(--kps-nav-btn-bg) !important;
  border: 1px solid var(--kps-nav-btn-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  text-shadow: none !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  animation: kpsNavBtnIn 260ms ease-out both;
  backdrop-filter: none !important;
  letter-spacing: 0.6px !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

/* Subtle underline effect (not flashy) */
.navbar .nav-links a::after,
.navbar .language-toggle::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--kps-nav-accent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0.7;
  transition: transform 180ms ease, opacity 180ms ease;
  pointer-events: none;
}

.navbar .nav-links a:hover,
.navbar .language-toggle:hover {
  color: var(--kps-nav-btn-text) !important;
  background: var(--kps-nav-btn-bg-hover) !important;
  border-color: var(--kps-nav-btn-border-hover) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
  animation: none !important;
}

.navbar .nav-links a:hover::after,
.navbar .language-toggle:hover::after {
  transform: scaleX(1);
  opacity: 0.85;
}

.navbar .nav-links a:active,
.navbar .language-toggle:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

.navbar .nav-links a.active {
  background: rgba(235, 235, 235, 0.96) !important;
  border-color: rgba(0, 0, 0, 0.26) !important;
  color: var(--kps-nav-btn-text) !important;
}

.navbar .nav-links a.active::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.navbar .nav-links a:focus-visible,
.navbar .language-toggle:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.25);
  outline-offset: 3px;
}

/* Language button: remove gradient/float/globe spin/pulse */
.navbar .language-toggle {
  gap: 8px;
}

.navbar .language-toggle i,
.navbar .language-toggle i.fa-globe,
.navbar .language-toggle:hover i.fa-globe,
.navbar .language-toggle:focus i.fa-globe,
.navbar .language-toggle.active i.fa-globe {
  animation: none !important;
  transform: none !important;
}

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

/* ===== ALTERNATIVE NAVBAR THEME ===== */
/* Enable by adding class: <nav class="navbar kps-navbar--alt"> */
.navbar.kps-navbar--alt {
  --kps-nav-btn-bg: transparent;
  --kps-nav-btn-bg-hover: rgba(0, 166, 81, 0.08);
  --kps-nav-btn-border: rgba(17, 17, 17, 0.22);
  --kps-nav-btn-border-hover: rgba(0, 166, 81, 0.70);
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.9);

  /* Keep navbar itself clean */
  animation: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.navbar.kps-navbar--alt .nav-links a,
.navbar.kps-navbar--alt .language-toggle {
  border-radius: 999px !important;
  background: var(--kps-nav-btn-bg) !important;
  box-shadow: none !important;
  padding: 10px 16px;
  letter-spacing: 0.7px !important;
}

.navbar.kps-navbar--alt .nav-links a::after,
.navbar.kps-navbar--alt .language-toggle::after {
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  opacity: 0.0;
}

.navbar.kps-navbar--alt .nav-links a:hover::after,
.navbar.kps-navbar--alt .language-toggle:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.navbar.kps-navbar--alt .nav-links a:hover,
.navbar.kps-navbar--alt .language-toggle:hover {
  background: var(--kps-nav-btn-bg-hover) !important;
  border-color: var(--kps-nav-btn-border-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10) !important;
}

.navbar.kps-navbar--alt .nav-links a.active {
  background: rgba(0, 166, 81, 0.92) !important;
  border-color: rgba(0, 166, 81, 0.92) !important;
  color: #ffffff !important;
}

.navbar.kps-navbar--alt .nav-links a.active::after {
  display: none;
}

.navbar.kps-navbar--alt .language-toggle {
  /* Keep language button same weight as others */
  font-weight: 700 !important;
}

@media (prefers-reduced-motion: reduce) {
  .navbar.kps-navbar--alt .nav-links a,
  .navbar.kps-navbar--alt .language-toggle {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile menu pills (optional): keep readable and less rounded */
.nav-links.mobile-menu a {
  border-radius: 0 !important;
}

/* ===== BLENDED NAVBAR THEME (no buttons) ===== */
/* Enable by adding class: <nav class="navbar kps-navbar--blend"> */
.navbar.kps-navbar--blend {
  --kps-nav-btn-bg: transparent;
  --kps-nav-btn-bg-hover: transparent;
  --kps-nav-btn-border: transparent;
  --kps-nav-btn-border-hover: transparent;
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.95);

  animation: none !important;
  background: rgba(245, 245, 245, 0.92) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.navbar.kps-navbar--blend .nav-links {
  gap: 26px;
}

.navbar.kps-navbar--blend .nav-links a,
.navbar.kps-navbar--blend .language-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: 8px 6px;
  min-height: auto;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
}

.navbar.kps-navbar--blend .nav-links a::after,
.navbar.kps-navbar--blend .language-toggle::after {
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  opacity: 0.0;
  transform: scaleX(0);
}

.navbar.kps-navbar--blend .nav-links a:hover,
.navbar.kps-navbar--blend .language-toggle:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

.navbar.kps-navbar--blend .nav-links a:hover::after,
.navbar.kps-navbar--blend .language-toggle:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar.kps-navbar--blend .nav-links a.active {
  background: transparent !important;
  border: none !important;
  color: #111111 !important;
}

.navbar.kps-navbar--blend .nav-links a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar.kps-navbar--blend .nav-links a:focus-visible,
.navbar.kps-navbar--blend .language-toggle:focus-visible {
  outline: 2px solid rgba(0, 166, 81, 0.35);
  outline-offset: 4px;
}

@media (max-width: 991px) {
  .navbar.kps-navbar--blend .nav-links {
    gap: 18px;
  }
}

/* Fix clipped logo/text/icons in navbar on all pages */
.navbar {
  height: auto;
  min-height: 64px;
  overflow: visible;
}

.navbar-flex-mobile,
.navbar .nav-links {
  align-items: center;
}

.navbar .logo,
.navbar img.logo {
  display: block;
}

@media (max-width: 768px) {
  .navbar {
    min-height: 56px;
  }
}

/* Shop page: make only the desktop language label text gray */
.navbar .language-toggle #lang-label {
  color: #6b7280 !important;
}

/* ===== LINE Icon Image Override (Global) ===== */
/* Replace Font Awesome LINE glyphs with the site image everywhere */
.fa-line::before { content: ''; }
.fa-line {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: center / contain no-repeat url('../image/Logo_for_navbar/line.png') !important;
  vertical-align: middle;
  border-radius: 50%;
}

/* Common contexts where icons are larger; keep image crisp */
.bulk-contact__btn .fa-line { width: 1em; height: 1em; }
.kps-quick-cta .fa-line { width: 1.2em; height: 1.2em; }

/* Rounded corners for navbar across all pages (all sides) */
.navbar {
  border-radius: 12px;
  overflow: hidden;
}

.navbar .nav-links {
  border-radius: inherit;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 245, 245, 0.95);
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 1500;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: navbarFadeIn 0.8s ease-out;
  border-radius: 12px !important;
  overflow: hidden;
    
    /* Advanced Glow and Shadow */
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 1px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 0 50px rgba(0, 166, 81, 0.1);
    
    /* Animated Border */
    background: 
      linear-gradient(135deg, 
        rgba(245, 245, 245, 0.95) 0%,
        rgba(250, 250, 250, 0.98) 50%,
        rgba(245, 245, 245, 0.95) 100%);
    background-size: 200% 200%;
    animation: 
      navbarGlow 4s ease-in-out infinite,
      navbarFloat 6s ease-in-out infinite;
    
    /* Glass Morphism */
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

  /* Hide mobile hamburger by default on desktop; show via media query */
  .mobile-menu-toggle {
    display: none;
  }

/* Ensure mobile header row matches index across all pages */
.navbar-flex-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
}

@media (max-width: 900px) {
  .navbar-flex-mobile {
    width: 100%;
  }
}

.logo {
  height: 50px;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0; /* ensure left alignment, no auto-centering */
}

.contact-bar {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Keep navbar in a single row by reducing spacing on narrower screens */
@media (max-width: 1200px) {
  .nav-links { gap: 12px; }
  .nav-links a { padding: 8px 12px; font-size: 16px; }
  .language-toggle { padding: 6px 10px; font-size: 16px; }
}

@media (max-width: 1024px) {
  .nav-links { gap: 8px; }
  .nav-links a { padding: 6px 10px; font-size: 15px; }
  .language-toggle { padding: 6px 10px; font-size: 15px; }
}

/* Enhanced Nav Links Effects */
.nav-links a {
    position: relative;
    padding: 10px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
  font-size: 18px;
    letter-spacing: 1.2px;
    white-space: nowrap;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 !important;
    
    /* Enhanced Glass Effect */
    background: 
      linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 245, 245, 0.85) 100%);
    backdrop-filter: blur(15px) saturate(180%);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.08),
      inset 0 2px 0 rgba(255, 255, 255, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.3);
    
    /* 3D Transform */
    transform-style: preserve-3d;
    perspective: 1000px;
    
    /* Magnetic Effect */
    position: relative;
    overflow: hidden;
    
    /* Smooth Entrance Animation */
    animation: navLinkEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.nav-links a:nth-child(1) { animation-delay: 0.1s; }
.nav-links a:nth-child(2) { animation-delay: 0.2s; }
.nav-links a:nth-child(3) { animation-delay: 0.3s; }
.nav-links a:nth-child(4) { animation-delay: 0.4s; }

/* Admin Link Styling */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px) rotate(90deg);
}

.admin-link i {
    font-size: 18px;
}

.nav-links a:hover {
    /* Enhanced 3D Transform */
    transform: 
      translateY(-8px) 
      rotateX(-10deg) 
      rotateY(3deg) 
      scale(1.08);
    
    letter-spacing: 1.8px;
    color: #222;
    
    /* Magical Glow */
    box-shadow: 
      0 20px 60px rgba(0, 166, 81, 0.4),
      0 10px 30px rgba(0, 119, 255, 0.2),
      0 5px 15px rgba(0, 0, 0, 0.1),
      inset 0 2px 0 rgba(255, 255, 255, 0.9),
      0 0 0 2px rgba(0, 166, 81, 0.3),
      0 0 80px rgba(0, 166, 81, 0.3);
    
    /* Animated Background */
    background: 
      linear-gradient(135deg, 
        rgba(0, 166, 81, 0.15) 0%,
        rgba(0, 119, 255, 0.12) 30%,
        rgba(255, 152, 0, 0.08) 60%,
        rgba(138, 43, 226, 0.1) 100%);
    background-size: 300% 300%;
    animation: magicalGradient 2s ease infinite;
}

/* Magical Shimmer Effect */
.nav-links a::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: 
    linear-gradient(
      45deg,
      transparent 25%,
      rgba(255, 255, 255, 0.8) 40%,
      rgba(0, 166, 81, 0.3) 50%,
      rgba(255, 255, 255, 0.8) 60%,
      transparent 75%
    );
  transform: translateX(-200%) translateY(-200%) rotate(45deg);
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
}

.nav-links a:hover::after {
  transform: translateX(200%) translateY(200%) rotate(45deg);
  opacity: 1;
}

/* Floating Orb Effect */
.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: 
      linear-gradient(90deg, 
        transparent 0%,
        #00A651 25%,
        #0077ff 50%,
        #ff9800 75%,
        transparent 100%);
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
    border-radius: 0;
    filter: blur(0.5px);
}

/* Globe Animation */
.language-toggle {
    background: linear-gradient(45deg, #00A651, #0077ff);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Prompt', sans-serif;
  font-size: 18px;
    transition: all 0.3s ease;
    
    /* Enhanced Gradient */
    background: 
      linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
    background-size: 400% 400%;
    animation: 
      languageGradient 3s ease infinite,
      languageFloat 2s ease-in-out infinite;
    
    /* Glass Effect */
    backdrop-filter: blur(10px);
    box-shadow: 
      0 8px 25px rgba(0, 166, 81, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
    
    /* 3D Effect */
    transform-style: preserve-3d;
}

.language-toggle i {
  font-size: 18px;
}

.language-toggle:hover {
    transform: translateY(-2px);
    
    /* Enhanced Hover */
    transform: 
      translateY(-5px) 
      rotateX(-10deg) 
      rotateY(5deg) 
      scale(1.1);
    box-shadow: 
      0 15px 35px rgba(0, 166, 81, 0.4),
      0 5px 15px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: 
      languageGradient 3s ease infinite,
      buttonPulse 0.6s ease;
}

.rotate-animation {
    animation: rotateButton 0.5s ease;
}

@keyframes rotateButton {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateGlobe {
    from {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    to {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes globeSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes globeSpinHover {
    0% {
        transform: rotate(0deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1.3);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}

/* Active Link Style */
.nav-links a.active {
    background: linear-gradient(120deg, 
        rgba(0, 166, 81, 0.15), 
        rgba(0, 119, 255, 0.15));
    color: #00A651;
    font-weight: 600;
}

/* Enhanced Link Entrance Animation */
.nav-links a {
  animation: linkEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
  opacity: 0;
  transform: translateY(30px) scale(0.8);
}

.nav-links a:nth-child(1) { --index: 1; }
.nav-links a:nth-child(2) { --index: 2; }
.nav-links a:nth-child(3) { --index: 3; }
.nav-links a:nth-child(4) { --index: 4; }
.nav-links a:nth-child(5) { --index: 5; }

@keyframes linkEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotateX(-90deg);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(1.05) rotateX(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

/* Magical Floating Orb Effect */
.nav-links a::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #00A651, #0077ff);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(0, 166, 81, 0.8);
  animation: orbFloat 3s ease-in-out infinite;
}

.nav-links a:hover::before {
  opacity: 1;
  transform: scale(1);
  animation: orbGlow 1s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { 
    transform: translateX(0) translateY(0) scale(0.8);
    box-shadow: 0 0 15px rgba(0, 166, 81, 0.6);
  }
  25% { 
    transform: translateX(100px) translateY(-5px) scale(1);
    box-shadow: 0 0 25px rgba(0, 119, 255, 0.8);
  }
  50% { 
    transform: translateX(200px) translateY(0) scale(0.9);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.7);
  }
  75% { 
    transform: translateX(150px) translateY(5px) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 166, 81, 0.9);
  }
}

@keyframes orbGlow {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.8);
  }
  50% { 
    transform: scale(1.5);
    box-shadow: 0 0 40px rgba(0, 119, 255, 1);
  }
}

/* Enhanced Link Hover Animation */
.nav-links a:hover {
  animation: 
    linkMagic 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    linkFloat 2s ease-in-out infinite;
}

@keyframes linkMagic {
  0% {
    transform: translateY(-3px) rotateX(-5deg) rotateY(2deg) scale(1.05);
  }
  25% {
    transform: translateY(-8px) rotateX(-10deg) rotateY(5deg) scale(1.1);
  }
  50% {
    transform: translateY(-5px) rotateX(-3deg) rotateY(-2deg) scale(1.08);
  }
  75% {
    transform: translateY(-7px) rotateX(-7deg) rotateY(3deg) scale(1.12);
  }
  100% {
    transform: translateY(-6px) rotateX(-5deg) rotateY(2deg) scale(1.1);
  }
}

@keyframes linkFloat {
  0%, 100% { 
    transform: translateY(-6px) rotateX(-5deg) rotateY(2deg) scale(1.1);
  }
  50% { 
    transform: translateY(-10px) rotateX(-8deg) rotateY(4deg) scale(1.12);
  }
}

/* Contact Items Enhancement */
.contact-item {
    font-family: 'Prompt', sans-serif;
    letter-spacing: 0.8px;
    padding: 8px 15px;
    transition: all 0.4s ease;
    background: #00A651;
    opacity: 0.5;
}

/* หมุนไอคอนโลกเมื่อ hover หรือ active */
.language-toggle i.fa-globe {
    transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.language-toggle:hover i.fa-globe,
.language-toggle:focus i.fa-globe,
.language-toggle.active i.fa-globe {
    animation: globeSpin 0.7s linear;
}

/* ===== ADVANCED NAVBAR EFFECTS ===== */

/* Navbar Enhanced Effects */
.navbar {
  /* Enhanced Glow and Shadow */
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 1px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 50px rgba(0, 166, 81, 0.1);
  
  /* Animated Background */
  background: 
    linear-gradient(135deg, 
      rgba(245, 245, 245, 0.95) 0%,
      rgba(250, 250, 250, 0.98) 50%,
      rgba(245, 245, 245, 0.95) 100%);
  background-size: 200% 200%;
  animation: 
    navbarGlow 4s ease-in-out infinite,
    navbarFloat 6s ease-in-out infinite;
  
  /* Glass Morphism */
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Advanced Nav Links Effects */
.nav-links a {
  /* Enhanced Glass Effect */
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.9) 0%,
      rgba(245, 245, 245, 0.8) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 166, 81, 0.05);
  
  /* 3D Transform */
  transform-style: preserve-3d;
  perspective: 1000px;
  overflow: hidden;
}

/* Shimmer Effect */
.nav-links a::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s;
}

.nav-links a:hover::after {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Enhanced Language Toggle */
.language-toggle {
  background: 
    linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
  background-size: 400% 400%;
  animation: 
    languageGradient 3s ease infinite,
    languageFloat 2s ease-in-out infinite;
  
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 25px rgba(0, 166, 81, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform-style: preserve-3d;
}

/* Keyframe Animations */
@keyframes navbarGlow {
  0%, 100% { 
    background-position: 0% 50%;
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 0 50px rgba(0, 166, 81, 0.1);
  }
  50% { 
    background-position: 100% 50%;
    box-shadow: 
      0 15px 40px rgba(0, 0, 0, 0.15),
      0 0 70px rgba(0, 119, 255, 0.15);
  }
}

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

@keyframes languageGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes languageFloat {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-3px) rotateZ(1deg); }
}

/* ===== RESPONSIVE DESIGN FOR NAVBAR ===== */

/* Large screens (1400px and up) */
@media (min-width: 1400px) {
  .navbar {
    padding: 25px 30px;
  }
  .nav-links {
    gap: 25px;
  }
  .nav-links a {
    padding: 12px 24px;
    font-size: 16px;
  }
  .language-toggle {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
  .navbar {
    padding: 22px 25px;
  }
  .nav-links {
    gap: 22px;
  }
  .nav-links a {
    padding: 11px 22px;
    font-size: 15px;
  }
  .language-toggle {
    padding: 9px 18px;
    font-size: 15px;
  }
}

/* Medium Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .navbar {
    padding: 20px 20px;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    padding: 10px 18px;
    font-size: 14px;
    letter-spacing: 1px;
  }
  .language-toggle {
    padding: 8px 16px;
    font-size: 14px;
  }
  .logo {
    height: 45px;
  }
}

/* Large Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .navbar {
    padding: 18px 15px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
  }
  
  .logo {
    height: 42px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 15px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 50px;
    height: 50px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
  }
}

/* Tablet (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  .navbar {
    padding: 15px 10px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 38px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 50px;
    height: 50px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 70px 15px 30px 15px;
  }
  
  .nav-links.mobile-menu a {
    width: 120px;
    height: 120px;
    font-size: 11px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 24px;
    margin-bottom: 6px;
  }
}

/* Mobile Large (481px - 575px) */
@media (max-width: 575px) and (min-width: 481px) {
  .navbar {
    padding: 12px 8px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 35px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 48px;
    height: 48px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 20px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 65px 12px 25px 12px;
  }
  
  .nav-links.mobile-menu a {
    width: 110px;
    height: 110px;
    font-size: 10px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 22px;
    margin-bottom: 5px;
  }
}

/* Mobile Medium (361px - 480px) */
@media (max-width: 480px) and (min-width: 361px) {
  .navbar {
    padding: 10px 5px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 32px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 8px;
  }
  
  .language-toggle i {
    font-size: 12px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 45px;
    height: 45px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 18px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 60px 10px 20px 10px;
  }
  
  .nav-links.mobile-menu a {
    width: 100px;
    height: 100px;
    font-size: 9px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 20px;
    margin-bottom: 4px;
  }
  
  .mobile-language-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 15px;
    margin-top: 10px;
    background: linear-gradient(45deg, #00A651, #0077ff);
    color: white;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    transition: all 0.3s ease;
  }
  
  .mobile-language-toggle:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #0077ff, #00A651);
  }
}

/* Mobile Small (≤360px) */
@media (max-width: 360px) {
  .navbar {
    padding: 8px 3px;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 28px;
    order: 1;
  }
  
  .language-toggle {
    order: 2;
    padding: 4px 6px;
    font-size: 9px;
    border-radius: 6px;
  }
  
  .language-toggle i {
    font-size: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    width: 42px;
    height: 42px;
  }
  
  .mobile-nav-toggle .toggle-icon {
    font-size: 16px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 55px 8px 15px 8px;
  }
  
  .nav-links.mobile-menu a {
    width: 90px;
    height: 90px;
    font-size: 8px;
  }
  
  .nav-links.mobile-menu a::before {
    font-size: 18px;
    margin-bottom: 3px;
  }
  
  .mobile-menu-close {
    width: 40px;
    height: 40px;
    font-size: 16px;
    top: 20px;
    right: 20px;
  }
}

/* ===== MOBILE LANGUAGE TOGGLE ===== */

/* Mobile Language Section */
.mobile-language-section {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Mobile Language Toggle Button */
.mobile-language-toggle {
  background: linear-gradient(45deg, #00A651, #0077ff, #ff9800, #00A651);
  background-size: 400% 400%;
  animation: languageGradient 3s ease infinite;
  
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Prompt', sans-serif;
  font-size: 18px;
  font-weight: 600;
  
  /* Glass Effect */
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 166, 81, 0.4),
    inset 0 2px 15px rgba(255, 255, 255, 0.2);
  
  /* 3D Effect */
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border for better visibility */
  border: 2px solid rgba(255, 255, 255, 0.3);
  
  /* Animation entrance */
  transform: translateY(30px);
  opacity: 0;
  animation: 
    mobileLanguageEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards,
    languageGradient 3s ease infinite;
}

.mobile-language-toggle i {
  font-size: 20px;
  transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.mobile-language-toggle:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 15px 40px rgba(0, 166, 81, 0.6),
    inset 0 2px 15px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.mobile-language-toggle:hover i.fa-globe {
  animation: globeSpin 0.7s linear;
}

.mobile-language-toggle:active {
  transform: translateY(-2px) scale(1.02);
}

/* Mobile Language Text */
.mobile-lang-text {
  font-weight: bold;
  letter-spacing: 1px;
}

/* Mobile Language Entrance Animation */
@keyframes mobileLanguageEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Menu Navigation Links - Updated to work with language toggle */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20010; /* above navbar which is 1500 */
  backdrop-filter: blur(5px);
}
.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  z-index: 20011; /* above navbar */
  overflow-y: auto;
  transition: right 0.3s ease-in-out;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}
@media (max-width: 360px) {
  .mobile-language-toggle {
    padding: 10px 20px;
    font-size: 14px;
    gap: 8px;
  }
  
  .mobile-language-toggle i {
    font-size: 16px;
  }
  
  .mobile-language-section {
    margin-top: 20px;
  }
}

/* ===== MOBILE SPECIFIC OPTIMIZATIONS ===== */

/* Hide complex animations on mobile for better performance */
@media (max-width: 768px) {
  .navbar {
    animation: none;
    backdrop-filter: blur(10px);
  }
  
  .nav-links a {
    animation: none !important;
    backdrop-filter: blur(5px);
  }
  
  .nav-links a::after {
    display: none;
  }
  
  .language-toggle {
    animation: languageFloat 2s ease-in-out infinite;
  }
}

/* Ensure proper touch targets on mobile */
@media (max-width: 575px) {
  .nav-links a,
  .language-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Ultra-wide screens optimization */
@media (min-width: 1920px) {
  .navbar {
    padding: 30px 40px;
    max-width: none;
    margin: 0;
  }
  .nav-links {
    gap: 30px;
  }
  .nav-links a {
    padding: 15px 30px;
    font-size: 18px;
  }
  .language-toggle {
    padding: 12px 24px;
    font-size: 18px;
  }
}

/* เพิ่มเติมสำหรับ mobile toggle system */
.nav-links a:hover::before {
    transform: scaleX(1);
    filter: blur(0px);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: linear-gradient(135deg, 
    rgba(0, 166, 81, 0.95), 
    rgba(0, 119, 255, 0.95));
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 
    0 8px 32px rgba(0, 166, 81, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: toggleBounce 2s ease-in-out infinite;
}

.mobile-nav-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 12px 40px rgba(0, 166, 81, 0.6),
    inset 0 2px 15px rgba(255, 255, 255, 0.3);
  animation: toggleGlow 1s ease-in-out infinite;
}

.mobile-nav-toggle:active {
  transform: scale(0.95) rotate(-2deg);
}

/* Toggle Button Icon */
.mobile-nav-toggle::before,
.mobile-nav-toggle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-toggle::before {
  transform: translate(-50%, -8px);
  box-shadow: 0 8px 0 white, 0 16px 0 white;
}

.mobile-nav-toggle::after {
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* Toggle Button Active State */
.mobile-nav-toggle.active::before {
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: none;
}

.mobile-nav-toggle.active::after {
  transform: translate(-50%, -50%) rotate(-45deg);
  opacity: 1;
}

/* Toggle Button Animations */
@keyframes toggleBounce {
  0%, 100% { 
    transform: scale(1) translateY(0);
  }
  50% { 
    transform: scale(1.05) translateY(-2px);
  }
}

@keyframes toggleGlow {
  0%, 100% { 
    box-shadow: 
      0 12px 40px rgba(0, 166, 81, 0.6),
      inset 0 2px 15px rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 
      0 16px 50px rgba(0, 119, 255, 0.8),
      inset 0 2px 20px rgba(255, 255, 255, 0.4);
  }
}

/* Mobile Menu Overlay */
.nav-links.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg,
    rgba(0, 0, 0, 0.95),
    rgba(0, 166, 81, 0.1),
    rgba(0, 119, 255, 0.1));
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  grid-template-columns: none !important;
  padding: 60px 20px;
}

.nav-links.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

/* Mobile Menu Links */
.nav-links.mobile-menu a {
  font-size: 2rem !important;
  font-weight: bold;
  text-align: center;
  margin: 0;
  padding: 20px 40px !important;
  border-radius: 20px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.1),
    rgba(0, 166, 81, 0.2)) !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: none !important;
  width: 280px;
  max-width: 80vw;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 2px 10px rgba(255, 255, 255, 0.1) !important;
}

.nav-links.mobile-menu.active a {
  transform: translateY(0);
  opacity: 1;
  animation: mobileSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--mobile-index, 0) * 0.1s);
}

.nav-links.mobile-menu a:nth-child(1) { --mobile-index: 1; }
.nav-links.mobile-menu a:nth-child(2) { --mobile-index: 2; }
.nav-links.mobile-menu a:nth-child(3) { --mobile-index: 3; }
.nav-links.mobile-menu a:nth-child(4) { --mobile-index: 4; }
.nav-links.mobile-menu a:nth-child(5) { --mobile-index: 5; }

.nav-links.mobile-menu a:hover {
  background: linear-gradient(135deg,
    rgba(0, 166, 81, 0.3),
    rgba(0, 119, 255, 0.3)) !important;
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05) translateY(-5px);
  box-shadow: 
    0 15px 40px rgba(0, 166, 81, 0.4),
    inset 0 2px 15px rgba(255, 255, 255, 0.2) !important;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(90deg);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Mobile Menu Animations */
@keyframes mobileSlideIn {
  0% {
    transform: translateY(50px) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateY(-10px) scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Enhanced Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  /* Hide nav-links on mobile */
  .navbar .nav-links {
    display: none !important;
  }
}

/* Ensure the mobile hamburger appears inside the top navbar and is styled */
@media (max-width: 768px) {
  .navbar {
    position: relative;
    padding-right: 70px; /* room for the hamburger */
  }

  /* Prefer the existing mobile toggle button but when placed inside .navbar use this styling */
  .navbar .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00A651, #0077ff);
    color: #ffffff;
    border: none;
    font-size: 18px;
    box-shadow: 0 8px 25px rgba(0, 166, 81, 0.25);
    cursor: pointer;
  }

  /* Make sure the icon inside is centered and visible */
  .navbar .mobile-menu-toggle i {
    font-size: 20px;
    line-height: 1;
  }

  /* If there is a floating mobile-menu-toggle elsewhere, keep it usable but less prominent */
  .mobile-menu-toggle { right: 12px; top: 12px; }
}

/* CSS Hamburger (3 lines) inside the mobile toggle button */
.hamburger {
  display: block;
  position: relative;
  width: 22px;
  height: 16px;
}
.hamburger, .hamburger::before, .hamburger::after {
  box-sizing: border-box;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.hamburger::before { top: 0; }
.hamburger::after { bottom: 0; }
.hamburger { background: white; height: 3px; top: 50%; transform: translateY(-50%); border-radius: 2px; transition: background 0.28s ease, opacity 0.28s ease; }

/* Active state -> morph to X */
.mobile-menu-toggle.active .hamburger { background: transparent; }
.mobile-menu-toggle.active .hamburger::before { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active .hamburger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 480px) {
  .mobile-nav-toggle {
    width: 55px;
    height: 55px;
    top: 15px;
    right: 15px;
  }
  
  .nav-links.mobile-menu a {
    font-size: 1.8rem !important;
    padding: 18px 35px !important;
    width: 260px;
  }
  
  .mobile-menu-close {
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

/* ===== SIMPLIFIED NAVBAR BUTTONS (flat style) ===== */
/* Removes neumorphic "raised" look + rounded pills, unifies language button, and keeps text dark */
.navbar {
  --kps-nav-btn-bg: rgba(255, 255, 255, 0.92);
  --kps-nav-btn-bg-hover: rgba(245, 245, 245, 0.96);
  --kps-nav-btn-border: rgba(0, 0, 0, 0.18);
  --kps-nav-btn-border-hover: rgba(0, 0, 0, 0.28);
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.75);
}

.navbar .nav-links a,
.navbar .language-toggle {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  gap: 8px;

  color: var(--kps-nav-btn-text) !important;
  background: var(--kps-nav-btn-bg) !important;
  border: 1px solid var(--kps-nav-btn-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  text-shadow: none !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  animation: kpsNavBtnIn 260ms ease-out both;
  backdrop-filter: none !important;
  letter-spacing: 0.6px !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

/* Subtle underline effect (not flashy) */
.navbar .nav-links a::after,
.navbar .language-toggle::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--kps-nav-accent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0.7;
  transition: transform 180ms ease, opacity 180ms ease;
  pointer-events: none;
}

.navbar .nav-links a:hover,
.navbar .language-toggle:hover {
  color: var(--kps-nav-btn-text) !important;
  background: var(--kps-nav-btn-bg-hover) !important;
  border-color: var(--kps-nav-btn-border-hover) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
  animation: none !important;
}

.navbar .nav-links a:hover::after,
.navbar .language-toggle:hover::after {
  transform: scaleX(1);
  opacity: 0.85;
}

.navbar .nav-links a:active,
.navbar .language-toggle:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

.navbar .nav-links a.active {
  background: rgba(235, 235, 235, 0.96) !important;
  border-color: rgba(0, 0, 0, 0.26) !important;
  color: var(--kps-nav-btn-text) !important;
}

.navbar .nav-links a.active::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.navbar .nav-links a:focus-visible,
.navbar .language-toggle:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.25);
  outline-offset: 3px;
}

/* Language button: remove gradient/float/globe spin/pulse */
.navbar .language-toggle {
  gap: 8px;
}

.navbar .language-toggle i,
.navbar .language-toggle i.fa-globe,
.navbar .language-toggle:hover i.fa-globe,
.navbar .language-toggle:focus i.fa-globe,
.navbar .language-toggle.active i.fa-globe {
  animation: none !important;
  transform: none !important;
}

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

/* ===== ALTERNATIVE NAVBAR THEME ===== */
/* Enable by adding class: <nav class="navbar kps-navbar--alt"> */
.navbar.kps-navbar--alt {
  --kps-nav-btn-bg: transparent;
  --kps-nav-btn-bg-hover: rgba(0, 166, 81, 0.08);
  --kps-nav-btn-border: rgba(17, 17, 17, 0.22);
  --kps-nav-btn-border-hover: rgba(0, 166, 81, 0.70);
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.9);

  /* Keep navbar itself clean */
  animation: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.navbar.kps-navbar--alt .nav-links a,
.navbar.kps-navbar--alt .language-toggle {
  border-radius: 999px !important;
  background: var(--kps-nav-btn-bg) !important;
  box-shadow: none !important;
  padding: 10px 16px;
  letter-spacing: 0.7px !important;
}

.navbar.kps-navbar--alt .nav-links a::after,
.navbar.kps-navbar--alt .language-toggle::after {
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  opacity: 0.0;
}

.navbar.kps-navbar--alt .nav-links a:hover::after,
.navbar.kps-navbar--alt .language-toggle:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.navbar.kps-navbar--alt .nav-links a:hover,
.navbar.kps-navbar--alt .language-toggle:hover {
  background: var(--kps-nav-btn-bg-hover) !important;
  border-color: var(--kps-nav-btn-border-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10) !important;
}

.navbar.kps-navbar--alt .nav-links a.active {
  background: rgba(0, 166, 81, 0.92) !important;
  border-color: rgba(0, 166, 81, 0.92) !important;
  color: #ffffff !important;
}

.navbar.kps-navbar--alt .nav-links a.active::after {
  display: none;
}

.navbar.kps-navbar--alt .language-toggle {
  /* Keep language button same weight as others */
  font-weight: 700 !important;
}

@media (prefers-reduced-motion: reduce) {
  .navbar.kps-navbar--alt .nav-links a,
  .navbar.kps-navbar--alt .language-toggle {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile menu pills (optional): keep readable and less rounded */
.nav-links.mobile-menu a {
  border-radius: 0 !important;
}

/* ===== BLENDED NAVBAR THEME (no buttons) ===== */
/* Enable by adding class: <nav class="navbar kps-navbar--blend"> */
.navbar.kps-navbar--blend {
  --kps-nav-btn-bg: transparent;
  --kps-nav-btn-bg-hover: transparent;
  --kps-nav-btn-border: transparent;
  --kps-nav-btn-border-hover: transparent;
  --kps-nav-btn-text: #111111;
  --kps-nav-accent: rgba(0, 166, 81, 0.95);

  animation: none !important;
  background: rgba(245, 245, 245, 0.92) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.navbar.kps-navbar--blend .nav-links {
  gap: 26px;
}

.navbar.kps-navbar--blend .nav-links a,
.navbar.kps-navbar--blend .language-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: 8px 6px;
  min-height: auto;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
}

.navbar.kps-navbar--blend .nav-links a::after,
.navbar.kps-navbar--blend .language-toggle::after {
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  opacity: 0.0;
  transform: scaleX(0);
}

.navbar.kps-navbar--blend .nav-links a:hover,
.navbar.kps-navbar--blend .language-toggle:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

.navbar.kps-navbar--blend .nav-links a:hover::after,
.navbar.kps-navbar--blend .language-toggle:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar.kps-navbar--blend .nav-links a.active {
  background: transparent !important;
  border: none !important;
  color: #111111 !important;
}

.navbar.kps-navbar--blend .nav-links a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar.kps-navbar--blend .nav-links a:focus-visible,
.navbar.kps-navbar--blend .language-toggle:focus-visible {
  outline: 2px solid rgba(0, 166, 81, 0.35);
  outline-offset: 4px;
}

@media (max-width: 991px) {
  .navbar.kps-navbar--blend .nav-links {
    gap: 18px;
  }
}

/* Fix clipped logo/text/icons in navbar on all pages */
.navbar {
  height: auto;
  min-height: 64px;
  overflow: visible;
}

.navbar-flex-mobile,
.navbar .nav-links {
  align-items: center;
}

.navbar .logo,
.navbar img.logo {
  display: block;
}

@media (max-width: 768px) {
  .navbar {
    min-height: 56px;
  }
}

/* Shop page: make only the desktop language label text gray */
.navbar .language-toggle #lang-label {
  color: #6b7280 !important;
}

/* ===== LINE Icon Image Override (Global) ===== */
/* Replace Font Awesome LINE glyphs with the site image everywhere */
.fa-line::before { content: ''; }
.fa-line {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: center / contain no-repeat url('../image/Logo_for_navbar/line.png') !important;
  vertical-align: middle;
  border-radius: 50%;
}

/* Common contexts where icons are larger; keep image crisp */
.bulk-contact__btn .fa-line { width: 1em; height: 1em; }
.kps-quick-cta .fa-line { width: 1.2em; height: 1.2em; }

/* Rounded corners for navbar across all pages (all sides) */
.navbar {
  border-radius: 12px;
  overflow: hidden;
}

.navbar .nav-links {
  border-radius: inherit;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 245, 245, 0.95);
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 1500;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: navbarFadeIn 0.8s ease-out;
  border-radius: 12px !important;
  overflow: hidden;
    
    /* Advanced Glow and Shadow */
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 1px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 0 50px rgba(0, 166, 81, 0.1);
    
    /* Animated Border */
    background: 
      linear-gradient(135deg, 
        rgba(245, 245, 245, 0.95) 0%,
        rgba(250, 250, 250, 0.98) 50%,
        rgba(245, 245, 245, 0.95) 100%);
    background-size: 200% 200%;
    animation: 
      navbarGlow 4s ease-in-out infinite,
      navbarFloat 6s ease-in-out infinite;
    
    /* Glass Morphism */
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

  /* Hide mobile hamburger by default on desktop; show via media query */
  .mobile-menu-toggle {
    display: none;
  }

/* Ensure mobile header row matches index across all pages */
.navbar-flex-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
}

@media (max-width: 900px) {
  .navbar-flex-mobile {
    width: 100%;
  }
}

.logo {
  height: 50px;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0; /* ensure left alignment, no auto-centering */
}

.contact-bar {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Keep navbar in a single row by reducing spacing on narrower screens */
@media (max-width: 1200px) {
  .nav-links { gap: 12px; }
  .nav-links a { padding: 8px 12px; font-size: 16px; }
  .language-toggle { padding: 6px 10px; font-size: 16px; }
}

@media (max-width: 1024px) {
  .nav-links { gap: 8px; }
  .nav-links a { padding: 6px 10px; font-size: 15px; }
  .language-toggle { padding: 6px 10px; font-size: 15px; }
}

/* Enhanced Nav Links Effects */
.nav-links a {
    position: relative;
    padding: 10px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
  font-size: 18px;
    letter-spacing: 1.2px;
    white-space: nowrap;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 !important;
    
    /* Enhanced Glass Effect */
    background: 
      linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(245, 245, 245, 0.8) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 
      0 4px 15px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 20px rgba(0, 166, 81, 0.05);
  
    /* 3D Transform */
    transform-style: preserve-3d;
    perspective: 1000px;
    overflow: hidden;
}

/* ================================================================
   MOBILE SIDEBAR NAV — FINAL OVERRIDES (hamburger + slide-in sidebar)
   ================================================================ */

/* --- Slide-in sidebar: open state --- */
.mobile-nav-menu.open {
  right: 0;
}

/* --- Sidebar content styles (shared across all pages) --- */
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #ffffff;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo {
  height: 40px;
}

.mobile-brand {
  font-size: 14px;
  font-weight: 600;
  font-family: 'Prompt', sans-serif;
  color: #333;
}

.mobile-nav-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #333;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.mobile-nav-content {
  padding: 24px 16px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 14px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  font-family: 'Prompt', sans-serif;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.25s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mobile-nav-link:hover {
  background: linear-gradient(135deg, rgba(0, 166, 81, 0.08), rgba(0, 119, 255, 0.08));
  color: #00A651;
  transform: translateX(6px);
}

.mobile-nav-link:active {
  background: rgba(0, 166, 81, 0.12);
}

.mobile-nav-link i {
  width: 24px;
  color: #00A651;
  font-size: 18px;
  text-align: center;
}

.mobile-nav-link span {
  font-weight: 500;
}

/* --- Sidebar icon color: black --- */
.mobile-nav-link i {
  color: #333 !important;
}
.mobile-nav-link:hover i {
  color: #333 !important;
}

/* --- Language toggle: clean white button --- */
.mobile-language-toggle {
  background: #ffffff !important;
  color: #333 !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  animation: mobileLanguageEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards !important;
}
.mobile-language-toggle i {
  color: #333 !important;
}
.mobile-language-toggle:hover {
  background: #f5f5f5 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
}
.mobile-language-toggle:active {
  transform: translateY(0) scale(0.98) !important;
}

/* --- Prevent horizontal scroll on all pages --- */
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  overflow-x: hidden;
}
.navbar {
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Mobile navbar bar: logo + hamburger --- */
@media (max-width: 900px) {
  /* Navbar: rounded, no clip, sticky */
  .navbar {
    overflow: visible !important;
    min-height: 56px;
    border-radius: 12px !important;
    position: sticky;
    padding-left: 0;
    padding-right: 0;
  }

  /* Logo must be visible */
  .navbar .logo,
  .navbar img.logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 44px;
    max-height: 44px;
    width: auto;
  }

  /* Hamburger button inside navbar */
  .navbar .mobile-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    order: 2;
    z-index: 2;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0 !important;
    margin: 0;
    transform: none !important;
    right: auto !important;
    top: auto !important;
  }

  .navbar .mobile-menu-toggle:active {
    transform: scale(0.92);
  }

  .navbar .mobile-menu-toggle i {
    font-size: 20px;
    line-height: 1;
  }

  /* flex-mobile row: logo left, hamburger right */
  .navbar-flex-mobile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  /* Hide desktop nav-links */
  .navbar .nav-links {
    display: none !important;
  }

  /* Sidebar slides from right */
  .mobile-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 80vw;
    max-width: 340px;
    height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    z-index: 20011;
    display: flex;
    flex-direction: column;
  }
  .mobile-nav-menu.open {
    transform: translateX(0);
  }

  /* Sidebar overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 20010;
    display: none;
    pointer-events: none;
    backdrop-filter: blur(5px);
  }
  .mobile-nav-overlay[style*="display: block"] {
    display: block;
  }
  .mobile-nav-overlay[style*="opacity: 1"] {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  .navbar .logo,
  .navbar img.logo {
    height: 36px;
    max-height: 36px;
  }
  .mobile-nav-menu {
    width: 280px;
  }
}

@media (max-width: 360px) {
  .navbar .logo,
  .navbar img.logo {
    height: 30px;
    max-height: 30px;
  }
  .mobile-nav-menu {
    width: 260px;
  }
}

/* ===== ANIMATED HAMBURGER ICON (3 lines → X) ===== */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 18px;
  position: relative;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #333;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-icon span:nth-child(1) {
  top: 0;
}

.hamburger-icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon span:nth-child(3) {
  bottom: 0;
}

/* Active state: morph to X */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}