/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Poppins", sans-serif;
  padding-top: 70px; /* Prevent content from hiding under fixed header */
}

/* ---------- HEADER ---------- */
header {
  width: 100%;
  position: fixed; /* Changed from sticky to fixed for better mobile support */
  top: 0;
  background: #fff;
  z-index: 1000;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Added shadow for better visibility */
}

/* ---------- NAVBAR ---------- */
.navbar {
  max-width: 1300px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  position: relative;
}

/* ---------- LOGO ---------- */
.navbar .logo img {
  height: 40px; /* Slightly reduced for better mobile fit */
  width: auto;
}

/* ---------- MENU ---------- */
.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
}
.navbar ul li a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  padding: 5px 0; /* Added padding for better touch targets */
}
.navbar ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -5px;
  background: #172f62;
  transition: 0.3s;
}
.navbar ul li a:hover::after,
.navbar ul li a.active::after {
  width: 100%;
}

/* ---------- RIGHT ICONS ---------- */
.right-icons {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1010;
}

/* ---------- SEARCH ---------- */
.search-toggle {
  font-size: 18px;
  color: #333;
  cursor: pointer;
  padding: 5px; /* Added padding for better touch targets */
}
.search-box {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 10px;
  border-radius: 5px;
  width: 250px; /* Fixed width for consistency */
}
.search-box input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  width: 100%; /* Full width of container */
  margin-bottom: 5px; /* Added spacing */
}
.search-box button {
  background: #ccc;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  width: 100%; /* Full width of container */
}

/* ---------- HAMBURGER ---------- */
.hamburger {
  display: none;
  font-size: 22px;
  color: #333;
  cursor: pointer;
  padding: 5px; /* Added padding for better touch targets */
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 991px) {
  body {
    padding-top: 60px; /* Adjusted for smaller header */
  }
  
  .navbar {
    padding: 10px 15px; /* Reduced padding */
  }
  
  .navbar .logo img {
    height: 35px; /* Smaller logo for mobile */
  }
  
  /* Menu hidden by default */
  .navbar ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: white;
    border-top: 1px solid #eee;
    display: none;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1); /* Added shadow */
    max-height: calc(100vh - 60px); /* Limit height to viewport */
    overflow-y: auto; /* Add scroll if needed */
  }
  
  .navbar ul.show {
    display: flex;
  }
  
  .navbar ul li {
    text-align: center;
    padding: 12px 0; /* Increased padding for better touch targets */
    border-bottom: 1px solid #f0f0f0; /* Added separator */
  }
  
  .navbar ul li:last-child {
    border-bottom: none;
  }
  
  /* Show hamburger */
  .hamburger {
    display: block;
  }
  
  /* Right icons side by side */
  .right-icons {
    gap: 10px; /* Reduced gap */
  }
  
  .search-toggle {
    font-size: 20px;
  }
  
  /* Search box adjustments */
  .search-box {
    width: 100%; /* Full width on mobile */
    right: 0;
    left: 0;
    border-radius: 0;
  }
}

/* Small screens (phones) */
@media (max-width: 576px) {
  .navbar {
    padding: 8px 12px; /* Further reduced padding */
  }
  
  .navbar .logo img {
    height: 30px; /* Even smaller logo */
  }
  
  .navbar ul li {
    padding: 10px 0; /* Slightly reduced padding */
  }
  
  .right-icons {
    gap: 8px; /* Further reduced gap */
  }
}
