/* COMMON STYLES - UPDATED WITH SUBMENU SUPPORT */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --secondary: #1e293b;
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #cbd5e1;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark);
  color: var(--light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    var(--primary-light),
    var(--accent-light)
  );
}

/* Parallax Background */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(34, 197, 94, 0.05) 0%,
      transparent 50%
    );
  background-size: 100% 100%;
  transform: translateZ(0);
}

/* Common Animations */
@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== GLOBAL HEADER STYLES (CONSISTENT ACROSS ALL PAGES) ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 40px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.scrolled {
  padding: 15px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-light);
  z-index: 1001;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  color: var(--primary);
  font-size: 2px;
  animation: pulse 2s infinite;
}

.logo-icon img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-item {
  position: relative;
}

/* GLOBAL NAV LINK STYLES - CONSISTENT ACROSS ALL PAGES */
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 10px 0;
  display: flex;
  align-items: center;
}

/* GLOBAL NAV HOVER COLOR - CONSISTENT ACROSS ALL PAGES */
.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a i {
  margin-left: 8px;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}

.nav-links a:hover i {
  opacity: 1;
  transform: translateX(0);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-main-link {
  flex: 1;
}

.dropdown-arrow {
  display: none;
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 14px;
  padding: 5px 10px;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.dropdown-arrow:hover {
  color: var(--primary);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 250px;
  background: var(--secondary);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
  padding: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: var(--gray);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.dropdown-content a:hover {
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--primary);
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Submenu Styles */
.dropdown-submenu {
  position: relative;
}

.submenu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  color: var(--light);
  font-weight: 600;
  border-left: 3px solid transparent;
}

.submenu-header i {
  margin-left: auto;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.submenu-content {
  position: absolute;
  top: 0;
  left: 100%;
  width: 220px;
  background: var(--secondary);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  z-index: 101;
  padding: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.submenu-content a {
  padding: 10px 20px;
  font-size: 14px;
}

.dropdown-submenu:hover .submenu-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.dropdown-submenu:hover .submenu-header i {
  transform: rotate(90deg);
}

.dropdown-submenu:hover .submenu-header {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--primary);
  color: var(--primary-light);
}

/* GLOBAL CTA BUTTON - CONSISTENT ACROSS ALL PAGES */
.cta-button {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
  text-decoration: none;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.cta-button::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: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
  color: white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--light);
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
}

.close-menu {
  display: none;
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: none;
  color: var(--light);
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
}

/* Overlay for mobile menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Common section styles */
.section-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.7;
  transition: opacity 0.8s ease;
}

/* Common buttons */
.secondary-button {
  background: transparent;
  color: var(--gray);
  border: 1px solid #475569;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.secondary-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease;
}

.secondary-button:hover::before {
  width: 100%;
}

.secondary-button:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

/* Footer */
footer {
  background: var(--dark);
  padding: 100px 40px 50px;
  position: relative;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.footer-col h3 {
  font-size: 20px;
  margin-bottom: 25px;
  color: var(--light);
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.footer-links a i {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-links a:hover i {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--light);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 50px;
  border-top: 1px solid #334155;
  color: var(--gray);
  font-size: 15px;
}

.footer-bottom a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.scroll-to-top.active {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-5px);
}

/* Global Help Center Floating Button - RIGHT SIDE */
.global-help-button {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
  text-decoration: none;
  border: none;
  padding: 15px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 50px;
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  flex-direction: row-reverse;
}

.global-help-button::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: left 0.5s ease;
}

.global-help-button:hover::before {
  left: 100%;
}

.global-help-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.7);
  color: white;
  max-width: 200px;
  padding-left: 25px;
}

.global-help-button i {
  font-size: 20px;
  min-width: 20px;
}

.global-help-button span {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.global-help-button:hover span {
  opacity: 1;
  max-width: 120px;
}

/* Responsive design for common components */
@media (max-width: 1200px) {
  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .mobile-menu-btn {
    display: block;
  }

  .close-menu {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    padding: 100px 30px 30px;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  /* Mobile dropdown styles */
  .dropdown-arrow {
    display: block;
  }

  .dropdown-header {
    width: 100%;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-top: 0;
    margin-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown.active .dropdown-content {
    display: block;
    max-height: 500px;
    margin-top: 10px;
  }

  /* Mobile submenu styles */
  .dropdown-submenu {
    width: 100%;
  }

  .submenu-header {
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 5px;
  }

  .submenu-header i {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
  }

  .dropdown-submenu.active .submenu-header i {
    transform: rotate(90deg);
  }

  .submenu-content {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown-submenu.active .submenu-content {
    max-height: 300px;
    margin-bottom: 10px;
  }

  /* Rotate arrow when dropdown is active */
  .dropdown.active .dropdown-arrow i {
    transform: rotate(180deg);
  }

  .dropdown-arrow i {
    transition: transform 0.3s ease;
  }

  .dropdown-content a {
    padding: 10px 15px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
  }

  /* Adjust CTA button for mobile */
  .cta-button {
    display: none; /* Hide in mobile nav menu, appears as separate contact link */
  }
}

@media (max-width: 768px) {
  header {
    padding: 15px 20px;
  }

  header.scrolled {
    padding: 12px 20px;
  }

  .logo {
    font-size: 20px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .social-link {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }

  /* Fix for mobile horizontal scroll */
  body,
  html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  header,
  footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .header-container,
  .footer-container {
    max-width: 100% !important;
  }
}

/* Prevent horizontal overflow globally */
section,
div,
article,
aside,
nav {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* Fix for responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for mobile menu overlay */
.overlay.active {
  z-index: 999;
}