/* ==========================================================================
   Collect Foundation - Master Language Switcher & Responsive Navbar Styles
   ========================================================================== */

/* ── Base Language Dropdown Container (Details/Summary) ─────────────────── */
.lang-switcher {
  position: relative;
  display: inline-block;
  font-family: Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.lang-switcher details {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
}

.lang-switcher summary {
  list-style: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #d1d5db;
  padding: 7px 13px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switcher summary::-webkit-details-marker,
.lang-switcher summary::marker {
  display: none;
  content: "";
}

.lang-switcher summary:hover,
.lang-switcher[open] summary {
  color: #f3fe79;
  background: rgba(243, 254, 121, 0.08);
  border-color: rgba(243, 254, 121, 0.35);
  box-shadow: 0 0 16px rgba(243, 254, 121, 0.15);
}

/* ── Globe Icon & Caret ─────────────────────────────────────────────────── */
.lang-globe-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: currentColor;
  transition: color 0.25s ease;
}

.lang-globe-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-caret {
  display: inline-block;
  width: 9px;
  height: 9px;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lang-caret svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-switcher[open] .lang-caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── Dropdown List Panel ─────────────────────────────────────────────────── */
.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: 280px;
  max-width: 320px;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(13, 13, 13, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 1px rgba(243, 254, 121, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: langFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Custom Scrollbar for Language Menu */
.lang-list::-webkit-scrollbar {
  width: 5px;
}

.lang-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.lang-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.lang-list::-webkit-scrollbar-thumb:hover {
  background: #f3fe79;
}

.lang-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* ── List Items & Genuine Anchor Tags ────────────────────────────────────── */
.lang-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 450;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.lang-list a:hover {
  color: #f3fe79;
  background: rgba(243, 254, 121, 0.08);
  transform: translateX(2px);
}

.lang-list a.is-active,
.lang-list a[aria-current="true"] {
  color: #f3fe79;
  background: rgba(243, 254, 121, 0.12);
  font-weight: 600;
}

.lang-list a .lang-native {
  font-size: 13px;
}

.lang-list a .lang-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #6b7280;
  transition: all 0.18s ease;
}

.lang-list a:hover .lang-tag,
.lang-list a.is-active .lang-tag {
  background: rgba(243, 254, 121, 0.2);
  color: #f3fe79;
}

/* ── Header Navbar Base Alignment ────────────────────────────────────────── */
.h-navbar {
  height: 100px;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  padding-left: 50px;
  padding-right: 50px;
}

.h-navbar-c {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1350px;
  height: 50px;
  gap: 16px;
}

.h-navbar-c > .div-block-3 {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.h-navbar-c > .h-navbar-mid {
  display: none !important;
}

/* ── Desktop Viewport Specifics (>= 992px) ───────────────────────────────── */
@media screen and (min-width: 992px) {
  .h-navbar-c > .nav-links-menu {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin: 0 auto;
  }

  .h-navbar-c > .nav-b-w {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
  }

  .gradient-button {
    display: flex !important;
  }

  .gradient-button-mobile {
    display: none !important;
  }

  .mob-b {
    display: none !important;
  }

  .menu-block {
    display: none !important;
  }
}

/* ── Mobile / Tablet Viewport Specifics (<= 991px) ───────────────────────── */
@media screen and (max-width: 991px) {
  .h-navbar {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .h-navbar-c > .nav-links-menu {
    display: none !important; /* Hide desktop capsule on mobile */
  }

  .h-navbar-c > .nav-b-w {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }

  .nav-b-w .nav-button-wrapper .gradient-button {
    display: none !important;
  }

  .nav-b-w .nav-button-wrapper .gradient-button-mobile {
    display: flex !important;
  }

  .mob-b {
    display: flex !important;
    cursor: pointer;
  }

  .h-navbar:not(.lite) .header-lang-switcher {
    display: inline-flex !important; /* Keep compact language switcher or let it appear */
  }
}

@media screen and (max-width: 479px) {
  .h-navbar {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* ── Header Language Switcher Summary ───────────────────────────────────── */
.h-navbar .header-lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.h-navbar .header-lang-switcher summary {
  height: 40px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  gap: 6px;
  white-space: nowrap;
  border-radius: 9999px;
}

.h-navbar .header-lang-switcher summary .lang-globe-icon {
  width: 14px;
  height: 14px;
}

.h-navbar .header-lang-switcher summary .lang-caret {
  width: 8px;
  height: 8px;
}

/* ── Lite Navbar (Privacy Policy & Terms of Service) Specifics ─────────── */
.h-navbar.lite .header-lang-switcher summary {
  color: #1f2937;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.h-navbar.lite .header-lang-switcher summary:hover,
.h-navbar.lite .header-lang-switcher[open] summary {
  color: #000000;
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

/* ── Mobile Drawer Switcher Specifics ────────────────────────────────────── */
.mobile-lang-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-lang-switcher {
  width: 100%;
}

.mobile-lang-switcher summary {
  width: 100%;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 12px;
}

.mobile-lang-switcher .lang-list {
  position: static;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  max-height: 240px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.03);
}

/* ── Footer Switcher Specifics (Upward Opening) ─────────────────────────── */
.footer-lang-switcher .lang-list {
  top: auto;
  bottom: calc(100% + 8px);
  right: auto;
  left: 0;
  animation: langFadeInUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langFadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.footer-lang-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
