/* ==========================================================================
   GLASS CONTAINER NAVIGATION - UPPER & BOTTOM DUAL NAV SYSTEM
   Frosted Glassmorphism, Floating Dock, Mobile Native Smoothness
   ========================================================================== */

/* --- Upper Glass Navbar --- */
.header-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 0;
  transform: translateZ(0);
  will-change: transform;
}

.glass-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.05);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform: translateZ(0);
}

.header-glass.scrolled .glass-nav-container {
  background: rgba(8, 12, 22, 0.95);
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 254, 0.1);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 14px rgba(255, 215, 0, 0.35));
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #060b14;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Desktop Nav Links */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 991px) {
  .desktop-nav {
    display: none;
  }
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.nav-link .badge-hot {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  margin-left: 6px;
  text-transform: uppercase;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* ==========================================================================
   Mobile Header Optimization (Fixes overlap & text collision on mobile)
   ========================================================================== */
@media (max-width: 768px) {
  .header-glass {
    padding: 8px 0;
  }

  .header-glass.scrolled {
    padding: 6px 0;
  }

  .glass-nav-container {
    padding: 7px 12px;
    border-radius: 16px;
    gap: 8px;
  }

  .brand-logo {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-icon svg {
    width: 18px;
    height: 18px;
  }

  .brand-title {
    font-size: 0.95rem;
    line-height: 1.1;
  }

  .brand-title span:first-child {
    white-space: nowrap;
  }

  .brand-sub {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  /* Compact icon-only WhatsApp button on mobile header to avoid overlapping logo */
  .nav-actions .btn-whatsapp {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.35);
  }

  .nav-actions .btn-whatsapp span {
    display: none; /* Hide label text on mobile header */
  }

  .nav-actions .btn-whatsapp svg {
    width: 20px;
    height: 20px;
    margin: 0;
  }

  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 0.88rem;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
  }
  .glass-nav-container {
    padding: 5px 8px;
  }
}

/* Mobile Slide Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(105%);
  width: min(320px, 85vw);
  height: 100vh;
  background: #090e18;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10001;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.mobile-nav-list .nav-link {
  padding: 12px 16px;
  font-size: 1.05rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   --- Bottom Glass Navbar (Mobile Docking Container) ---
   Fully Responsive & Safe on All Screen Sizes
   ========================================================================== */
.bottom-glass-nav {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom, 10px));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  will-change: transform;
  width: min(410px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  z-index: 999;
  display: block;
  pointer-events: none;
}

@media (min-width: 992px) {
  .bottom-glass-nav {
    display: none; /* Desktop uses upper navbar */
  }
}

.bottom-glass-dock {
  background: rgba(10, 15, 26, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 242, 254, 0.12);
  pointer-events: auto;
  box-sizing: border-box;
  width: 100%;
  transform: translateZ(0);
}

.bottom-tab-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  padding: 5px 2px;
  border-radius: 12px;
  transition: all var(--transition-fast);
  position: relative;
  text-align: center;
}

.bottom-tab-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.bottom-tab-item span {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: -0.01em;
  display: block;
}

.bottom-tab-item:hover,
.bottom-tab-item.active {
  color: var(--accent-cyan);
}

.bottom-tab-item.active::after {
  content: '';
  position: absolute;
  top: 1px;
  width: 4px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-cyan);
}

.bottom-tab-item.active svg {
  transform: translateY(-1px);
  stroke: var(--accent-cyan);
}

/* WhatsApp elevated center pill */
.bottom-tab-item.wa-pulse {
  flex: 1.25 1 0;
  background: var(--gradient-wa);
  color: #ffffff;
  padding: 6px 4px;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5);
  margin-top: -14px; /* Elevated hero action button */
  border: 2px solid #0a0f1a;
}

.bottom-tab-item.wa-pulse svg {
  fill: #ffffff;
  stroke: none;
  width: 22px;
  height: 22px;
}

.bottom-tab-item.wa-pulse span {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.64rem;
}

.bottom-tab-item.wa-pulse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.65);
}

/* Micro screens (width <= 360px, e.g. iPhone SE / small Androids) */
@media (max-width: 360px) {
  .bottom-glass-nav {
    width: calc(100% - 10px);
    bottom: max(6px, env(safe-area-inset-bottom, 6px));
  }
  .bottom-glass-dock {
    padding: 5px 2px;
    border-radius: 18px;
  }
  .bottom-tab-item {
    padding: 4px 1px;
    gap: 2px;
  }
  .bottom-tab-item svg {
    width: 18px;
    height: 18px;
  }
  .bottom-tab-item span {
    font-size: 0.58rem;
  }
  .bottom-tab-item.wa-pulse {
    margin-top: -10px;
    padding: 5px 2px;
    border-radius: 14px;
  }
  .bottom-tab-item.wa-pulse svg {
    width: 20px;
    height: 20px;
  }
  .bottom-tab-item.wa-pulse span {
    font-size: 0.58rem;
  }
}
