/* ============================================================
   LAWFUL JOURNEY - MASTER UNIFIED HEADER & FOOTER
   100% Pixel-Identical to index.html with Perfect Icon Support.
   ============================================================ */

/* CSS Variables for Header & Footer */
:root {
  --hf-bg-dark: #070B19;
  --hf-bg-surface: #0E162E;
  --hf-bg-surface-elevated: #15203D;
  --hf-gold-primary: #D4AF37;
  --hf-gold-light: #F3E5AB;
  --hf-gold-dark: #AA7C11;
  --hf-gold-gradient: linear-gradient(135deg, #D4AF37 0%, #AA7C11 100%);
  --hf-accent-green: #25D366;
  --hf-text-primary: #FFFFFF;
  --hf-text-secondary: #94A3B8;
  --hf-text-muted: #64748B;
  --hf-border-subtle: rgba(255, 255, 255, 0.08);
  --hf-border-gold: rgba(212, 175, 55, 0.35);
  --hf-font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hf-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   0. FONT AWESOME ICON PROTECTION (PREVENTS LINE / BOX GLITCHES)
   ============================================================ */
.fas, .fa-solid {
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  font-style: normal !important;
  display: inline-block !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.far, .fa-regular {
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 400 !important;
  font-style: normal !important;
  display: inline-block !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.fab, .fa-brands {
  font-family: 'Font Awesome 5 Brands' !important;
  font-weight: 400 !important;
  font-style: normal !important;
  display: inline-block !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* ============================================================
   1. TOP NOTIFICATION / CONTACT INFO BAR
   ============================================================ */
.top-bar {
  background: #040711;
  border-bottom: 1px solid var(--hf-border-subtle);
  padding: 8px 0;
  font-size: 13px;
  color: var(--hf-text-muted);
  font-family: var(--hf-font-main);
  box-sizing: border-box;
  position: relative;
  z-index: 999;
}

.top-bar .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-left a, .top-bar-right a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hf-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--hf-font-main);
  transition: var(--hf-transition);
}

.top-bar-left span, .top-bar-right span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-family: var(--hf-font-main);
  color: var(--hf-text-muted);
}

.top-bar-left a:hover, .top-bar-right a:hover {
  color: var(--hf-gold-primary);
}

.top-bar i {
  color: var(--hf-gold-primary);
  font-size: 12px;
}

.top-bar .top-bar-right a i.fa-whatsapp {
  color: #25D366;
  font-size: 14px;
}

@media (max-width: 992px) {
  .top-bar {
    display: none !important;
  }
}

/* ============================================================
   2. STICKY HEADER & NAVBAR
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 11, 25, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hf-border-subtle);
  transition: var(--hf-transition);
  font-family: var(--hf-font-main);
  box-sizing: border-box;
}

.header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.header .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
}

/* Brand Logo */
.header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.header .logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hf-gold-primary);
  margin: 0;
  padding: 0;
  display: block;
}

.header .logo-text {
  display: flex;
  flex-direction: column;
}

.header .logo-title {
  font-family: var(--hf-font-main);
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.header .logo-sub {
  font-family: var(--hf-font-main);
  font-size: 10px;
  color: var(--hf-gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  line-height: 1.2;
}

/* Nav Links */
.header .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .nav-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.header .nav-link {
  font-family: var(--hf-font-main);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hf-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  text-decoration: none;
  transition: var(--hf-transition);
  background: transparent;
  border: none;
}

.header .nav-link:hover, 
.header .nav-link.active,
.header .nav-item:hover > .nav-link {
  color: var(--hf-gold-primary);
  background: transparent;
}

.header .nav-link i.fa-chevron-down {
  font-size: 11px;
  color: var(--hf-text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.header .nav-item:hover > .nav-link i.fa-chevron-down {
  transform: rotate(180deg);
  color: var(--hf-gold-primary);
}

/* ============================================================
   3. SEARCHABLE MEGA-MENU DROPDOWN
   ============================================================ */
.header .mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 1040px;
  background: rgba(10, 16, 35, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--hf-border-gold);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}

.header .nav-item-services:hover .mega-menu,
.header .mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.header .mega-search-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.header .mega-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hf-gold-primary);
  font-size: 15px;
  pointer-events: none;
}

.header .mega-search-input {
  width: 100%;
  padding: 12px 40px 12px 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hf-border-subtle);
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 14px;
  font-family: var(--hf-font-main);
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.header .mega-search-input:focus {
  border-color: var(--hf-gold-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.header .mega-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  cursor: pointer;
  display: none;
}

.header .mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 6px;
}

.header .mega-grid::-webkit-scrollbar {
  width: 5px;
}
.header .mega-grid::-webkit-scrollbar-thumb {
  background: var(--hf-gold-primary);
  border-radius: 10px;
}

.header .mega-col-title {
  font-family: var(--hf-font-main);
  font-size: 13px;
  font-weight: 700;
  color: var(--hf-gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--hf-border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .mega-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header .mega-service-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: var(--hf-font-main);
  color: #CBD5E1;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.18s ease;
  line-height: 1.35;
}

.header .mega-service-link i {
  font-size: 9px;
  color: var(--hf-gold-primary);
  opacity: 0.6;
  transition: transform 0.18s ease;
}

.header .mega-service-link:hover {
  color: #FFFFFF;
  background: rgba(212, 175, 55, 0.12);
  padding-left: 12px;
}

.header .mega-service-link:hover i {
  opacity: 1;
  transform: translateX(2px);
}

/* ============================================================
   4. HEADER ACTIONS (Search Button, WhatsApp, Hamburger)
   ============================================================ */
.header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header .header-search-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--hf-gold-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: var(--hf-transition);
}

.header .header-search-btn i {
  font-size: 15px;
  color: var(--hf-gold-primary);
}

.header .header-search-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--hf-gold-primary);
  transform: scale(1.05);
}

.header .btn-whatsapp {
  background: var(--hf-accent-green) !important;
  color: #FFFFFF !important;
  font-family: var(--hf-font-main);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: var(--hf-transition);
  box-shadow: none;
  border: 1px solid var(--hf-accent-green);
  transform: translateY(-4px);
}

.header .btn-whatsapp i {
  font-size: 16px;
  color: #FFFFFF;
}

.header .btn-whatsapp:hover {
  background: #20BA56;
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.header .menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hf-border-subtle);
  border-radius: 10px;
  cursor: pointer;
  gap: 5px;
}

.header .hamburger-line {
  width: 20px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.header .menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header .menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.header .menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Floating WhatsApp quick action */
.whatsapp-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--hf-accent-green) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.38) !important;
  transition: var(--hf-transition);
}

.whatsapp-btn i {
  font-family: 'Font Awesome 5 Brands' !important;
  font-weight: 400 !important;
  display: inline-block;
  line-height: 1;
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.5);
}

/* Mobile Nav Backdrop */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 997;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   5. GLOBAL INSTANT SEARCH MODAL OVERLAY
   ============================================================ */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.85);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  font-family: var(--hf-font-main);
}

.search-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-card {
  width: 90%;
  max-width: 680px;
  background: #0E162E;
  border: 1px solid var(--hf-border-gold);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hf-border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.search-modal-header i {
  color: var(--hf-gold-primary);
  font-size: 18px;
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 16px;
  font-family: var(--hf-font-main);
  outline: none;
}

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

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

.search-modal-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  color: #E2E8F0;
  text-decoration: none;
  font-family: var(--hf-font-main);
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--hf-gold-primary);
}

/* ============================================================
   6. MASTER FOOTER
   ============================================================ */
.footer {
  background: #050812;
  border-top: 1px solid var(--hf-border-gold);
  padding: 70px 0 30px;
  font-family: var(--hf-font-main);
  color: #CBD5E1;
  box-sizing: border-box;
}

.footer .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  font-family: var(--hf-font-main);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}

.footer-about .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-about .logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hf-gold-primary);
  display: block;
}

.footer-about .logo-title {
  font-family: var(--hf-font-main);
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.footer-about p {
  font-family: var(--hf-font-main);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--hf-text-secondary);
  max-width: 360px;
  margin: 0;
}

.footer-disclaimer {
  font-size: 11.5px !important;
  color: var(--hf-text-muted) !important;
  line-height: 1.5 !important;
  margin-top: 10px !important;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-family: var(--hf-font-main);
  color: var(--hf-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-links a i {
  font-size: 11px;
  color: var(--hf-gold-primary);
}

.footer-links a:hover {
  color: var(--hf-gold-primary);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 25px;
  border-top: 1px solid var(--hf-border-subtle);
  font-size: 13px;
  font-family: var(--hf-font-main);
  color: var(--hf-text-secondary);
}

.footer-bottom strong {
  color: #FFFFFF;
}

/* ============================================================
   7. MOBILE STICKY ACTION BAR & RESPONSIVE RULES
   ============================================================ */
.mobile-bottom-bar {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(7, 11, 25, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.35) !important;
    padding: 10px 16px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    gap: 12px !important;
    z-index: 997 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8) !important;
    font-family: var(--hf-font-main) !important;
  }

  .mobile-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 46px !important;
    border-radius: 9999px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: transform 0.2s ease !important;
    font-family: var(--hf-font-main) !important;
  }

  .mobile-action-btn:active {
    transform: scale(0.97) !important;
  }

  .mobile-action-call {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
  }

  .mobile-action-call i {
    color: var(--hf-gold-primary) !important;
  }

  .mobile-action-whatsapp {
    flex: 1.25 !important;
    background: var(--hf-accent-green) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35) !important;
  }

  /* Responsive Header for Mobile */
  .header .navbar {
    height: 62px;
  }

  .header .logo img {
    width: 36px;
    height: 36px;
  }

  .header .logo-title {
    font-size: 16.5px;
  }

  .header .logo-sub {
    font-size: 9px;
  }

  .header .btn-whatsapp {
    display: none;
  }

  .header .menu-toggle {
    display: flex;
  }

  .header .nav-links {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    background: #080D1F;
    border-bottom: 2px solid var(--hf-gold-primary);
    border-radius: 0 0 20px 20px;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px;
    gap: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
  }

  .header .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 15px;
    color: #FFFFFF;
    font-weight: 600;
  }

  .header .mega-menu {
    position: static;
    transform: none !important;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 14px;
    margin-top: 10px;
    display: none;
  }

  .header .nav-item-services.active .mega-menu {
    display: block;
  }

  .header .mega-grid {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  /* Footer on Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Hide floating whatsapp button on mobile */
  .whatsapp-btn,
  .floating-whatsapp {
    display: none !important;
  }
}
