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

:root {
  --color1st: #0b0f19;
  --color2nd: #10b981;
  --color2nd_hover: #059669;
  --header_top_bg: #070a12;
  --header_top_text: #94a3b8;
  --header_bg: #ffffff;
  --header_text: #0b0f19;
  --menu_color: #1e293b;
  --menu_hover: #10b981;
  --submenu_bg: #ffffff;
  --action_btn_bg: #10b981;
  --action_btn_text: #ffffff;
}

/* ======= TOP ANNOUNCEMENT BAR (.headertop) ======= */
.headertop {
  background: var(--header_top_bg);
  color: var(--header_top_text);
  font-size: 12.5px;
  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: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.headertop a:hover { color: var(--color2nd); }

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

.top-tech-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ======= UNIFIED INLINE HEADER (.header) ======= */
.header {
  background: var(--header_bg);
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 4px 25px rgba(11, 15, 25, 0.1);
  padding: 12px 0;
}

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

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

.logo-icon-box {
  width: 46px;
  height: 46px;
  background: var(--color1st);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--color2nd);
  box-shadow: 0 4px 14px rgba(11, 15, 25, 0.2);
}

.logo-text-wrap .site-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--color1st);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-text-wrap .site-name span { color: var(--color2nd); }

.logo-text-wrap .site-tagline {
  font-size: 10.5px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 3px;
  font-weight: 700;
}

/* Desktop Menu inside Header Style 4 */
.desktopmenu {
  display: flex;
  align-items: center;
}

/* Royal Menu (.royalmenu) */
.royalmenu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.royalmenu > li {
  position: relative;
}

.royalmenu > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--menu_color);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.royalmenu > li:hover > a,
.royalmenu > li.current-menu-item > a {
  color: var(--color2nd);
  background: rgba(16, 185, 129, 0.08);
}

.royalmenu > li > a .caret {
  font-size: 11px;
  transition: transform 0.2s;
  opacity: 0.7;
}

.royalmenu > li:hover > a .caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown */
.royalmenu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--submenu_bg);
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(11, 15, 25, 0.15);
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--color2nd);
  list-style: none;
  padding: 8px 0;
  margin: 8px 0 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1000;
}

.royalmenu li:hover > .sub-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.royalmenu .sub-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s;
}

.royalmenu .sub-menu li a:hover {
  background: #f8fafc;
  color: var(--color2nd);
  padding-left: 25px;
}

.royalmenu .sub-menu li a i {
  color: var(--color2nd);
  font-size: 14px;
}

/* Header Right Actions */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.royal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--action_btn_bg);
  color: var(--action_btn_text) !important;
  font-size: 13.5px;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}

.royal-action-btn:hover {
  background: var(--color2nd_hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Mobile Toggle */
#navigation-icon {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

#navigation-icon span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color1st);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Responsive */
@media (max-width: 991px) {
  #navigation-icon { display: flex; }

  .desktopmenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 16px 24px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 1px solid #e2e8f0;
  }

  .desktopmenu.mobile-open { display: block; }

  .royalmenu {
    flex-direction: column;
    gap: 0;
  }

  .royalmenu > li > a {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
  }

  .royalmenu .sub-menu {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color2nd);
    background: #f8fafc;
    border-radius: 0;
    margin: 4px 0 8px 12px;
    display: none;
  }

  .royalmenu li.menu-item-has-children.open .sub-menu { display: block; }
  .header-right-actions .royal-action-btn { display: none; }
}

@media (max-width: 640px) {
  .headertop .topright { display: none; }
  .logo-text-wrap .site-tagline { display: none; }
}
