/* ================================================================
   header.css — Vivek Pal | FINAL FIXED VERSION
   ✅ Search bar resize BAND
   ✅ Suggestion box layout push BAND
   ✅ Mobile blink BAND — animation speed fix
   ✅ Running multi-color borders on all elements
   ✅ Logo: no filter
   ✅ Dropdown z-index fix — projects page pe kaam karega
   ================================================================ */

@keyframes runBorderBox {
  0%   { border-color: #00f2ff; box-shadow: 0 0 8px rgba(0,242,255,0.5); }
  25%  { border-color: #ff2d55; box-shadow: 0 0 8px rgba(255,45,85,0.5); }
  50%  { border-color: #00ff88; box-shadow: 0 0 8px rgba(0,255,136,0.5); }
  75%  { border-color: #a855f7; box-shadow: 0 0 8px rgba(168,85,247,0.5); }
  100% { border-color: #00f2ff; box-shadow: 0 0 8px rgba(0,242,255,0.5); }
}

@keyframes runBorderSearch {
  0%   { border-color: #00f2ff; box-shadow: 0 0 12px rgba(0,242,255,0.4); }
  33%  { border-color: #ff2d55; box-shadow: 0 0 12px rgba(255,45,85,0.4); }
  66%  { border-color: #00ff88; box-shadow: 0 0 12px rgba(0,255,136,0.4); }
  100% { border-color: #00f2ff; box-shadow: 0 0 12px rgba(0,242,255,0.4); }
}

@keyframes loginGlow {
  0%   { box-shadow: 0 0 0 1.5px #00f2ff, 0 0 10px rgba(0,242,255,0.6); }
  25%  { box-shadow: 0 0 0 1.5px #ff2d55, 0 0 10px rgba(255,45,85,0.6); }
  50%  { box-shadow: 0 0 0 1.5px #00ff88, 0 0 10px rgba(0,255,136,0.6); }
  75%  { box-shadow: 0 0 0 1.5px #a855f7, 0 0 10px rgba(168,85,247,0.6); }
  100% { box-shadow: 0 0 0 1.5px #00f2ff, 0 0 10px rgba(0,242,255,0.6); }
}
@keyframes loginColorShift {
  0%,100% { color: #00f2ff; }
  25%      { color: #ff2d55; }
  50%      { color: #00ff88; }
  75%      { color: #a855f7; }
}
@keyframes neonPulse {
  0%,100% { box-shadow: 0 0 6px rgba(0,242,255,0.4); }
  50%      { box-shadow: 0 0 18px rgba(0,242,255,0.85); }
}
@keyframes slideDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ================================================================
   BRAND
   ================================================================ */
.brand-box {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px;
  flex-shrink: 0;
}
.brand-text-wrapper { display:flex; flex-direction:column; justify-content:center; }
.header-cyber-logo {
  height: 50px !important;
  width: auto !important;
  object-fit: contain !important;
  flex-shrink: 0;
  filter: none !important;
  transition: transform 0.3s ease;
}
.brand-box:hover .header-cyber-logo { transform: scale(1.06); }

/* ================================================================
   HEADER MAIN — DESKTOP
   ================================================================ */
.headm {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(7,8,13,0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,242,255,0.12);
  z-index: 2200;
  padding: 0 4%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  box-sizing: border-box;
  gap: 20px;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.headm:hover {
  background: rgba(7,8,13,0.99) !important;
  border-bottom-color: rgba(0,242,255,0.35);
}
.headm .h1 {
  font-size: 1.35rem; font-weight: 900; color: #00f2ff;
  text-transform: uppercase; letter-spacing: 2.5px;
  margin: 0; line-height: 1.1;
  text-shadow: 0 0 14px rgba(0,242,255,0.55);
  white-space: nowrap;
}
.headm .pt {
  font-size: 0.62rem; color: #ff2d55;
  text-transform: uppercase; margin-top: 4px; letter-spacing: 1px;
  white-space: nowrap;
}

/* ================================================================
   SEARCH WRAPPER
   ================================================================ */
.search-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 140px;
  max-width: 320px;
  z-index: 2300;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid #00f2ff;
  border-radius: 50px;
  padding: 7px 16px;
  animation: runBorderSearch 8s linear infinite;
  transition: background 0.3s;
}

.search-box:focus-within {
  animation: none;
  border-color: #00f2ff;
  background: rgba(0,242,255,0.05);
  box-shadow: 0 0 22px rgba(0,242,255,0.3);
  width: 100% !important;
  flex: none !important;
}

.search-box input {
  background: transparent;
  border: none;
  color: #e0fbfc;
  outline: none;
  width: 100%;
  font-size: 0.85rem;
  min-width: 0;
  box-sizing: border-box;
}
.search-box input::placeholder { color: rgba(0,242,255,0.38); }

.search-btn {
  background: transparent; border: none; color: #00f2ff;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center;
  padding: 0; margin-left: 6px; flex-shrink: 0;
  transition: color 0.3s, text-shadow 0.3s;
}
.search-btn:hover { color: #fff; text-shadow: 0 0 8px #00f2ff; }

/* ================================================================
   SUGGESTION BOX
   ================================================================ */
.suggestion-results {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  background: rgba(7,8,13,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,242,255,0.25);
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 9999 !important;
}
.suggestion-results.active { display: block; }

.suggestion-item {
  padding: 10px 16px; color: #ccc; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem; transition: background 0.2s, color 0.2s;
}
.suggestion-item:hover { background: rgba(0,242,255,0.08); color: #00f2ff; }

/* ================================================================
   NAV CONTAINER
   ================================================================ */
.nav-container-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav > a, .nav .dropbtn {
  color: rgba(180,220,235,0.85);
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 7px 11px; border-radius: 8px;
  text-decoration: none; cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.nav > a:hover, .nav .dropbtn:hover {
  color: #00f2ff;
  border-color: rgba(0,242,255,0.45);
  background: rgba(0,242,255,0.06);
  animation: neonPulse 1.3s ease-in-out infinite;
}

/* ================================================================
   LOGIN BUTTON
   ================================================================ */
.btn-login {
  position: relative; overflow: hidden;
  background: transparent;
  padding: 7px 16px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 1.5px; cursor: pointer;
  text-transform: uppercase; border: none;
  white-space: nowrap;
  animation: loginGlow 6s linear infinite, loginColorShift 6s linear infinite;
  transition: background 0.3s;
}
.btn-login::before {
  content: ''; position: absolute;
  top: 50%; left: 50%; width: 0; height: 0;
  background: radial-gradient(circle, rgba(0,242,255,0.25) 0%, transparent 70%);
  transform: translate(-50%,-50%); border-radius: 50%;
  transition: width 0.5s ease, height 0.5s ease, opacity 0.4s; opacity: 0;
}
.btn-login:hover::before { width: 220px; height: 220px; opacity: 1; }
.btn-login:hover {
  color: #fff !important; animation: none;
  box-shadow: 0 0 0 1.5px #00f2ff, 0 0 28px rgba(0,242,255,0.8);
}

/* ================================================================
   DROPDOWN
   FIX: z-index 9999 — projects page ke cards ke upar aayega
   FIX: .headm ka isolation ensure karta hai ki dropdown
        header ke bahar na jaaye
   ================================================================ */
.dropdown { position: relative; }
.dropdown-content {
  display: none;
  position: fixed;
  background: rgba(7,8,13,0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0,242,255,0.2);
  border-radius: 10px;
  min-width: 190px;
  overflow: hidden;
  z-index: 99999;
}
/* CSS hover hatao — sirf JS se handle hoga */
.dropdown-content a {
  display: block; padding: 10px 18px;
  font-size: 0.83rem; color: #aac; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s, color 0.2s;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: rgba(0,242,255,0.08); color: #00f2ff; }

/* ================================================================
   MOBILE TOGGLE
   ================================================================ */
.mobile-nav-toggle {
  display: none;
  color: #00f2ff; font-size: 1.6rem;
  cursor: pointer; padding: 4px; flex-shrink: 0;
  transition: color 0.3s, text-shadow 0.3s;
}
.mobile-nav-toggle:hover { color: #fff; text-shadow: 0 0 10px #00f2ff; }

/* ================================================================
   TABLET  1025px – 1280px
   ================================================================ */
@media (min-width: 1025px) and (max-width: 1280px) {
  .headm { gap: 14px; padding: 0 3%; }
  .headm .h1 { font-size: 1.15rem; letter-spacing: 1.5px; }
  .headm .pt { font-size: 0.56rem; }
  .header-cyber-logo { height: 42px !important; }
  .search-wrapper { max-width: 260px; }
  .nav > a, .nav .dropbtn { font-size: 0.75rem; padding: 6px 8px; }
  .btn-login { font-size: 0.75rem; padding: 6px 12px; }
}

/* ================================================================
   MOBILE  ≤ 1024px
   ================================================================ */
@media (max-width: 1024px) {

  .headm {
    height: auto !important;
    min-height: 120px !important;
    padding: 10px 4% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 0 !important;
    background: rgba(7,9,14,0.98) !important;
    z-index: 2200 !important;
    box-sizing: border-box !important;
  }

  .brand-box    { order: 1 !important; flex: 0 0 auto !important; }
  .headm .h1    { font-size: 1.05rem !important; letter-spacing: 1px !important; }
  .headm .pt    { display: none !important; }
  .header-cyber-logo { height: 36px !important; }

  .mobile-nav-toggle {
    display: block !important;
    order: 2 !important;
    flex: 0 0 auto !important;
  }

  .search-wrapper {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    margin: 0 !important;
    position: relative !important;
    top: unset !important;
    left: unset !important;
    right: unset !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2300 !important;
  }

  .search-box {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    padding: 10px 16px !important;
    animation: runBorderSearch 10s linear infinite !important;
  }

  .search-box:focus-within {
    animation: none !important;
    width: 100% !important;
    flex: none !important;
    border-color: #00f2ff !important;
    box-shadow: 0 0 22px rgba(0,242,255,0.3) !important;
  }

  .search-box input { font-size: 0.9rem !important; }

  .suggestion-results {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    max-height: 180px !important;
  }

  .nav-container-wrapper {
    order: 4 !important;
    position: fixed !important;
    top: 120px !important;
    right: -100% !important;
    width: 100% !important;
    height: calc(100vh - 120px) !important;
    background: rgba(7,9,14,0.97) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 36px 6% !important;
    transition: right 0.4s cubic-bezier(0.16,1,0.3,1) !important;
    z-index: 2100 !important;
    box-sizing: border-box;
    overflow-y: auto;
  }
  .nav-container-wrapper.active { right: 0 !important; }

  .nav { flex-direction: column !important; width: 100% !important; gap: 10px !important; }

  .nav > a, .nav .dropbtn {
    font-size: 1.1rem !important;
    width: 100% !important;
    text-align: center !important;
    padding: 14px 0 !important;
    border-radius: 10px !important;
    letter-spacing: 1.5px !important;
    display: block !important;
    border: 1.5px solid #00f2ff !important;
    animation: runBorderBox 10s linear infinite !important;
    background: rgba(0,0,0,0.3) !important;
    color: #e0fbfc !important;
  }

  .dropdown { width: 100% !important; text-align: center !important; }
  .nav .dropbtn { width: 100% !important; box-sizing: border-box !important; }

  /* Mobile pe position:static — nav ke andar hi expand hoga neeche */
  .dropdown-content {
    display: none;
    position: static !important;
    top: unset !important; left: unset !important;
    width: 100% !important;
    background: rgba(0,242,255,0.04) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0,242,255,0.15) !important;
    border-radius: 10px !important;
    overflow: hidden;
    margin-top: 4px !important;
    z-index: auto !important;
  }
  .dropdown-content.open { display: block !important; }

  .dropdown-content a {
    font-size: 0.95rem !important; color: #88a0aa !important;
    padding: 9px 0 !important; text-align: center !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }

  .btn-login {
    width: 100% !important; max-width: 100% !important;
    padding: 14px 0 !important; font-size: 1.1rem !important;
    margin-top: 4px !important; display: block !important;
    text-align: center !important; border-radius: 10px !important;
    letter-spacing: 1.5px !important;
    background: rgba(0,0,0,0.3) !important;
    animation: loginGlow 8s linear infinite, loginColorShift 8s linear infinite !important;
  }
}




/* ================================================================
   HEADER SCROLL BEHAVIOR — Creative24 style float + shrink
   Colors same rahenge (cyan/pink/purple/green), sirf shape/position change
   ================================================================ */
@keyframes headerBorderRun {
  0%   { border-color: #00f2ff; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 18px rgba(0,242,255,0.35); }
  25%  { border-color: #ff2d55; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 18px rgba(255,45,85,0.35); }
  50%  { border-color: #00ff88; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 18px rgba(0,255,136,0.35); }
  75%  { border-color: #a855f7; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 18px rgba(168,85,247,0.35); }
  100% { border-color: #00f2ff; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 18px rgba(0,242,255,0.35); }
}

.headm {
  /* existing properties same rahenge, bas transition thoda extend kar rahe hain */
  transition: border-color 0.4s ease, background 0.4s ease,
              top 0.6s cubic-bezier(0.4,0,0.2,1),
              width 0.6s cubic-bezier(0.4,0,0.2,1),
              border-radius 0.6s cubic-bezier(0.4,0,0.2,1),
              height 0.6s cubic-bezier(0.4,0,0.2,1),
              padding 0.6s cubic-bezier(0.4,0,0.2,1);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.headm.scrolled {
  top: 14px;
  width: min(1300px, calc(100% - 40px));
  height: 64px;
  padding: 0 2.5%;
  background: rgba(7,8,13,0.55) !important;
  backdrop-filter: blur(20px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1.5px solid;
  border-radius: 18px;
  animation: headerBorderRun 6s linear infinite;
}

/* Scrolled state pe logo/title thoda chota */
.headm.scrolled .h1 { font-size: 1.15rem; }
.headm.scrolled .pt { opacity: 0; max-height: 0; overflow: hidden; }
.headm.scrolled .header-cyber-logo { height: 40px !important; }

/* Mobile pe scroll shrink effect skip — mobile already apna layout handle karta hai */
@media (max-width: 1024px) {
  .headm.scrolled {
    top: 0;
    width: 100%;
    border-radius: 0;
    animation: none;
    border: none;
  }
}





@media (max-width: 1024px) {
  .headm.scrolled {
    height: 64px !important;
    min-height: 64px !important;
    top: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    padding: 0 4% !important;
    flex-wrap: nowrap !important;
    border-radius: 18px !important;
    background: rgba(7,8,13,0.55) !important;
    backdrop-filter: blur(18px) saturate(1.7) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.7) !important;
    animation: headerBorderRun 6s linear infinite !important;
  }

  .headm.scrolled .h1 { font-size: 0.95rem !important; }
  .headm.scrolled .pt { display: none !important; }
  .headm.scrolled .header-cyber-logo { height: 30px !important; }

  /* Search bar ke liye jagah nahi hai jab navbar shrink hoga, isliye hide/compact karna hoga */
  .headm.scrolled .search-wrapper { display: none !important; }

  .headm.scrolled .mobile-nav-toggle { margin-left: auto !important; }
}


