:root {
    --bd-header-bg: rgba(4, 16, 29, 0.78);
    --bd-header-border: rgba(81, 125, 170, 0.24);
    --bd-header-card: rgba(9, 26, 44, 0.96);
    --bd-header-card-2: rgba(13, 35, 58, 0.98);
    --bd-header-text: #edf3ff;
    --bd-header-muted: #9eb2c7;
    --bd-header-accent: #ff705c;
    --bd-header-accent-2: #ff8a66;
    --bd-header-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.bd-public-header {
    position: sticky;
    top: 0;
    z-index: 240;
    width: 100%;
    backdrop-filter: blur(14px);
    background:
        linear-gradient(90deg, rgba(0, 97, 185, 0.06), rgba(255, 112, 92, 0.08)),
        var(--bd-header-bg);
    border-bottom: 1px solid var(--bd-header-border);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.10);
}

.bd-public-header__inner {
    width: min(100%, 1360px);
    min-height: 78px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.bd-public-header__left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1 1 auto;
}

.bd-public-header__brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.bd-public-header__logo {
    width: 170px;
    height: auto;
    display: block;
    object-fit: contain;
}

.bd-public-header__logo--light {
    display: none;
}

.bd-public-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bd-public-nav__link {
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--bd-header-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.bd-public-nav__link:hover,
.bd-public-nav__link:focus-visible,
.bd-public-nav__group.is-open > .bd-public-nav__link {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateY(-1px);
}

.bd-public-nav__link--button {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
}

.bd-public-nav__group {
    position: relative;
}

.bd-public-mega {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: min(860px, calc(100vw - 48px));
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(98, 146, 201, 0.22);
    background:
        radial-gradient(circle at top right, rgba(255, 112, 92, 0.14), transparent 36%),
        linear-gradient(180deg, var(--bd-header-card), var(--bd-header-card-2));
    box-shadow: var(--bd-header-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.bd-public-nav__group.is-open .bd-public-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bd-public-mega__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 18px;
}

.bd-public-mega__section {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.bd-public-mega__ey {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--bd-header-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.bd-public-mega__section h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    line-height: 1.1;
}

.bd-public-mega__section p {
    margin: 0 0 18px;
    color: var(--bd-header-muted);
    font-size: 14px;
    line-height: 1.6;
}

.bd-public-mega__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}

.bd-public-mega__links a,
.bd-public-mega__stack a {
    text-decoration: none;
    color: var(--bd-header-text);
}

.bd-public-mega__links a {
    min-height: 92px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bd-public-mega__links a b {
    font-size: 14px;
}

.bd-public-mega__links a span {
    color: var(--bd-header-muted);
    font-size: 12px;
}

.bd-public-mega__stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}

.bd-public-mega__stack a {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
    font-weight: 600;
}

.bd-public-mega__links a:hover,
.bd-public-mega__stack a:hover,
.bd-public-mega__links a:focus-visible,
.bd-public-mega__stack a:focus-visible {
    border-color: rgba(255, 112, 92, 0.36);
    background: rgba(255,112,92,0.08);
    color: #fff;
}

.bd-public-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.bd-public-lang,
.bd-public-theme,
.bd-public-login,
.bd-public-register,
.bd-public-burger {
    min-height: 42px;
    border-radius: 14px;
}

.bd-public-lang {
    display: flex;
    align-items: center;
    padding: 3px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.bd-public-lang__item {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bd-header-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.bd-public-lang__item.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--bd-header-accent), var(--bd-header-accent-2));
    box-shadow: 0 8px 16px rgba(255, 112, 92, 0.25);
}

.bd-public-theme,
.bd-public-login,
.bd-public-register,
.bd-public-burger {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--bd-header-text);
}

.bd-public-theme,
.bd-public-burger {
    width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bd-theme-icon {
    width: 16px;
    height: 16px;
}

.bd-theme-icon--sun {
    display: none;
}

.bd-theme-icon--moon {
    display: block;
}

.bd-public-login,
.bd-public-register {
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.bd-public-login:hover,
.bd-public-theme:hover,
.bd-public-burger:hover {
    background: rgba(255,255,255,0.08);
}

.bd-public-register {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--bd-header-accent), var(--bd-header-accent-2));
    box-shadow: 0 14px 26px rgba(255, 112, 92, 0.25);
}

.bd-public-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.bd-public-burger span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.bd-public-drawer[hidden] {
    display: none;
}

.bd-public-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.bd-public-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 10, 20, 0.55);
    backdrop-filter: blur(8px);
}

.bd-public-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(255,112,92,0.16), transparent 28%),
        linear-gradient(180deg, rgba(7, 24, 40, 0.98), rgba(5, 18, 31, 1));
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -24px 0 64px rgba(0,0,0,0.28);
}

.bd-public-drawer__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 4px 20px;
}

.bd-public-drawer__top b {
    display: block;
    color: #fff;
    font-size: 22px;
    line-height: 1.1;
}

.bd-public-drawer__top p {
    margin: 8px 0 0;
    color: var(--bd-header-muted);
    font-size: 13px;
    line-height: 1.5;
}

.bd-public-drawer__close {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
}

.bd-public-drawer__body {
    flex: 1 1 auto;
    display: grid;
    gap: 18px;
    overflow: auto;
}

.bd-public-drawer__section {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
}

.bd-public-drawer__section span {
    display: block;
    margin-bottom: 12px;
    color: var(--bd-header-accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.bd-public-drawer__section a {
    min-height: 48px;
    margin-bottom: 10px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--bd-header-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.bd-public-drawer__section a:last-child {
    margin-bottom: 0;
}

.bd-public-drawer__footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 16px;
}

.bd-public-login--drawer,
.bd-public-register--drawer {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

html[data-theme="light"] .bd-public-header,
body[data-theme="light"] .bd-public-header,
body.theme-light .bd-public-header {
    --bd-header-bg: rgba(255,255,255,0.88);
    --bd-header-border: rgba(205, 213, 224, 0.85);
    --bd-header-card: rgba(255,255,255,0.98);
    --bd-header-card-2: rgba(245,248,252,1);
    --bd-header-text: #112337;
    --bd-header-muted: #5f7084;
    box-shadow: 0 12px 34px rgba(17, 35, 55, 0.10);
}

html[data-theme="light"] .bd-public-header__logo--dark,
body[data-theme="light"] .bd-public-header__logo--dark,
body.theme-light .bd-public-header__logo--dark {
    display: none;
}

html[data-theme="light"] .bd-public-header__logo--light,
body[data-theme="light"] .bd-public-header__logo--light,
body.theme-light .bd-public-header__logo--light {
    display: block;
}

html[data-theme="light"] .bd-public-nav__link:hover,
html[data-theme="light"] .bd-public-nav__group.is-open > .bd-public-nav__link,
body[data-theme="light"] .bd-public-nav__link:hover,
body[data-theme="light"] .bd-public-nav__group.is-open > .bd-public-nav__link,
body.theme-light .bd-public-nav__link:hover,
body.theme-light .bd-public-nav__group.is-open > .bd-public-nav__link {
    background: rgba(17,35,55,0.05);
}

html[data-theme="light"] .bd-public-nav__link--button,
html[data-theme="light"] .bd-public-lang,
html[data-theme="light"] .bd-public-theme,
html[data-theme="light"] .bd-public-login,
html[data-theme="light"] .bd-public-burger,
body[data-theme="light"] .bd-public-nav__link--button,
body[data-theme="light"] .bd-public-lang,
body[data-theme="light"] .bd-public-theme,
body[data-theme="light"] .bd-public-login,
body[data-theme="light"] .bd-public-burger,
body.theme-light .bd-public-nav__link--button,
body.theme-light .bd-public-lang,
body.theme-light .bd-public-theme,
body.theme-light .bd-public-login,
body.theme-light .bd-public-burger {
    background: rgba(246,248,251,0.95);
    border-color: rgba(204, 214, 225, 0.95);
}

html[data-theme="light"] .bd-theme-icon--moon,
body[data-theme="light"] .bd-theme-icon--moon,
body.theme-light .bd-theme-icon--moon {
    display: none;
}

html[data-theme="light"] .bd-theme-icon--sun,
body[data-theme="light"] .bd-theme-icon--sun,
body.theme-light .bd-theme-icon--sun {
    display: block;
}

html[data-theme="light"] .bd-public-mega__section,
body[data-theme="light"] .bd-public-mega__section,
body.theme-light .bd-public-mega__section,
html[data-theme="light"] .bd-public-mega__links a,
html[data-theme="light"] .bd-public-mega__stack a,
body[data-theme="light"] .bd-public-mega__links a,
body[data-theme="light"] .bd-public-mega__stack a,
body.theme-light .bd-public-mega__links a,
body.theme-light .bd-public-mega__stack a,
html[data-theme="light"] .bd-public-drawer__section,
body[data-theme="light"] .bd-public-drawer__section,
body.theme-light .bd-public-drawer__section,
html[data-theme="light"] .bd-public-drawer__section a,
body[data-theme="light"] .bd-public-drawer__section a,
body.theme-light .bd-public-drawer__section a {
    background: rgba(17,35,55,0.03);
    border-color: rgba(204, 214, 225, 0.95);
}

html[data-theme="light"] .bd-public-drawer__panel,
body[data-theme="light"] .bd-public-drawer__panel,
body.theme-light .bd-public-drawer__panel {
    background:
        radial-gradient(circle at top right, rgba(255,112,92,0.14), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,247,251,1));
}

@media (max-width: 1180px) {
    .bd-public-nav {
        gap: 4px;
    }

    .bd-public-nav__link {
        padding: 0 10px;
        font-size: 13px;
    }

    .bd-public-login,
    .bd-public-register {
        padding: 0 12px;
    }
}

@media (max-width: 980px) {
    .bd-public-nav,
    .bd-public-login,
    .bd-public-register {
        display: none;
    }

    .bd-public-burger {
        display: inline-flex;
    }

    .bd-public-header__inner {
        min-height: 72px;
        padding: 12px 18px;
    }
}

@media (max-width: 640px) {
    .bd-public-header__inner {
        min-height: 66px;
        padding: 10px 14px;
        gap: 10px;
    }

    .bd-public-header__left {
        gap: 12px;
    }

    .bd-public-header__logo {
        width: 146px;
    }

    .bd-public-lang {
        height: 38px;
    }

    .bd-public-lang__item {
        min-width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .bd-public-theme,
    .bd-public-burger {
        width: 38px;
        min-height: 38px;
    }
}

/* V10 scoped menu: dense links, no paragraphs, tooltip on hover via title */
.bd-public-header__inner{max-width:1480px}
.bd-public-nav__link{gap:7px}
.bd10-mega{width:min(880px,calc(100vw - 32px));padding:20px;left:50%;transform:translate(-35%,8px)}
.bd-public-nav__group.is-open .bd10-mega{transform:translate(-35%,0)}
.bd10-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.bd10-column{display:flex;flex-direction:column;gap:3px;padding:13px;border-right:1px solid rgba(128,157,187,.15)}
.bd10-column:last-child{border-right:0}
.bd10-heading{font-size:12px;font-weight:800;letter-spacing:.065em;text-transform:uppercase;color:var(--bd-header-accent);padding:5px 6px 13px}
.bd10-column a{min-height:42px;display:flex;align-items:center;gap:10px;border-radius:11px;padding:6px 8px;text-decoration:none;color:var(--bd-header-text);font-weight:650;font-size:13px;transition:background .18s,color .18s}
.bd10-column a:hover,.bd10-column a:focus-visible{background:rgba(255,113,84,.13);color:var(--bd-header-text);outline-offset:2px}
.bd10-glyph{display:flex;align-items:center;justify-content:center;flex:none;width:31px;height:31px;border:1px solid rgba(255,126,96,.18);background:rgba(255,126,96,.09);border-radius:9px;color:var(--bd-header-accent);font-size:17px}
.bd-public-register{padding-inline:18px}
html[data-theme=light] .bd10-mega,body.theme-light .bd10-mega{background:linear-gradient(145deg,#fff,#f4f8fd);border-color:#d3dfec;box-shadow:0 28px 65px rgba(20,38,60,.18)}
html[data-theme=light] .bd10-column,body.theme-light .bd10-column{border-color:#dbe4ee}
html[data-theme=light] .bd10-column a,body.theme-light .bd10-column a{color:#192c44}
html[data-theme=light] .bd10-column a:hover,body.theme-light .bd10-column a:hover{background:#fff0e9}
@media(max-width:980px){.bd10-mega{display:none}}
@media(min-width:981px) and (max-width:1180px){.bd-public-header__logo{width:145px}.bd-public-nav__link{padding-inline:8px}}

/* BEDEEL V10B - CONTRASTE MENU CLARO */
html[data-theme="light"] .bd-public-header .bd-public-nav__link,
body[data-theme="light"] .bd-public-header .bd-public-nav__link,
body.theme-light .bd-public-header .bd-public-nav__link {
    color: #172B45 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .bd-public-header .bd-public-nav__link:hover,
html[data-theme="light"] .bd-public-header .bd-public-nav__link:focus-visible,
html[data-theme="light"] .bd-public-header .bd-public-nav__group.is-open > .bd-public-nav__link,
body.theme-light .bd-public-header .bd-public-nav__link:hover,
body.theme-light .bd-public-header .bd-public-nav__link:focus-visible,
body.theme-light .bd-public-header .bd-public-nav__group.is-open > .bd-public-nav__link {
    color: #E55338 !important;
    background: #FFF0E9 !important;
}

html[data-theme="light"] .bd-public-header .bd-public-nav__link--button,
body.theme-light .bd-public-header .bd-public-nav__link--button {
    background: #F5F8FC;
    border-color: #CFDAE7;
}

/* Modo oscuro: sin modificaciones */


/* BEDEEL V10C - NAVEGACION ACTIVA */

/* Tema oscuro */
.bd-public-header .bd-public-nav__link[aria-current="page"],
.bd-public-header .bd-public-nav__link.is-current {
    color: #FF896B !important;
    background: rgba(255,112,75,.13) !important;
    border-bottom: 2px solid #FF704B !important;
    font-weight: 800 !important;
}

/* Tema claro */
html[data-theme="light"] .bd-public-header .bd-public-nav__link[aria-current="page"],
html[data-theme="light"] .bd-public-header .bd-public-nav__link.is-current,
body.theme-light .bd-public-header .bd-public-nav__link[aria-current="page"],
body.theme-light .bd-public-header .bd-public-nav__link.is-current {
    color: #D94D32 !important;
    background: #FFF0E9 !important;
    border-bottom: 2px solid #F46C4B !important;
}

/* Enlaces interiores del mega-menu */
.bd-public-mega a[aria-current="page"],
.bd-public-mega a.is-current,
.bd-public-drawer a[aria-current="page"],
.bd-public-drawer a.is-current {
    color: #FF704B !important;
    border-color: rgba(255,112,75,.5) !important;
    background: rgba(255,112,75,.10) !important;
}


/* BEDEEL V10E: one subtle active item + hide redundant theme bubble on public pages */
body.np4-public > .np4-theme-control { display:none !important; }
.bd-public-header .bd-public-nav__link.is-current,
.bd-public-header .bd-public-nav__link[aria-current="page"] {
  color:#ff977a !important;
  background:transparent !important;
  border-bottom:0 !important;
  border-radius:0 !important;
  box-shadow:inset 0 -2px #ff7759 !important;
  font-weight:700 !important;
}
html[data-theme="light"] .bd-public-header .bd-public-nav__link.is-current,
html[data-theme="light"] .bd-public-header .bd-public-nav__link[aria-current="page"] {
  color:#ce533b !important;
  background:transparent !important;
  box-shadow:inset 0 -2px #ec6b50 !important;
}
.bd-public-header .bd-public-nav__link:not(.is-current):not([aria-current="page"]) {
  border-bottom-color:transparent !important;
}
.bd-public-header .bd-public-mega a.is-current,
.bd-public-header .bd-public-drawer a.is-current {
  background:rgba(255,112,75,.075) !important;
  border-color:rgba(255,112,75,.25) !important;
}

/* BEDEEL V10F: never style active items from hover or previous states */
.bd-public-header .bd-public-nav__link:not(.is-current):not([aria-current="page"]) {
  box-shadow:none !important;
  border-bottom:0 !important;
  background:transparent !important;
}
.bd-public-header .bd-public-nav__link.is-current {
  background:transparent !important;
  border-bottom:0 !important;
  box-shadow:inset 0 -2px #ff785e !important;
}
