/* Base Styles */
.container {
  max-width: var(--rail);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.row {
  display: flex;
  justify-content: space-between;
}

.alignItemsCenter { align-items: center; }

.col12 { width: 100%; }
.colMd12 { width: 100%; }
.colLg3 { width: 25%; }
.colLg4 { width: 33.33%; }
.colLg8 { width: 66.66%; }
.colLg9 { width: 75%; }

/* Top Bar Styling */
.headerTopBar {
  background-color: #000;
  border-bottom: 1px solid var(--border-default);
  padding: 10px 0;
}

.headerLeft p,
.addressContent p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
}

.actionLink {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--speed-base);
  display: flex;
  align-items: center;
}

.actionLink:hover { color: var(--text-primary); }

.headerRight {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.addressContent a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 5px;
}

.socialIconWrapper {
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 20px;
}

.socialIcon {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 15px;
}

.socialIcon li a {
  color: var(--text-secondary);
  transition: var(--speed-base);
}

.socialIcon li a:hover { color: var(--text-primary); }

/* Main Header */
.rainbowHeader {
  padding: 16px 0;
  background: transparent;
  transition: var(--speed-base) var(--ease-out);
  position: relative;
  z-index: 999;
}

.headerSticky {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 15, 17, 0.85);
  backdrop-filter: blur(15px);
  padding: 16px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* brightness(0) crushes the mark to solid black, invert(1) flips it to pure
   white - renders the wordmark full white whatever fills the SVG carries. */
.logoLight {
  height: 35px;
  filter: brightness(0) invert(1);
}

.headerRightMain {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.desktopNav {
  display: block;
}

.mainMenu {
  display: flex;
  list-style: none;
  gap: 35px;
  margin: 0;
}

.mainMenu li a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  font-size: 15px;
  transition: var(--speed-base);
}

.mainMenu li a:hover { color: var(--blue); }

/* Dropdown Animation & Layout */
.hasDropdown {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.menuItemWithIcon {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdownIcon { transition: var(--speed-base); }
.hasDropdown:hover .dropdownIcon {
  transform: rotate(180deg);
  color: var(--blue);
}

.megaSubmenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: #121214;
  border: 1px solid var(--border-default);
  min-width: 420px;
  max-width: 520px;
  padding: 12px;
  border-radius: var(--radius);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--speed-base) var(--ease-out);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.hasDropdown:hover .megaSubmenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

.projectCard {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-radius: var(--radius);
  transition: var(--speed-fast);
}

.projectCard:hover { background: rgba(255, 255, 255, 0.05); }

.projectImageWrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.projectImageWrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projectLogoWrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(25, 25, 28, 0.9), rgba(10, 10, 12, 1));
  border: 1px solid var(--border-subtle);
}

.projectLogoWrapper svg {
  width: auto;
  height: auto;
  max-width: 34px;
  max-height: 30px;
}

.projectName {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.projectDesc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 2px 0 0 0;
  line-height: 1.4;
}

.hambergerButton {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  margin-left: 18px;
}

.mobileMenuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 1200;
}

.mobileMenuPanel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(88vw, 340px);
  height: 100vh;
  background: #121216;
  border-left: 1px solid var(--border-default);
  box-shadow: -14px 0 36px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform var(--speed-base) ease;
  z-index: 1300;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.mobileMenuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-default);
}

.mobileLogo {
  height: 28px;
  filter: brightness(0) invert(1);
}

.mobileCloseButton {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobileMenuList,
.mobileProjectsList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobileMenuList li + li {
  margin-top: 12px;
}

.mobileMenuList a {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.mobileProjectsBlock {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}

.mobileProjectsTitle {
  color: var(--text-tertiary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.mobileProjectsList li + li {
  margin-top: 9px;
}

.mobileProjectsList a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
}

.active.mobileMenuOverlay {
  opacity: 1;
  visibility: visible;
}

.active.mobileMenuPanel {
  transform: translateX(0);
}

/* Utilities */
.mr2 { margin-right: 8px; }
.ml1 { margin-left: 4px; }

@media (max-width: 767px) {
  .desktopNav { display: none; }
  .hambergerButton { display: inline-flex; }
  .headerTopBar { display: none; }
  .colLg3 { width: 50%; }
  .colLg9 { width: 50%; }
}

@media (min-width: 768px) {
  .mobileMenuOverlay,
  .mobileMenuPanel {
    display: none;
  }
}
