/* Overlay menu: left parents stay; right children swap on hover (desktop).
   Mobile (html.is-reflow): true accordion — children sit under each parent. */

.menu-static-chevron {
  display: none;
}

.site-menu-nav {
  display: contents;
}

.menu-section {
  display: contents;
}

.menu-parent-row {
  display: contents;
}

.menu-expand {
  display: none;
}

.menu-children:not(.is-active) {
  display: none !important;
}

/* ---- Desktop children stage (absolute column on the right) ---- */
.site-menu-nav .menu-children.is-active {
  position: absolute;
  left: 1328px;
  top: 142px;
  width: 190px;
  max-height: 330px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 14px;
  box-sizing: content-box;
  z-index: 310;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: #adb5bd transparent;
  display: flex !important;
  flex-direction: column;
  gap: 29px;
}

/* Sektörler: 9 madde — kaydırma olmadan sığsın */
.site-menu-nav .menu-section[data-menu-key="sektorler"] > .menu-children.is-active {
  gap: 15px;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

.site-menu .menu-child {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 190px;
  overflow: visible;
  color: #2b2d42 !important;
  font-weight: 400 !important;
}

.site-menu .menu-child-label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 166px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-menu .menu-child-chevron {
  flex: 0 0 8px;
  width: 8px;
  height: 15px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-menu .menu-child:hover,
.site-menu .menu-child.is-hot,
.site-menu .menu-child:focus-visible {
  color: #2b2d42 !important;
  font-weight: 600 !important;
}

.site-menu .menu-child:hover .menu-child-chevron,
.site-menu .menu-child.is-hot .menu-child-chevron,
.site-menu .menu-child:focus-visible .menu-child-chevron {
  opacity: 1;
  transform: translateX(0);
}

.site-menu .menu-child:hover .menu-child-chevron path,
.site-menu .menu-child.is-hot .menu-child-chevron path,
.site-menu .menu-child:focus-visible .menu-child-chevron path {
  fill: #2b2d42;
}

.site-menu .menu-parent {
  color: #2b2d42;
}

.site-menu .menu-parent.is-active {
  color: #0466c8 !important;
}

.site-menu .menu-connector {
  transition: top 180ms ease;
}

/* ============================================================
   Mobile accordion menu
   ============================================================ */
html.is-reflow .site-menu-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}

html.is-reflow .menu-section {
  display: block;
  width: 100%;
  border-bottom: 1px solid #eef0f3;
}

html.is-reflow .menu-parent-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 52px;
}

html.is-reflow #site-menu .menu-parent {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  flex: 1 1 auto;
  display: flex !important;
  align-items: center;
  width: auto !important;
  min-width: 0;
  padding: 16px 8px 16px 4px !important;
  border-bottom: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #2b2d42 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  text-decoration: none;
  opacity: 1 !important;
  transform: none !important;
}

html.is-reflow #site-menu .menu-parent.is-active {
  color: #0466c8 !important;
}

html.is-reflow .menu-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

html.is-reflow .menu-expand:focus-visible {
  outline: 2px solid #0466c8;
  outline-offset: -2px;
  border-radius: 8px;
}

html.is-reflow .menu-expand-icon {
  display: block;
  transition: transform 200ms ease;
}

html.is-reflow .menu-section.is-open .menu-expand-icon {
  transform: rotate(180deg);
  color: #0466c8;
}

html.is-reflow .menu-section.is-open .menu-expand {
  color: #0466c8;
}

/* Children nested under parent — not dumped at the bottom */
html.is-reflow .site-menu-nav .menu-children,
html.is-reflow .site-menu-nav .menu-children.is-active {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 0 10px 0 !important;
  margin: 0;
  display: none !important;
  flex-direction: column;
  gap: 0;
  background: #f7f8fa;
  border-radius: 0;
}

html.is-reflow .menu-section.is-open > .menu-children,
html.is-reflow .menu-section.is-open > .menu-children.is-active {
  display: flex !important;
}

/* Long project list stays usable on small screens */
html.is-reflow .menu-section[data-menu-key="proje"].is-open > .menu-children {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.is-reflow #site-menu .menu-child {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  padding: 13px 16px 13px 20px !important;
  border-bottom: 0 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #495057 !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  text-decoration: none;
  opacity: 1 !important;
  transform: none !important;
}

html.is-reflow #site-menu .menu-child + .menu-child {
  border-top: 1px solid rgba(43, 45, 66, 0.06);
}

html.is-reflow #site-menu .menu-child-label {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

html.is-reflow #site-menu .menu-child-chevron {
  opacity: 0.45;
  transform: rotate(180deg);
  flex-shrink: 0;
}

html.is-reflow #site-menu .menu-child.is-current {
  color: #0466c8 !important;
  font-weight: 600 !important;
  background: rgba(4, 102, 200, 0.06);
}

html.is-reflow #site-menu .menu-child:active,
html.is-reflow #site-menu .menu-child:hover {
  color: #0466c8 !important;
  font-weight: 600 !important;
}

html.is-reflow #site-menu .menu-child:active .menu-child-chevron,
html.is-reflow #site-menu .menu-child:hover .menu-child-chevron,
html.is-reflow #site-menu .menu-child.is-current .menu-child-chevron {
  opacity: 1;
}

html.is-reflow #site-menu .menu-child:active .menu-child-chevron path,
html.is-reflow #site-menu .menu-child:hover .menu-child-chevron path,
html.is-reflow #site-menu .menu-child.is-current .menu-child-chevron path {
  fill: #0466c8;
}

/* Legacy stage class (if any leftover) */
html.is-reflow .menu-children-stage {
  display: contents;
}
