/* ============================================
   2026 FIFA World Cup — Layout
   ============================================ */

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-navbar);
  transition: background var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

.navbar.scrolled {
  background: var(--bg-nav);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  font-size: 1.6rem;
  line-height: 1;
}

.navbar-title {
  font-family: var(--font-heading);
  font-weight: var(--font-extrabold);
  font-size: var(--text-lg);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.navbar-title span {
  font-weight: var(--font-normal);
  font-size: var(--text-sm);
  -webkit-text-fill-color: var(--text-tertiary);
  display: block;
  margin-top: -2px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-default);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-primary-light);
  background: rgba(79, 70, 229, 0.08);
}

.nav-link-icon {
  font-size: var(--text-base);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Spoiler Toggle */
.spoiler-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.spoiler-toggle:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.spoiler-toggle.active {
  border-color: var(--color-warning);
  color: var(--color-warning);
  background: rgba(245, 158, 11, 0.1);
}

.spoiler-toggle-icon {
  font-size: var(--text-sm);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-xl);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  z-index: var(--z-navbar);
  padding: var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-default);
}

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

.mobile-nav .nav-link {
  padding: var(--space-4);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0;
  margin-top: var(--space-16);
  background: rgba(5, 5, 16, 0.5);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
}

.footer-section h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-default);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-8) auto 0;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-default);
}

.footer-social a:hover {
  color: var(--text-primary);
  border-color: var(--color-primary-light);
  background: rgba(79, 70, 229, 0.05);
}

/* ── Responsive Layout ── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* ── Language Selector ── */
.lang-selector-wrapper {
  position: relative;
  display: inline-block;
}

.lang-selector {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  outline: none;
  transition: all var(--duration-fast) var(--ease-default);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: var(--text-xs);
}

.lang-selector:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23F8FAFC'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.lang-selector option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

html[data-theme="light"] .lang-selector {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}
html[data-theme="light"] .lang-selector:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230F172A'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* ── Theme Switcher Button ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  transform: scale(1.05);
}

.theme-toggle span {
  font-size: var(--text-base);
  line-height: 1;
}

/* ── Mobile Actions Block ── */
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-4);
}

.mobile-nav-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}
}
