/* Mega Menu Styles */
:root {
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #fc6067 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --navbar-height: 65px;
  --navbar-mobile-height: 55px;
}

/* Floating Navbar Styles */
.navbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 2560px;
  height: var(--navbar-height);
  background: rgba(23, 23, 23, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(23, 23, 23, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) translateY(-5px);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 35px;
  width: auto;
  margin-right: 0.5rem;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: var(--glass-bg);
  transform: translateY(-2px);
}

/* Start Project Button Styles */
.nav-cta {
  margin-left: 1.5rem;
}

.nav-btn {
  height: 45px;
  padding: 0 1.5rem;
  background: var(--gradient-primary);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
  z-index: 1;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #fc6067 100%);
  z-index: -1;
  transition: opacity 0.3s ease;
}

.nav-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #7376ff 0%, #ff7077 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.nav-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.nav-btn:hover::after {
  opacity: 1;
}

.btn-text {
  position: relative;
  font-weight: 600;
}

.btn-icon {
  font-size: 1.2rem;
  position: relative;
  transition: transform 0.3s ease;
}

.nav-btn:hover .btn-icon {
  transform: translateX(3px) translateY(-3px);
}

.nav-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  background: rgba(23, 23, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  transition: all 0.3s ease;
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.nav-toggle i {
  font-size: 24px;
  color: #fff;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  background: var(--glass-bg);
}

.nav-item {
  position: relative;
}

.mega-menu {
  position: fixed;
  top: var(--navbar-height);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(95vw, 2400px);
  background: rgba(23, 23, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.mega-menu-column {
  padding: 1rem;
}

.mega-menu-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  position: relative;
  padding-left: 1.5rem;
}

.mega-menu-title i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mega-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-item {
  margin-bottom: 0.75rem;
}

.mega-menu-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.mega-menu-link:hover {
  color: #fff;
  background: var(--glass-bg);
}

.mega-menu-link i {
  font-size: 1.2rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Featured Section */
.mega-menu-featured {
  background: var(--glass-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.featured-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  text-align: center;
}

.featured-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  background: var(--gradient-primary);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.featured-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

/* Mobile Styles */
@media (max-width: 991px) {
  .navbar {
    top: 5px;
    height: var(--navbar-mobile-height);
  }

  .nav-container {
    padding: 0 0.75rem;
  }

  .logo-img {
    height: 30px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 40, 40, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse 2s ease-in-out 1s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }
  
  .nav-toggle i {
    font-size: 26px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .nav-toggle[aria-expanded="true"] i:before {
    content: "\eb99"; /* ri-close-line */
  }
  
  .nav-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(252, 96, 103, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .nav-toggle:hover::after {
    opacity: 1;
  }

  .nav-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(252, 96, 103, 0.3));
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
  }

  .nav-menu {
    position: fixed;
    top: calc(var(--navbar-mobile-height) + 10px); 
    left: 0;
    width: 100%;
    height: calc(100vh - var(--navbar-mobile-height) - 15px);
    background: rgba(23, 23, 23, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    font-size: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-link::after {
    content: '\ea50';
    font-family: 'remixicon';
    font-size: 1.25rem;
    transition: transform 0.3s ease;
  }

  .nav-item.active .nav-link::after {
    transform: rotate(180deg);
  }

  .nav-cta {
    margin-top: 1.5rem;
    margin-left: 0;
    width: 100%;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
    height: 45px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Mobile Toggle Animation */
  .toggle-line {
    width: 22px;
    height: 3px;
    margin: 2px 0;
    background: #ffffff;
    transition: all 0.3s ease;
  }

  .nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }

  .nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mega-menu {
    position: static;
    width: 100%;
    transform: none;
    display: none;
    opacity: 1;
    visibility: visible;
    border: none;
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 1rem;
    box-shadow: none;
    background: rgba(35, 35, 35, 0.5);
  }

  .nav-item.active .mega-menu {
    display: block;
    transform: none;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mega-menu-column {
    padding: 0.5rem;
  }

  .mega-menu-title {
    font-size: 1rem;
  }

  .mega-menu-link {
    padding: 0.5rem 0;
  }

  .mega-menu-featured {
    margin-top: 1.5rem;
    padding: 1rem;
  }

  main {
    padding-top: calc(var(--navbar-mobile-height) + 15px);
  }

  /* Section padding is now handled by global styles */

  /* Special styling for direct navigation links */
  .nav-item .nav-link[href="#services"],
  .nav-item .nav-link[href="#portfolio"] {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    border-left: 3px solid #6366f1;
    position: relative;
    overflow: hidden;
  }
  
  .nav-item .nav-link[href="#services"]::before,
  .nav-item .nav-link[href="#portfolio"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    pointer-events: none;
  }
  
  .nav-item .nav-link[href="#services"]:active::before,
  .nav-item .nav-link[href="#portfolio"]:active::before {
    transform: translateX(0);
  }
  
  .nav-item .nav-link[href="#services"]::after,
  .nav-item .nav-link[href="#portfolio"]::after {
    content: '\ea6c'; /* ri-arrow-down-line */
    font-family: 'remixicon';
    font-size: 1.25rem;
    transition: transform 0.3s ease;
  }
  
  .nav-item .nav-link[href="#services"]:active::after,
  .nav-item .nav-link[href="#portfolio"]:active::after {
    transform: translateY(3px);
  }

  /* Hide mega-menu for services and portfolio on mobile */
  .nav-item:has(.nav-link[href="#services"]) .mega-menu,
  .nav-item:has(.nav-link[href="#portfolio"]) .mega-menu {
    display: none !important;
  }

  /* Styling for direct navigation items with the mobile-direct-nav class */
  .nav-item.mobile-direct-nav .nav-link {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    border-left: 3px solid #6366f1;
    position: relative;
    overflow: hidden;
  }
  
  .nav-item.mobile-direct-nav .mega-menu {
    display: none !important;
    visibility: hidden !important;
  }

  /* Direct navigation icon for better UX */
  .nav-item .nav-link[href="#services"]::after,
  .nav-item .nav-link[href="#portfolio"]::after,
  .nav-item.mobile-direct-nav .nav-link::after {
    content: '\ea93' !important; /* ri-arrow-down-s-line */
    color: #6366f1;
  }
  
  /* Small hint below direct navigation links */
  .nav-item .nav-link[href="#services"] .direct-nav-hint,
  .nav-item .nav-link[href="#portfolio"] .direct-nav-hint,
  .nav-item.mobile-direct-nav .nav-link .direct-nav-hint {
    display: block;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #fc6067);
    border-radius: 1px;
  }
}

/* Scrollbar Styles for Mobile Menu */
.nav-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
  background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Hide custom cursor on mobile devices */
@media (max-width: 991px), (pointer: coarse) {
  .cursor, 
  .cursor-follower {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* Global Section Margins */
section {
  padding: 4rem clamp(1rem, 5vw, 4rem);
  margin: 0 auto;
  max-width: 2560px;
  width: 100%;
}

/* Container Styling */
.container {
  width: 100%;
  max-width: 2560px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

@media (max-width: 991px) {
  section {
    padding: 3rem clamp(1rem, 4vw, 2rem);
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 2560px;
  padding: 0 clamp(1rem, 5vw, 2rem);
  margin: 0 auto;
  height: 100%;
}
