/* Kiwa Footer (design "1a"). Selectors start at #kiwa-footer so the POWER
   theme's heading, list and link styles don't leak in. */

/* The new footer replaces the theme footer wherever it renders. */
body:has(#kiwa-footer) footer.footer { display: none !important; }

#kiwa-footer {
  --kf-navy: #072643;
  --kf-mint: #80ffca;
  --kf-rule: rgba(255, 255, 255, .14);
  --kf-muted: rgba(255, 255, 255, .75);
  display: block;
  margin: 0;
  /* Content lines up with the 1200px page column (and the Kiwa header) on wide screens. */
  padding: 0 max(96px, calc((100% - 1200px) / 2));
  background: var(--kf-navy);
  color: #fff;
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}
#kiwa-footer *,
#kiwa-footer *::before,
#kiwa-footer *::after { box-sizing: border-box; }
#kiwa-footer p,
#kiwa-footer ul,
#kiwa-footer li { margin: 0; padding: 0; }
#kiwa-footer ul { list-style: none; }
#kiwa-footer li::before,
#kiwa-footer li::marker { content: none; }
#kiwa-footer a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
#kiwa-footer a:hover { color: var(--kf-mint); text-decoration: none; }
#kiwa-footer a:focus-visible {
  outline: 2px solid var(--kf-mint);
  outline-offset: 3px;
  border-radius: 2px;
}
#kiwa-footer img { max-width: none; }

/* Top row: logo + contact */
#kiwa-footer .kf-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--kf-rule);
}
#kiwa-footer .kf-logo { display: flex; align-items: center; }
#kiwa-footer .kf-logo img { display: block; width: auto; height: 44px; }
#kiwa-footer .kf-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  line-height: 1.5;
}
#kiwa-footer .kf-contact li { display: flex; flex-direction: column; gap: 2px; }
#kiwa-footer .kf-contact__label { color: var(--kf-mint); font-size: 12px; font-weight: 500; }
#kiwa-footer .kf-contact a { font-weight: 500; }

/* Middle: badge + link columns (the nav shares the outer 5-column grid) */
#kiwa-footer .kf-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0 64px;
}
#kiwa-footer .kf-brand { display: flex; flex-direction: column; gap: 28px; padding-right: 40px; }
/* Shrinks to its content, so a linked badge is clickable only on the badge and caption. */
#kiwa-footer .kf-badge { display: flex; align-self: flex-start; align-items: center; gap: 16px; }
#kiwa-footer .kf-badge img {
  display: block;
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
#kiwa-footer .kf-badge p { max-width: 160px; color: var(--kf-muted); font-size: 13px; line-height: 1.5; transition: color .15s ease; }
#kiwa-footer a.kf-badge:hover p { color: var(--kf-mint); }
#kiwa-footer .kf-nav {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
@supports (grid-template-columns: subgrid) {
  #kiwa-footer .kf-nav { grid-template-columns: subgrid; }
}
#kiwa-footer .kf-col ul { display: flex; flex-direction: column; gap: 14px; }
#kiwa-footer .kf-col a { font-size: 15px; line-height: 1.5; }
#kiwa-footer .kf-col__title {
  margin: 0 0 20px;
  padding: 0;
  color: var(--kf-mint);
  font-family: 'Azo Sans', 'Work Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}

/* Bottom row: copyright + LinkedIn + back to top */
#kiwa-footer .kf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--kf-rule);
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
}
#kiwa-footer .kf-bottom__right { display: flex; align-items: center; gap: 24px; }
#kiwa-footer .kf-li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 4px;
  color: #fff;
}
#kiwa-footer .kf-li:hover { border-color: var(--kf-mint); }
#kiwa-footer .kf-totop { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 500; }
#kiwa-footer .kf-totop:hover { color: var(--kf-mint); }

@media (max-width: 1100px) {
  #kiwa-footer { padding: 0 40px; }
  #kiwa-footer .kf-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  #kiwa-footer .kf-brand { grid-column: 1 / -1; padding-right: 0; }
  #kiwa-footer .kf-nav { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); gap: 40px; }
  #kiwa-footer .kf-badge p { max-width: 220px; }
}
@media (max-width: 640px) {
  #kiwa-footer { padding: 0 24px; }
  #kiwa-footer .kf-contact { gap: 24px; }
  #kiwa-footer .kf-grid { grid-template-columns: 1fr; padding: 40px 0 48px; }
  /* Two link columns on phones keep the footer from running ~1,500px tall. */
  #kiwa-footer .kf-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
}
