/* ============================================================
 * nav-footer.css — Self-contained nav + beautified footer styles
 *
 * This stylesheet is the SINGLE SOURCE OF TRUTH for the site nav
 * and footer appearance. It does NOT depend on shared.min.css —
 * pages that load only nav-footer.css still get a fully styled
 * nav and footer.
 *
 * Edit this file to globally update nav/footer appearance.
 * ============================================================ */

/* ===== Base nav bar ===== */
nav#mainNav,
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.5s cubic-bezier(.25,.46,.45,.94);
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
nav#mainNav.scrolled,
nav.scrolled {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(250, 250, 250, 0.85);
}

/* Nav logo */
.nav-logo {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.nav-logo .dice-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Nav links container */
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg2);
  align-items: center;
}
.nav-links a {
  transition: color 0.3s;
  color: var(--fg2);
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--fg);
}

/* Nav CTA button */
.nav-cta {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 980px;
  background: var(--fg);
  color: #fff;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: scale(1.04);
  opacity: 0.9;
}

/* Mobile hamburger button */
.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.nav-mobile-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  transition: all 0.3s;
  border-radius: 1px;
}
.nav-mobile-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-btn.active span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Language switcher */
.nav-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 12px;
  font-weight: 500;
  -webkit-user-select: none;
  user-select: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.nav-lang-switch:hover {
  border-color: var(--blue);
}
.nav-lang-item {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  color: var(--fg2);
  font-size: 12px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  cursor: default;
}
.nav-lang-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.nav-lang-item:not(.active) {
  color: var(--fg2);
  cursor: pointer;
  text-decoration: none;
}
.nav-lang-item:not(.active):hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* ===== Nav dropdown ===== */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  cursor: pointer;
  color: var(--fg2);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.3s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger:hover {
  color: var(--fg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  z-index: 200;
  margin-top: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  color: var(--fg2);
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-dropdown-menu a:hover {
  background: var(--bg2);
  color: var(--fg);
}
.nav-dropdown-menu a i {
  width: 16px;
  color: var(--fg3);
  font-size: 13px;
}
.nav-dropdown-menu a:hover i {
  color: var(--accent);
}

/* Nav dropdown arrow */
.nav-dropdown-arrow {
  display: inline-block;
  font-size: 10px;
  margin-left: 4px;
  color: var(--fg3);
  transition: transform 0.25s ease;
}
.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--fg);
}

/* ===== Responsive nav (tablet + mobile) ===== */
@media (max-width: 900px) {
  nav#mainNav,
  nav {
    padding: 0 24px;
  }
}

@media (max-width: 600px) {
  nav#mainNav,
  nav {
    padding: 0 20px;
  }
  /* Hide inline links on mobile, show hamburger */
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 99;
    align-items: flex-start;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .nav-mobile-btn {
    display: flex;
  }
  /* Mobile dropdown: expand inline, no hover popup */
  .nav-links.mobile-open .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links.mobile-open .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
  }
  .nav-links.mobile-open .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0 0 16px !important;
    min-width: 0 !important;
    width: 100%;
    margin-top: 8px;
  }
  .nav-links.mobile-open .nav-lang-switch {
    margin-top: 8px;
  }
}

/* ===== Legacy footer fallback (for pages with old <footer> without .site-footer) =====
 * Pages that still have the old <footer><div class="footer-inner">...</div></footer>
 * structure get basic styling. New pages use .site-footer (below).
 */
footer:not(.site-footer) {
  padding: 56px 0;
  border-top: 1px solid var(--border-light);
}
footer:not(.site-footer) .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
footer:not(.site-footer) .footer-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--fg3);
}
footer:not(.site-footer) .footer-links a:hover {
  color: var(--fg);
}
footer:not(.site-footer) .footer-social {
  display: flex;
  gap: 16px;
}
footer:not(.site-footer) .footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg3);
  font-size: 16px;
  transition: all 0.3s;
}
footer:not(.site-footer) .footer-social a:hover {
  color: var(--fg);
  background: var(--bg3);
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  footer:not(.site-footer) .footer-inner {
    padding: 0 20px;
    flex-direction: column;
    text-align: center;
  }
  footer:not(.site-footer) .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  footer:not(.site-footer) .footer-social {
    justify-content: center;
  }
}

/* ===== Beautified Footer (multi-column) ===== */
.site-footer {
  padding: 64px 0 24px;
  border-top: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}

/* Brand column */
.footer-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--fg);
  margin-bottom: 16px;
}
.footer-brand .footer-logo .dice-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.footer-tagline {
  font-size: 13px;
  color: var(--fg2);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 360px;
  font-weight: 300;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg2);
  font-size: 15px;
  transition: all 0.3s cubic-bezier(.25,.46,.45,.94);
}
.footer-social a:hover {
  color: var(--fg);
  background: var(--bg3);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* Link columns */
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.footer-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg2);
  padding: 5px 0;
  transition: color 0.2s, padding-left 0.2s;
  font-weight: 400;
}
.footer-col a:hover {
  color: var(--accent);
  padding-left: 4px;
}
.footer-col a i {
  width: 14px;
  color: var(--fg3);
  font-size: 12px;
  transition: color 0.2s;
}
.footer-col a:hover i {
  color: var(--accent);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
}
.footer-copy {
  font-size: 12px;
  color: var(--fg3);
  font-weight: 400;
}
.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
}
.footer-bottom-links a {
  color: var(--fg3);
  transition: color 0.2s;
  font-weight: 400;
}
.footer-bottom-links a:hover {
  color: var(--fg);
}
.footer-lang-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 980px;
  border: 1px solid var(--border-light);
  background: var(--card);
  transition: all 0.2s;
}
.footer-lang-link:hover {
  border-color: var(--blue);
  color: var(--blue) !important;
  background: var(--blue-light);
}

/* ===== Beautified Footer responsive ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-tagline {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 48px 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding-bottom: 28px;
  }
}

@media (max-width: 600px) {
  .site-footer {
    padding: 40px 0 16px;
    margin-top: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 24px;
  }
  .footer-brand {
    text-align: left;
  }
  .footer-brand .footer-logo {
    margin-bottom: 12px;
  }
  .footer-tagline {
    font-size: 13px;
    margin-bottom: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding-top: 20px;
  }
  .footer-bottom-links {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
}
