/* Import custom font */
@font-face {
  font-family: 'Black Arcade Script';
  src: url('../fonts/Black Arcade Script/Black Arcade Script.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

header {
  background: #003b5c;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  border-top: solid 4px #ef3340;
  box-sizing: border-box;
}
  
.navbar {
  width: 85%;
  max-width: 85%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.logo {
  height: 45px;
  width: auto;
  transition: transform 0.3s;
  padding: 20px;
  margin-left: 2px;
}

/* Desktop Navigation */
.navbar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
  
.navbar-links li {
  margin-right: 20px;
}

.navbar-links li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 400;
}

.navbar-links li a:hover {
  text-decoration: none;
  border-bottom: solid 2px white;
}

/* Mobile Header - Hidden by default */
.mobile-header {
  display: none;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.mobile-logo {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  padding: 0 1rem;
}

.mobile-sp-logo {
  height: 60px;
  width: auto;
}

.mobile-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  align-items: center;
}

.premium-choice-text {
  font-family: 'Black Arcade Script', cursive;
  font-size: 1.4rem;
  color: white;
  display: block;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
  white-space: nowrap;
}

.mobile-series {
  font-size: 0.8rem;
  color: white;
  font-weight: 400;
  letter-spacing: 1px;
}

/* Hamburger Menu */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  gap: 4px;
  z-index: 10001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

  .mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background-color: #003b5c;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 100px 0 20px 0;
  }

.mobile-nav-overlay.active .mobile-nav {
  transform: translateX(0);
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-links li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-links li a {
  display: block;
  padding: 15px 25px;
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
  transition: background-color 0.3s ease;
}

.mobile-nav-links li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 10px 0;
}

/* Mobile Search */
.mobile-search {
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.mobile-search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
  color: #000000;
  background-color: #ffffff;
}

.mobile-search-input::placeholder {
  color: #666666;
}

.mobile-search-button {
  width: 100%;
  background: #ef3340;
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-search-button img {
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
}
  
.navbar-right {
  display: flex;
  align-items: center;
  position: relative;
}

.navbar-right a {
  text-decoration: none;
  color: rgba(0,0,0,.5);
  display: flex;
  padding: 3px;
}

.navbar-right a:hover {
  text-decoration: none;
  color: white;
  display: flex;
  padding: 3px;
}

.search-button {
  background: #ef3340;
  border: none;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 40px;
}

.search-button img {
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
}
  
.search-input {
  padding: 0.5rem;
  margin-right: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #000000 !important;
  background-color: #ffffff !important;
  align-self: center;
  height: 40px;
  box-sizing: border-box;
}

.search-input::placeholder {
  color: #666666 !important;
}

/* Additional specificity for search input */
.navbar-right .search-input {
  color: #000000 !important;
  background-color: #ffffff !important;
}

.navbar-right .search-input::placeholder {
  color: #666666 !important;
}

/* Style the preview container */
.preview-container {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  z-index: 1001;
  transition: opacity 0.3s, visibility 0.3s;
  flex-direction: column;
  max-height: 300px;
  overflow-y: auto;
}

/* Style the individual preview items */
.preview-container div {
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #eee;
  color: #333;
}

.preview-container div:last-child {
  border-bottom: none;
}

/* Highlight the selected preview item */
.preview-container div.selected,
.preview-container div:hover {
  background-color: #f0f0f0;
}

/* Top Header Styles */
.top-header {
  background-color: whitesmoke;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2rem 0;
}

.top-header-content {
  width: 85%;
  max-width: 85%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.nav-logo img {
  height: 100px;
}

.header-tag-wrap {
  display: flex;
  flex-direction: column;
}

.header-tag-1 {
  margin: 0px;
  font-size: 1.5rem;
  color: #003b5c;
  font-weight: 500;
}

.header-tag-2 {
  margin: 0px;
  font-size: 1.5rem;
  color: #003b5c;
  font-weight: 500;
}

.search-item {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.optisizer-logo-wrapp {
  align-items: center;
  display: flex;
  font-size: 20px;
  align-self: center;
  color: #003b5c;
  text-decoration: none;
  margin-bottom: 0.5rem;
  flex-direction: column;
}

.nav-logo.desktop-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Tablet Media Query */
@media screen and (max-width: 1024px) {
  .top-header {
    padding: 1.5rem 0;
  }
  
  .nav-logo img {
    height: 80px;
  }
  
  .header-tag-1,
  .header-tag-2 {
    font-size: 1.3rem;
  }
  
  .navbar {
    width: 90%;
    max-width: 90%;
  }
  
  .top-header-content {
    width: 90%;
    max-width: 90%;
  }
  
  .navbar-links li a {
    font-size: 0.9rem;
  }
  
  .navbar-links li {
    margin-right: 15px;
  }
  
  .preview-container {
    width: 250px;
  }
}

/* Small Tablet Media Query */
@media screen and (max-width: 868px) {
  .navbar-links li {
    margin-right: 10px;
  }
  
  .navbar-links li a {
    font-size: 0.85rem;
  }
  
  .search-input {
    width: 120px;
  }
}

/* Mobile Media Query */
@media screen and (max-width: 768px) {
  /* Hide top header on mobile */
  .top-header {
    display: none !important;
  }
  
  /* Hide desktop navigation */
  .desktop-nav {
    display: none !important;
  }
  
  .navbar-right {
    display: none !important;
  }
  
  /* Show mobile header */
  .mobile-header {
    display: flex !important;
  }
  
  /* Show mobile navigation overlay */
  .mobile-nav-overlay {
    display: block;
  }
  
  /* Fixed mobile header */
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 0;
    border-top: none;
    border-bottom: solid 4px #ef3340;
    z-index: 9999;
  }
  
  .navbar {
    width: 95%;
    max-width: 95%;
  }
  
  /* Add top margin to body to compensate for fixed header */
  body {
    padding-top: 80px;
  }
}

/* Very Small Mobile */
@media screen and (max-width: 480px) {
  .navbar {
    width: 98%;
    max-width: 98%;
  }
  
  .premium-choice-text {
    font-size: 1.2rem;
  }
  
  .mobile-series {
    font-size: 0.7rem;
  }
  
  .mobile-sp-logo {
    height: 80px;
  }
  
  .mobile-nav {
    width: 100%;
  }
}

/* Hide mobile elements on desktop */
@media screen and (min-width: 769px) {
  .mobile-header {
    display: none !important;
  }
  
  .mobile-nav-overlay {
    display: none !important;
  }
}
  