/* Infectioase.ro: header & primary navigation v0.6
   Scoped exclusively to .mainhead to avoid changing content pages or CMS. */
.mainhead {
  position: relative;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e6edf3;
  box-shadow: 0 5px 22px rgba(20, 49, 72, .055);
}
.mainhead .headinner {
  width: min(1480px, calc(100% - 56px));
  min-height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 34px);
}
.mainhead .brand {
  min-width: 0;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  line-height: 1.25;
}
.mainhead .brand img {width: 74px;height: 74px;object-fit: contain; flex: 0 0 auto;}
.mainhead .brand > div {min-width: 0;}
.mainhead .brand-kicker {font-size: 10px;letter-spacing: .75px;font-weight: 780;color: #17415e;}
.mainhead .brand strong {font-size: clamp(18px, 1.5vw, 24px);letter-spacing: -.35px;white-space: nowrap;color: #123a56;}
.mainhead .brand-city {margin-top: 2px;letter-spacing: 3px;font-size: 11px;}
.mainhead .mainnav {width: auto;min-width: 0; flex: 0 1 auto;display:block;}
.mainhead .nav-list {display:flex;align-items:center;justify-content:flex-end;gap: 1px;list-style:none;padding:0;margin:0;}
.mainhead .mainnav li {position:relative;list-style:none;min-width:0;margin:0;padding:0;}
.mainhead .nav-entry {display:flex;align-items:center;border-radius:8px;}
.mainhead .nav-link {
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  border:0;
  border-radius:8px;
  box-shadow:none;
  color:#24465e;
  font:650 13px/1.35 'Segoe UI',Arial,sans-serif;
  text-align:left;
  letter-spacing:0;
  text-decoration:none;
  cursor:pointer;
  padding:12px 9px;
  display:flex;
  align-items:center;
  gap:5px;
  width:auto;
  margin:0;
  white-space:nowrap;
  transition:background .16s,color .16s;
}
.mainhead .nav-parent {padding-right:11px;}
.mainhead .sub-toggle {
  appearance:none;
  -webkit-appearance:none;
  border:0;
  border-radius:7px;
  background:transparent;
  margin:0 2px 0 -7px;
  padding: 11px 7px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#496779;
  cursor:pointer;
}
.mainhead .nav-chevron {display:block;flex:0 0 14px;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s;}
.mainhead .nav-entry:hover, .mainhead .nav-entry:focus-within,
.mainhead .nav-list > li > .nav-link:hover,
.mainhead .nav-list > li > .nav-link:focus-visible {background:#eaf4f8;color:#126b8e;}
.mainhead .nav-entry:hover .nav-link,
.mainhead .nav-entry:hover .sub-toggle {color:#126b8e;}
.mainhead .is-current > .nav-entry, .mainhead .nav-list > .is-current > .nav-link {
  background:#edf5f9;color:#155c7e;
}
.mainhead .nav-link:focus-visible, .mainhead .sub-toggle:focus-visible,
.mainhead .nav-toggle:focus-visible {outline:3px solid #4fa2ba;outline-offset:2px;}
.mainhead .submenu {
  display:none;
  position:absolute;
  top:100%;
  left:0;
  width:max-content;
  min-width:240px;
  max-width:min(340px, 90vw);
  max-height:min(68vh, 570px);
  overflow-y:auto;
  overflow-x:visible;
  padding:8px;
  margin:0;
  list-style:none;
  border:1px solid #dce8ef;
  border-radius:12px;
  box-shadow:0 14px 38px rgba(17,54,78,.17);
  background:#fff;
}
.mainhead .submenu .nav-link {
  width:100%;
  font-size:13px;
  font-weight:560;
  padding:10px 12px;
  white-space:normal;
  line-height:1.45;
}
.mainhead .submenu .nav-entry {width:100%;}
.mainhead .submenu .nav-entry > .nav-link {flex:1;}
.mainhead .submenu .sub-toggle {margin:0 2px 0 0;}
.mainhead .submenu > li {width:100%;}
.mainhead .submenu > li + li {margin-top:2px;}
.mainhead .submenu .submenu {top:0;left:calc(100% + 4px);}
/* Keep the last dropdowns within the browser viewport. */
.mainhead .nav-list > li:nth-last-child(-n+3) > .submenu {left:auto;right:0;}
.mainhead .nav-list > li:nth-last-child(-n+3) > .submenu .submenu {left:auto;right:calc(100% + 4px);}
@media (min-width: 981px) {
  .mainhead .has-submenu:hover > .submenu,
  .mainhead .has-submenu:focus-within > .submenu,
  .mainhead .has-submenu.expanded > .submenu {display:block;}
  .mainhead .has-submenu.expanded > .nav-entry .nav-chevron {transform:rotate(180deg);}
  .mainhead .nav-toggle {display:none;}
}
/* Laptops: give long Romanian menu entries a dedicated, uncluttered row. */
@media (min-width: 981px) and (max-width: 1550px) {
  .mainhead .headinner {display:grid;grid-template-columns:1fr;gap:0;padding-bottom:0;}
  .mainhead .brand {padding:12px 0 10px;}
  .mainhead .mainnav {width:100%;border-top:1px solid #edf1f5;}
  .mainhead .nav-list {justify-content:space-between;}
  .mainhead .nav-list > li > .nav-link,
  .mainhead .nav-list > li > .nav-entry > .nav-link {padding-top:13px;padding-bottom:13px;}
}
@media (max-width: 980px) {
  .mainhead .headinner {width:min(100% - 32px, 900px);display:flex;flex-wrap:wrap;min-height:84px;gap:0;}
  .mainhead .brand {flex:1 1 auto;padding:11px 0;gap:11px;}
  .mainhead .brand img {height:60px;width:60px;}
  .mainhead .brand-kicker {font-size:9px;}
  .mainhead .brand strong {font-size:19px;white-space:normal;}
  .mainhead .brand-city {font-size:10px;}
  .mainhead .nav-toggle {
    display:inline-flex;align-items:center;gap:8px;
    margin-left:12px;padding:9px 13px;
    background:#e9f4f8;border:1px solid #d2e3ec;border-radius:9px;
    font:700 14px/1.3 'Segoe UI',Arial,sans-serif;color:#174968;
    cursor:pointer;
  }
  .mainhead .nav-toggle span {font-size:20px;line-height:1;}
  .mainhead .mainnav {display:none;flex:1 0 100%;width:100%;border-top:1px solid #e4edf3;}
  .mainhead .mainnav.open {display:block;}
  .mainhead .nav-list {display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:12px 0 17px;}
  .mainhead .nav-list > li {width:100%;}
  .mainhead .nav-link {width:100%;font-size:14px;white-space:normal;min-height:43px;padding:10px 12px;}
  .mainhead .nav-parent {justify-content:space-between;}
  .mainhead .nav-entry > .nav-link {flex:1;}
  .mainhead .sub-toggle {min-width:44px;min-height:44px;margin:0;padding:10px;}
  .mainhead .submenu {position:static;display:none;box-shadow:none;border:0;border-left:2px solid #cce0eb;border-radius:0;background:#f7fafc;width:100%;min-width:0;max-width:100%;max-height:none;margin:3px 0 6px 12px;padding:4px 8px;overflow:visible;}
  .mainhead .has-submenu > .submenu,
  .mainhead .has-submenu:hover > .submenu,
  .mainhead .has-submenu:focus-within > .submenu {display:none;}
  .mainhead .has-submenu.expanded > .submenu {display:block;}
  .mainhead .has-submenu.expanded > .nav-entry .nav-chevron {transform:rotate(180deg);}
  .mainhead .submenu .submenu {position:static;}
  .mainhead .submenu .nav-link {font-size:13px;}
}
@media (max-width: 520px) {
  .mainhead .headinner {width:calc(100% - 24px);}
  .mainhead .brand {gap:8px;}
  .mainhead .brand img {width:49px;height:49px;}
  .mainhead .brand-kicker {font-size:8px;letter-spacing:.3px;}
  .mainhead .brand strong {font-size:16px;}
  .mainhead .brand-city {letter-spacing:1.4px;font-size:9px;}
  .mainhead .nav-toggle {padding:8px 9px;font-size:13px;}
}
@media (prefers-reduced-motion: reduce) {
  .mainhead .nav-link, .mainhead .nav-chevron {transition:none;}
}
/* Existing skip link becomes visible when focused from keyboard. */
.skip-link {position:absolute;left:12px;top:-100px;z-index:9999;padding:10px 16px;background:#fff;color:#13405b;border:2px solid #135779;border-radius:7px;}
.skip-link:focus {top:12px;}
