/*
============================================
MOBILE-FIRST RESPONSIVE STYLES
Myanmar Digital Solutions - 2024
============================================
Enhanced responsive styles for mobile navigation
and mobile-optimized components
*/

/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

/* Header - Mobile First */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: var(--z-fixed);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--container-sm);
  margin: 0 auto;
}

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

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

/* Desktop Navigation - Hidden on Mobile */
.nav-links {
  display: none;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: var(--font-size-sm);
}

.nav-links a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color, #667eea);
}

.cta-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  padding: var(--space-sm) var(--space-lg) !important;
  border-radius: 2rem !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Hamburger Menu - Mobile Only */
.hamburger-menu {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.hamburger-menu:hover {
  background: rgba(102, 126, 234, 0.1);
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 3px;
  margin: 3px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 20px rgba(0,0,0,0.15);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: var(--z-modal);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.mobile-nav-close {
  background: none;
  border: none;
  padding: var(--space-sm);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: var(--font-size-lg);
  color: #666;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:hover {
  background: rgba(0,0,0,0.1);
  color: #333;
}

.mobile-nav-content {
  padding: var(--space-md) 0;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list > li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list .nav-link {
  display: block;
  padding: var(--space-md);
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-base);
  transition: all 0.3s ease;
  min-height: 44px;
  align-items: center;
}

.mobile-nav-list .nav-link:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color, #667eea);
  padding-left: calc(var(--space-md) + var(--space-sm));
}

/* Mobile Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-toggle i {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.nav-dropdown.open .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  background: #f8f9fa;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-header {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #666;
  background: #e9ecef;
  margin: 0;
}

.dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: #333;
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
  min-height: 44px;
  align-items: center;
}

.dropdown-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color, #667eea);
}

.dropdown-divider {
  height: 1px;
  background: #dee2e6;
  margin: var(--space-xs) 0;
  border: none;
}

/* Mobile Contact Info */
.mobile-contact-info {
  padding: var(--space-lg);
  border-top: 1px solid #eee;
  background: #f8f9fa;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.contact-item i {
  width: 20px;
  margin-right: var(--space-sm);
  color: var(--primary-color, #667eea);
}

.contact-item a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color, #667eea);
  color: white;
  text-decoration: none;
  border-radius: 50%;
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Special Mobile Buttons */
.cta-button-mobile {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-weight: 600 !important;
  margin: var(--space-md) var(--space-md) var(--space-md) 0;
  text-align: center;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quotation-link-mobile {
  background: #28a745;
  color: white !important;
  font-weight: 500 !important;
  margin: 0 var(--space-md);
  text-align: center;
  border-radius: 0.5rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (768px and up) */
@media (min-width: 768px) {
  .nav-container {
    padding: var(--space-sm) var(--space-lg);
    max-width: var(--container-md);
  }
  
  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .hamburger-menu {
    display: none;
  }
  
  .mobile-nav,
  .mobile-nav-overlay {
    display: none;
  }
  
  /* Mega Menu - Tablet and Desktop */
  .mega-menu-wrapper {
    position: relative;
  }
  
  .mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 1rem;
    padding: var(--space-lg);
    min-width: 600px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: var(--z-dropdown);
  }
  
  .mega-menu-wrapper:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    top: calc(100% + var(--space-sm));
  }
  
  .mega-menu-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  
  .mega-menu-column h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--primary-color, #667eea);
  }
  
  .mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mega-menu-column li {
    margin-bottom: var(--space-sm);
  }
  
  .mega-menu-column a {
    color: #666;
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }
  
  .mega-menu-column a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #667eea);
  }
  
  .mega-menu-column a i {
    margin-right: var(--space-sm);
    width: 16px;
    text-align: center;
  }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  .nav-container {
    max-width: var(--container-lg);
  }
  
  .mega-menu-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .mega-menu {
    min-width: 800px;
  }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .nav-container {
    max-width: var(--container-xl);
  }
  
  .nav-links a {
    font-size: var(--font-size-base);
    padding: var(--space-sm) var(--space-lg);
  }
}

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

/* Touch device detection */
@media (hover: none) and (pointer: coarse) {
  .nav-links a:hover {
    background: transparent;
  }
  
  .nav-links a:active {
    background: rgba(102, 126, 234, 0.2);
  }
  
  .mega-menu-wrapper:active .mega-menu {
    opacity: 1;
    visibility: visible;
    top: calc(100% + var(--space-sm));
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus styles */
.hamburger-menu:focus,
.mobile-nav-close:focus,
.nav-link:focus,
.dropdown-item:focus {
  outline: 2px solid var(--primary-color, #667eea);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hamburger-menu span,
  .mobile-nav,
  .mobile-nav-overlay,
  .nav-links a,
  .dropdown-item {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .header {
    background: white;
    border-bottom: 2px solid #000;
  }
  
  .nav-links a {
    color: #000;
  }
  
  .nav-links a:hover {
    background: #000;
    color: #fff;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Hardware acceleration */
.mobile-nav,
.mobile-nav-overlay,
.hamburger-menu span {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth scrolling */
.mobile-nav {
  scroll-behavior: smooth;
}

/* ============================================
   MOBILE-SPECIFIC UTILITIES
   ============================================ */

/* Safe area insets for notched screens */
.mobile-nav {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent text selection on mobile navigation */
.mobile-nav,
.mobile-nav-list,
.dropdown-menu {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Better touch targets */
.mobile-nav-list .nav-link,
.dropdown-item {
  min-height: 48px; /* iOS recommendation */
  padding-top: 12px;
  padding-bottom: 12px;
}
