/* ===================================
   FC BALLERS - MODULAR NAVBAR STYLES
   =================================== */

/* NAV */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000000;
  /* border-bottom: 1px solid rgba(10, 185, 255, 0.15); */
  height: 72px;
  display: flex;
  align-items: center;
  /* box-shadow: 0 1px 0 rgba(10, 185, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(10, 185, 255, 0.08); */
}

.navbar a {
  text-decoration: none;
}

.navbar-container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

/* Logo Center */
.nav-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
}
.nav-brand:hover {
  transform: scale(1.05);
}
.nav-brand a {
  display: block;
  line-height: 0;
}
.nav-brand img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* Desktop Nav Sections */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
}

/* Links */
.nav-link,
.dropbtn {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.dropbtn:hover,
.nav-link.active {
  color: var(--blue);
}

/* Dropdown Caret Icon */
.dropdown-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
}

.dropdown:hover .dropdown-caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdowns */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: linear-gradient(
    180deg,
    rgba(15, 15, 25, 0.98) 0%,
    rgba(10, 10, 15, 0.98) 100%
  );
  backdrop-filter: blur(24px) saturate(180%);
  min-width: 180px;
  max-width: min(280px, calc(100vw - 40px));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 8px 0;
  padding-top: 12px;
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
  margin-top: 8px;
  contain: layout style paint;
}

/* Invisible hover bridge */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s,
    backdrop-filter 0.2s ease;
}

.dropdown-content a {
  color: rgba(255, 255, 255, 0.75);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  margin: 0 4px;
  border-radius: 6px;
}

.dropdown-content a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(
    90deg,
    rgba(10, 185, 255, 0.15) 0%,
    rgba(10, 185, 255, 0.05) 100%
  );
  color: var(--blue);
  padding-left: 24px;
}

.dropdown-content a:hover::before {
  height: 60%;
}

/* CTA Button in Nav */
.nav-cta-btn {
  background: var(--blue);
  color: var(--black);
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.2s;
}
.nav-cta-btn:hover {
  transform: translateY(-1px);
  color: var(--black);
}

/* Mobile Hamburger Checkbox Hack */
#mobile-check {
  display: none;
}

.hamburger-label {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 102;
}

.hamburger-label span {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 4px rgba(10, 185, 255, 0.2);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 72px;
  right: 0;
  width: 100%;
  max-width: 320px;
  max-height: calc(100vh - 72px);
  background: #000000;
  border-left: 1px solid rgba(10, 185, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 0;
  gap: 4px;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  /* box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5); */
}

.mobile-nav a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  width: calc(100% - 16px);
  padding: 14px 20px;
  margin: 0 8px;
  display: block;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  border-radius: 8px;
  position: relative;
}

.mobile-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.mobile-nav a:hover {
  background: rgba(10, 185, 255, 0.1);
  color: var(--blue);
  border-left-color: var(--blue);
  padding-left: 24px;
}

.mobile-nav a:hover::before {
  height: 60%;
}

/* Mobile Dropdowns */
.mobile-dropdown {
  width: 100%;
}

.mobile-dropdown input[type="checkbox"] {
  display: none;
}

.mobile-dropdown-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  width: calc(100% - 16px);
  padding: 14px 20px;
  margin: 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  border-radius: 8px;
  position: relative;
  user-select: none;
}

.mobile-dropdown-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.mobile-dropdown-label:hover {
  background: rgba(10, 185, 255, 0.1);
  color: var(--blue);
  border-left-color: var(--blue);
  padding-left: 24px;
}

.mobile-dropdown-label:hover::before {
  height: 60%;
}

.mobile-dropdown-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
}

.mobile-dropdown
  input[type="checkbox"]:checked
  ~ .mobile-dropdown-label
  .mobile-dropdown-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 12px;
}

.mobile-dropdown input[type="checkbox"]:checked ~ .mobile-dropdown-content {
  max-height: 500px;
}

.mobile-dropdown-content a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  width: calc(100% - 16px);
  padding: 12px 20px;
  padding-left: 28px;
  margin: 0 8px;
  display: block;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 2px solid transparent;
  border-radius: 6px;
  position: relative;
}

.mobile-dropdown-content a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.mobile-dropdown-content a:hover {
  background: rgba(10, 185, 255, 0.08);
  color: var(--blue);
  border-left-color: var(--blue);
  padding-left: 32px;
}

.mobile-dropdown-content a:hover::before {
  height: 50%;
}

/* Checkbox Logic */
#mobile-check:checked ~ .mobile-nav {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#mobile-check:checked ~ .navbar-container .hamburger-label span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
#mobile-check:checked ~ .navbar-container .hamburger-label span:nth-child(2) {
  opacity: 0;
}
#mobile-check:checked ~ .navbar-container .hamburger-label span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Backdrop when mobile menu is open */
#mobile-check:checked ~ .mobile-nav::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-left,
  .nav-right {
    display: none;
  }
  .navbar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    height: 100%;
    position: relative;
  }
  .hamburger-label {
    display: flex;
    position: absolute;
    right: 24px;
  }
  .nav-brand {
    position: static;
    transform: none;
  }
  .nav-brand:hover {
    transform: none;
  }
}
