/* =========================
   HERO SEARCH
========================= */

.hero-search {

  width: 100%;

  display: flex;

  justify-content: center;

  padding:
    30px 20px;

}

/* =========================
   SEARCH BAR
========================= */

.hero-search .search-bar {

  position: relative;

  width: 100%;

  max-width: 760px;

  height: 64px;

  display: flex;

  align-items: center;

  gap: 10px;

  padding:
    0 10px 0 20px;

  border-radius: 22px;

  background:
    rgba(255,255,255,0.88);

  border:
    1px solid rgba(255,255,255,0.7);

  backdrop-filter:
    blur(18px);

  -webkit-backdrop-filter:
    blur(18px);

  box-shadow:
    0 20px 60px rgba(15,23,42,0.10),
    0 6px 18px rgba(15,23,42,0.05),
    inset 0 1px 0 rgba(255,255,255,0.75);

  transition:
    all 0.3s cubic-bezier(.4,0,.2,1);

}

/* HOVER */

.hero-search .search-bar:hover {

  transform:
    translateY(-2px);

  box-shadow:
    0 28px 80px rgba(15,23,42,0.14),
    0 12px 28px rgba(15,23,42,0.06);

}

/* FOCUS */

.hero-search .search-bar:focus-within {

  border-color:
    rgba(59,130,246,0.28);

  box-shadow:
    0 0 0 5px rgba(59,130,246,0.10),
    0 32px 90px rgba(15,23,42,0.16);

}

/* =========================
   ICON
========================= */

.hero-search .search-icon {

  color:
    #94a3b8;

  font-size: 1rem;

  flex-shrink: 0;

}

/* =========================
   INPUT
========================= */

.hero-search .search-bar input {

  flex: 1;

  height: 100%;

  border: none;

  outline: none;

  background: transparent;

  color: #0f172a;

  font-size: 1rem;

  font-weight: 500;

  letter-spacing: -0.01em;

  font-family:
    Inter,
    system-ui,
    sans-serif;

}

/* PLACEHOLDER */

.hero-search .search-bar input::placeholder {

  color:
    #94a3b8;

}

/* =========================
   SHORTCUT
========================= */

.hero-search .search-shortcut {

  padding:
    8px 12px;

  border-radius: 12px;

  background:
    rgba(148,163,184,0.10);

  color:
    #64748b;

  font-size: 0.78rem;

  font-weight: 700;

  white-space: nowrap;

}

/* =========================
   BUTTON
========================= */

.hero-search .search-bar button {

  border: none;

  cursor: pointer;

  width: 48px;

  height: 48px;

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #60a5fa
    );

  color: white;

  font-size: 1rem;

  display: flex;

  align-items: center;

  justify-content: center;

  transition:
    all 0.25s ease;

  box-shadow:
    0 10px 24px rgba(59,130,246,0.22);

}

/* BUTTON HOVER */

.hero-search .search-bar button:hover {

  transform:
    scale(1.05);

  box-shadow:
    0 14px 34px rgba(59,130,246,0.30);

}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

  .hero-search .search-bar {

    height: 58px;

    border-radius: 18px;

    padding:
      0 8px 0 16px;

  }

  .hero-search .search-shortcut {

    display: none;

  }

  .hero-search .search-bar button {

    width: 44px;

    height: 44px;

    border-radius: 14px;

  }

}

@media (max-width: 480px) {

  .hero-search .search-bar {

    height: 54px;

    border-radius: 16px;

  }

  .hero-search .search-bar input {

    font-size: 0.95rem;

  }

}

/* =========================
   FULL WIDTH HEADER
========================= */

.home-header {

  position: sticky;

  top: 0;

  width: 100%;

  z-index: 9999;

  background:
    rgba(60, 58, 200, 0.78);

  backdrop-filter:
    blur(125px);

  -webkit-backdrop-filter:
    blur(135px);

  border-bottom:
    1px solid rgba(255,255,255,0.08);

  transition:
    all 0.3s ease;

}

/* =========================
   INNER LAYOUT
========================= */

.home-header-inner {

  max-width: 1320px;

  margin: 0 auto;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 24px;

  padding:
    18px 24px;

}

/* =========================
   LOGO
========================= */

.home-logo a {

  display: flex;

  align-items: center;

  gap: 12px;

  text-decoration: none;

}

.home-logo img {

  width: 42px;

  height: 42px;

  border-radius: 12px;

  object-fit: cover;

}

.home-logo span {

  font-size: 1.45rem;

  font-weight: 800;

  letter-spacing: -0.03em;

  background:
    linear-gradient(
      90deg,
      rgba(153, 240, 251, 0.96),
      #a8f0ed
    );

  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;

}

/* =========================
   NAVIGATION
========================= */

.home-nav {

  display: flex;

  align-items: center;

  gap: 10px;

  flex-wrap: wrap;

}

.home-nav a {

  position: relative;

  text-decoration: none;

  color:
    rgba(255,255,255,0.72);

  font-size: 0.94rem;

  font-weight: 600;

  padding:
    10px 16px;

  border-radius: 12px;

  transition:
    all 0.25s ease;

  white-space:
    nowrap;

}

/* HOVER */

.home-nav a:hover {

  color:
    rgba(255,255,255,0.96);

  background:
    rgba(255,255,255,0.06);

}

/* ACTIVE LINE */

.home-nav a::after {

  content: "";

  position: absolute;

  left: 50%;

  bottom: 6px;

  width: 0;

  height: 2px;

  border-radius: 999px;

  background:
    #3b82f6;

  transform:
    translateX(-50%);

  transition:
    width 0.25s ease;

}

.home-nav a:hover::after {

  width: 55%;

}

/* =========================
   CTA BUTTON
========================= */

.home-nav-cta {

  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #60a5fa
    );

  color:
    rgba(255,255,255,0.96) !important;

  padding:
    10px 18px !important;

  border-radius:
    12px;

  box-shadow:
    0 8px 24px rgba(59,130,246,0.22);

}

.home-nav-cta:hover {

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #3b82f6
    );

}

/* =========================
   TABLET
========================= */

@media (max-width: 980px) {

  .home-header-inner {

    flex-wrap: wrap;

    justify-content: center;

    gap: 18px;

  }

  .home-nav {

    justify-content: center;

  }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {

  .home-header-inner {

    flex-direction: column;

    align-items: stretch;

    gap: 14px;

    padding:
      16px;

  }

  .home-logo {

    display: flex;

    justify-content: center;

  }

  .home-logo img {

    width: 38px;

    height: 38px;

  }

  .home-logo span {

    font-size:
      1.2rem;

  }

  .home-nav {

    display: grid;

    grid-template-columns:
      repeat(2, 1fr);

    gap: 10px;

    width: 100%;

  }

  .home-nav a {

    text-align: center;

    width: 100%;

    padding:
      12px 10px;

    font-size:
      0.88rem;

  }

  .home-nav-cta {

    grid-column:
      span 2;

  }

}
/* =========================
   LIGHT THEME SEARCH DROPDOWN
========================= */

.search-results {

  position: absolute;

  top: calc(100% + 10px);

  left: 50%;

  transform:
    translateX(-50%);

  width: 100%;

  max-width: 620px;

  max-height: 360px;

  overflow-y: auto;

  overscroll-behavior: contain;

  padding:
    8px;

  border-radius: 20px;

  border:
    1px solid rgba(255,255,255,0.10);

  background:
    rgba(60, 58, 200, 0.78);

  box-shadow:
    0 20px 50px rgba(15,23,42,0.18),
    0 8px 20px rgba(15,23,42,0.08);

  z-index: 99999;

  display: none;

  animation:
    dropdownReveal 160ms ease;

}

/* =========================
   SCROLLBAR
========================= */

.search-results::-webkit-scrollbar {

  width: 7px;

}

.search-results::-webkit-scrollbar-thumb {

  background:
    rgba(255,255,255,0.20);

  border-radius: 999px;

}

.search-results::-webkit-scrollbar-track {

  background: transparent;

}

/* =========================
   SEARCH RESULT ITEM
========================= */

.search-result-item {

  display: flex;

  flex-direction: column;

  justify-content: center;

  gap: 2px;

  min-height: 52px;

  padding:
    10px 14px;

  border:
    1px solid transparent;

  border-radius: 14px;

  text-decoration: none;

  transition:
    all 0.16s ease;

  background:
    transparent;

}

/* HOVER */

.search-result-item:hover,
.search-result-item.active {

  border:
    1px solid rgba(59,130,246,0.28);

  background:
    rgba(255,255,255,0.06);

}

/* =========================
   RESULT TITLE
========================= */

.result-title {

  font-size: 0.92rem;

  font-weight: 650;

  letter-spacing: -0.01em;

  color:
    rgba(255,255,255,0.96);

  line-height: 1.2;

}

/* =========================
   RESULT META
========================= */

.result-meta {

  font-size: 0.75rem;

  font-weight: 500;

  color:
    rgba(255,255,255,0.74);

  line-height: 1.2;

}

/* =========================
   EMPTY STATE
========================= */

.search-empty {

  padding:
    16px;

  text-align: center;

  border-radius: 14px;

  color:
    rgba(255,255,255,0.74);

  font-size: 0.85rem;

}

/* =========================
   ANIMATION
========================= */

@keyframes dropdownReveal {

  0% {

    opacity: 0;

    transform:
      translateX(-50%)
      translateY(8px);

  }

  100% {

    opacity: 1;

    transform:
      translateX(-50%)
      translateY(0);

  }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .search-results {

    width: calc(100vw - 24px);

    max-width: unset;

    border-radius: 16px;

    padding:
      6px;

  }

  .search-result-item {

    min-height: 48px;

    padding:
      10px 12px;

    border-radius:
      12px;

  }

  .result-title {

    font-size:
      0.88rem;

  }

  .result-meta {

    font-size:
      0.72rem;

  }

}

/* =========================
   MOBILE HEADER CLEAN MODE
========================= */

@media (max-width: 640px) {

  .home-header {

    padding:
      10px 14px;

  }

  .home-header-inner {

    min-height: 68px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
      14px 18px;

  }

  /* LOGO CENTER */

  .home-logo {

    width: 100%;

    display: flex;

    justify-content: center;

    align-items: center;

  }

  .home-logo a {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

  }

  .home-logo img {

    width: 40px;

    height: 40px;

    border-radius: 12px;

  }

  .home-logo span {

    font-size: 1.18rem;

    font-weight: 800;

  }

  /* HIDE NAVIGATION */

  .home-nav {

    display: none !important;

  }

}

/* =========================
   MOBILE SEARCH ACTIVE
========================= */

@media (max-width: 768px) {

  .hero-search {

    position: relative;

    z-index: 200;

  }

  .hero-search .search-bar {

    transition:
      box-shadow 320ms ease,
      border-color 220ms ease,
      background 220ms ease;

  }

  /* ACTIVE STATE */

  .hero-search .search-bar.mobile-search-active {

    border-color:
      rgba(59,130,246,0.24);

    box-shadow:
      0 24px 60px rgba(15,23,42,0.12),
      0 0 0 4px rgba(59,130,246,0.10);

  }

  /* OVERLAY */

  .search-overlay {

    position: fixed;

    inset: 0;

    opacity: 0;

    pointer-events: none;

    transition:
      opacity 260ms ease;

    background:
      radial-gradient(
        circle at center,
        rgba(96,165,250,0.10),
        rgba(15,23,42,0.16)
      );

    backdrop-filter:
      blur(8px);

    -webkit-backdrop-filter:
      blur(8px);

    z-index: 150;

  }

  .search-overlay.is-visible {

    opacity: 1;

    pointer-events: auto;

  }

}

/* =========================
   MOBILE SEARCH LIFT
========================= */

@media (max-width: 768px) {

  .hero-search {

    position: relative;

    z-index: 200;

  }

  .hero-search .search-bar {

    position: relative;

    z-index: 220;

    transition:
      transform 420ms cubic-bezier(.16,1,.3,1),
      box-shadow 320ms ease,
      border-color 220ms ease,
      background 220ms ease;

    will-change:
      transform;

  }

  /* MOVE SEARCH UP */

  .hero-search .search-bar.mobile-search-active {

    transform:
      translateY(-18rem);

    border-color:
      rgba(59,130,246,0.24);

    box-shadow:
      0 28px 70px rgba(15,23,42,0.16),
      0 0 0 4px rgba(59,130,246,0.10);

  }

}
