﻿/* ============================================================
   BGSS & Associates – Floating Pill Navigation Bar
   Exact match to uploaded reference screenshot in brand color code (#A7253A)
   Includes all 7 sections:
   1. HOME           (fa-table-cells-large)
   2. PARTNERS       (fa-box-archive)
   3. SERVICES       (fa-cash-register)
   4. KNOWLEDGE BANK (fa-book-open)
   5. FEMA           (fa-globe)
   6. CAREER         (fa-briefcase)
   7. CONTACT        (fa-receipt)

   Active state: Pure white elongated capsule with crimson red icon.
   Inactive state: Pitch black (#000000) icons.
   Responsive: Present and perfectly proportioned on ALL screen sizes.
   ============================================================ */

:root {
  --nav-h: 84px;
  --nav-h-scrolled: 74px;
  --color-bgss-red: #A7253A;
  --color-bgss-red-dark: #891E30;
  --color-bgss-red-light: #D2909B;
}

/* ── Fixed Header Bar ── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav, 100);
  height: var(--nav-h);
  background: #FFFFFF;
  border-bottom: 1px solid #ECECEC;
  display: flex;
  align-items: center;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

#site-nav.nav-scrolled {
  height: var(--nav-h-scrolled);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  width: 100%;
  max-width: var(--max-w-site, 1400px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

/* ── Brand Logo ── */
.nav-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  min-width: 110px;
}

.nav-logo-img {
  height: 34px;
  width: auto;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.92;
  transform: scale(1.02);
}

.nav-logo-text {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-size: clamp(1.85rem, 2.6vw, 2.5rem);
  font-weight: 600;
  color: var(--color-bgss-red);
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-logo:hover .nav-logo-text {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ── PILL NAVIGATION WRAPPER (Center Aligned Hero Element) ── */
.nav-pill-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* ── THE CAPSULE PILL BAR (With Clear Text Labels) ── */
.nav-pill-bar {
  display: inline-flex;
  align-items: center;
  background: var(--color-bgss-red);
  border-radius: 9999px;
  padding: 5px 8px;
  box-shadow: 0 5px 22px rgba(167, 37, 58, 0.32), 0 1px 4px rgba(0, 0, 0, 0.08);
  gap: 6px;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill-bar:hover {
  box-shadow: 0 8px 28px rgba(167, 37, 58, 0.42), 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ── Pill Item / Link with Visible Text Label ── */
.nav-pill-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9999px;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-pill-link i {
  font-size: 0.92rem;
  line-height: 1;
  color: inherit;
  transition: transform 0.2s ease;
}

.nav-pill-text {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-block;
  line-height: 1;
  color: inherit;
}

/* ── Active State: Pure White Capsule with Red Text & Icon ── */
.nav-pill-link.active {
  background: #FFFFFF !important;
  color: var(--color-bgss-red) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.nav-pill-link.active .nav-pill-text {
  color: var(--color-bgss-red) !important;
  font-weight: 700;
}

.nav-pill-link.active i {
  color: var(--color-bgss-red) !important;
  transform: scale(1.05);
}

/* ── Inactive Item Hover State ── */
.nav-pill-link:hover:not(.active) {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.nav-pill-link:active {
  transform: scale(0.96);
}

/* ── Tooltips ── */
.nav-pill-link::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 5px 11px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 105;
}

.nav-pill-link:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Right Actions (Matching Reference Site Search Circle) ── */
.nav-right-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 110px;
  flex-shrink: 0;
}

.nav-search-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F1F3F5;
  color: #495057;
  border: 1px solid #E2E8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.nav-search-circle:hover {
  background: var(--color-bgss-red);
  color: #FFFFFF;
  border-color: var(--color-bgss-red);
  transform: scale(1.06);
  box-shadow: 0 3px 12px rgba(167, 37, 58, 0.25);
}

/* ── Search Flyout Modal ── */
#nav-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 150;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#nav-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-inner {
  background: #FFFFFF;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(-20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-search-modal.is-open .search-modal-inner {
  transform: translateY(0);
}

.search-modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.search-modal-input-wrap:focus-within {
  border-color: var(--color-bgss-red);
}

.search-modal-input-wrap i {
  color: #94A3B8;
  font-size: 1.1rem;
}

.search-modal-input {
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: inherit;
  width: 100%;
  color: #1E293B;
}

.search-modal-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.search-modal-close:hover {
  color: #0F172A;
}

.search-modal-quicklinks {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-quicklink {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-quicklink:hover {
  background: var(--color-bgss-red);
  color: #FFFFFF;
  border-color: var(--color-bgss-red);
}

/* ============================================================
   RESPONSIVE DESIGN (All Screen Sizes)
   The user explicitly requested:
   "Also in all responsive i want this type of navigation bar."
   The pill bar adapts smoothly down to mobile screens with zero clipping.
   ============================================================ */

/* ── Tablet & Small Laptops (769px - 1080px) ── */
@media (max-width: 1080px) {
  :root {
    --nav-h: 76px;
    --nav-h-scrolled: 68px;
  }

  .nav-container {
    padding-inline: 1rem;
    gap: 0.75rem;
  }

  .nav-logo {
    min-width: 80px;
  }

  .nav-right-actions {
    min-width: 80px;
  }

  .nav-pill-bar {
    padding: 5px 7px;
    gap: 6px;
  }

  .nav-pill-link {
    height: 40px;
    min-width: 38px;
    padding: 0 10px;
    font-size: 1.1rem;
  }

  .nav-pill-link.active {
    min-width: 52px;
  }
}

/* ── Mobile Devices & Portrait Tablets (<= 860px) ── */
/* ── Mobile Devices & Tablets (<= 860px): Exact Same Red Capsule Pill Bar as Desktop ── */
@media (max-width: 860px) {
  :root {
    --nav-h: 96px;
    --nav-h-scrolled: 90px;
  }

  #site-nav {
    height: auto !important;
    min-height: var(--nav-h) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  .nav-container {
    padding: 6px 12px 6px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
  }

  /* Row 1: Logo left */
  .nav-logo {
    order: 1 !important;
    flex: 0 0 auto !important;
  }

  .nav-logo-img {
    height: 25px !important;
    width: auto !important;
  }

  /* Row 1: Search right */
  .nav-right-actions {
    order: 2 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .nav-search-circle {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.88rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Row 2: Capsule Pill Bar centered - Exact Match to Desktop */
  .nav-pill-wrapper {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 2px 3px !important;
  }

  .nav-pill-wrapper::-webkit-scrollbar {
    display: none !important;
  }

  .nav-pill-bar {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--color-bgss-red, #A7253A) !important;
    border-radius: 9999px !important;
    padding: 3px 6px !important;
    gap: 4px !important;
    box-shadow: 0 4px 16px rgba(167, 37, 58, 0.35) !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    max-width: 100% !important;
  }

  .nav-pill-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 32px !important;
    padding: 0 9px !important;
    border-radius: 9999px !important;
    color: #FFFFFF !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    transition: all 0.25s ease !important;
  }

  .nav-pill-link i {
    font-size: 0.8rem !important;
    line-height: 1 !important;
    color: inherit !important;
  }

  .nav-pill-text {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-block !important;
    color: inherit !important;
  }

  /* Active State: Pure White Capsule with Red Text & Icon */
  .nav-pill-link.active {
    background: #FFFFFF !important;
    color: var(--color-bgss-red, #A7253A) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16) !important;
  }

  .nav-pill-link.active .nav-pill-text {
    color: var(--color-bgss-red, #A7253A) !important;
    font-weight: 700 !important;
  }

  .nav-pill-link.active i {
    color: var(--color-bgss-red, #A7253A) !important;
  }
}

/* ── Ultra-Compact Mobile (<= 400px) ── */
@media (max-width: 400px) {
  .nav-pill-bar {
    padding: 3px 4px !important;
    gap: 3px !important;
  }

  .nav-pill-link {
    height: 30px !important;
    padding: 0 7px !important;
    gap: 4px !important;
    font-size: 0.74rem !important;
  }

  .nav-pill-link i {
    font-size: 0.76rem !important;
  }

  .nav-pill-text {
    font-size: 0.74rem !important;
  }
}