/**
 * Royal Elementor Theme - Header Style 4 Stylesheet (Unified Inline Layout)
 * Compatible with: Royal Elementor Theme (template-parts/headerstyle4.php & header-top.php)
 * & Royal Addons for Elementor
 * Author: Royal Technologies
 */

:root {
  --royal-defense-dark: #090d16;
  --royal-defense-red: #dc2626;
  --royal-defense-red-hover: #b91c1c;
  --royal-top-bg: #030712;
  --royal-top-fg: #cbd5e1;
  --royal-menu-color: #f1f5f9;
  --royal-menu-hover: #ef4444;
}

/* ==========================================================================
   Header Top Bar (.headertop)
   ========================================================================== */
.headertop {
  background: var(--royal-top-bg);
  color: var(--royal-top-fg);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.headertop .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.headertop a {
  color: var(--royal-top-fg);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.headertop a:hover {
  color: #f87171;
}

.headertop .topleft,
.headertop .topright {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bail-alert-pill {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.4);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bail-alert-pill .dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulseBail 1.5s infinite;
}

@keyframes pulseBail {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* ==========================================================================
   Header Style 4 Unified Inline Layout (.header)
   ========================================================================== */
.header {
  background: var(--royal-defense-dark);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(9, 13, 22, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: slideDownHeader 0.35s ease forwards;
}

@keyframes slideDownHeader {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#logowarper .branding-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.defense-logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
  color: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.3);
}

.site-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
  line-height: 1.1;
}

.site-title span {
  color: var(--royal-defense-red);
}

.site-description {
  font-size: 11px;
  color: #94a3b8;
  margin: 2px 0 0 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header .right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Royal Navigation in Style 4 */
.desktopmenu .royalmenu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.desktopmenu .royalmenu > li > a {
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--royal-menu-color);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.desktopmenu .royalmenu > li > a:hover,
.desktopmenu .royalmenu > li.current-menu-item > a {
  color: var(--royal-menu-hover);
}

/* Submenu Dropdown */
.desktopmenu .royalmenu li.menu-item-has-children {
  position: relative;
}

.desktopmenu .royalmenu li.menu-item-has-children > a::after {
  content: "\f282";
  font-family: "bootstrap-icons", sans-serif;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.desktopmenu .royalmenu li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

.desktopmenu .royalmenu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #090d16;
  border-radius: 8px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1002;
}

.desktopmenu .royalmenu li.menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.desktopmenu .royalmenu .sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.desktopmenu .royalmenu .sub-menu li a:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #ef4444;
  padding-left: 22px;
}

/* Royal Action Button */
.royal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--royal-defense-red);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.royal-action-btn:hover {
  background: var(--royal-defense-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5);
}

.rightpanel .panel-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s ease;
}

.rightpanel .panel-btn:hover {
  background: var(--royal-defense-red);
}

/* Mobile Hamburger Button */
.navigation-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.navigation-icon span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Mobile Drawer Overlay */
.mobile-navigation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-navigation-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-navigation-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 340px;
  height: 100vh;
  background: #090d16;
  color: #ffffff;
  z-index: 99999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-navigation-drawer.active {
  transform: translateX(0);
}

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

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-list li a {
  display: block;
  padding: 13px 4px;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  text-decoration: none;
}

.mobile-nav-list li a:hover {
  color: #ef4444;
}

@media (max-width: 991px) {
  .desktophide { display: flex !important; }
  .tablethide { display: none !important; }
  .desktopmenu { display: none; }
  .rightpanel { display: none; }
}
