/* ============================================================
   Clickin Labs — Navigation Styles
   File: public_html/assets/css/navigation.css
   ============================================================ */


/* ============================================================
   Navigation Local Variables
   ============================================================ */

nav.menu {
  --nav-heading: #111827;
  --nav-surface: #FFFFFF;
  --nav-bg: #FFFFFF;
  --nav-border: #E5E7EB;
  --nav-border-hover: #D1D5DB;
  --nav-accent: #7C5CFF;
  --nav-muted: #9CA3AF;
}


/* ============================================================
   Light Theme
   ============================================================ */

html[data-theme="light"] nav.menu {
  --nav-heading: #111827;
  --nav-surface: #FFFFFF;
  --nav-bg: #FFFFFF;
  --nav-border: #E5E7EB;
  --nav-border-hover: #D1D5DB;
  --nav-accent: #7C5CFF;
  --nav-muted: #9CA3AF;
}


/* ============================================================
   Dark Theme
   ============================================================ */

html[data-theme="dark"] nav.menu {
  --nav-heading: #D0D6E0;
  --nav-surface: #000000;
  --nav-bg: #000000;
  --nav-border: #2D2D33;
  --nav-border-hover: #464650;
  --nav-accent: #7C5CFF;
  --nav-muted: #6B6B74;
}


/* ============================================================
   Navigation — Base
   ============================================================ */

nav.menu {
  flex-wrap: nowrap;
  display: flex;
  gap: 22px;
}


/* ============================================================
   Navigation — Link Reset
   ============================================================ */

nav.menu a,
nav.menu a:hover,
nav.menu a:focus,
nav.menu a:active,
nav.menu a:visited {
  white-space: nowrap;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
}


/* ============================================================
   Navigation — Dropdown Link Reset
   ============================================================ */

.dropdown-items a,
.dropdown-items a:hover,
.dropdown-items a:focus,
.dropdown-items a:active,
.dropdown-items a:visited {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
}


/* ============================================================
   Navigation — Pseudo Element Reset
   ============================================================ */

header.custom-header a::before,
header.custom-header a::after {
  content: none !important;
  display: none !important;
}


/* ============================================================
   Navigation — Base Links
   ============================================================ */

nav.menu a {
  color: var(--nav-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

nav.menu a:hover {
  color: var(--nav-accent);
}

nav.menu a:active {
  color: var(--nav-accent);
}

nav.menu a.active {
  color: var(--nav-accent) !important;
}


/* ============================================================
   Navigation — Desktop Portal / Divider Defaults
   ============================================================ */

.client-portal-btn {
  display: none;
}

.nav-divider {
  display: none;
}


/* ============================================================
   Navigation — Desktop / Tablet
   ============================================================ */

@media (min-width: 769px) {

  header.custom-header:not(.scrolled) nav.menu a {
    color: var(--nav-heading) !important;
  }

  header.custom-header.scrolled nav.menu a {
    color: var(--nav-heading) !important;
  }

  header.custom-header nav.menu a:hover {
    color: var(--nav-accent) !important;
  }

  header.custom-header nav.menu a.active {
    color: var(--nav-heading) !important;
  }

  .dropdown-group,
  .search-bar,
  .contact-button {
    display: none !important;
  }

  nav.menu {
    align-items: center;
  }

  nav.menu a[href="https://clickin.in"],
  nav.menu a[href="https://clickin.in/about-us"] {
    display: none !important;
  }

  nav.menu a[href="https://clickin.in/services"] {
    order: 1;
  }

  nav.menu a[href="https://clickin.in/blog"] {
    order: 2;
  }

  nav.menu a[href="https://clickin.in/contact-us"] {
    order: 3;
  }

  /* ========================================================
     Desktop Divider
     ======================================================== */

  .nav-divider {
    order: 4;

    display: block;

    flex-shrink: 0;

    width: 1px;
    height: 20px;

    background: var(--nav-border);

    margin: 0 6px;

    align-self: center;
  }

  /* ========================================================
     Desktop Client Portal
     ======================================================== */

  .client-portal-btn {
    order: 5;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 22px;

    background: var(--nav-surface);

    color: var(--nav-heading) !important;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;

    border-radius: 8px;

    transition:
      border-color 0.2s ease,
      color 0.2s ease;
  }

  nav.menu a.client-portal-btn {
    border: 1px solid var(--nav-border) !important;
  }

  nav.menu a.client-portal-btn:hover,
  nav.menu a.client-portal-btn:active {
    border: 1px solid var(--nav-border-hover) !important;
    color: var(--nav-accent) !important;
  }
}


/* ============================================================
   Navigation — Mobile / Tablet Portrait
   ============================================================ */

@media (max-width: 768px) {

  nav.menu {
    display: none;

    flex-direction: column;

    position: absolute;

    top: 60px;
    right: 12px;

    background: var(--nav-surface);

    border: 1px solid var(--nav-border);

    width: 270px;
    max-height: 80vh;

    overflow-y: auto;

    padding: 12px 14px !important;

    border-radius: 14px;

    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);

    z-index: 99999;
  }

  nav.menu.active {
    display: flex;
  }

  nav.menu a {
    color: var(--nav-heading);

    padding: 6px 0 !important;

    font-size: 13px;
    line-height: 1.3;
  }


  /* ========================================================
     Dropdown Groups
     ======================================================== */

  .dropdown-group {
    display: flex;

    flex-direction: column;

    margin-top: 4px !important;
    padding-top: 4px !important;

    border-top: 1px solid var(--nav-border);
  }

  .dropdown-title {
    font-weight: 600;

    padding: 6px 0 !important;

    cursor: pointer;

    color: var(--nav-heading);

    position: relative;

    font-size: 13px;

    user-select: none;
  }

  .dropdown-title::after {
    content: "＋";

    position: absolute;

    right: 0;

    font-size: 12px;
  }

  .dropdown-title.active::after {
    content: "−";
  }

  .dropdown-items {
    display: none;

    flex-direction: column;

    gap: 6px !important;

    padding-left: 10px;
    padding-top: 6px !important;

    margin-bottom: 6px !important;

    background: var(--nav-bg);

    border-radius: 3px;

    border: none !important;

    box-shadow: none !important;
    outline: none !important;
  }

  .dropdown-items a {
    font-size: 12.5px;

    color: var(--nav-heading);

    text-decoration: none !important;

    padding: 3px 0 !important;
  }

  .dropdown-items a:hover {
    color: var(--nav-accent);
  }

  .dropdown-title.active + .dropdown-items {
    display: flex;
  }


  /* ========================================================
     Mobile Client Button
     ======================================================== */

  .contact-button {
    display: flex;

    align-items: center;
    justify-content: center;

    margin-top: 12px !important;
    margin-bottom: 20px !important;

    height: 36px !important;

    padding: 0 12px !important;

    text-align: center;

    background: var(--nav-surface);

    border: 1px solid var(--nav-border);

    color: var(--nav-heading) !important;

    border-radius: 8px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: -0.01em;

    text-decoration: none !important;

    width: 100%;

    transition:
      border-color 0.2s ease,
      color 0.2s ease;
  }

  nav.menu a.contact-button {
    border: 1px solid var(--nav-border) !important;
  }

  nav.menu a.contact-button:hover,
  nav.menu a.contact-button:active {
    border: 1px solid var(--nav-border-hover) !important;
    color: var(--nav-accent) !important;
  }


  /* ========================================================
     Mobile Search
     ======================================================== */

  .search-bar {
    background: var(--nav-surface);

    border-radius: 8px;

    display: flex;

    align-items: center;

    height: 36px !important;

    padding: 0 12px !important;

    border: 1px solid var(--nav-border);

    margin-bottom: 10px !important;

    width: 100%;

    transition: border-color 0.25s ease;
  }

  .search-bar:focus-within {
    border-color: var(--nav-accent);
  }

  .search-bar input {
    border: none;

    outline: none;

    font-size: 14px;

    width: 100%;

    background: transparent;

    color: var(--nav-heading);
  }

  .search-bar input::placeholder {
    color: var(--nav-muted);

    font-size: 13px;
  }

  .search-bar button {
    background: none;

    border: none;

    padding: 0;

    margin-left: 3px;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;
  }

  .search-bar svg {
    width: 14px !important;
    height: 14px !important;

    stroke: var(--nav-heading);
  }
}