@import "./global.css";

/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-width: 100%;
}

/* Header styling */
header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Logo */
.logo img {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.01);
}

/* Navigation */
#header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}

#header nav ul li a {
  text-decoration: none;
  color: #333;
  position: relative;
  transition: color 0.3s ease;
}

/* Hover underline effect */
#header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 0%;
  background: #007bff;
  transition: width 0.3s ease;
}

#header nav ul li a:hover {
  color: #007bff;
}

#header nav ul li a:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 30px;
  height: 25px;
}

.mobile span {
  height: 3px;
  width: 100%;
  background: #333;
  margin-bottom: 5px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Menu Active Animation */
.mobile.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile.active span:nth-child(2) {
  opacity: 0;
}

.mobile.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Menu */
@media (max-width: 768px) {
  #header nav {
    position: absolute;
    top: 70px;
    left: -100%;
    width: 100%;
    background: #fff;
    transition: all 0.4s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  }

  /* header.scrolled nav {
    background-color: black;
  } */

  #header nav ul {
    flex-direction: column;
    gap: 20px;
    padding: 25px 0;
  }

  #header nav.active {
    left: 0;
  }

  .mobile {
    display: flex;
  }

  /* Add nice smooth dropdown feel */
  #header nav ul li a {
    display: inline-block;
    padding: 10px 0;
  }
}


/* Optional: subtle scroll behavior */
html {
  scroll-behavior: smooth;
}

/*  */
header.scrolled {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

header.h-hide{
  transform: translateY(-70px);
}

/* search */
.search-form {
  width: 70%;
  max-width: 320px;
  display: flex;
  align-items: center;
  border: 1px solid #3333333f;
  border-radius: 20px;
  padding: 2px 30px 2px 2px;
  position: relative;
  background: #cccccc27;
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 7.5px;
  font-size: 14px;
  max-width: 100%;
  border-radius: 20px;
  /* line-height: 1.6; */
}

.search-form button {
  display: flex;
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  transition: color 0.3s;
  position: absolute;
  right: 7.5px;
}

.search-form button:hover {
  color: var(--accent-pink);
}

@media (min-width:769px) and (max-width: 1000px) {
  .logo div {
    display: none !important;
    background-color: #007bff;
  }

  .search-form {
    width: 70%;
    max-width: 250px;
  }
}

@media (max-width: 768px) {
  .search-form {
    width: 70%;
    max-width: 250px;
  }
}

/* logo */
.logo {
  display: flex;
  cursor: pointer;
  user-select: none;
}

.logo div {
  display: flex;
  flex-direction: column;
  font-family: "Arial Narrow", "Verdana", "Tahoma", sans-serif;
  color: #555;
}

.logo div :nth-child(1) {
  flex: 2;
  /* background-color: #333; */
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  padding: 0;
  line-height: 0.8;
}

.logo div:nth-child(2) {
  flex: 1;
  font-size: 1.2rem;
  text-transform: capitalize;
  letter-spacing: 2px;
  font-weight: 900;
  text-align: center;
  padding: 0;
  line-height: 1;
}

@media (max-width: 600px) {
  .search-form {
    max-width: calc(100vw - 140px) !important;
  }

  .logo div {
    display: none;
  }
}