header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}

/* Estado com fundo ao scrollar */
header.scrolled {
  background-color: rgba(26, 27, 87, 0.95) !important;
}

header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0 auto;
  max-width: var(--container-width);
  width: 100%;
  padding: var(--spacing-2xl);
}

.logo {
  position: absolute;
  left: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 1;
  z-index: 2;
  gap: var(--spacing-2xl);
}

.logo img {
  width: 100%;
  max-width: 110px;
  height: auto;
}

.logo-text {
  width: 100%;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.logo-text span {
  font-size: 0.6rem;
  margin-top: -5px;
  margin-bottom: 1px;
  color: white;
}

.logos-exclusive {
  display: flex;
  gap: var(--spacing-xs);
}

.logos-exclusive img {
  max-width: 24px;
  height: auto;
}

.lottu-roleta {
  max-width: 20px !important;
  height: auto !important;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
  gap: var(--spacing-nav);
  width: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.nav-links a {
  color: white;
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-benzin-light);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-size: var(--font-xs);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: white;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--tertiary-color);
  transform: translateY(-2px);
}

.nav-links a:hover::after {
  width: 100%;
}

.lang-select-mobile {
  display: none;
}

.mobile-menu-btn {
  display: none;
}

.mobile-menu-logo {
  display: none;
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.header-actions {
  position: absolute;
  right: 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(0.8rem, 1.5vw, 1.2rem);
  grid-column: 3;
  z-index: 2;
}

/* Spinner removido */

.header-actions select {
  height: 40px;
  padding-right: 2.2em;
  padding-left: 1em;
  border-radius: var(--border-radius-sm);
  background: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg fill='%23ffffff' height='18' viewBox='0 0 20 20' width='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.516 7.548a1 1 0 0 1 1.415 0L10 10.617l3.07-3.07a1 1 0 1 1 1.415 1.415l-3.777 3.778a1 1 0 0 1-1.415 0L5.516 8.963a1 1 0 0 1 0-1.415z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  -webkit-appearance: none;
  appearance: none;
  color: white;
  font-family: var(--font-family-title);
  font-weight: var(--font-weight-benzin-light) !important;
  font-size: var(--font-xs);
  outline: none;
  cursor: pointer;
}

.header-actions select:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

.header-actions select option {
  background-color: white;
  color: var(--text-primary);
}

.header-actions select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 1px rgba(24, 47, 152, 0.2);
}

/* Tablet Styles - Nav em linha separada */
@media (max-width: 1279px) and (min-width: 920px) {
  header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    padding: 0 var(--spacing-md);
    align-items: center;
    min-height: 15vh;
  }

  .logo {
    position: static;
    grid-column: 1;
    grid-row: 1;
    margin: 0 auto;
    gap: var(--spacing-xl);
  }

  .header-actions {
    position: static;
    grid-column: 3;
    grid-row: 1;
    justify-content: center;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: 0;
    margin-bottom: 5px;
  }

  .logo img {
    max-width: 95px;
  }

  .eds-ona {
    max-width: 45px !important;
  }
}

/* Mobile Styles */
@media (max-width: 919px) {
  header {
    padding: 0;
  }

  header .container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    flex-direction: row;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .header-actions {
    display: none;
  }

  .hamburger {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
  }

  .hamburger i,
  .hamburger svg {
    font-size: 35px;
    color: white;
    transition: all 0.3s ease;
    position: absolute;
  }

  .hamburger svg {
    width: 28px;
    height: 28px;
  }

  .hamburger-close {
    opacity: 0;
    transform: rotate(90deg);
  }

  .hamburger.active .hamburger-open {
    opacity: 0;
    transform: rotate(-90deg);
  }

  .hamburger.active .hamburger-close {
    opacity: 1;
    transform: rotate(0deg);
  }

  .nav-links {
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background: #11164d !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: var(--spacing-lg);
    padding-top: 100px;
    padding-bottom: 40px;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: none;
    left: auto;
    margin-top: 0;
    align-items: end;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    display: flex;
    padding: var(--spacing-sm) 25px;
    transition: all 0.3s ease;
    font-weight: var(--font-weight-benzin-light);
    font-size: var(--font-sm);
  }

  .nav-links a:hover {
    color: var(--tertiary-color);
    padding-left: 10px;
    transform: translateX(5px);
  }

  .lang-select-mobile {
    display: flex;
    justify-content: flex-start;
    width: auto;
    padding: 0;
  }

  .lang-select-mobile select {
    width: auto;
    min-width: 60px;
    padding: 8px 12px;
    padding-right: 2em;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg fill='%23ffffff' height='18' viewBox='0 0 20 20' width='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.516 7.548a1 1 0 0 1 1.415 0L10 10.617l3.07-3.07a1 1 0 1 1 1.415 1.415l-3.777 3.778a1 1 0 0 1-1.415 0L5.516 8.963a1 1 0 0 1 0-1.415z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6em center;
    background-size: 12px;
    color: white;
    font-family: var(--font-family-body);
    font-size: var(--font-xs);
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
  }

  .lang-select-mobile select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    transition: all 0.3s ease;
  }

  .lang-select-mobile select option {
    background-color: white;
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: var(--font-xs);
    line-height: 1.1;
  }

  .mobile-menu-logo {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
  }

  .mobile-menu-logo img {
    height: 40px;
    width: auto;
    opacity: 0.8;
  }

  .mobile-menu-btn {
    display: flex;
    justify-content: end;
    width: 100%;
    padding: var(--spacing-md) 25px;
  }

  .mobile-menu-btn .btn {
    width: 100%;
    max-width: 180px;
    white-space: nowrap;
    font-size: var(--font-sm);
    padding: 10px 16px;
    border-radius: 7px;
  }

  .header-actions {
    display: none;
  }

  .nav-links.open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  .logo {
    position: static;
    gap: var(--spacing-md);
  }

  .logos-exclusive img {
    max-width: 18px !important;
    height: auto !important;
  }

  .lottu-roleta {
    max-width: 10px !important;
    height: auto !important;
  }
}

@media (max-width: 510px) {
  .eds-ona {
    max-width: 45px !important;
  }

  .logo img {
    max-width: 70px;
  }

  .logo-text span {
    font-size: 0.35rem;
  }
}

/* Spinner removido completamente */

/* Remove spinner do nav-links para evitar duplicação */

/* Remove o antigo */
.language-selector-loading {
  position: relative;
}

.language-selector-loading::after {
  display: none; /* Desabilita o antigo */
}

/* Fallback para mobile */
#lang-select-mobile.language-selector-loading::after {
  left: -35px;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 0, 0, 0.3);
  border-top: 3px solid #ff0000;
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Suavizar transição durante carregamento */
.hero-title {
  transition: opacity 0.3s ease;
}
