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

:root {
  --royal-legal-navy: #0b192c;
  --royal-legal-gold: #c59b27;
  --royal-legal-gold-hover: #b48c1e;
  --header_top_bg_color: #060e18;
  --header_top_fg_color: #cbd5e1;
  --headermiddlebg: #ffffff;
  --menucontbackground: #0b192c;
  --menupadding: 0px;
  --menuanchorcolor: #ffffff;
  --menuanchorhovercolor: #c59b27;
  --royal-border: #e2e8f0;
}

/* ==========================================================================
   Header Top Bar (.headertop)
   ========================================================================== */
.headertop {
  background: var(--header_top_bg_color);
  color: var(--header_top_fg_color);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
}

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

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

.headertop a:hover {
  color: var(--royal-legal-gold);
}

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

.top-badge-legal {
  background: rgba(197, 155, 39, 0.18);
  color: #fde047;
  border: 1px solid rgba(197, 155, 39, 0.35);
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-social a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.2s ease;
}

.top-social a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   Middle Header (.header.custom-header-style-2)
   ========================================================================== */
.header.custom-header-style-2 {
  background: var(--headermiddlebg);
  padding: 16px 0;
  border-bottom: 1px solid var(--royal-border);
  position: relative;
  z-index: 1000;
}

.header .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-flex-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-left .branding-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.logo-crest {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #0b192c 0%, #1e293b 100%);
  color: var(--royal-legal-gold);
  border: 2px solid var(--royal-legal-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 16px rgba(11, 25, 44, 0.2);
}

.header-left .site-branding-text {
  display: flex;
  flex-direction: column;
}

.header-left .site-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--royal-legal-navy);
  margin: 0;
  line-height: 1.15;
}

.header-left .site-title span {
  color: var(--royal-legal-gold);
}

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

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

.contact-info-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-detail .detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--royal-legal-gold);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-detail:hover .detail-icon {
  background: var(--royal-legal-navy);
  color: #ffffff;
}

.contact-detail .detail-text {
  display: flex;
  flex-direction: column;
}

.contact-detail .detail-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
}

.contact-detail a,
.contact-detail span.detail-value {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.25;
}

.contact-detail a:hover {
  color: var(--royal-legal-gold);
}

.header-action-button .btn-request-proposal,
.royal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--royal-legal-gold);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(197, 155, 39, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.header-action-button .btn-request-proposal:hover,
.royal-action-btn:hover {
  background: var(--royal-legal-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(197, 155, 39, 0.45);
}

/* ==========================================================================
   Desktop Navigation Bar (.desktopmenu)
   ========================================================================== */
.desktopmenu.custom-nav-style-2 {
  background: var(--menucontbackground);
  position: relative;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(11, 25, 44, 0.15);
  transition: all 0.3s ease;
}

.desktopmenu.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideDownNav 0.35s ease forwards;
}

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

.desktopmenu .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.royalmenu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.royalmenu > li > a {
  padding: 16px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--menuanchorcolor);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.royalmenu > li > a:hover,
.royalmenu > li.current-menu-item > a {
  color: var(--menuanchorhovercolor);
  background: rgba(255, 255, 255, 0.05);
}

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

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

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

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

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

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

.royalmenu .sub-menu li a:hover {
  background: rgba(197, 155, 39, 0.15);
  color: var(--royal-legal-gold);
  padding-left: 24px;
}

/* Search Box */
.menu-search-wrapper {
  display: flex;
  align-items: center;
}

.menu-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-search-field {
  padding: 8px 36px 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  width: 170px;
  transition: all 0.25s ease;
}

.menu-search-field::placeholder {
  color: #94a3b8;
}

.menu-search-field:focus {
  width: 220px;
  border-color: var(--royal-legal-gold);
  background: rgba(255, 255, 255, 0.15);
}

.menu-search-submit {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
}

.menu-search-submit:hover {
  color: var(--royal-legal-gold);
}

/* Mobile Drawer Overlay */
.mobile-navigation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.7);
  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: 350px;
  height: 100vh;
  background: #0b192c;
  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: var(--royal-legal-gold);
}

/* Mobile Hamburger Button */
.navigation-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  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: #0b192c;
  border-radius: 2px;
  transition: all 0.2s ease;
}

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