/**
 * 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-theme-blue: #0284c7;
  --royal-theme-dark: #0f172a;
  --royal-theme-accent: #0ea5e9;
  --royal-theme-cta: #0284c7;
  --royal-theme-cta-hover: #0369a1;
  --header_top_bg_color: #0b2545;
  --header_top_fg_color: #e2e8f0;
  --headermiddlebg: #ffffff;
  --menucontbackground: #ffffff;
  --menupadding: 0px;
  --menuanchorcolor: #1e293b;
  --menuanchorhovercolor: #0284c7;
  --royal-border: #e2e8f0;
}

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

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

.headertop .top-badge {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(14, 165, 233, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

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

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

/* ==========================================================================
   Header Middle / Main (.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;
}

.header-left .logo-badge {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 16px -4px rgba(2, 132, 199, 0.35);
}

.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: #0f172a;
  margin: 0;
  line-height: 1.15;
}

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

.header-left .site-description {
  font-size: 12.5px;
  color: #64748b;
  margin: 2px 0 0 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.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: #f0f9ff;
  color: var(--royal-theme-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid #e0f2fe;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-detail:hover .detail-icon {
  background: var(--royal-theme-blue);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.contact-detail .detail-label {
  font-size: 11.5px;
  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-theme-blue);
}

.header-action-button .btn-request-proposal,
.royal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--royal-theme-cta);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.header-action-button .btn-request-proposal:hover,
.royal-action-btn:hover {
  background: var(--royal-theme-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4);
  color: #ffffff;
}

/* ==========================================================================
   Desktop Menu Navigation (.desktopmenu.custom-nav-style-2)
   ========================================================================== */
.desktopmenu.custom-nav-style-2 {
  background: var(--menucontbackground);
  border-bottom: 1px solid var(--royal-border);
  position: relative;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

/* Sticky Class */
.desktopmenu.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  animation: slideDownHeader 0.35s ease forwards;
}

@keyframes slideDownHeader {
  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;
  position: relative;
}

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

.royalmenu > li {
  position: relative;
}

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

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

.royalmenu > li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--royal-theme-blue);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.royalmenu > li:hover > a::after,
.royalmenu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Submenu Dropdown */
.royalmenu li.menu-item-has-children > a::before {
  content: "\f282"; /* Bootstrap icon chevron-down or Royal icon arrow */
  font-family: "bootstrap-icons", sans-serif;
  font-size: 11px;
  transition: transform 0.25s ease;
}

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

.royalmenu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  border: 1px solid #f1f5f9;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  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: 14px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

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

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

.menu-search-field {
  padding: 9px 38px 9px 14px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 13.5px;
  outline: none;
  width: 170px;
  transition: all 0.25s ease;
}

.menu-search-field:focus {
  width: 220px;
  border-color: var(--royal-theme-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.menu-search-submit {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-search-submit:hover {
  color: var(--royal-theme-blue);
}

/* Mobile Hamburger Button */
.mobile-menu-trigger {
  display: none;
}

.navigation-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navigation-icon:hover {
  background: #f1f5f9;
}

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

/* Mobile Drawer Overlay */
.mobile-navigation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  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: 360px;
  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;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.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-drawer-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.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: 14px 4px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
}

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

.mobile-drawer-contact {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
  .tablethide {
    display: none !important;
  }
  .tabletshow {
    display: flex !important;
  }
  .mobile-menu-trigger {
    display: block;
  }
  .desktopmenu {
    display: none;
  }
  .header.custom-header-style-2 {
    padding: 12px 0;
  }
}

@media (max-width: 640px) {
  .headertop .topleft span.clinic-address {
    display: none;
  }
}
