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

:root {
  --royal-header-bg: #ffffff;
  --royal-top-bg: #0a192f;
  --royal-top-fg: #cbd5e1;
  --royal-accent-gold: #c59b27;
  --royal-accent-teal: #00b4d8;
  --royal-menu-color: #0f172a;
  --royal-menu-hover: #00b4d8;
}

/* ==========================================================================
   Header Top Bar (.headertop)
   ========================================================================== */
.headertop {
  background: var(--royal-top-bg);
  color: var(--royal-top-fg);
  font-size: 13px;
  line-height: 1.5;
  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: #38bdf8;
}

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

.top-promo-pill {
  background: rgba(197, 155, 39, 0.2);
  color: #fde047;
  border: 1px solid rgba(197, 155, 39, 0.4);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   Inline Header Style 4 (.header)
   ========================================================================== */
.header {
  background: var(--royal-header-bg);
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(10, 25, 47, 0.08);
  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;
  color: inherit;
}

.logo-icon-gold {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #0a192f 0%, #1e3a8a 100%);
  color: #f8fafc;
  border: 2px solid #c59b27;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(197, 155, 39, 0.2);
}

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

.site-title span {
  color: var(--royal-accent-gold);
}

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

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

/* 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);
}

/* 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: 220px;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 16px 36px rgba(10, 25, 47, 0.12);
  border: 1px solid #f1f5f9;
  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 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}

.desktopmenu .royalmenu .sub-menu li a:hover {
  background: #f0f9ff;
  color: var(--royal-accent-teal);
  padding-left: 24px;
}

/* Action Button */
.royal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0a192f 0%, #0f2b48 100%);
  color: #f8fafc !important;
  border: 1px solid #c59b27;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 25, 47, 0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.royal-action-btn:hover {
  background: #00b4d8;
  border-color: #00b4d8;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 180, 216, 0.35);
}

/* Right Panel Icons */
.rightpanel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rightpanel .panel-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s ease;
}

.rightpanel .panel-btn:hover {
  background: #0a192f;
  color: #ffffff;
}

/* Mobile Hamburger Button */
.navigation-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

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

/* Mobile Drawer Overlay */
.mobile-navigation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.65);
  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: #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 #e2e8f0;
  margin-bottom: 20px;
}

.mobile-drawer-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  color: #475569;
  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 #f1f5f9;
}

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

.mobile-nav-list li a:hover {
  color: var(--royal-accent-teal);
}

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