/* Shared MEBA footer. The khf- prefix isolates it from legacy page styles. */

.khf-footer {
  --khf-bg: #ffffff;
  --khf-heading: #191919;
  --khf-text: #333333;
  --khf-text-dim: #7c7c7c;
  --khf-accent: #134732;
  --khf-border: #e9ebf3;

  display: block !important;
  width: 100% !important;
  background-color: var(--khf-bg);
  color: var(--khf-text);
  padding: clamp(72px, 5.7vw, 120px) 5.2vw 40px;
  border-top: 1px solid var(--khf-border);
  font-family: "Noto Sans", Arial, sans-serif;
}
.khf-footer * { box-sizing: border-box; }
#site-header { display: block; width: 100%; align-self: stretch; }
#site-footer { display: block; width: 100%; }

@media screen and (min-width: 992px) and (max-width: 1100px) {
  #site-header .navigation-container-3 { padding-right: 2%; padding-left: 2%; }
  #site-header .navigation-link-3 { padding-right: 8px; padding-left: 8px; font-size: 14px; }
  #site-header .dropdown-2 { font-size: 14px; }
  #site-header .dropdown-toggle-3 { padding-right: 18px; padding-left: 8px; }
  #site-header .div-block-86-en { width: auto; }
  #site-header .lang { margin-left: 4px; }
}

@media screen and (min-width: 992px) {
  #site-header .navigation-dropdown-3.w--open {
    background-color: #134732;
  }
}

/* Shared mobile header controls. */
.mobile-header-languages { display: none; }

@media screen and (max-width: 991px) {
  #site-header .navigation-container-mob-2 {
    justify-content: flex-start;
  }

  #site-header .navigation-container-mob-2 > .w-nav-brand {
    margin-right: auto;
  }

  #site-header .mobile-header-languages {
    display: flex;
    align-items: center;
    margin-left: 8px;
  }

  #site-header .mobile-header-lang {
    min-width: 30px;
    padding: 20px 5px;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    line-height: 20px;
    text-decoration: none;
  }

  html[lang="az"] #site-header .mobile-header-lang[data-lang="az"],
  html[lang="en"] #site-header .mobile-header-lang[data-lang="en"],
  html[lang="ru"] #site-header .mobile-header-lang[data-lang="ru"] {
    color: #99d715;
  }

  #site-header .menu-mob-3 {
    position: relative;
    margin-left: 4px;
    background-image: url('../images/ui/menu.svg');
  }

  #site-header .menu-mob-3.w--open {
    background-image: none;
  }

  #site-header .menu-mob-3.w--open::before,
  #site-header .menu-mob-3.w--open::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background-color: #191919;
  }

  #site-header .menu-mob-3.w--open::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  #site-header .menu-mob-3.w--open::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}

/* ---------------- Desktop layout ---------------- */

.khf-columns {
  display: grid;
  grid-template-columns:
    minmax(125px, .75fr)
    minmax(230px, 1.35fr)
    minmax(175px, 1fr)
    minmax(175px, 1fr)
    minmax(270px, 1.45fr);
  gap: clamp(18px, 2vw, 40px);
  align-items: start;
}

.khf-col-head {
  all: unset;
  display: flex;
  color: var(--khf-heading);
  font-family: "Noto Sans", Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  cursor: default;
}
.khf-chevron { display: none; }

.khf-col-links { display: block; }

.khf-col a.khf-link {
  display: block;
  color: var(--khf-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 12px;
  transition: color .15s ease;
}
.khf-col a.khf-link:hover { color: var(--khf-accent); text-decoration: underline; }

.khf-col-desc {
  max-width: 24ch;
  margin: 0 0 26px;
  color: var(--khf-text-dim);
  font-size: 16px;
  line-height: 1.55;
}

.khf-text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--khf-accent);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.khf-text-link:hover { text-decoration: underline; }
.khf-text-link:hover .khf-arrow { transform: translateX(4px); }

/* Contact panel */
.khf-contact-box {
  min-width: 0;
  padding-left: clamp(28px, 2.4vw, 50px);
  border-left: 1px solid var(--khf-border);
}
.khf-contact-title {
  max-width: 14ch;
  color: var(--khf-heading);
  font-family: "Noto Sans", Arial, sans-serif;
  font-size: clamp(30px, 2.15vw, 42px);
  font-weight: 700;
  line-height: .98;
  margin-bottom: 24px;
}
.khf-contact-desc {
  max-width: 29ch;
  font-size: 16px;
  color: var(--khf-text-dim);
  line-height: 1.55;
  margin-bottom: 28px;
}
.khf-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 182px;
  gap: 24px;
  padding: 15px 26px;
  border: 1px solid var(--khf-accent);
  border-radius: 30px;
  color: var(--khf-accent);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: background-color .15s ease, color .15s ease;
}
.khf-contact-btn:hover { background-color: var(--khf-accent); color: #fff; }
.khf-arrow { transition: transform .15s ease; }
.khf-contact-btn:hover .khf-arrow { transform: translateX(4px); }

/* ---------------- Bottom bar ---------------- */

.khf-divider {
  height: 1px;
  background: var(--khf-border);
  margin: 60px 0 24px;
}

.khf-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.khf-copy { font-size: 12px; color: var(--khf-text-dim); }

.khf-bottom-right { display: flex; align-items: center; gap: 14px; }

.khf-social { display: flex; align-items: center; gap: 10px; }
.khf-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--khf-border);
  color: var(--khf-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease, color .15s ease;
}
.khf-social a:hover { background: var(--khf-accent); color: #fff; }

.khf-top-link {
  padding: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--khf-heading);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color .15s ease;
}
.khf-top-link:hover { background: var(--khf-accent); }

/* ---------------- Tablet ---------------- */
@media screen and (max-width: 1100px) {
  .khf-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 42px;
  }
  .khf-contact-box {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--khf-border);
    padding-left: 0;
    padding-top: 36px;
  }
  .khf-contact-title,
  .khf-contact-desc { max-width: 620px; }
}

/* ---------------- Mobile accordion ---------------- */
@media screen and (max-width: 767px) {
  .khf-footer { padding: 48px 6vw 28px; }

  .khf-columns { display: block; }

  .khf-col {
    border-bottom: 1px solid var(--khf-border);
  }
  .khf-col:first-child { border-top: 1px solid var(--khf-border); }

  .khf-col-head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 18px 2px;
    margin-bottom: 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
  }

  .khf-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--khf-heading);
    border-bottom: 2px solid var(--khf-heading);
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin-left: 12px;
    flex-shrink: 0;
  }
  .khf-col.khf-open .khf-chevron { transform: rotate(225deg); border-color: var(--khf-accent); }
  .khf-col.khf-open .khf-col-head > span:first-child { color: var(--khf-accent); }

  .khf-col-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .khf-col.khf-open .khf-col-links { max-height: 600px; }

  .khf-col a.khf-link { padding: 3px 2px 14px 2px; margin-bottom: 0; }

  .khf-col--feature { padding: 24px 2px 26px; }
  .khf-col--feature .khf-col-head {
    width: auto;
    padding: 0;
    margin-bottom: 14px;
  }
  .khf-col-desc {
    max-width: 34ch;
    margin-bottom: 16px;
    font-size: 15px;
  }
  .khf-text-link { font-size: 15px; }

  .khf-contact-box {
    grid-column: unset;
    border-left: none;
    border-top: none;
    padding: 32px 0 8px;
    text-align: center;
  }
  .khf-contact-title { max-width: none; font-size: 28px; line-height: 1.1; }
  .khf-contact-desc { max-width: 38ch; margin-right: auto; margin-left: auto; font-size: 15px; }
  .khf-contact-btn { display: inline-flex; }

  .khf-divider { margin: 28px 0 20px; }

  .khf-bottom { flex-direction: column-reverse; gap: 20px; }
  .khf-bottom-right { flex-direction: row-reverse; width: 100%; justify-content: center; gap: 16px; }
  .khf-copy { text-align: center; }
}
