/* diocAN header/footer shell: same structure/style as WP home orchestrator. */

html,
body {
  height: 100%;
}

body.cm-page {
  --cm-footer-h: 38px;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

@supports not (height: 100dvh) {
  body.cm-page {
    min-height: 100vh;
    height: 100vh;
  }
}

#cm-header {
  --cm-topbar-h: 86px;
  --cm-menubar-h: 68px;
  --cm-cat-h: calc(var(--cm-topbar-h) + var(--cm-menubar-h));
  --cm-cat-offset: 60px;
  --cm-mobile-topbar-h: 84px;
  --cm-titlebar-h: 0px;
  --cm-topbar-bg: #0069fa;
  position: relative;
  z-index: 80;
  color: #fff;
  font-family: "Open Sans", Arial, sans-serif;
}

#cm-header,
#cm-header * {
  box-sizing: border-box;
}

#cm-topbar {
  height: var(--cm-topbar-h);
  background: var(--cm-topbar-bg);
  padding: 0 26px;
  display: flex;
  align-items: center;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#cm-topgrid {
  width: 100%;
  display: grid;
  grid-template-columns: 38.2% 61.8%;
  align-items: center;
  gap: 0;
}

#cm-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#cm-home {
  display: inline-flex;
  align-items: center;
}

#cm-logo {
  max-height: 62px;
  height: auto;
  width: auto;
  display: block;
}

#cm-site-title {
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cm-mobile-cat {
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#cm-mobile-cat a {
  display: flex;
  align-items: center;
  justify-content: center;
}

#cm-cat-mobile {
  height: var(--cm-cat-h) !important;
  max-height: var(--cm-cat-h) !important;
  width: auto;
  display: block;
  cursor: pointer;
}

#cm-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  position: relative;
}

#cm-page-title {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  padding-left: var(--cm-cat-offset);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#cm-mobile-menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
}

#cm-mobile-menu-toggle .cm-mobile-toggle-line,
#cm-mobile-menu-toggle::before,
#cm-mobile-menu-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #ffffff;
  transition: top 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

#cm-mobile-menu-toggle .cm-mobile-toggle-line {
  top: 21px;
}

#cm-mobile-menu-toggle::before {
  top: 14px;
}

#cm-mobile-menu-toggle::after {
  top: 28px;
}

#cm-header.cm-mobile-menu-open #cm-mobile-menu-toggle .cm-mobile-toggle-line {
  opacity: 0;
  transform: scaleX(0.6);
}

#cm-header.cm-mobile-menu-open #cm-mobile-menu-toggle::before {
  top: 21px;
  transform: rotate(45deg);
}

#cm-header.cm-mobile-menu-open #cm-mobile-menu-toggle::after {
  top: 21px;
  transform: rotate(-45deg);
}

#cm-titlebar {
  display: none;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

#cm-titlebar-inner {
  padding: 10px 26px;
}

#cm-mobile-page-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cm-main-menu {
  height: var(--cm-menubar-h);
  background: #000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

#cm-menugrid {
  width: 100%;
  display: grid;
  grid-template-columns: 38.2% 61.8%;
  align-items: center;
  padding: 0 26px;
  gap: 0;
}

#cm-menu-left,
#cm-menu-right {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

#cm-menu-left {
  justify-content: flex-start;
}

#cm-menu-right {
  justify-content: flex-start;
  padding-left: var(--cm-cat-offset);
}

.cm-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  opacity: 0.92;
  display: inline-block;
}

.cm-link:hover,
.cm-link:focus {
  opacity: 1;
}

#cm-main-menu a.active {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

#cm-golden-pivot {
  position: absolute;
  left: 38.2%;
  top: 0;
  transform: translateX(-50%);
  height: var(--cm-cat-h);
  max-height: var(--cm-cat-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 81;
}

#cm-golden-pivot a {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  height: 100%;
}

#cm-cat {
  height: var(--cm-cat-h) !important;
  max-height: var(--cm-cat-h) !important;
  width: auto;
  display: block;
  cursor: pointer;
}

.cm-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #000;
  padding-bottom: 24px;
}

#cm-footer {
  flex: 0 0 var(--cm-footer-h);
  height: var(--cm-footer-h);
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cm-hero {
  padding: 42px 0 24px;
}

.cm-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9bb8ff;
}

.cm-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
}

.cm-lead {
  margin: 10px 0 0;
  max-width: 78ch;
}

.cm-content-section {
  padding-top: 12px;
}

.cm-content-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.cm-content-head h2,
.cm-content-head p {
  margin: 0;
}

@media (max-width: 980px) {
  #cm-header {
    --cm-topbar-h: auto;
    --cm-menubar-h: 0px;
    --cm-cat-h: 58px;
    --cm-cat-offset: 0px;
    --cm-titlebar-h: 54px;
  }

  #cm-topbar {
    position: relative;
    min-height: var(--cm-mobile-topbar-h);
    height: auto;
    padding: 10px 14px;
  }

  #cm-topgrid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
  }

  #cm-right {
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 3;
  }

  #cm-page-title {
    display: none;
  }

  #cm-mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
  }

  #cm-mobile-cat {
    display: flex;
  }

  #cm-cat-mobile {
    height: var(--cm-cat-h);
  }

  #cm-titlebar {
    display: block;
  }

  #cm-titlebar-inner {
    padding: 10px 14px;
  }

  #cm-mobile-page-title {
    font-size: clamp(24px, 7vw, 34px);
  }

  #cm-menugrid {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
    padding: 20px 18px 28px;
    overflow-y: auto;
  }

  #cm-main-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--cm-mobile-topbar-h) + var(--cm-titlebar-h));
    bottom: 0;
    height: auto;
    min-height: 0;
    border-bottom: 0;
    background: rgba(0, 0, 0, 0.96);
    transform: translateX(100%);
    transition: transform 0.26s ease;
    pointer-events: none;
    overflow: hidden;
    z-index: 900;
  }

  #cm-header.cm-mobile-menu-open #cm-main-menu {
    transform: translateX(0);
    pointer-events: auto;
  }

  #cm-menu-left,
  #cm-menu-right {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    align-items: start;
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  #cm-main-menu li {
    list-style: none;
  }

  #cm-menu-right {
    padding-left: 0;
  }

  .cm-link {
    display: block;
    width: 100%;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  #cm-golden-pivot {
    display: none;
  }
}
