/* Identidad común con DC COM Homepage. */
body:is(.dci-refresh-home, .dci-refresh-post, .dci-refresh-section) {
  --dci-blue: #1356d8;
  --dci-deep: #0b2e72;
  --dci-ink: #0d1b32;
  --dci-muted: #5f6f86;
  --dci-bg: #f4f7fb;
  --dci-line: #e2e8f1;
  --dci-red: #d72638;
  --dci-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dci-header, .dci-header *, .dci-mobile-bar, .dci-mobile-bar * { box-sizing: border-box; }
.dci-header {
  position: relative;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--dci-line);
  color: var(--dci-ink);
  font: 400 14px/1.45 var(--dci-font);
}
.dci-header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 77px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
}
.dci-header a { text-decoration: none; }
:is(.dci-header, .dci-mobile-bar) :is(a, summary, input, button):focus-visible {
  outline: 2px solid var(--dci-blue);
  outline-offset: 3px;
}
.dci-header .dci-brand { display: flex; align-items: center; gap: 12px; color: var(--dci-ink); }
.dci-brand img { display: block; width: 46px; height: 46px; flex: 0 0 46px; object-fit: contain; }
.dci-brand span { display: grid; gap: 5px; line-height: 1.05; }
.dci-brand strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.dci-brand small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--dci-muted); }
.dci-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); font-weight: 700; }
.dci-actions { display: flex; align-items: center; gap: 4px; }
.dci-header .dci-icon-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dci-deep);
  cursor: pointer;
  list-style: none;
}
.dci-icon-control::-webkit-details-marker { display: none; }
.dci-header .dci-icon-control:hover, .dci-actions details[open] > .dci-icon-control {
  background: var(--dci-bg);
  color: var(--dci-blue);
}
.dci-header .dci-menu-close[hidden], .dci-mobile-bar [hidden] { display: none; }
.dci-menu-heading { display: flex; min-height: 44px; justify-content: space-between; align-items: center; font-size: 16px; }
.dci-mobile-bar { display: none; }
.dci-header .dci-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  color: #42516a;
  white-space: nowrap;
}
.dci-header .dci-nav-link:is(:hover, :focus-visible, [aria-current]), .dci-sections[open] > summary { color: var(--dci-blue); }
.dci-header .dci-nav > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 3px;
  height: 2px;
  background: currentColor;
}
.dci-header .dci-services, .dci-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--dci-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
}
.dci-header .dci-services { box-shadow: 0 10px 22px rgba(19,86,216,.16); }
.dci-header .dci-services:hover, .dci-search button:hover { background: var(--dci-deep); color: #fff; }
.dci-submenu-toggle::before {
  content: "";
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
}
.dci-submenu-toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(225deg); }
.dci-panel {
  position: absolute;
  inset: calc(100% + 6px) max(12px, calc((100% - 1180px) / 2)) auto;
  max-height: min(68vh, 34rem);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border: 1px solid var(--dci-line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(19,42,83,.18);
  padding: clamp(14px, 3vw, 28px);
}
.dci-search-panel { max-width: 34rem; inset-inline-start: auto; width: calc(100% - 24px); }
.dci-search { max-width: 36rem; margin: 0 0 16px; }
.dci-search:only-child { margin-bottom: 0; }
.dci-search label { display: block; margin-bottom: 6px; color: var(--dci-ink); }
.dci-search-row { display: flex; gap: 8px; }
.dci-search input[type="search"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b6c3d6;
  border-radius: 11px;
  padding: 8px 12px;
  color: var(--dci-ink);
  background: var(--dci-bg);
  font: 400 16px/1.35 var(--dci-font);
}
.dci-search button { cursor: pointer; }
.dci-header .dci-menu-list, .dci-header .dci-menu-list ul { list-style: none; margin: 0; padding: 0; }
.dci-header .dci-menu-list { columns: 3 190px; column-gap: 22px; border-top: 1px solid var(--dci-line); padding-top: 8px; }
.dci-menu-list > li { break-inside: avoid; margin-bottom: 10px; }
.dci-header .dci-menu-list ul { margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--dci-line); }
.dci-menu-list a { display: flex; align-items: center; min-height: 36px; padding: 3px 4px; color: var(--dci-ink); overflow-wrap: anywhere; }
.dci-menu-list ul a { color: #42516a; font-weight: 500; }
.dci-menu-list a:is(:hover, :focus-visible, [aria-current]) { color: var(--dci-blue); text-decoration: underline; }
.dci-menu-list .dci-submenu-toggle { display: none; }

@media (max-width: 720px) {
  body:is(.dci-refresh-home, .dci-refresh-post, .dci-refresh-section) {
    --dci-bar-space: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--dci-bar-space);
  }
  .dci-header-inner { width: 100%; min-height: auto; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; padding: 4px 10px 0; }
  .dci-header .dci-brand { gap: 8px; width: fit-content; max-width: 100%; min-height: 48px; }
  .dci-brand img { width: 34px; height: 34px; flex-basis: 34px; }
  .dci-brand strong { font-size: 16px; }
  .dci-brand small { display: none; }
  .dci-actions { gap: 0; }
  .dci-nav {
    grid-column: 1 / -1;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    font-size: 14px;
  }
  .dci-nav::-webkit-scrollbar { display: none; }
  .dci-header .dci-nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 9px;
    justify-content: center;
  }
  .dci-header .dci-nav > a[aria-current="page"]::after { inset-inline: 9px; }
  .dci-header .dci-nav > a:focus-visible { outline-offset: -3px; }
  .dci-header .dci-services, .dci-header .dci-services:hover {
    color: #42516a;
    background: none;
    box-shadow: none;
  }
  .dci-panel {
    --dci-panel-reserve: calc(112px + var(--dci-bar-space));
    inset-inline: 10px;
    width: auto;
    max-height: min(32rem, max(8rem, calc(100vh - var(--dci-panel-reserve) - var(--dci-admin-bar, 0px))));
    max-height: min(32rem, max(8rem, calc(100dvh - var(--dci-panel-reserve) - var(--dci-admin-bar, 0px))));
  }
  .admin-bar .dci-panel { --dci-admin-bar: 46px; }
  body.dci-bar-menu-open .dci-header { z-index: 10001; }
  body.dci-bar-menu-open .dci-menu-panel {
    position: fixed;
    inset-block: auto calc(var(--dci-bar-space) + 8px);
    max-height: min(34rem, calc(100vh - var(--dci-bar-space) - 24px));
    max-height: min(34rem, calc(100dvh - var(--dci-bar-space) - 24px));
  }
  .dci-header .dci-menu-list { columns: auto; }
  .dci-menu-list > li { margin-bottom: 0; }
  .dci-menu-list a { min-height: 44px; }
  .dci-menu-list .dci-has-submenu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
  }
  .dci-menu-list .dci-has-submenu > ul { grid-column: 1 / -1; }
  .dci-menu-list .dci-submenu-toggle {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--dci-bg);
    color: var(--dci-deep);
    cursor: pointer;
  }
  .dci-menu-list .dci-submenu-toggle[aria-expanded="false"] + ul { display: none; }

  .dci-mobile-bar {
    position: fixed;
    z-index: 10000;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--dci-bar-space);
    padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid var(--dci-line);
    box-shadow: 0 -4px 20px rgba(19, 42, 83, .08);
    font: 700 11px/1.25 var(--dci-font);
  }
  .dci-mobile-bar :is(a, button) {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 44px;
    min-height: 47px;
    max-width: 130px;
    padding: 2px 0;
    border: 0;
    border-radius: 8px;
    color: #42516a;
    background: transparent;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
  }
  .dci-mobile-bar :is(a, button):is(:hover, :focus-visible, [aria-current], [aria-expanded="true"]) { color: var(--dci-blue); background: var(--dci-bg); }
  .dci-mobile-bar svg { flex: none; width: 21px; height: 21px; }
  .dci-mobile-bar .dci-bar-directoria { color: var(--dci-blue); }
  .dci-mobile-bar .dci-bar-directoria svg { box-sizing: content-box; padding: 4px; border-radius: 50%; background: var(--dci-blue); color: #fff; }
  body.dci-mobile-directoria .dcs-directoria-launcher { display: none !important; }
  body.dcs-directoria-open .dci-mobile-bar { visibility: hidden; }
  body:is(.dci-refresh-home, .dci-refresh-post, .dci-refresh-section) .generate-back-to-top {
    bottom: calc(var(--dci-bar-space) + 12px) !important;
  }
}
@media print {
  .dci-header, .dci-mobile-bar { display: none; }
}
