/* ===== THEME VARIABLES ===== */

/* Light Theme */
:root {
  --bg-main: #ffffff;
  --bg-section: #f9fafb;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);

  --text-main: #111111;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  --border-soft: rgba(0, 0, 0, 0.08);

  --accent: #ff4ecd;
  --accent-2: #9b5dcd;

  /* Button / UI colors (merged) */
  --bg-color: #ffffff;
  --text-color: #111111;
  --btn-bg: #f0f0f0;

  /* header sizing used to offset page content when headers are fixed */
  --top-header-height: 50px; /* height reserved for .top-header (approx) */
  --navbar-height: 75px; /* height of .navbar-custom */
}

/* Dark Theme */
.dark-theme {
  --bg-main: #000000;
  --bg-section: #050505;
  --bg-card: #0f172a;
  --bg-glass: rgba(0, 0, 0, 0.65);

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-light: #9ca3af;

  --border-soft: rgba(255, 255, 255, 0.08);

  --accent: #ff4ecd;
  --accent-2: #aa42ff;

  /* Button / UI colors (merged) */
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --btn-bg: #1e293b;
}

/* Toggle Button */
#theme-toggle {
  z-index: 5000;
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--btn-bg);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  padding: 12px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.3s ease;
}

.theme #theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

.top-header,
.navbar-custom {
  background: var(--bg-glass);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}

/* TOP HEADER */
.top-header {
  position: fixed;
  top: 0;
  /* background: #0b0b0b; */
  height: fit-content;
  width: 100%;
  font-size: 1.5rem;
  /* color: #d1d5db; */
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: var(--bg-glass);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.header-container {
  width: 100%;
  height: 100%;
  padding: 8px 280px;
  display: flex;
  /* align-items: center; */
  justify-content: space-between;
}

@media (max-width: 1600px) {
  .header-container {
    padding: 8px 150px;
  }
}

@media (max-width: 1200px) {
  .header-container {
    padding: 8px 50px;
  }
}

.header-right i {
  margin-right: 6px;
  color: var(--accent);
}

/* Left */
.header-left a,
.header-right a {
  margin-left: 15px;
  color: var(--text-light);
  transition: color 0.3s ease;
  text-decoration: none;
}

.header-left a:hover,
.header-right a:hover {
  color: var(--accent);
}

/* =========================================================== */
/* NAVBAR */
.navbar-custom {
  width: 100%;
  height: 75px;
  top: 50px;
  position: fixed;
  left: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  background: var(--bg-glass);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
  max-width: 1400px;
  height: 100%;
  margin: auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 1200px) {
  .nav-container {
    padding: 0 40px;
  }
}

/* Logo */
.nav-logo img {
  height: 42px;
  object-fit: contain;
}

/* Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 35px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

/* Hover underline animation (subtle, moved lower + scale animation) */
.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px; /* move indicator further below text */
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: center;
  transform: scaleX(0);
  transition:
    transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
    background 200ms;
  border-radius: 2px;
  opacity: 0.9;
}

.nav-links li a:hover::after {
  transform: scaleX(1);
}

.nav-links li a:hover {
  color: var(--accent);
}

/* CTA Button */
.nav-cta .btn {
  border-radius: 25px;
  padding: 8px 22px;
  font-weight: 600;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent-2);
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero styles consolidated further below */
/* NAV ITEM */
.nav-item {
  position: relative;
}

/* Dropdown toggle */
/* .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
} */

/* MEGA MENU */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 500px;
  background: var(--bg-color);
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: 0.3s ease;
  z-index: 999;
}

/* Show on hover */
@media (min-width: 925px) {
  .nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Title */
.mega-menu h3 {
  font-size: 26px;
  margin-bottom: 25px;
}

/* Grid */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Lists */
.mega-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-grid li {
  font-size: 15px;

  padding: 10px 0;
  cursor: pointer;
  transition: 0.2s;
}

.mega-grid li:hover {
  color: var(--accent-2);
  transform: translateX(4px);
}
.nav-item:hover i {
  transform: rotate(180deg);
  transition: 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
  }
  /* Overlay for mobile menu */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
    z-index: 998;
  }
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 120px 40px 40px;
    visibility: hidden;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    overflow-y: auto;
  }
  .nav-links.active {
    left: 0;
    visibility: visible;
  }
  /* Close button */
  .nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
  }
  .nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  .nav-links li {
    text-align: left;
    padding: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
  }
  .nav-links li:last-child {
    border-bottom: none;
  }
  .nav-links li a {
    font-size: 1.1rem;
    padding: 18px 20px;
    display: block;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
  }
  .nav-links li a:hover {
    color: var(--accent);
  }
  .nav-cta {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mega-menu {
    position: static;
    width: 100%;
    padding: 20px 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition:
      max-height 0.4s ease,
      opacity 0.3s ease;
  }
  .nav-item.active .mega-menu {
    max-height: 800px; /* Increased to fit all items */
    opacity: 1;
    visibility: visible;
  }
  .mega-menu h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent);
    text-align: center;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
  }
  .mega-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .mega-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .mega-grid li {
    padding: 12px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
    transition: color 0.3s ease;
  }
  .mega-grid li:last-child {
    border-bottom: none;
  }
  .mega-grid li::before {
    content: "→ ";
    color: var(--accent);
    font-weight: bold;
    margin-right: 5px;
  }
  .mega-grid li:hover {
    color: var(--accent);
  }
  .mega-grid li a {
    color: inherit;
    text-decoration: none;
    display: block;
  }
}

/* Tablet and below */
@media (max-width: 1370px) {
  .top-header {
    display: none;
  }
  .navbar-custom {
    top: 0px;
  }
  body {
    padding-top: var(--navbar-height);
  }
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}

.mobile-menu.active {
  left: 0;
}

.mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.3s ease;
  z-index: 10000;
}

.mobile-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 120px 40px 40px;
  gap: 0;
}

.mobile-nav > a {
  padding: 18px 0;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.3s ease;
  font-size: 1.1rem;
}

.mobile-nav > a:hover {
  color: var(--accent);
}

.mobile-nav > a:last-child {
  border-bottom: none;
}

.mobile-services {
  border-bottom: 1px solid var(--border-soft);
}

.mobile-services-header {
  padding: 18px 0;
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.3s ease;
  border-bottom: 1px solid var(--border-soft);
}

.mobile-services-header:hover {
  color: var(--accent);
}

.mobile-services-list {
  display: none;
  flex-direction: column;
  padding-left: 20px;
}

.mobile-services-list.active {
  display: flex;
}

.mobile-services-list a {
  padding: 12px 0;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.3s ease;
  font-size: 1rem;
  position: relative;
}

.mobile-services-list a::before {
  content: "→ ";
  color: var(--accent);
  font-weight: bold;
}

.mobile-services-list a:hover {
  color: var(--accent);
}

.mobile-services-list a:last-child {
  border-bottom: none;
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 9998;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}
