/* Removed render-blocking @import of line-awesome (the vendor path 404s in production and the
   homepage uses no la-* icons). Load line-awesome explicitly where its icons are actually needed. */

html,
body {
  margin: 0;
  padding: 0;
}

/* No joined letter-pairs (ct, st, fi, …) — clearer for marketing/UI copy across themes */
body {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "calt" 0;
}

/* Custom page (VVVeb) main — inherits active theme tokens; inline styles in saved HTML still win. */
main.custom-page-vvveb {
  color: var(--text-primary, inherit);
  background-color: var(--bg-primary, transparent);
}

/*
 * Navbar shell — all themes, Blade + saved global nav.
 * SPA main.css is optional; this keeps sticky bar + padding without theme-specific colors (those live in public/css/themes/*.css).
 */
header.site-header .navbar,
.site-header > .navbar,
.site-header > nav.navbar,
body > nav.navbar:first-of-type {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 1.1rem 0;
  box-sizing: border-box;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

header.site-header .navbar.scrolled,
.site-header .navbar.scrolled,
.site-header > nav.navbar.scrolled,
body > nav.navbar.scrolled:first-of-type {
  padding: 0.7rem 0;
}

/* Mirror-markup global nav when mirror.css is not loaded (other themes). data-site-theme is set on <html> in page.blade.php. */
html:not([data-site-theme="mirror"]) body > nav.mirror-nav:first-of-type {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  min-height: 68px;
  background: var(--bg-primary, #07071a);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-purple, rgba(124, 58, 237, 0.25));
  box-sizing: border-box;
}

/* Row layout for default / Blade “navbar + nav-container” pattern (shared across themes) */
.navbar .nav-container {
  max-width: 1560px !important;
  width: min(1560px, calc(100% - 1.5rem));
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-sizing: border-box;
}

/* LeftCoast theme — full-width nav row (overrides the default centered max-width nav container) */
html[data-site-theme="innolynk"] .navbar .nav-container.lc-nav-container {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 0.9rem !important;
  box-sizing: border-box;
}

/*
 * VVVeb sometimes drops the inner .nav-container or flattens structure.
 * When .nav-container is missing, keep a single horizontal bar instead of a vertical stack.
 * :has() is supported in current Safari/Chrome; if unsupported, stricter nav markup (reset global nav) still fixes.
 */
@supports selector(:has(*)) {
  .site-header > nav.navbar:has(> a):not(:has(> .nav-container)),
  header.site-header > nav.navbar:has(> a):not(:has(> .nav-container)) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 1.5rem;
    row-gap: 0.75rem;
    max-width: 1560px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
  }
}

/* Mirror nav — if global HTML was built in Mirror, grid rules live in mirror.css; duplicate structure here so
   switching to Default/Clean/another theme does not collapse the bar when mirror.css is not loaded. */
.mirror-nav .mirror-nav-inner {
  max-width: 100%;
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  box-sizing: border-box;
}

.mirror-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.mirror-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-wrap: wrap;
}

.nav-logo {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

/* Header right: language dropdown + CTA (same pattern as SPA Navbar) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-lang {
  position: relative;
  flex-shrink: 0;
}

.nav-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  padding: 0.46rem 0.78rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 140px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 9, 32, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.15s ease;
  z-index: 1100;
}

.nav-lang-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-lang-menu a {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary, #c8c9df);
  border-radius: 8px;
  text-align: left;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
  font-size: 0.84rem;
  text-decoration: none;
}

.nav-lang-menu a:hover {
  background: rgba(124, 58, 237, 0.16);
  color: #fff;
}

/* Floating scroll-to-top button */
.scroll-top-btn {
  position: fixed;
  right: clamp(0.9rem, 2.8vw, 1.35rem);
  bottom: 5vh;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 999px;
  background: linear-gradient(168deg, #ffffff 0%, #f7f5ff 52%, #faf8ff 100%);
  color: #5b21b6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1200;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  color: #4c1d95;
  border-color: rgba(124, 58, 237, 0.52);
}

.page-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.page-nav-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.page-nav-cta svg {
  flex-shrink: 0;
}

.sp-menu-root {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-menu-root .nav-item {
  position: relative;
}

.sp-menu-root .nav-item > a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.sp-menu-root .nav-item > a:hover {
  color: var(--text-primary);
}

.sp-menu-root .sub-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 0.45rem;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 20;
}

.sp-menu-root .has-children:hover > .sub-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.sp-menu-root .sub-menu .nav-item > a {
  display: block;
  font-size: 0.85rem;
  padding: 0.45rem 0.65rem;
}

.logo-image {
  height: 40px;
  width: auto;
}

.hamburger,
.mobile-menu {
  display: none;
}

/* ── Footer column links (force vertical list) ───────────────── */
.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col-links li {
  display: block;
  margin-bottom: 0.45rem;
}

.footer-col-links li a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted, rgba(255,255,255,.55));
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col-links li a:hover {
  color: var(--text-primary, #fff);
}

/* ── Footer brand column ─────────────────────────────────────── */
.footer-brand-logo {
  display: inline-block;
  margin-bottom: 0.85rem;
}

.footer-brand-logo img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.footer-brand-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary, #fff);
  margin-bottom: 0.85rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-muted, rgba(255,255,255,.55));
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted, rgba(255,255,255,.55));
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-contact-item i {
  font-size: 1.05rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  color: var(--text-secondary, rgba(255,255,255,.7));
}

.footer-contact-item a {
  color: inherit;
  text-decoration: none;
}

.footer-contact-item a:hover {
  color: var(--text-primary, #fff);
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sp-menu-root {
    display: none;
  }

  .nav-actions {
    display: none;
  }

  .mobile-menu .mobile-nav-extras {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-purple);
  }

  .mobile-menu .mobile-nav-extras .page-nav-cta {
    margin-top: 0.65rem;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.4rem;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
  }

  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(13, 13, 43, 0.98);
    border-top: 1px solid var(--border-purple);
  }

  .mobile-menu.open a {
    color: var(--text-secondary);
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-purple);
  }
}

/* ── VVVeb section / footer background-container support (clip decorative bleed) ──
   Do NOT set overflow: hidden on body > header: it clips .nav-lang-menu / dropdowns. */
body > section,
body > footer {
  position: relative;
  overflow: hidden;
}

body > header {
  position: relative;
  overflow: visible;
}

body > section .background-container,
body > header .background-container,
body > footer .background-container,
body > section .overlay,
body > header .overlay,
body > footer .overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

body > section .background-container img,
body > header .background-container img,
body > footer .background-container img,
body > section .background-container video,
body > header .background-container video,
body > footer .background-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body > section .overlay,
body > header .overlay,
body > footer .overlay {
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

body > section > *:not(.background-container):not(.overlay),
body > header > *:not(.background-container):not(.overlay),
body > footer > *:not(.background-container):not(.overlay) {
  position: relative;
  z-index: 2;
}
