/* ========== HEADER.CSS (FULLY RESPONSIVE - FIXED TOGGLE) ========== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  background: #111;
}

/* ----- TOP NAVBAR (mobile-first) ----- */
.topbar {
  width: 100%;
  background: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 68px;
  position: relative;
  z-index: 100;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  width: 130px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* desktop navigation (horizontal) */
.menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
  margin-left: 22px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

/* hide scrollbar for cleaner look (optional) */
.menu::-webkit-scrollbar {
  height: 3px;
}

.menu::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.menu::-webkit-scrollbar-thumb {
  background: #ffde17;
  border-radius: 4px;
}

.menu li {
  color: #f1f1f1;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 6px 0;
  font-weight: 500;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.menu li:hover {
  color: #ffde17;
}

.menu li.active {
  color: #ffde17;
  font-weight: 700;
  border-bottom: 2px solid #ffde17;
}

.menu li.yellow {
  color: #ffde17;
  font-weight: 700;
}

/* ----- HAMBURGER (mobile only) - FIXED ----- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 101;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #ffde17;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* mobile slide menu - FIXED POSITIONING */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #0f0f0f;
  z-index: 999;
  transition: left 0.3s ease-in-out;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
  padding: 80px 24px 30px 24px;
  overflow-y: auto;
}

.mobile-menu-overlay.open {
  left: 0;
}

.mobile-menu-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mobile-menu-overlay li {
  color: #f1f1f1;
  font-size: 18px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid #2c2c2c;
  cursor: pointer;
  transition: 0.2s;
}

.mobile-menu-overlay li.active {
  color: #ffde17;
  font-weight: 700;
}

.mobile-menu-overlay li.yellow {
  color: #ffde17;
  font-weight: 700;
}

.mobile-menu-overlay li:hover {
  color: #ffde17;
  padding-left: 6px;
}

/* close button inside mobile menu */
.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #ffde17;
  font-size: 32px;
  cursor: pointer;
  font-weight: bold;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* overlay background (dim) - FIXED */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.menu-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ----- MARQUEE (responsive) ----- */
.marquee-wrapper {
  width: 100%;
  background: #f5d625;
  overflow: hidden;
  border-top: 1px solid #e4c600;
  border-bottom: 1px solid #e4c600;
  height: auto;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.marquee {
  display: flex;
  width: max-content;
  animation: scrollText 22s linear infinite;
  will-change: transform;
}

.marquee span {
  font-size: 15px;
  color: #111;
  font-weight: 600;
  padding-right: 60px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* slower animation on mobile for readability */
@keyframes scrollText {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media screen and (max-width: 1024px) {
  .menu {
    gap: 20px;
    margin-left: 16px;
  }
  .menu li {
    font-size: 13px;
  }
  .logo img {
    width: 120px;
  }
}

@media screen and (max-width: 880px) {
  /* hide horizontal menu, show hamburger */
  .menu {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .topbar {
    padding: 0 16px;
  }
  .logo img {
    width: 115px;
  }
}

@media screen and (max-width: 550px) {
  .topbar {
    height: 60px;
    padding: 0 12px;
  }
  .logo img {
    width: 100px;
  }
  .marquee span {
    font-size: 12px;
    padding-right: 40px;
    white-space: nowrap;
  }
  .marquee {
    animation-duration: 18s;
  }
  .marquee-wrapper {
    min-height: 34px;
  }
}

/* extra small devices */
@media screen and (max-width: 480px) {
  .marquee span {
    font-size: 11px;
    padding-right: 30px;
  }
  .mobile-menu-overlay li {
    font-size: 16px;
    gap: 18px;
  }
}

/* prevent body scroll when mobile menu open */
body.menu-open {
  overflow: hidden;
}

/* Animation for hamburger to X (optional) */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}