/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #1e40af;
  --primary-red: #dc2626;
  --accent-orange: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #dc2626 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #ef4444 100%);
  --gradient-accent: linear-gradient(135deg, #1e40af 0%, #f59e0b 50%, #dc2626 100%);
  --dark-bg: #0f172a;
  --darker-bg: #020617;
  --light-bg: #f8fafc;
  --lighter-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --border-radius-sm: 6px;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Rajdhani", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
  background: var(--lighter-bg);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Modern Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(30, 64, 175, 0.1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-lg);
  border-bottom-color: rgba(30, 64, 175, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

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

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

.logo img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 80%;
}

.nav-link:hover {
  color: var(--primary-blue);
  background: rgba(30, 64, 175, 0.05);
}

.nav-link.active {
  color: var(--primary-blue);
  background: rgba(30, 64, 175, 0.1);
}

/* Enhanced Multi-level Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle i {
  font-size: 0.75rem;
  transition: var(--transition);
  margin-left: 4px;
}

/* Only apply hover effects on desktop, not mobile */
@media (min-width: 769px) {
  .nav-dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
  }

  /* Main dropdown menu */
  .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow-2xl);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid rgba(30, 64, 175, 0.1);
    overflow: visible;
  }

  .nav-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  /* Show submenu on hover */
  .dropdown-submenu:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  /* Keep main menu open when hovering over submenu */
  .dropdown-submenu:hover .submenu-toggle {
    background: rgba(30, 64, 175, 0.12);
  }
}

/* Dropdown items */
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(30, 64, 175, 0.05);
  position: relative;
  cursor: pointer;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
}

.dropdown-item:hover::before {
  width: 4px;
}

.dropdown-item:hover {
  background: rgba(30, 64, 175, 0.05);
  color: var(--primary-blue);
  padding-left: 2rem;
}

/* Submenu container */
.dropdown-submenu {
  position: relative;
}

/* Submenu items that have submenus */
.submenu-toggle {
  background: rgba(30, 64, 175, 0.08);
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.submenu-toggle::after {
  content: "▶";
  font-size: 0.7rem;
  color: var(--primary-blue);
  margin-left: auto;
}

.submenu-toggle:hover {
  background: rgba(30, 64, 175, 0.12);
}

/* Submenu dropdown - appears to the right */
.dropdown-submenu .dropdown-menu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 8px;
  margin-top: 0;
  min-width: 200px;
  z-index: 1002;
}

/* Submenu items styling */
.dropdown-submenu .dropdown-item {
  background: var(--white);
  border-bottom: 1px solid rgba(30, 64, 175, 0.05);
}

.dropdown-submenu .dropdown-item:hover {
  background: rgba(30, 64, 175, 0.05);
  color: var(--primary-blue);
}

/* Ensure smooth transitions */
.dropdown-menu {
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.dropdown-submenu .dropdown-menu {
  transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out, transform 0.15s ease-in-out;
}

/* Prevent menu from closing when moving mouse between parent and submenu */
@media (min-width: 769px) {
  .nav-dropdown:hover,
  .dropdown-submenu:hover {
    position: relative;
  }
}

/* Enhanced hamburger menu styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.hamburger:hover {
  background: rgba(30, 64, 175, 0.1);
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

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

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

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

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: "Orbitron", monospace;
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  line-height: 1.2;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

/* Modern Footer */
.footer {
  background: var(--white);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(30, 64, 175, 0.1);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.footer-main {
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-family: "Orbitron", monospace;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 80px;
  width: auto;
  filter: none;
}

.footer-logo-text {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1rem;
}

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

.social-link {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  background: rgba(30, 64, 175, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid rgba(30, 64, 175, 0.2);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section ul li a:hover {
  color: var(--primary-blue);
  padding-left: 0.5rem;
}

.footer-section ul li a::before {
  content: "→";
  opacity: 0;
  transition: var(--transition);
  transform: translateX(-10px);
  color: var(--primary-blue);
}

.footer-section ul li a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: rgba(30, 64, 175, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(30, 64, 175, 0.1);
  padding: 2rem 0;
  text-align: center;
  background: rgba(30, 64, 175, 0.02);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
}

.footer-bottom-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--primary-blue);
}

/* Mobile menu overlay */
@media (max-width: 768px) {
  .nav-menu.active::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
    z-index: 1003;
    position: relative;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 100px 0 2rem 0;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1002;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    margin: 0;
    padding: 1rem 2rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
    border-radius: 0;
    justify-content: space-between;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background: rgba(30, 64, 175, 0.05);
  }

  /* Disable hover effects on mobile and use only active states */
  .nav-dropdown:hover .dropdown-toggle i,
  .nav-dropdown:hover > .dropdown-menu,
  .dropdown-submenu:hover > .dropdown-menu,
  .dropdown-submenu:hover .submenu-toggle {
    /* Reset hover effects on mobile */
  }

  /* Mobile dropdown behavior */
  .nav-dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    justify-content: space-between;
    width: 100%;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
  }

  .dropdown-toggle i {
    transition: transform 0.3s ease;
  }

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

  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(30, 64, 175, 0.05);
    margin: 0;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: auto;
  }

  .nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
  }

  .dropdown-item {
    padding: 0.875rem 3rem;
    border-bottom: 1px solid rgba(30, 64, 175, 0.05);
    font-size: 1rem;
    justify-content: space-between;
  }

  .dropdown-item:hover {
    background: rgba(30, 64, 175, 0.08);
    padding-left: 3.5rem;
  }

  /* Submenu handling on mobile */
  .dropdown-submenu {
    width: 100%;
  }

  .submenu-toggle {
    background: rgba(30, 64, 175, 0.08);
    position: relative;
    justify-content: space-between;
  }

  .submenu-toggle::after {
    content: "▼";
    transition: transform 0.3s ease;
    font-size: 0.8rem;
  }

  .dropdown-submenu.active .submenu-toggle::after {
    transform: rotate(180deg);
  }

  .dropdown-submenu .dropdown-menu {
    background: rgba(30, 64, 175, 0.08);
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  .dropdown-submenu.active .dropdown-menu {
    max-height: 300px;
  }

  .dropdown-submenu .dropdown-item {
    padding-left: 4rem;
    font-size: 0.95rem;
  }

  .dropdown-submenu .dropdown-item:hover {
    padding-left: 4.5rem;
  }

  /* Footer responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1;
    text-align: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .nav-container {
    padding: 1rem;
  }

  .logo img {
    height: 40px;
  }

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

  .section-title {
    font-size: 2rem;
  }

  .nav-link {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .dropdown-item {
    padding: 0.625rem 2.5rem;
    font-size: 0.9rem;
  }

  .dropdown-submenu .dropdown-item {
    padding-left: 3.5rem;
    font-size: 0.85rem;
  }

  .social-links {
    justify-content: center;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}
