/* ========================================
   MOBILE-FIRST RESPONSIVE CSS SYSTEM
   ======================================== */

/* CSS Custom Properties for Consistent Breakpoints */
:root {
  /* Breakpoints */
  --mobile: 480px;
  --tablet: 768px;
  --desktop: 1024px;
  --large-desktop: 1200px;
  --xl-desktop: 1400px;
  
  /* Spacing */
  --mobile-padding: 1rem;
  --tablet-padding: 1.5rem;
  --desktop-padding: 2rem;
  
  /* Typography Scale */
  --mobile-h1: 1.75rem;
  --mobile-h2: 1.5rem;
  --mobile-h3: 1.25rem;
  --mobile-h4: 1.125rem;
  --mobile-body: 0.875rem;
  
  --tablet-h1: 2rem;
  --tablet-h2: 1.75rem;
  --tablet-h3: 1.5rem;
  --tablet-h4: 1.25rem;
  --tablet-body: 1rem;
  
  --desktop-h1: 2.5rem;
  --desktop-h2: 2rem;
  --desktop-h3: 1.75rem;
  --desktop-h4: 1.5rem;
  --desktop-body: 1.125rem;
  
  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-mobile-menu: 9999; /* Highest priority for mobile menu */
}

/* ========================================
   MOBILE-FIRST BASE STYLES
   ======================================== */

/* Ensure proper box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base mobile typography */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-size: var(--mobile-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first heading sizes */
h1 { font-size: var(--mobile-h1); }
h2 { font-size: var(--mobile-h2); }
h3 { font-size: var(--mobile-h3); }
h4 { font-size: var(--mobile-h4); }

/* ========================================
   HEADER MOBILE OPTIMIZATION (UPDATED)
   ======================================== */

/* Mobile Header Styles */
.modern-header {
  position: relative;
  z-index: var(--z-fixed);
  background: #fff;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Top Bar - Mobile First */
.header-top-bar {
  background: #0a993c;
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.75rem;
}

.top-bar-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.contact-item i {
  font-size: 0.75rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.social-link:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

/* Main Header - Mobile First with Top Positioning */
.header-main {
  padding: 0;
  position: relative;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  position: relative;
  min-height: 70px;
}

/* Mobile Header Control Bar - Top positioned */
.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  position: relative;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Logo positioned in center on mobile */
.header-logo {
  text-align: center;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  order: 2;
  margin: 0 1rem;
}

.logo-img {
  max-width: 140px;
  height: auto;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.02);
}

/* Mobile Menu Toggle - Professional positioning */
.mobile-menu-toggle {
  display: flex;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #dee2e6;
  padding: 0.6rem;
  cursor: pointer;
  position: relative;
  z-index: var(--z-fixed);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  order: 1;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: linear-gradient(135deg, #0a993c 0%, #0d7931 100%);
  box-shadow: 0 4px 16px rgba(10, 153, 60, 0.2);
  transform: translateY(-2px);
  border-color: #0a993c;
}

.mobile-menu-toggle:hover .hamburger-line {
  background: #fff;
}

.mobile-menu-toggle:active {
  transform: translateY(0) scale(0.95);
}

.mobile-menu-toggle:focus {
  outline: 2px solid #0a993c;
  outline-offset: 2px;
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: #495057;
  margin: 2px auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Hamburger Animation - Smooth and professional */
.mobile-menu-toggle.active {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border-color: #dc3545;
}

.mobile-menu-toggle.active .hamburger-line {
  background: #fff;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   NAVIGATION DISPLAY LOGIC
   ======================================== */

/* Mobile Navigation - Hidden by default */
.header-nav {
  display: none; /* Hidden on mobile */
}

.nav-menu {
  display: none; /* Hidden on mobile */
}

/* Mobile Menu Toggle - Always visible on mobile */
.mobile-menu-toggle {
  display: flex;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #dee2e6;
  padding: 0.6rem;
  cursor: pointer;
  position: relative;
  z-index: var(--z-fixed);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  order: 1;
  flex-shrink: 0;
}

/* Mobile Menu Sidebar */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: var(--z-mobile-menu); /* Highest z-index */
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 1rem;
  box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.active {
  left: 0;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-mobile-menu) - 1); /* Just below mobile menu */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
}

.mobile-logo img {
  max-width: 120px;
  height: auto;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #333;
  transition: color 0.3s ease;
}

.mobile-menu-close:hover {
  color: #0a993c;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid #f5f5f5;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
  margin: 0.25rem 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0a993c;
  background: rgba(10, 153, 60, 0.05);
  padding-left: 0.5rem;
}

.mobile-nav-link i {
  width: 20px;
  text-align: center;
  color: #0a993c;
  font-size: 1rem;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.mobile-language-switcher {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-lang-option {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
}

.mobile-lang-option.active,
.mobile-lang-option:hover {
  background: #0a993c;
  color: #fff;
  border-color: #0a993c;
}

.mobile-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #0a993c;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
  width: 100%;
  justify-content: center;
}

.mobile-login-btn:hover {
  background: #088f35;
}

/* Header Actions - Mobile (hidden initially) */
.header-actions {
  display: none;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem;
  order: 3;
}

.language-switcher,
.login-section {
  display: none; /* Hidden on mobile */
}

/* ========================================
   STICKY HEADER - MOBILE OPTIMIZATION
   ======================================== */

/* Sticky Header - Mobile Optimization */
.sticky-header {
  display: none; /* Hidden on mobile by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  z-index: var(--z-sticky);
  padding: 0.5rem 0;
  transition: transform 0.3s ease;
}

/* ========================================
   FOOTER MOBILE OPTIMIZATION
   ======================================== */

footer {
  padding: 2rem 0;
}

.footer-data {
  padding: 0 var(--mobile-padding);
}

.widget {
  margin-bottom: 2rem;
  text-align: center;
}

.widget-title {
  font-size: var(--mobile-h3);
  margin-bottom: 1rem;
  color: #333;
}

.cont-info-list2 {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cont-info-list2 li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cont-info-list2 i {
  color: #0a993c;
  font-weight: bold;
  min-width: 20px;
}

/* ========================================
   TABLET STYLES (768px and up)
   ======================================== */

@media (min-width: 768px) {
  /* Typography */
  h1 { font-size: var(--tablet-h1); }
  h2 { font-size: var(--tablet-h2); }
  h3 { font-size: var(--tablet-h3); }
  h4 { font-size: var(--tablet-h4); }
  body { font-size: var(--tablet-body); }
  
  /* Top Bar */
  .header-top-bar {
    padding: 0.75rem 0;
    font-size: 0.875rem;
  }
  
  .top-bar-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  
  .contact-info {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .contact-item {
    font-size: 0.875rem;
  }
  
  /* Main Header */
  .header-main {
    padding: 1.5rem 0;
  }
  
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    min-height: auto;
  }
  
  /* Reset mobile-specific layout */
  .header-top-row {
    display: none; /* Hide mobile top row on tablet+ */
  }
  
  .header-logo {
    text-align: left;
    flex: none;
    order: unset;
    margin: 0;
    display: block;
  }
  
  .logo-img {
    max-width: 180px;
  }
  
  /* Show desktop navigation */
  .header-nav {
    display: block !important; /* Force show on tablet+ */
    order: unset;
    flex: 1;
    justify-content: center;
  }
  
  .nav-menu {
    display: flex !important; /* Force show on tablet+ */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    justify-content: center;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
  }
  
  .nav-link:hover,
  .nav-link.active {
    color: #0a993c;
  }
  
  /* Hide mobile elements completely on tablet+ */
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  /* Show desktop elements */
  .language-switcher,
  .login-section {
    display: block;
  }
  
  .header-actions {
    justify-content: flex-end;
    order: unset;
    padding: 0;
    display: flex;
  }
  
  /* Footer */
  .footer-data {
    padding: 0 var(--tablet-padding);
  }
  
  .widget {
    text-align: left;
  }
  
  .cont-info-list2 li {
    justify-content: flex-start;
  }
}

/* ========================================
   DESKTOP STYLES (1024px and up)
   ======================================== */

@media (min-width: 1024px) {
  /* Typography */
  h1 { font-size: var(--desktop-h1); }
  h2 { font-size: var(--desktop-h2); }
  h3 { font-size: var(--desktop-h3); }
  h4 { font-size: var(--desktop-h4); }
  body { font-size: var(--desktop-body); }
  
  /* Top Bar */
  .header-top-bar {
    padding: 1rem 0;
    font-size: 1rem;
  }
  
  .contact-info {
    gap: 2rem;
  }
  
  .contact-item {
    font-size: 1rem;
  }
  
  /* Main Header */
  .header-main {
    padding: 2rem 0;
  }
  
  .logo-img {
    max-width: 200px;
  }
  
  .nav-menu {
    gap: 3rem;
  }
  
  /* Footer */
  .footer-data {
    padding: 0 var(--desktop-padding);
  }
  
  /* Show sticky header */
  .sticky-header {
    display: block;
  }
}

/* ========================================
   LARGE DESKTOP STYLES (1200px and up)
   ======================================== */

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .logo-img {
    max-width: 220px;
  }
  
  .nav-menu {
    gap: 4rem;
  }
}

/* ========================================
   XL DESKTOP STYLES (1400px and up)
   ======================================== */

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .logo-img {
    max-width: 250px;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Hide elements on specific breakpoints */
.hide-mobile { display: none; }
.hide-tablet { display: none; }
.hide-desktop { display: none; }

@media (min-width: 768px) {
  .hide-mobile { display: block; }
  .show-mobile { display: none; }
}

@media (min-width: 1024px) {
  .hide-tablet { display: block; }
  .show-tablet { display: none; }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */

/* Ensure touch targets are at least 44px */
.mobile-nav-link,
.mobile-lang-option,
.mobile-login-btn,
.social-link {
  min-height: 44px;
  min-width: 44px;
}

/* Touch device specific styles */
.touch-device .mobile-nav-link,
.touch-device .mobile-lang-option,
.touch-device .mobile-login-btn {
  -webkit-tap-highlight-color: transparent;
}

.touch-device .social-link {
  -webkit-tap-highlight-color: transparent;
}

.touch-device .mobile-menu-toggle {
  -webkit-tap-highlight-color: transparent;
}

/* Improve touch feedback */
.touch-device .mobile-nav-link:active,
.touch-device .mobile-lang-option:active,
.touch-device .mobile-login-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
}

/* Touch-friendly button states */
.touch-device button:active,
.touch-device a:active {
  transform: scale(0.98);
}

/* Prevent text selection on touch devices */
.touch-device .mobile-nav-link,
.touch-device .mobile-lang-option {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus states for keyboard navigation */
.nav-link:focus,
.mobile-nav-link:focus,
.social-link:focus {
  outline: 2px solid #0a993c;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .header-top-bar {
    background: #000;
    color: #fff;
  }
  
  .social-link:hover {
    background: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .header-top-bar,
  .mobile-menu-toggle,
  .sticky-header {
    display: none !important;
  }
  
  .modern-header {
    box-shadow: none;
  }
}

/* Language Switcher - Mobile */
.language-dropdown {
  position: relative;
}

.language-toggle {
  background: none;
  border: none;
  color: #333;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.language-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 120px;
  z-index: var(--z-dropdown);
}

.language-option {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.3s ease;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover,
.language-option.active {
  background: #f8f9fa;
  color: #0a993c;
}

/* Show language menu on hover for desktop */
@media (min-width: 768px) {
  .language-dropdown:hover .language-menu {
    display: block;
  }
}

/* ========================================
   MOBILE FORM OPTIMIZATIONS
   ======================================== */

/* Form error styles for mobile */
.mobile-error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  animation: slideIn 0.3s ease;
}

/* Form field error state */
input.error,
textarea.error,
select.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Error animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile form spacing */
@media (max-width: 767px) {
  form {
    padding: 0 var(--mobile-padding);
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 100%;
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: #0a993c;
    box-shadow: 0 0 0 0.2rem rgba(10, 153, 60, 0.25);
  }
  
  button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: #0a993c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  button[type="submit"]:hover {
    background: #088f35;
  }
  
  button[type="submit"]:active {
    transform: scale(0.98);
  }
}

/* ========================================
   PERFORMANCE & LOADING OPTIMIZATIONS
   ======================================== */

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0a993c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Skeleton loading for images */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Lazy loading image placeholder */
.lazy-image {
  background: #f8f9fa;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Progressive image loading */
.progressive-image {
  position: relative;
  overflow: hidden;
}

.progressive-image img {
  transition: opacity 0.3s ease;
}

.progressive-image img.loading {
  opacity: 0;
}

.progressive-image img.loaded {
  opacity: 1;
}

/* ========================================
   MOBILE PERFORMANCE IMPROVEMENTS
   ======================================== */

/* Optimize animations for mobile */
@media (max-width: 767px) {
  * {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  /* Reduce motion on mobile for better performance */
  .animate-on-scroll {
    animation: none;
  }
  
  /* Optimize transitions */
  .mobile-menu,
  .mobile-nav-link,
  .social-link {
    will-change: transform, opacity;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .mobile-menu {
    transition: none;
  }
  
  .sticky-header {
    transition: none;
  }
}

/* ========================================
   MOBILE-FIRST NAVIGATION HIDING
   ======================================== */

/* Force hide desktop navigation on mobile */
@media (max-width: 767px) {
  .header-nav,
  .nav-menu,
  .nav-item,
  .nav-link {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  
  /* Ensure mobile toggle is visible */
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Hide header actions on mobile */
  .header-actions {
    display: none !important;
  }
  
  /* Show only mobile top row */
  .header-top-row {
    display: flex !important;
  }
}

/* ========================================
   MOBILE MENU POSITIONING FIX
   ======================================== */

/* Mobile Menu - Full Viewport Coverage */
.mobile-menu {
  position: fixed; /* Changed back to fixed for full viewport coverage */
  top: 0;
  left: -100%;
  width: 100vw; /* Full viewport width */
  height: 100vh; /* Full viewport height */
  background: #fff;
  z-index: 999999;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 1rem;
  box-shadow: 2px 0 20px rgba(0,0,0,0.1);
  margin: 0;
  border: none;
  box-sizing: border-box;
}

.mobile-menu.active {
  left: 0;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin: 0;
  border: none;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   MOBILE HEADER LAYOUT FIX
   ======================================== */

@media (max-width: 767px) {
  /* Single Header - No Duplication */
  .header-main {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    background: #fff;
    z-index: 1000;
  }
  
  .header-main .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  
  .header-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
    position: relative;
  }
  
  /* Single Header Top Row */
  .header-top-row {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0;
    position: relative;
    z-index: 1001;
  }
  
  /* Logo Container */
  .header-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  
  .logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
  }
  
  .logo-img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
  }
  
  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    flex-shrink: 0;
    margin: 0;
    order: 1;
    z-index: 1002;
    position: relative;
  }
  
  /* Hide all other header elements on mobile */
  .header-nav,
  .header-actions,
  .nav-menu,
  .nav-item,
  .nav-link,
  .language-switcher,
  .login-section {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    width: 0 !important;
    position: absolute !important;
    top: -9999px !important;
  }
  
  /* Mobile menu is now positioned fixed for full viewport coverage */
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* ========================================
   EXTRA SMALL MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 480px) {
  .header-top-row {
    padding: 0.75rem;
  }
  
  .logo-img {
    max-height: 50px;
  }
  
  .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    padding: 0.5rem;
  }
  
  .mobile-menu-toggle .hamburger-line {
    height: 2px;
    margin: 1px 0;
  }
}

@media (max-width: 360px) {
  .header-top-row {
    padding: 0.5rem;
  }
  
  .logo-img {
    max-height: 45px;
  }
  
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }
}

/* ========================================
   MOBILE HEADER RESPONSIVE FIXES
   ======================================== */

/* Ensure no horizontal scrolling on mobile */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  .modern-header {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Fix any potential container issues */
  .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
  
  /* Ensure header elements don't overflow */
  .header-main * {
    box-sizing: border-box;
  }
}

/* ========================================
   Z-INDEX SAFEGUARDS & CONFLICT RESOLUTION
   ======================================== */

/* Ensure mobile menu appears above all content */
@media (max-width: 767px) {
  /* Force mobile menu to highest layer */
  .mobile-menu {
    z-index: 999999 !important; /* Maximum z-index */
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100vh !important;
  }
  
  .mobile-menu.active {
    left: 0 !important;
  }
  
  /* Force backdrop to high layer */
  .mobile-menu-backdrop {
    z-index: 999998 !important; /* Just below mobile menu */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
  }
  
  /* Ensure toggle button is above other elements */
  .mobile-menu-toggle {
    z-index: 999997 !important; /* High z-index for toggle */
    position: relative !important;
  }
  
  /* Prevent other elements from overlapping */
  .header-main,
  .header-content,
  .header-top-row {
    position: relative;
    z-index: 1; /* Lower than mobile menu */
  }
  
  /* Ensure no other fixed/sticky elements interfere */
  .sticky-header,
  .fixed-header,
  .navbar-fixed-top {
    z-index: 999 !important; /* Lower than mobile menu */
  }
  
  /* Fix any potential dropdown conflicts */
  .dropdown-menu,
  .dropdown-toggle {
    z-index: 1000 !important; /* Lower than mobile menu */
  }
  
  /* Fix any modal conflicts */
  .modal,
  .modal-backdrop {
    z-index: 10000 !important; /* Higher than mobile menu if needed */
  }
}

/* ========================================
   MOBILE MENU CONTENT LAYERING
   ======================================== */

/* Ensure all mobile menu content is properly layered */
.mobile-menu * {
  position: relative;
  z-index: inherit;
}

.mobile-menu-header {
  position: relative;
  z-index: inherit;
  background: #fff;
}

.mobile-nav {
  position: relative;
  z-index: inherit;
}

.mobile-nav-menu {
  position: relative;
  z-index: inherit;
}

.mobile-nav-item {
  position: relative;
  z-index: inherit;
}

.mobile-nav-link {
  position: relative;
  z-index: inherit;
  background: #fff;
}

.mobile-menu-footer {
  position: relative;
  z-index: inherit;
  background: #fff;
}

/* Ensure mobile menu is above any potential overlays */
@media (max-width: 767px) {
  .mobile-menu,
  .mobile-menu * {
    z-index: 999999 !important;
  }
  
  /* Force mobile menu to be above everything */
  .mobile-menu {
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: left; /* Optimize animation */
  }
  
  /* Ensure backdrop covers everything */
  .mobile-menu-backdrop {
    transform: translateZ(0);
    will-change: opacity, visibility;
  }
}

/* ========================================
   MOBILE MENU CONTENT LAYOUT FIX
   ======================================== */

/* Mobile Menu Container */
.mobile-menu {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 2rem 1.5rem;
  gap: 1rem;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 1.5rem;
  background: #fff;
  flex-shrink: 0;
}

.mobile-logo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-logo img {
  max-width: 140px;
  height: auto;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #333;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.mobile-menu-close:hover {
  color: #0a993c;
}

/* Mobile Navigation Menu */
.mobile-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  min-height: 0;
}

.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-item {
  border-bottom: 1px solid #f5f5f5;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0;
  background: #fff;
  min-height: 60px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0a993c;
  background: rgba(10, 153, 60, 0.08);
  padding-left: 1.5rem;
  transform: translateX(5px);
}

.mobile-nav-link i {
  width: 24px;
  text-align: center;
  color: #0a993c;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mobile-nav-link span {
  flex: 1;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 2px solid #f0f0f0;
  background: #fff;
  flex-shrink: 0;
}

.mobile-language-switcher {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mobile-lang-option {
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
  background: #fff;
  font-weight: 500;
}

.mobile-lang-option.active,
.mobile-lang-option:hover {
  background: #0a993c;
  color: #fff;
  border-color: #0a993c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 153, 60, 0.3);
}

.mobile-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #0a993c;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 100%;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(10, 153, 60, 0.2);
}

.mobile-login-btn:hover {
  background: #088f35;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(10, 153, 60, 0.4);
}

/* ========================================
   OVERRIDE: Non-overlay collapsible mobile menu (below header)
   ======================================== */
.mobile-menu {
  position: relative !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  transition: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  z-index: 1 !important;
  display: none;
}

.mobile-menu.active {
  display: block !important;
  left: 0 !important;
}

.mobile-menu-backdrop {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}
