/* Shared identity, always-visible desktop navigation, and language tools. */
header .wrap.nav .brand{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;flex-shrink:0}
header .wrap.nav .brand img{display:block;margin-left:auto;margin-right:auto;object-fit:contain}
header .wrap.nav .brand-tagline{display:block;width:100%;text-align:center;margin-left:auto;margin-right:auto;white-space:normal}
.hcc-contact-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:18px;position:relative}
.hcc-contact-bar .hcc-us-flag{display:block;width:76px;height:40px;object-fit:contain;opacity:.5;justify-self:start;margin-left:44px}
.hcc-contact-bar .phone-call-group{grid-column:2;white-space:nowrap}
.hcc-language{display:flex;flex-direction:column;align-items:flex-start;gap:3px;font:600 .875rem/1.3 Arial,sans-serif;color:#19334e;justify-self:end;margin-right:20px;text-align:left;white-space:nowrap}
.hcc-language select{font:400 1rem/1.3 Arial,sans-serif;background:#fff;color:#19334e;border:1px solid #729b96;border-radius:4px;min-height:40px;min-width:130px;padding:7px 32px 7px 10px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2319716b' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:10px 7px;background-position:right 10px center}
.hcc-language select:focus-visible{outline:3px solid #bc8638;outline-offset:3px}
.hcc-language-only{padding:14px 5%;display:flex;justify-content:flex-end;background:#eef5f2}
/* Keep brand, navigation and portals aligned on one desktop row. */
@media(min-width:1100px){
 header .wrap.nav{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;width:96%;max-width:1560px;gap:16px;padding:8px 0}
 header .wrap.nav .brand{flex:0 0 240px;max-width:240px;margin:0;padding:4px 0;gap:4px}
 header .wrap.nav .brand img{width:230px;height:199px}
 header .wrap.nav .brand-tagline{font-size:16px;line-height:1.4;max-width:none;white-space:normal;padding:0}
 header .wrap.nav .portal-buttons{flex:0 0 auto;margin:0;gap:8px}
 header .wrap.nav .portal-button{font-size:12px;padding:7px 10px;min-height:36px}
 header .wrap.nav #nav,header .wrap.nav #nav.open{display:flex;position:static;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:clamp(8px,.8vw,16px);flex:1 1 auto;width:auto;min-width:0;max-height:none;overflow:visible;margin:0;padding:0;border:0;background:transparent}
 header .wrap.nav #nav a{display:block;white-space:nowrap;padding:10px 0;min-height:44px;font-size:17px;line-height:1.4;flex:0 0 auto}
 header .wrap.nav .menu{display:none}
}
@media(min-width:1100px) and (max-width:1399px){html[lang="es"] header .wrap.nav #nav{gap:6px}html[lang="es"] header .wrap.nav #nav a{font-size:16px}html[lang="es"] header .wrap.nav .portal-button{font-size:11px;padding:7px 8px}}
@media(min-width:1400px){header .wrap.nav .brand{flex-basis:270px;max-width:270px}header .wrap.nav .brand img{width:260px;height:225px}header .wrap.nav .brand-tagline{font-size:17px}header .wrap.nav #nav a{font-size:19px}header .wrap.nav .portal-button{font-size:13px}}
@media(max-width:1099px){
 header .wrap.nav{display:flex;flex-wrap:nowrap;align-items:center;position:relative}
 header .wrap.nav .brand{flex:0 1 auto;max-width:60%;min-width:0}
 header .wrap.nav .brand-tagline{font-size:.875rem;line-height:1.3}
 header .wrap.nav .portal-buttons{margin-left:auto}
 header .wrap.nav .menu{display:block;margin-left:0}
 header .wrap.nav #nav{display:none;position:absolute;top:100%;left:0;width:100%;padding:18px 5%;margin:0;background:#fff;border-bottom:1px solid #ccd;max-height:65vh;overflow:auto;z-index:10}
 header .wrap.nav #nav.open{display:flex;flex-direction:column;align-items:stretch;gap:6px}
 header .wrap.nav #nav a{font-size:18px;min-height:44px;padding:10px;white-space:normal;overflow-wrap:anywhere}
 html[lang="es"] header .wrap.nav .portal-button{white-space:normal;text-align:center}
}
@media(max-width:760px){
 .hcc-contact-bar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 12px;padding:8px 12px}
 .hcc-contact-bar .phone-call-group{order:0;width:100%;margin:0;justify-content:center;gap:6px}
 .hcc-contact-bar .hcc-us-flag{order:1;width:57px;height:30px;margin:0}
 .hcc-contact-bar .hcc-language{order:2;margin:0;font-size:.8125rem;flex-direction:row;align-items:center;gap:8px}
 .hcc-language select{min-width:115px;font-size:.9375rem;min-height:40px}
}
@media(max-width:380px){.hcc-contact-bar .hcc-language{gap:5px}.hcc-contact-bar .hcc-language span{font-size:.75rem}.hcc-contact-bar .hcc-us-flag{width:48px;height:25px}.hcc-contact-bar .phone-call-group a{font-size:clamp(12px,3.8vw,16px)}}
html[lang="es"] #caregiver-standards .caregiver-badge h3{white-space:normal}
@media print{.hcc-language,.hcc-language-only{display:none!important}}

/* Match the language control to the portal button dimensions and right edge. */
@media(min-width:1100px){
 .hcc-contact-bar .hcc-language{margin-right:max(0px,calc(2vw - 12px));align-items:stretch;width:144px}
 .hcc-contact-bar .hcc-language span{font-size:12px}
 .hcc-contact-bar .hcc-language select{width:144px;min-width:0;height:36px;min-height:36px;border-color:#14594f;border-radius:4px;color:#14594f;font-size:13px;font-weight:600;padding:6px 30px 6px 11px}
 header .wrap.nav .portal-button{width:144px;min-height:36px}
}
@media(min-width:1100px) and (max-width:1199px){
 header .wrap.nav{gap:12px}
 header .wrap.nav .brand{flex-basis:230px;max-width:230px}
 header .wrap.nav .brand img{width:220px;height:190px}
 header .wrap.nav #nav{gap:8px}
 header .wrap.nav #nav a{font-size:16px}
 html[lang="es"] header .wrap.nav #nav{gap:5px}
 html[lang="es"] header .wrap.nav #nav a{font-size:15px}
}

@media(min-width:1100px) and (max-width:1299px){html[lang="es"] header .wrap.nav #nav a{white-space:normal;text-align:center;flex:0 1 auto}}

@media(min-width:761px){.hcc-contact-bar .hcc-language{grid-column:3}}


@media (max-width: 600px) {
  header .nav nav#nav.open {
    gap: 0;
    padding-block: 4px;
    max-height: 70vh;
  }

  header .nav nav#nav.open > a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    white-space: normal;
  }
}


@media (max-width: 600px) {
  footer #directory.footnav,
  footer .footnav.footer-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    column-gap: 18px;
    row-gap: 0;
    max-width: 360px;
    text-align: left;
  }

  footer #directory.footnav {
    padding-bottom: 0;
  }

  footer .footnav.footer-secondary {
    padding-top: 0;
  }

  footer #directory.footnav > a,
  footer .footnav.footer-secondary > a {
    padding-inline: 4px;
  }
}

/* Allow room for Payments while keeping the restored desktop navigation. */
@media(min-width:1100px) and (max-width:1399px){header .wrap.nav #nav{gap:8px}header .wrap.nav #nav a{font-size:16px}}
