/* MEDLAK targeted compatibility, navigation, accessibility and error-page refinements. */
.navbar > .container,
.navbar > .container-fluid {
  column-gap: 18px;
}

.navbar .navbar-brand {
  flex: 0 0 auto;
  margin-right: 18px;
}

.navbar .navbar-collapse {
  min-width: 0;
}

.navbar-actions {
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .header:not(.medlak-nav-compact) .navbar-nav {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}

.medlak-language-item {
  display: flex;
  align-items: center;
  padding: 0 8px;
  margin-right: 0 !important;
}

.medlak-language-select {
  min-width: 132px;
  min-height: 40px;
  padding: 7px 30px 7px 11px;
  border: 1px solid rgba(27, 26, 26, 0.2);
  border-radius: 999px;
  background-color: #fff;
  color: #1b1a1a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.medlak-language-select:hover {
  border-color: #27ae60;
}

.medlak-language-select:focus,
.medlak-language-select:focus-visible {
  outline: 3px solid rgba(39, 174, 96, .2);
  outline-offset: 2px;
  border-color: #27ae60;
}

.header-transparent:not(.medlak-nav-compact) .medlak-language-select {
  background: rgba(255,255,255,.96);
}

/* Switch to the mobile navigation presentation before any header collision occurs. */
.header.medlak-nav-compact .navbar .navbar-toggler {
  display: block !important;
  position: absolute;
  right: 15px;
  height: 13px;
}

.header.medlak-nav-compact .navbar .collapse.navbar-collapse {
  display: block !important;
  background-color: #fff;
  box-shadow: 0 3px 4px rgba(0,0,0,.07);
  z-index: 1050;
  padding: 15px 0;
  position: absolute;
  left: 0;
  width: 100%;
  max-width: 100%;
  top: 100%;
  overflow-x: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.header.medlak-nav-compact .navbar .menu-opened.navbar-collapse {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header.medlak-nav-compact .navbar .navbar-nav {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
}

.header.medlak-nav-compact .navbar .nav__item {
  margin-right: 0;
}

.header.medlak-nav-compact .navbar .nav__item .nav__item-link {
  color: #282828;
  line-height: 35px;
  padding: 0 20px;
}

.header.medlak-nav-compact .navbar .nav__item .nav__item-link:before {
  display: none;
}

.header.medlak-nav-compact .navbar .nav__item.with-dropdown > .dropdown-menu {
  display: none !important;
  position: static !important;
  float: none;
  min-width: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  box-shadow: none;
}

.header.medlak-nav-compact .navbar .nav__item.with-dropdown.medlak-submenu-open > .dropdown-menu {
  display: block !important;
}

.header.medlak-nav-compact .navbar .dropdown-menu .nav__item {
  padding: 0 15px 0 30px;
}

.header.medlak-nav-compact .navbar .dropdown-menu .nav__item .nav__item-link {
  padding-left: 0;
}

.header.medlak-nav-compact .navbar__actions-list {
  position: absolute;
  top: 50%;
  right: 58px;
  transform: translateY(-50%);
}

.header.medlak-nav-compact .navbar,
.header.medlak-nav-compact .navbar > .container,
.header.medlak-nav-compact .navbar > .container-fluid {
  height: 80px;
}

.header.medlak-nav-compact .navbar > .container,
.header.medlak-nav-compact .navbar > .container-fluid {
  width: 100%;
  max-width: none;
}

.header.medlak-nav-compact .navbar-brand {
  margin-left: 15px;
  margin-right: 0;
  line-height: 80px;
}

.header.medlak-nav-compact .navbar-brand img {
  height: 35px !important;
  max-height: 35px !important;
}

.header.medlak-nav-compact .fixed-navbar {
  position: static;
  animation: none;
}

.header.medlak-nav-compact .medlak-language-item {
  padding: 10px 20px 14px;
}

.header.medlak-nav-compact .medlak-language-select {
  width: 100%;
  min-height: 42px;
}

@media (max-width: 991px) {
  .medlak-language-item {
    padding: 10px 20px 14px;
  }

  .medlak-language-select {
    width: 100%;
    min-height: 42px;
  }

  .navbar .nav__item.with-dropdown > .dropdown-menu {
    display: none !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none;
  }

  .navbar .nav__item.with-dropdown.medlak-submenu-open > .dropdown-menu {
    display: block !important;
  }
}

@media (max-width: 575px) {
  .action__btn-contact {
    min-width: auto;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 12px;
  }
}

.medlak-error-page {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  background: #f8f9fa;
}

.medlak-error-code {
  margin-bottom: 8px;
  color: #27ae60;
  font-size: clamp(64px, 11vw, 130px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -3px;
}

.medlak-error-page .pagetitle__heading {
  margin-bottom: 18px;
}

.medlak-error-text {
  max-width: 680px;
  margin: 0 auto 28px;
  color: #666;
  font-size: 17px;
  line-height: 1.7;
}

/* Mobile/compact submenu control: the Products link remains navigable while
   the adjacent JS button opens and closes its submenu accessibly. */
.medlak-submenu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #282828;
  width: 44px;
  height: 35px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.medlak-submenu-toggle:focus,
.medlak-submenu-toggle:focus-visible {
  outline: 3px solid rgba(39, 174, 96, .24);
  outline-offset: -3px;
}

.medlak-submenu-toggle-icon {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}

.medlak-products-menu.medlak-submenu-open > .medlak-submenu-toggle .medlak-submenu-toggle-icon {
  transform: rotate(225deg) translate(-1px, -1px);
}

.header.medlak-nav-compact .medlak-products-menu {
  position: relative;
}

.header.medlak-nav-compact .medlak-submenu-toggle {
  display: flex;
  position: absolute;
  right: 10px;
  top: 0;
  z-index: 2;
}

.header.medlak-nav-compact .medlak-products-menu > .nav__item-link {
  padding-right: 58px !important;
}

.header.medlak-nav-compact .medlak-products-menu > .dropdown-toggle:after {
  display: none;
}

@media (max-width: 991px) {
  .medlak-products-menu {
    position: relative;
  }

  .medlak-submenu-toggle {
    display: flex;
    position: absolute;
    right: 10px;
    top: 0;
    z-index: 2;
  }

  .medlak-products-menu > .nav__item-link {
    padding-right: 58px !important;
  }

  .medlak-products-menu > .dropdown-toggle:after {
    display: none;
  }
}

/* First-visit cookie choice. Kept in MEDLAK's existing green/white visual
   language and responsive at the bottom of the viewport. */
.medlak-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 3000;
  width: min(1180px, calc(100% - 30px));
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(27, 26, 26, .12);
  border-top: 4px solid #27ae60;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.medlak-cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 20px;
}

.medlak-cookie-banner__content {
  flex: 1 1 auto;
  min-width: 0;
}

.medlak-cookie-banner__title {
  display: block;
  margin-bottom: 5px;
  color: #1b1a1a;
  font-size: 15px;
  line-height: 1.35;
}

.medlak-cookie-banner__text {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}

.medlak-cookie-banner__text a {
  color: #168f4a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.medlak-cookie-banner__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.medlak-cookie-btn {
  min-width: 118px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.medlak-cookie-btn--accept {
  border: 1px solid #27ae60;
  background: #27ae60;
  color: #fff;
}

.medlak-cookie-btn--accept:hover,
.medlak-cookie-btn--accept:focus {
  border-color: #1f9853;
  background: #1f9853;
  color: #fff;
}

.medlak-cookie-btn--reject {
  border: 1px solid #2c2c2c;
  background: #fff;
  color: #2c2c2c;
}

.medlak-cookie-btn--reject:hover,
.medlak-cookie-btn--reject:focus {
  background: #2c2c2c;
  color: #fff;
}

@media (max-width: 767px) {
  .medlak-cookie-banner {
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .medlak-cookie-banner__inner {
    display: block;
    padding: 16px;
  }

  .medlak-cookie-banner__actions {
    margin-top: 14px;
    width: 100%;
  }

  .medlak-cookie-btn {
    flex: 1 1 50%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .medlak-cookie-banner__actions {
    flex-direction: column;
  }

  .medlak-cookie-btn {
    width: 100%;
  }
}



/* MEDLAK V6.2 PRO — product submenu gallery wall */
.header.medlak-product-context {
  z-index: 12000;
}

.header.medlak-product-context .dropdown-menu,
.header.medlak-product-context .navbar-collapse {
  z-index: 12020;
}

.medlak-product-wall {
  padding: 10px;
  background: #f7f8f8;
}

.medlak-product-wall .container-fluid {
  padding-right: 0;
  padding-left: 0;
}

.medlak-product-wall__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.medlak-product-wall__item {
  min-width: 0;
}

.medlak-product-wall__item:only-child {
  grid-column: 1 / -1;
  width: min(760px, 100%);
  justify-self: center;
}

.medlak-product-wall .portfolio-item {
  height: 100%;
  margin: 0;
}

.medlak-product-wall .portfolio-item > a {
  position: relative;
  z-index: 1 !important;
  display: block;
  width: 100%;
  height: 100%;
}

.medlak-product-wall .portfolio__img {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #161616;
}

.medlak-product-wall .portfolio__img img {
  display: block;
  width: 100%;
  height: 100% !important;
  min-height: 260px;
  max-height: 430px;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.medlak-product-wall .portfolio__hover {
  opacity: 1;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  background: linear-gradient(180deg, rgba(12, 18, 16, .03) 30%, rgba(12, 18, 16, .30) 62%, rgba(7, 12, 10, .88) 100%);
  transition: background .35s ease;
  pointer-events: none;
}

.medlak-product-wall .portfolio__hover-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 20px;
  text-align: left;
  transform: none;
}

.medlak-product-wall .portfolio__info {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.medlak-product-wall .portfolio__title,
.medlak-product-wall .portfolio__title a,
.medlak-product-wall .portfolio__cat,
.medlak-product-wall .portfolio__cat a {
  color: #fff !important;
}

.medlak-product-wall .portfolio__title {
  margin: 0;
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .36);
}

.medlak-product-wall .zoom__icon {
  flex: 0 0 auto;
  pointer-events: auto;
  background: rgba(39, 174, 96, .92);
}

@media (hover: hover) and (pointer: fine) {
  .medlak-product-wall .portfolio-item:hover .portfolio__img img {
    transform: scale(1.035);
    filter: saturate(1.04) contrast(1.02);
  }

  .medlak-product-wall .portfolio-item:hover .portfolio__hover {
    background: linear-gradient(180deg, rgba(12, 18, 16, .08) 22%, rgba(12, 18, 16, .40) 58%, rgba(7, 12, 10, .94) 100%);
  }
}

@media (max-width: 991px) {
  .medlak-product-wall__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .medlak-product-wall .portfolio__img img {
    min-height: 230px;
    max-height: 390px;
  }
}

@media (max-width: 575px) {
  .medlak-product-wall {
    padding: 7px;
  }

  .medlak-product-wall__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .medlak-product-wall .portfolio__img img {
    min-height: 220px;
    max-height: 360px;
  }

  .medlak-product-wall .portfolio__hover-content {
    padding: 16px;
  }
}
