/* Header & Animus UI */
header.sticky-header {
  background: rgba(2, 2, 2, 0.9);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 2000;
  border-bottom: 1px solid rgba(0, 210, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
  transition: all 0.3s ease;
}

header.animus-glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* Holographic grid lines for Animus header */
  background-image:
    linear-gradient(rgba(0, 210, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

header nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

/* Brand: logo + site name */
.nav-brand {
  flex-shrink: 0;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

#logo {
  height: 2.6rem;
  transition: transform 0.3s ease;
}

#logo:hover {
  transform: scale(1.05);
}

.nav-brand-text {
  color: var(--text-offwhite);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-left: 2px solid var(--animus-blue);
  padding-left: 0.6rem;
  white-space: nowrap;
}

/* Center nav links */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  align-items: center;
  flex: 1;
  flex-wrap: nowrap;
}

.nav-links > li > a,
.nav-links > li > .dropdownto {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.content {
  display: flex;
  list-style: none;
  font-size: 1rem;
  margin: 0;
  padding: 0;
  gap: 1rem;
  align-items: center;
}

.content a {
  text-decoration: none;
  color: var(--text-offwhite);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.content a:hover {
  color: var(--animus-blue);
  text-shadow: 0 0 10px var(--animus-glow);
}

.content .home-link,
.content .assassins-link {
  font-weight: 700;
}

/* CTA Button */
.btn-cta-animus {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid var(--animus-blue);
  color: var(--animus-blue) !important;
  padding: 0.8rem 2rem;
  border-radius: 4px; /* Sharper */
  font-weight: 700 !important;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease !important;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.btn-cta-animus::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 210, 255, 0.4),
    transparent
  );
  transition: all 0.5s ease;
}

.btn-cta-animus:hover {
  background: rgba(0, 210, 255, 0.2);
  color: var(--text-white) !important;
  box-shadow: 0 0 20px var(--animus-glow);
  border-color: #00e5ff;
}

.btn-cta-animus:hover::before {
  left: 100%;
}

/* Dropdown */
/* Dropdown */
.dropdown {
  position: relative;
}

/* Dropdown toggle button */
.dropdownto {
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  background: none;
  border: none;
  color: var(--text-offwhite);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0;
  transition: color 0.3s ease;
}

.dropdownto:hover {
  color: var(--animus-blue);
  text-shadow: 0 0 10px var(--animus-glow);
}

.dropdownto:focus {
  outline: none;
}

/* Dropdown menu (under the button) */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  min-width: 14rem;
  list-style: none;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 4px;
  padding: 0.5rem 0;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(0, 210, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Dropdown links */
.dropdown-menu a {
  display: block;
  padding: 0.7rem 1.5rem;
  color: var(--text-offwhite);
  text-decoration: none;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    padding-left 0.3s ease;
}

/* Hover effect */
.dropdown-menu a:hover {
  background-color: rgba(0, 210, 255, 0.1);
  color: var(--animus-blue) !important;
  padding-left: 2rem;
  border-left: 3px solid var(--animus-blue);
}

/* Hide dropdown when menu is closed */
nav:not(.nav-active) .content .dropdown-menu {
  display: none;
}

/* Optional: Close dropdown automatically on reopen (CSS-only trick) */
#games-toggle:checked + .dropdownto:active + .dropdown-menu {
  display: none;
}

/* Footer */
/* --------- Footer --------- */
.main-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(0, 210, 255, 0.2);
  background: rgba(5, 8, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
}

.main-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--animus-blue),
    transparent
  );
  box-shadow: 0 0 10px var(--animus-glow);
}

.main-footer p {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin: 6px 0;
}

.main-footer a {
  color: var(--animus-blue);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.main-footer a:hover {
  color: var(--text-white);
  text-shadow: 0 0 10px var(--animus-glow);
}

.footer-icons {
  margin-top: 6px;
}

.footer-icons a {
  color: var(--text-white);
  margin: 0 10px;
  font-size: 1.5rem;
  transition: all 0.3s;
}

.footer-icons a:hover {
  color: var(--animus-blue);
  transform: translateY(-3px);
  text-shadow: 0 0 15px var(--animus-glow);
}

/* Responsive Header Layout */
/* Tablets and smaller desktops (max-width: 992px) */
@media (max-width: 992px) {
  header nav.desktop-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-center {
    position: static;
    transform: none;
    margin-bottom: 1rem;
  }

  .nav-links {
    flex: none;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-brand-text {
    display: none;
  }

  .content {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 1rem;
    gap: 1rem;
  }
}
/* Tablets and large phones (max-width: 768px) */

/* Hamburger container */
.hamburger {
  background: none;
  border: none;
  padding: 0;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  position: absolute;
  right: 1rem; /* stays on right side */
  top: 1.2rem;
  z-index: 1001; /* above menu */
}

/* Hamburger bars */
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--primary-red);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* When checked → animate to X */
.nav-active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-active .hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------------- TABLETS & PHONES (max-width: 768px) ---------------- */
@media (max-width: 768px) {
  /* ---------------- HEADER & NAV ---------------- */
  header nav.desktop-nav {
    flex-direction: row;
    justify-content: space-between;
  }

  .nav-center {
    position: static;
    transform: none;
  }

  .content.nav-links {
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    width: 100%;
    height: auto;
    background: none;
    padding: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .content {
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 6rem;
    z-index: 1100;

    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition:
      opacity 0.35s ease-out,
      transform 0.35s ease-out;
  }

  .nav-active .content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .content li {
    width: 100%;
  }

  .content a,
  .dropdownto {
    display: block;
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 1.2rem;
    color: #f5f5f5;
    text-decoration: none;
    border-radius: 50rem;
    transition:
      background 0.25s ease-out,
      color 0.25s ease-out;
  }

  .content a:hover,
  .dropdownto:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ccc;
  }

  /* ---------------- HAMBURGER ---------------- */
  .hamburger {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    position: absolute;
    top: 1.3rem;
    right: 1.5rem;
    z-index: 1101;
  }

  .hamburger span {
    height: 3px;
    width: 100%;
    background: var(--text-white);
    border-radius: 2px;
    transition: all 0.25s ease-out;
  }

  .nav-active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .nav-active .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav-active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* ---------------- OVERLAY ---------------- */
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease-out;
  }

  .nav-active .overlay {
    display: block;
    opacity: 1;
  }

  /* ---------------- GAME DROPDOWN ---------------- */
  .dropdown {
    width: 100%;
    position: relative;
  }

  .dropdownto {
    position: relative;
    cursor: pointer;
  }

  .dropdownto::after {
    content: "▼";
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    transition:
      transform 0.25s ease-out,
      content 0.25s ease-out;
  }

  #games-toggle:checked + .dropdownto::after {
    content: "▲";
    transform: translateY(-50%) rotate(180deg) scale(0.8);
  }

  .dropdown-menu {
    display: flex;
    flex-direction: column;
    padding-left: 2.5rem;
    margin-top: 0.3rem;
    background: none;
    border: none;
    box-shadow: none;
    width: 100%;

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-15px);
    transition:
      max-height 0.25s ease-out,
      opacity 0.25s ease-out,
      transform 0.25s ease-out;
  }

  #games-toggle:checked ~ .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  .dropdown-menu a {
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
    color: #ccc;
    background: none;
    border-radius: 0.5rem;
    transition:
      background 0.25s ease-out,
      color 0.25s ease-out;
  }

  .dropdown-menu a:hover {
    color: var(--text-white);
  }
}
/* ---------------- DESKTOP DROPDOWN POSITION FIX ---------------- */
@media (min-width: 769px) {
  .dropdown {
    position: relative; /* ensures dropdown is relative to parent */
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0; /* default: align left */
    right: auto;
    display: none;
    flex-direction: column;
    min-width: 14rem;
    background-color: var(--footer-dark);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.25rem;
    padding: 0.5rem 0;
    z-index: 1000;
  }

  /* Show dropdown on hover */
  .dropdown:hover .dropdown-menu {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    max-height: none !important;
    transform: translateY(0) !important;
  }

  /* If dropdown would go offscreen, align to right */
  .dropdown-menu {
    right: 0; /* ensures it stays within viewport */
    left: auto;
  }
}

/* ---------------- SMALL PHONES (max-width: 576px) ---------------- */
@media (max-width: 576px) {
  /* ---------------- HEADER & NAV ---------------- */
  .content {
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 4rem;
    z-index: 1100;

    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition:
      opacity 0.4s ease,
      transform 0.4s ease;
  }

  .nav-active .content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto;
    padding-bottom: 2rem;
  }

  .content li {
    width: 100%;
  }

  .content a,
  .dropdownto {
    display: block;
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 1.2rem;
    color: #f5f5f5;
    text-decoration: none;
    border-radius: 50rem;
    transition:
      background 0.3s ease,
      color 0.3s ease;
  }

  .content a:hover,
  .dropdownto:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ccc;
  }

  /* ---------------- HAMBURGER ---------------- */
  .hamburger {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    position: absolute;
    top: 1.3rem;
    right: 1.5rem;
    z-index: 1101;
  }

  .hamburger span {
    height: 3px;
    width: 100%;
    background: var(--text-white);
    border-radius: 2px;
    transition: all 0.4s ease;
  }

  .nav-active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .nav-active .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav-active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* ---------------- OVERLAY ---------------- */
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease-out;
  }

  .nav-active .overlay {
    display: block;
    opacity: 1;
  }

  /* ---------------- GAME DROPDOWN ---------------- */
  .dropdown {
    width: 100%;
    position: relative;
  }

  .dropdownto {
    position: relative;
    cursor: pointer;
  }

  .dropdownto::after {
    content: "▼";
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    transition:
      transform 0.25s ease-out,
      content 0.25s ease-out;
  }

  #games-toggle:checked + .dropdownto::after {
    content: "▲";
    transform: translateY(-50%) rotate(180deg) scale(0.8);
  }

  .dropdown-menu {
    display: flex;
    flex-direction: column;
    padding-left: 2.5rem;
    margin-top: 0.3rem;
    background: none;
    border: none;
    box-shadow: none;
    width: 100%;

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-15px);
    transition:
      max-height 0.25s ease-out,
      opacity 0.25s ease-out,
      transform 0.25s ease-out;
  }

  #games-toggle:checked ~ .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  .dropdown-menu a {
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
    color: #ccc;
    background: none;
    border-radius: 0.5rem;
    transition:
      background 0.25s ease-out,
      color 0.25s ease-out;
  }

  .dropdown-menu a:hover {
    color: var(--text-white);
  }

  /* ---------------- HERO + TEXT RESIZING ---------------- */
  #hero,
  #hero-assassins {
    height: 18rem;
    padding: 0 1rem;
  }

  #hero h1,
  #hero-assassins h1 {
    font-size: 2rem;
    text-align: center;
  }

  #hero p {
    font-size: 1.1rem;
    text-align: center;
  }

  h2 {
    font-size: 2.2rem;
  }

  .nav-pills {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.4rem 1.2rem;
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .assassin-card img {
    height: 280px;
  }

  .assassin-info {
    padding: 1.2rem;
  }

  .assassin-card h3 {
    font-size: 1.4rem;
  }

  .assassin-desc {
    font-size: 0.95rem;
  }

  .stat-badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .filter-pills {
    gap: 0.75rem;
  }

  .filter-btn {
    font-size: 0.95rem;
    padding: 0.65rem 1.2rem;
  }

  .main-footer p {
    font-size: 1rem;
  }

  .footer-icons a {
    font-size: 1.2rem;
    margin: 0 5px;
  }
}
