/* ======================================
       COLOR VARIABLES (Soft Slate Palette)
    ====================================== */
:root {
  /* Desktop Main Menu */
  --menu-main-bg: #33353a;
  --menu-text: #e8e6e3;
  --menu-accent: #1e293b;
  --menu-hover: #e2e8f0;
  --menu-border: #4f535c;
  --menu-focus-color: #c6af8f;

  /* Desktop Sub-Menus */
  --submenu-bg: #ffffff; /* Clean White for dropdowns */
  --submenu-hover: #f1f5f9;

  /* Mobile Sidebar */
  --sidebar-bg: #44474d;
  --sidebar-header: #33353a;
  --sidebar-text: #f8f9fa;
  --sidebar-accent: #4f535c;

  /* Header Height */
  --header-height: 100px;
}

/* ======================================
       DESKTOP NAV
    ====================================== */

#nav_section {
  padding-block: 0;
}

#menu_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid var(--menu-border);
}

/* The Below is usefull of text is next to the logo */
/* .site-branding .custom-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 10px 0;
} */

.site-branding {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-branding .custom-logo {
  width: 12rem;
  height: auto;
}

.site-branding span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--menu-text);
  letter-spacing: 0.5px;
}

.site-branding .live_btn {
  padding: 0 20px;
  color: var(--menu-text);
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 40px;
  text-decoration: none;
  transition: all 0.25s ease;
  background-color: #cd4eb9;
  border-radius: 5px;
}

nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav > ul > li {
  position: relative;
}

nav > ul > li:last-child {
  background-color: var(--accent);
  border-radius: 5px;
}

nav > ul > li:last-child a {
  padding-block: 6px 5px;
}

nav > ul > li:last-child a:hover {
  color: var(--menu-main-bg);
}

nav a {
  display: block;
  padding: 0 20px;
  color: var(--menu-text);
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 500;
  /* line-height: 70px; */
  text-decoration: none;
  transition: all 0.25s ease;
}

/* nav a:hover {
  color: var(--menu-accent);
  background-color: var(--menu-hover);
} */

/* Dropdown indicators */
nav > ul li > a:after {
  content: " ▾";
  font-size: 0.7rem;
  opacity: 0.5;
  margin-left: 5px;
}
nav > ul li > a:only-child:after {
  content: "";
}

/* Desktop Dropdowns */
nav ul ul {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 220px;
  background: var(--submenu-bg);
  border: 1px solid var(--menu-border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 200;
}

nav ul li:hover > ul {
  display: block;
}

nav ul ul li {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--menu-hover);
}

nav ul ul li:last-child {
  border-bottom: none;
}

nav ul ul a {
  line-height: 45px;
  padding: 0 20px;
  font-size: 0.9rem;
  color: var(--menu-text);
}

nav ul ul a:hover {
  background-color: var(--submenu-hover);
  padding-left: 25px;
}

nav ul ul ul {
  top: -1px;
  left: 100%;
}

/* =============================================
       BURGER BUTTON (Mobile Only)
    ============================================= */
.burger {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--submenu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--menu-accent);
  padding: 8px;
  transition: all 0.2s;
}

/* =============================================
       OVERLAY
    ============================================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.4); /* Slate tinted overlay */
  backdrop-filter: blur(4px);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.overlay.active {
  display: block;
}
.overlay.visible {
  opacity: 1;
}

/* =============================================
       SIDEBAR
    ============================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--sidebar-bg);
  z-index: 400;
  visibility: hidden;
  transform: translateX(-100%);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.2);
}
.sidebar.open {
  visibility: visible;
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 24px;
  background-color: var(--sidebar-header);
}

.sidebar-title {
  color: var(--sidebar-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
}

/* SIDEBAR NAV */
.sidebar-nav {
  list-style: none;
  padding: 10px 0;
}

.sidebar-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav li:last-child {
  background-color: var(--accent);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar-nav .arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: transform 0.2s;
}

.has-children.expanded > a .arrow {
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background: rgba(0, 0, 0, 0.15);
}

.has-children.expanded > ul {
  max-height: 1000px;
}

.sidebar-nav ul a {
  padding-left: 45px;
  opacity: 0.85;
}
.sidebar-nav ul ul a {
  padding-left: 65px;
  opacity: 0.75;
}

/* =============================================
       RESPONSIVE & DYNAMIC HEADER breakpoint
    ============================================= */
@media (max-width: 962px) {
  .site-branding .live_btn {
    margin-right: var(--space-xs);
  }
  nav > ul {
    display: none;
  }
  .burger {
    display: flex;
  }
}

/* The below selectors (.site-header, .site-header.header--fixed)
are the selector names of the header tag inside frond-page.php 
Have this in mind if you change the class names
*/

.site-header {
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  background-color: var(--menu-main-bg);
}

.site-header.header--fixed {
  position: fixed;
  background-color: rgba(44, 46, 51, 0.95);
  box-shadow: 0 4px 6px -1px rgba(179, 178, 178, 0.1);
}

.site-header.header--hidden {
  transform: translateY(-100%);
}

.site-header.header--fixed #menu_wrapper {
  border-bottom: none;
}
