/* =========================================
   HEADER MAIN
========================================= */
header {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 70px;

  background: linear-gradient(125deg, #021c29a2, #021c298c);
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 60px;
  transition: all 0.45s ease;
  z-index: 1000;

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

header h1 {
  font-size: 24px;
  color: #fff;
}

/* =========================================
   NAVIGATION
========================================= */
nav {
  display: flex;
  align-items: center;
  gap: 35px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

/* underline animation */
nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: rgb(0, 103, 167);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: rgb(0, 103, 167);
}

/* =========================================
   DROPDOWN MENU
========================================= */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 35px;
  left: 0;
  min-width: 160px;

  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);

  flex-direction: column;
  list-style: none;
  border-radius: 10px;

  padding: 10px 0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;

  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 999;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 8px 20px;
}

.dropdown-menu li a {
  color: #333;
  font-weight: 500;
  display: block;
  transition: 0.3s;
}

.dropdown-menu li a:hover {
  color: rgb(0, 103, 167);
  transform: translateX(4px);
}

/* =========================================
   NAV BUTTON (OLD .card → NEW .nav-btn)
========================================= */
.nav-btn {
  padding: 10px 28px;
  background: rgb(0,103,167);
  color: white;

  border-radius: 10px;
  font-weight: 600;

  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}
.nav-btn p{
    margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 20 !important;
}
.nav-btn:hover p{
  color:rgb(0,103,167) !important;
  

}
.nav-btn:hover{
  color:rgb(0,103,167);
  

}

/* hover animation left → right */
.nav-btn::after {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background:  rgba(255, 255, 255, 1);
  opacity: 100%;
  z-index:21;
  transition: left 0.35s ease;
}

.nav-btn:hover::after {
  left: 0;
  color: rgb(0,103,167) !important;
}

.nav-btn:hover {
  transform: translateY(-2px);
  
}

/* =========================================
   HAMBURGER MENU
========================================= */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}
/* ==============================
   TABLET VIEW (769px – 1024px)
============================== */
@media (min-width: 769px) and (max-width: 1024px) {

  header {
    padding: 0 35px;
    height: 70px;
  }

  /* Logo size adjust */
  header h1 {
    font-size: 22px;
  }

  /* Navigation spacing tighter */
  nav {
    gap: 25px;
  }

  nav ul {
    gap: 22px;
  }

  nav a {
    font-size: 15px;
  }

  /* Dropdown better spacing */
  .dropdown-menu {
    top: 32px;
    min-width: 150px;
    padding: 8px 0;
  }

  .dropdown-menu li {
    padding: 7px 18px;
  }

  .dropdown-menu li a {
    font-size: 14px;
  }

  /* Button size fix */
  .nav-btn {
    padding: 9px 18px;
  }
  .nav-btn p {
    font-size: 13px;
  }

  /* Improve header blur for tablets */
  header {
    backdrop-filter: blur(14px);
  }

  /* Fix large-screen hover underline position */
  nav a::after {
    bottom: -4px;
  }

  /* Prevent menu overflow if zoomed */
  nav {
    max-width: 100%;
  }
}

/* =========================================
   MOBILE NAVIGATION
========================================= */
@media (max-width: 768px) {

  header {
    margin-top:30px;
    padding: 15px 25px;
  }

  /* Show hamburger */
  .hamburger {
    display: flex !important;
    z-index: 1200;
  }

  /* hide desktop menu */
  nav {
    position: fixed;
    top: 0;
    right: -100%;

    width: 250px;
    height: 100vh;

    background: rgba(2, 28, 41, 0.98);
    backdrop-filter: blur(8px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: right 0.4s ease;
    z-index: 1100;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  nav a {
    font-size: 18px;
    color: #fff;
  }

  .nav-btn {
    width: 80%;
    text-align: center;
  }


  /* dropdown inside mobile */
  .dropdown-menu {
    position: static;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;

    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .dropdown-menu li a {
    color: #fff;
  }
}

/* =========================================
   SCROLL HEADER EFFECTS
========================================= */
header.hide {
  transform: translateY(-100%);
  opacity: 0;
}

header.show {
  transform: translateY(0);
  opacity: 1;
}

header.scrolled {
  height: 60px;
  background: linear-gradient(125deg, #021c29a2, #021c298c);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
