/* =========================================================
   MAXITECH — Layout: Header, Footer, Navigation
   Premium Enterprise Style
   ========================================================= */

/* ── Header / Navigation ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

/* Dark header variant (for dark hero pages) */
.header--dark {
  background: rgba(7, 17, 31, 0.8);
}

.header--dark.scrolled {
  background: rgba(7, 17, 31, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width-2xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

@media (min-width: 768px) {
  .header__inner {
    padding-inline: var(--space-2xl);
  }
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-primary);
}

.header--dark .header__logo {
  color: var(--color-text-light);
}

.header__logo img {
  height: 28px;
  width: auto;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .header__nav {
    display: flex;
  }
}

.header__nav a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  letter-spacing: var(--ls-wide);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
  padding: var(--space-xs) 0;
}

.header--dark .header__nav a {
  color: var(--color-text-light-secondary);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-blue);
  border-radius: 1px;
  transition: width var(--duration-base) var(--ease-out);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-text-primary);
}

.header--dark .header__nav a:hover,
.header--dark .header__nav a.active {
  color: var(--color-text-light);
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header--dark .header__nav a::after {
  background: var(--color-cyan);
}

.header__cta {
  display: none;
}

@media (min-width: 1024px) {
  .header__cta {
    display: inline-flex;
  }
}

/* Mobile Menu Toggle */
.header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 2px 0;
}

@media (min-width: 1024px) {
  .header__toggle {
    display: none;
  }
}

.header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-out);
  transform-origin: center;
}

.header--dark .header__toggle span {
  background: var(--color-text-light);
}

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

.header__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  padding: var(--space-2xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: color var(--duration-fast) var(--ease-out);
}

.mobile-menu a:first-child {
  border-top: 1px solid var(--color-border-light);
}

.mobile-menu a:hover {
  color: var(--color-blue);
}

/* ── Footer ── */
.footer {
  background: var(--color-navy-deep);
  color: var(--color-text-light);
  padding-block: var(--space-4xl) var(--space-2xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand {
  max-width: 320px;
}

.footer__brand .header__logo {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.footer__brand p {
  font-size: var(--fs-sm);
  color: var(--color-text-light-muted);
  line-height: var(--lh-relaxed);
}

.footer__heading {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-text-light-muted);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: var(--fs-sm);
  color: var(--color-text-light-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__links a:hover {
  color: var(--color-cyan);
}

.footer__bottom {
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__bottom p {
  font-size: var(--fs-xs);
  color: var(--color-text-light-muted);
}

/* ── Main content offset for fixed header ── */
main {
  padding-top: 72px;
}
