/* ===========================================
   NAVIGATION — Navbar & Footer
   Institutional Brutalism • Slate-950 dark chrome
   =========================================== */

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background-color: var(--color-slate-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-headline);
  font-size: 1.125rem; /* Adjusted slightly to fit with logo */
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
}

.navbar-logo {
  height: 40px; /* Base height */
  width: auto;
  object-fit: contain;
}

.navbar-links {
  display: none;
  gap: 32px;
  align-items: center;
}

.navbar-link {
  font-family: var(--font-headline);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-400);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.navbar-link:hover {
  color: #ffffff;
}

.navbar-link--active {
  color: #ffffff;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 4px;
}

/* --- DROPDOWN --- */
.navbar-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-link-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  color: var(--color-slate-400);
  transition: color var(--transition-fast);
}

.dropdown-toggle:hover {
  color: #ffffff;
}

.dropdown-icon {
  font-size: 1.125rem !important;
  transition: transform var(--transition-base);
  opacity: 0.5;
}

.navbar-item-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--color-slate-950);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 100;
  margin-top: 12px;
}

.navbar-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-400);
  padding: 12px 24px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  padding-left: 28px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-only {
  display: none;
}

.menu-toggle {
  display: flex;
  color: #ffffff;
  padding: 8px;
}

/* --- MOBILE MENU OVERLAY --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--color-slate-950);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px 24px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

/* Mobile Dropdown Overrides */
.mobile-menu .navbar-item-dropdown {
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.mobile-menu .navbar-link-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mobile-menu .dropdown-toggle {
  padding: 12px;
}

.mobile-menu .dropdown-toggle .dropdown-icon {
  font-size: 2rem !important;
  opacity: 1;
}

.mobile-menu .dropdown-menu {
  position: static;
  width: 100%;
  opacity: 1;
  visibility: visible;
  display: none; /* Controlled by .active */
  transform: none;
  background-color: transparent;
  border: none;
  padding: 10px 0 0 20px;
  margin-top: 0;
}

.mobile-menu .navbar-item-dropdown.active .dropdown-menu {
  display: flex;
}

.mobile-menu .navbar-item-dropdown.active .dropdown-icon {
  transform: rotate(180deg);
}

.mobile-menu .dropdown-link {
  font-size: 1.25rem;
  padding: 12px 0;
  color: var(--color-slate-400);
}

.mobile-menu-links .navbar-link {
  font-size: 2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mobile-menu-footer {
  margin-top: auto;
}

/* --- FOOTER --- */
.footer {
  background-color: var(--color-slate-950);
  padding: 100px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  margin-bottom: 80px;
}

.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-logo {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity var(--transition-fast);
}

.footer-logo:hover {
  opacity: 0.8;
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-slate-400);
  max-width: 320px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all var(--transition-fast);
  opacity: 0.6;
}

.social-link:hover {
  opacity: 1;
  color: var(--color-secondary);
}

.social-link .material-symbols-outlined {
  font-size: 14px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-nav-title {
  font-family: var(--font-headline);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ffffff;
  margin-bottom: 8px;
  opacity: 0.3;
}

.footer-link {
  font-family: var(--font-label);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--color-slate-400);
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(6px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copyright {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--color-slate-500);
  text-transform: uppercase;
}

.footer-legal {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--color-slate-500);
  text-transform: uppercase;
}

.legal-highlight {
  color: #ffffff;
  font-weight: 700;
}

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
  .navbar-brand {
    font-size: 1.5rem;
  }

  .navbar-links {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .desktop-only {
    display: block;
  }

  .footer-top {
    grid-template-columns: 1.5fr 3fr;
    gap: 80px;
  }

  .footer-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .footer-logo {
    font-size: 2.25rem;
  }
  
  .footer-top {
    grid-template-columns: 2fr 3fr;
  }
}
