/* Modern Header Improvements */

/* WhatsApp Floating Action Button - Enhanced */
.whatsapp-fab {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  z-index: 1200;
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.9) rotate(-8deg);
  cursor: pointer;
}

.whatsapp-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
  animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.2, 1) 1.5s infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0; }
  40% { transform: scale(1.3); opacity: 0.3; }
  80% { transform: scale(1.5); opacity: 0; }
}

.whatsapp-fab svg { 
  width: 42px;
  height: 42px;
  fill: currentColor;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whatsapp-fab:hover {
  transform: translate3d(0, -6px, 0) scale(1.08) rotate(0deg);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.5), 0 8px 16px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #2fe676 0%, #15a085 100%);
}

.whatsapp-fab:hover svg {
  transform: scale(1.1) rotate(12deg);
}

.whatsapp-fab:hover::before {
  opacity: 1;
  animation: none;
}

.whatsapp-fab:active {
  transform: translate3d(0, -3px, 0) scale(1.02);
}

/* Notification Badge */
.whatsapp-fab .notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #ff4757 0%, #e84118 100%);
  border-radius: 50%;
  border: 2.5px solid white;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(232, 65, 24, 0.5);
  animation: badge-bounce 3s ease-in-out 2s infinite;
}

@keyframes badge-bounce {
  0%, 100% { transform: scale(1) translateY(0); }
  5%, 15% { transform: scale(1.2) translateY(-3px); }
  10% { transform: scale(0.95) translateY(0); }
}

/* Tooltip */
.whatsapp-fab::after {
  content: '💬 Chat on WhatsApp';
  position: absolute;
  right: 85px;
  bottom: 50%;
  transform: translateY(50%) translateX(10px);
  background: linear-gradient(135deg, rgba(11, 18, 36, 0.95), rgba(15, 23, 42, 0.95));
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.whatsapp-fab::after::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent rgba(11, 18, 36, 0.95);
}

.whatsapp-fab:hover::after {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}

/* Appear animation */
.whatsapp-fab.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  animation: fab-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), fab-float 3s ease-in-out 1s infinite;
}

@keyframes fab-entrance {
  0% { 
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale(0.8) rotate(-15deg);
  }
  60% { 
    transform: translate3d(0, -8px, 0) scale(1.05) rotate(5deg);
  }
  100% { 
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes fab-float {
  0%, 100% { 
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% { 
    transform: translate3d(0, -6px, 0) rotate(2deg);
  }
}

/* Attention animation on idle */
.whatsapp-fab.attention {
  animation: fab-attention 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fab-attention {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  10%, 30%, 50% { transform: translate3d(-8px, 0, 0) scale(1.05) rotate(-5deg); }
  20%, 40% { transform: translate3d(8px, 0, 0) scale(1.05) rotate(5deg); }
}

@media (max-width: 640px) {
  .whatsapp-fab::after { display: none; }
  .whatsapp-fab { 
    right: 16px; 
    bottom: 16px;
    width: 65px;
    height: 65px;
  }
  .whatsapp-fab svg {
    width: 36px;
    height: 36px;
  }
  .whatsapp-fab .notification-badge {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
}

.header {
  background: white !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(20, 160, 111, 0.1) !important;
  box-shadow: 0 2px 12px rgba(11, 18, 36, 0.05) !important;
  position: relative !important;
  z-index: 200 !important;
}

.navbar {
  gap: 1.5rem !important;
  padding: 0.85rem 0 !important;
}

/* Keep dropdown visible on desktop */
.nav-links .dropdown {
  display: block !important;
}

/* Show More button styles */
.more-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.show-more-btn {
  appearance: none;
  border: 1.5px solid rgba(20, 160, 111, 0.25);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #0b1224;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  box-shadow: 0 4px 12px rgba(11, 18, 36, 0.06);
  transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 18, 36, 0.1);
  border-color: rgba(20, 160, 111, 0.4);
}

.show-more-btn:active {
  transform: translateY(0);
}

.show-more-btn:focus-visible {
  outline: 3px solid rgba(20, 160, 111, 0.4);
  outline-offset: 2px;
}

.brand {
  gap: 0.75rem !important;
  transition: all 200ms ease !important;
  cursor: pointer;
}

/* Service subheader navigation - show on all pages */
.service-subnav-shell {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
  border-top: 1px solid rgba(20, 160, 111, 0.12);
  border-bottom: 1px solid rgba(20, 160, 111, 0.1);
  box-shadow: 0 8px 20px rgba(11, 18, 36, 0.06);
  display: block;
  position: relative;
  z-index: 999;
  overflow: visible !important;
}

.service-subnav-shell .container {
  overflow: visible !important;
}

.service-subnav {
  display: flex !important;
  justify-content: center !important; /* Center the buttons */
  gap: 0.75rem !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  padding: 0.7rem 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.service-subnav::-webkit-scrollbar { display: none; }

.subnav-item {
  position: relative;
  flex: 0 0 auto;
  z-index: 999;
  display: inline-block; /* Ensures items are inline */
  margin: 0 !important;
}

.subnav-toggle {
  appearance: none;
  border: 2px solid rgba(20, 160, 111, 0.28);
  background: linear-gradient(135deg, #ffffff, #eefcf8);
  color: #0b1224;
  border-radius: 10px;
  padding: 0.65rem 1.15rem !important;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 6px 16px rgba(11, 18, 36, 0.1);
  transition: all 180ms ease;
}

.subnav-item:first-child .subnav-toggle {
  border-color: rgba(20, 160, 111, 0.42);
}

.subnav-item:last-child .subnav-toggle {
  border-color: rgba(234, 112, 38, 0.42);
  background: linear-gradient(135deg, #ffffff, #fff5ed);
}

.subnav-toggle::after {
  content: '▾';
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  transition: transform 160ms ease;
}

.subnav-toggle:hover,
.subnav-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(11, 18, 36, 0.16);
  border-color: rgba(20, 160, 111, 0.65);
}

.subnav-item:last-child .subnav-toggle:hover,
.subnav-item:last-child .subnav-toggle:focus-visible {
  border-color: rgba(234, 112, 38, 0.75);
}

.subnav-item.open .subnav-toggle::after {
  transform: rotate(180deg);
}

.subnav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(11, 18, 36, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.5rem;
  min-width: 260px;
  display: none;
  z-index: 1000;
  grid-template-columns: 1fr;
}

.subnav-item.open .subnav-menu {
  display: grid;
  gap: 0.3rem;
}

.subnav-menu a {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: #0b1224;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}

.subnav-menu a:hover,
.subnav-menu a:focus-visible {
  background: rgba(20, 160, 111, 0.08);
  color: #0b1224;
}

@media (max-width: 900px) {
  .service-subnav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem !important;
    padding: 0.65rem 1rem !important;
  }

  .subnav-item {
    width: 100%;
  }

  .subnav-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .subnav-menu {
    position: static;
    box-shadow: none;
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-top: 0.5rem;
    display: none;
    grid-template-columns: 1fr;
  }

  .subnav-item.open .subnav-menu {
    display: grid;
  }
}

.brand .logo {
  width: 64px !important;
  height: 64px !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  box-shadow: 0 4px 12px rgba(20, 160, 111, 0.2) !important;
}

.brand-name {
  font-size: 0.92rem !important;
  letter-spacing: -0.3px !important;
}

.brand-tagline {
  font-size: 0.6rem !important;
}

.nav-links {
  gap: 0.2rem !important;
  justify-content: flex-end !important;
}


.nav-link {
  padding: 0.6rem 0.95rem !important;
  border-radius: 6px !important;
  color: #5a6476 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

.nav-link::after {
  bottom: 4px !important;
  left: 0.95rem !important;
  right: 0.95rem !important;
  height: 2px !important;
  background: #1dc2a8 !important;
  transform: scaleX(0) !important;
  transform-origin: right !important;
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1) !important;
  transform-origin: left !important;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--navy) !important;
  background: transparent !important;
}

/* Hide dropdown arrow */
.dropdown-toggle .arrow {
  display: none !important;
}

.dropdown-toggle {
  padding: 0.6rem 0.95rem !important;
  border-radius: 6px !important;
  color: #5a6476 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  gap: 0 !important;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem) !important;
  left: 0 !important;
  transform: none !important;
  background: white !important;
  border: 1px solid rgba(20, 160, 111, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 30px rgba(11, 18, 36, 0.12) !important;
  padding: 0.6rem !important;
  min-width: 280px !important;
  max-width: 400px !important;
  max-height: 500px !important;
  overflow-y: auto !important;
  z-index: 1250 !important;
  display: none !important;
}

.dropdown-menu a {
  padding: 0.7rem 0.9rem !important;
  border-radius: 6px !important;
  color: #5a6476 !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: rgba(20, 160, 111, 0.1) !important;
  color: var(--navy) !important;
  padding-left: 1.1rem !important;
}

/* Mobile menu toggle should remain available on small screens */
.mobile-toggle {
  display: inline-flex !important;
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex !important;
  }
}

/* Remove background from nav links on hover */
.nav-links a:hover,
.nav-links a:focus-visible,
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible {
  background: transparent !important;
  transform: none !important;
  color: var(--navy) !important;
}

/* Force Services dropdown to open on hover or when open class is set */
.nav-links .dropdown:hover .dropdown-menu,
.nav-links .dropdown:focus-within .dropdown-menu,
.nav-links .dropdown.open .dropdown-menu {
  display: block !important;
}

/* Dropdown polish */
.dropdown-menu {
  backdrop-filter: blur(8px);
}

.dropdown-menu a {
  position: relative;
  border: 1px solid transparent;
}

.dropdown-menu a + a {
  margin-top: 4px;
}

.dropdown-menu a::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(29, 194, 168, 0.3);
  transform: translateY(-50%);
}

.dropdown-menu a:hover::before,
.dropdown-menu a:focus-visible::before {
  background: #1dc2a8;
}

.dropdown-menu::-webkit-scrollbar {
  width: 8px;
}
.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(20, 160, 111, 0.25);
  border-radius: 8px;
}

/* Ensure header call button stays readable */
.header .nav-actions .btn {
  white-space: nowrap;
  font-size: 0.9rem !important;
}
.header .nav-actions .btn.btn-secondary {
  color: var(--green) !important;
  border: 1.5px solid rgba(20, 160, 111, 0.3) !important;
}
