/* ===========================
   GLOBAL STYLES
   ModelBeacon - Clean & Fast
   =========================== */

:root {
  --bg: #fafbfc;
  --bg-dark: #0f1419;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --primary: #e67300;
  --primary-hover: #cc6600;
  --primary-soft: #fff7ed;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  position: relative;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 32px;
  width: auto;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.site-nav a.active {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-dropdown-trigger:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.nav-dropdown-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1001;
  margin-top: 4px;
}

/* Dropdown scrollbar */
.nav-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: #f8fafc;
}

.nav-dropdown-menu a img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.nav-dropdown-label {
  padding: 8px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* Nav Divider */
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border-strong);
  margin: 0 8px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--bg-dark);
  color: #94a3b8;
  padding: 48px 24px 32px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: block;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-column h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 13px;
  color: #64748b;
}

.footer-company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-company a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.footer-company a:hover {
  color: var(--primary);
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.footer-legal {
  display: flex;
  gap: 24px;
  font-size: 13px;
}

.footer-legal a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: #94a3b8;
}

/* ===========================
   MOBILE STYLES
   =========================== */
@media (max-width: 900px) {
  .footer-links {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 0 16px;
    height: 56px;
  }

  .site-logo img {
    height: 26px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px;
    gap: 4px;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a,
  .site-nav .nav-dropdown-trigger {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-divider {
    display: none;
  }

  /* Mobile dropdown */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: #f8fafc;
    margin: 4px 0 0 0;
    padding: 4px;
    border-radius: 8px;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu a {
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Footer mobile */
  .site-footer {
    padding: 40px 16px 24px;
    margin-top: 48px;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-links {
    width: 100%;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-legal {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 24px;
  }
}
