/* Keep the logo and horizontal navigation on the same row. */
html:not(.editing) .nice-header-row::before,
html:not(.editing) .nice-header-row::after { display:none; }
html:not(.editing) .c5wrapper .nice-header-row {
    display:grid;
    grid-template-columns:minmax(0,max-content) minmax(0,1fr);
    gap:16px;
    align-items:center;
    padding-top:12px;
    padding-bottom:12px;
}
html:not(.editing) .nice-header-row > .top-nav { grid-column:1; grid-row:1; min-width:0; max-width:140px; text-align:left; }
html:not(.editing) .nice-header-row > .primary-nav,
html:not(.editing) .nice-header-row > .nice-fixed-placeholder { grid-column:2; grid-row:1; min-width:0; }
html:not(.editing) .nice-header-row > .top-nav > .container,
html:not(.editing) .nice-header-row > .primary-nav > .container { width:100%; padding:0; }
html:not(.editing) .nice-header-row > .primary-nav.nice-horizontal-fixed > .container {
    width:var(--nice-header-width,100%);
    margin-left:auto;
    margin-right:auto;
    padding-left:calc(15px + var(--nice-fixed-logo-space,0px));
    padding-right:15px;
}
html:not(.editing) .nice-header-row .top-nav .row { margin:0; }
html:not(.editing) .nice-header-row .top-nav-left,
html:not(.editing) .nice-header-row .top-nav-right { width:100%; padding:0; float:none; }
html:not(.editing) .nice-header-row .top-nav-left img {
    max-width:140px;
    max-height:80px;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
    margin-left:0!important;
    margin-right:0!important;
}
html:not(.editing) .nice-header-row .top-nav-left,
html:not(.editing) .nice-header-row .top-nav-left p,
html:not(.editing) .nice-header-row .top-nav-left [style*="text-align"] { text-align:left!important; }
html:not(.editing) .nice-header-row .top-nav-left p { margin:0; }
html:not(.editing) .nice-header-row > .primary-nav:not(.nice-horizontal-fixed) .navbar { margin-top:0; margin-bottom:0; }
@media(max-width:767px) {
    html:not(.editing) .c5wrapper .nice-header-row { gap:12px; }
    html:not(.editing) .nice-header-row > .top-nav { max-width:100px; }
    html:not(.editing) .nice-header-row .top-nav-left img { max-width:100px; max-height:60px; }
    html:not(.editing) .nice-header-row > .primary-nav .navbar-header { margin:0; }
}

/* Tagline uses its existing global area, above the navigation on the right. */
html:not(.editing) .nice-header-row.nice-has-header-text{row-gap:8px;}
html:not(.editing) .nice-header-row.nice-has-header-text>.top-nav{grid-row:1 / span 2;}
html:not(.editing) .nice-header-row.nice-has-header-text>.primary-nav,
html:not(.editing) .nice-header-row.nice-has-header-text>.nice-fixed-placeholder{grid-row:2;}
html:not(.editing) .nice-header-row>.nice-header-text{grid-column:2;grid-row:1;width:auto;min-width:0;padding:0;text-align:right;overflow-wrap:anywhere;}
html:not(.editing) .nice-header-row>.nice-header-text p{margin:0;}
html:not(.editing) .nice-header-row>.nice-header-text [style*="text-align"]{text-align:right!important;}
html:not(.editing) .nice-always-fixed-top .nice-header-text,
html:not(.editing) .nice-always-fixed-bottom .nice-header-text{display:none;}
@media(max-width:767px){html:not(.editing) .nice-header-row>.nice-header-text{display:none;}html:not(.editing) .nice-header-row.nice-has-header-text>.top-nav,html:not(.editing) .nice-header-row.nice-has-header-text>.primary-nav,html:not(.editing) .nice-header-row.nice-has-header-text>.nice-fixed-placeholder{grid-row:1;}}

/* Roomier desktop brand; compact navigation and mobile keep their own sizing. */
@media(min-width:768px){
 html:not(.editing) .c5wrapper .nice-header-row{column-gap:24px;padding-top:20px;padding-bottom:20px;}
 html:not(.editing) .nice-header-row>.top-nav{max-width:clamp(200px,26vw,320px);padding-top:0;padding-bottom:0;}
 html:not(.editing) .nice-header-row .top-nav-left img{max-width:clamp(200px,26vw,320px);max-height:110px;}
 html:not(.editing) .nice-header-row>.nice-header-text{align-self:end;line-height:1.5;}
 html:not(.editing) .nice-header-row>.primary-nav:not(.nice-horizontal-fixed)>.container>.row{margin-left:0;margin-right:0;}
 html:not(.editing) .nice-header-row>.primary-nav:not(.nice-horizontal-fixed)>.container>.row>.col-sm-12{padding-left:0;padding-right:0;}
 html:not(.editing) .nice-header-row>.primary-nav:not(.nice-horizontal-fixed) .navbar-collapse{padding-left:0;padding-right:0;}
}
@media(min-width:768px){
 html:not(.editing) .c5wrapper:not(.nice-always-fixed-top):not(.nice-always-fixed-bottom)>.site-header .nice-header-row{padding-top:var(--nice-header-space-top,8px);padding-bottom:var(--nice-header-space-bottom,8px);}
 html:not(.editing) .c5wrapper .nice-header-row.nice-has-header-text{row-gap:var(--nice-header-row-gap,4px);}
 html:not(.editing) .nice-header-row>.top-nav{max-width:min(32vw,var(--nice-header-logo-width,320px));}
 html:not(.editing) .nice-header-row .top-nav-left img{max-width:min(32vw,var(--nice-header-logo-width,320px));max-height:var(--nice-header-logo-height,90px);}
 html:not(.editing) .nice-header-row>.nice-header-text{padding-top:var(--nice-tagline-space-top,0px);padding-bottom:var(--nice-tagline-space-bottom,0px);}
}

@media(min-width:768px){
 html:not(.editing) .nice-header-row>.nice-header-right{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-self:start;min-width:0;gap:var(--nice-header-row-gap,4px);}
 html:not(.editing) .nice-header-row.nice-has-header-text>.top-nav{grid-row:1;align-self:start;min-height:0;line-height:normal;padding-top:var(--nice-logo-space-top,0px);padding-bottom:var(--nice-logo-space-bottom,0px);}
 html:not(.editing) .nice-header-row .top-nav-left p{line-height:0;margin:0!important;}
 html:not(.editing) .nice-header-row .top-nav-left img{width:min(32vw,var(--nice-header-logo-width,320px))!important;height:auto!important;max-width:100%;max-height:var(--nice-header-logo-height,90px);object-fit:contain;object-position:left top;}
 html:not(.editing) .nice-header-row .nice-header-right>.nice-header-text{width:auto;min-width:0;text-align:right;line-height:1.3;padding-top:var(--nice-tagline-space-top,0px);padding-bottom:var(--nice-tagline-space-bottom,0px);}
 html:not(.editing) .nice-header-row .nice-header-right>.nice-header-text p{margin:0!important;}
 html:not(.editing) .nice-header-row .nice-header-right>.nice-header-text [style*="text-align"]{text-align:right!important;}
 html:not(.editing) .nice-header-row .nice-header-right>.primary-nav>.container{width:100%;padding:0;}
 html:not(.editing) .nice-header-row .nice-header-right>.primary-nav:not(.nice-horizontal-fixed)>.container>.row{margin:0;}
 html:not(.editing) .nice-header-row .nice-header-right>.primary-nav:not(.nice-horizontal-fixed)>.container>.row>.col-sm-12{padding:0;}
 html:not(.editing) .nice-header-row .nice-header-right>.primary-nav:not(.nice-horizontal-fixed) .navbar-collapse{padding-left:0;padding-right:0;}
 html:not(.editing) .nice-header-row .nice-header-right>.primary-nav.nice-horizontal-fixed>.container{width:var(--nice-header-width,100%);margin-left:auto;margin-right:auto;padding-left:calc(15px + var(--nice-fixed-logo-space,0px));padding-right:15px;}
}
@media(max-width:767px){html:not(.editing) .nice-header-row>.nice-header-right{grid-column:2;grid-row:1;min-width:0;}html:not(.editing) .nice-header-row .nice-header-right>.nice-header-text{display:none;}}
/* Let a height-limited logo reserve only its actual displayed width. */
@media(min-width:768px){
 html:not(.editing) .nice-header-row>.top-nav{width:max-content;max-width:min(32vw,var(--nice-header-logo-width,320px));}
 html:not(.editing) .nice-header-row .top-nav-left img{width:auto!important;height:auto!important;max-width:min(32vw,var(--nice-header-logo-width,320px));max-height:var(--nice-header-logo-height,90px);}
}
