/* ========================================
   SOFTMATRIX - Component Styles (Cyber-Enterprise V2)
   ======================================== */

/* Navbar - Ultra Sleek */
.navbar {
  padding: 1.5rem 0;
  position: fixed; /* Critical for sticky behavior */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: padding 0.3s ease, background 0.3s ease;
  background: transparent;
}

/* Force Navbar to stay horizontal on mobile */
/* Mobile responsiveness moved to bottom to prevent override issues */

.navbar.sticky {
  padding: 1rem 0;
  background: #050505; /* Solid dark background */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%); /* Tech Blue Gradient */
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; 
  font-size: 1rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); /* Perfect Hexagon */
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.5); /* Neon Glow */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  position: relative;
}

.logo-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, transparent 100%); /* Shine effect */
  z-index: 1;
}

.logo-title { color: #fff; font-size: 1.5rem; letter-spacing: -1px; }

.nav-menu { display: flex; gap: 2.5rem; list-style: none; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text-main); }

/* Hero Section - High Energy */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 180px 0 100px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  z-index: 0;
}

.hero-content { position: relative; z-index: 2; max-width: 850px; }
.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1; margin-bottom: 2rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 3rem; }

/* Featured Service Cards - Structural Design */
.service-card {
  padding: 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  background: var(--bg-card);
}

.service-icon { font-size: 2.5rem; margin-bottom: 2rem; display: block; }

/* Footer */
.footer {
  padding: 100px 0 50px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  margin-top: 120px;
}

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; }
.footer-subtitle { color: #fff; margin-bottom: 2rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary); padding-left: 8px; }

.footer-bottom {
  margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.85rem;
}

.mobile-menu-toggle { display: none; cursor: pointer; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Mobile Menu - Right Sidebar */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 80%;
  height: 100vh;
  background: var(--bg-surface);
  z-index: 1020; /* Very high to sit on top of everything */
  padding: 100px 30px 40px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -5px 0 30px rgba(0,0,0,0.5);
  border-left: 1px solid var(--border);
  display: block !important;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Mobile Menu Overlay */
#mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1015; /* Above Navbar (1000), Below Menu (1020) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Toggle Animation Styles */
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1001; /* Above navbar if needed, but navbar is 1000 so this is top */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
}

.whatsapp-icon {
  width: 35px;
  height: 35px;
  fill: white;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 600px) {
  .footer-grid { 
    grid-template-columns: 1fr; 
    gap: 30px; /* Reduced gap from 60px */
  }
  
  .footer {
    padding: 60px 0 30px; /* Reduced padding */
    margin-top: 60px;
  }
  
  .footer-subtitle {
    margin-bottom: 1rem; /* Compact subtitle spacing */
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 3rem; }
}

/* =========================================
   MOBILE RESPONSIVE OVERRIDES
   (Must be at bottom to override defaults)
   ========================================= */

@media (max-width: 900px) {
  .navbar .container {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  /* Hide Desktop Nav & Buttons */
  .nav-menu, 
  .navbar .container > .btn { display: none !important; }
  
  /* Show Mobile Toggle */
  .mobile-menu-toggle { display: block !important; pointer-events: auto; }
}

/* Promote the toggle above the overlay/menu when active so it remains clickable */
.mobile-menu-toggle.active {
  position: fixed;
  top: 28px; /* Matches roughly 1.5rem + alignment */
  right: 24px; /* Matches mobile container padding */
  z-index: 1030; /* Higher than menu (1020) and overlay (1015) */
}

/* Base Styles for Toggle Spans (Moved from HTML) */
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin-bottom: 5px;
  transition: 0.3s;
  border-radius: 2px;
}
