/* Footer public Khả Văn — gọn, đồng bộ theme xanh/vàng */
.kv-footer,
.hp-footer {
  /* Màu xanh footer theo brand swatch */
  --ft-bg: #05472d;
  --ft-bg-deep: #033822;
  --ft-line: rgba(255, 255, 255, 0.1);
  --ft-muted: rgba(255, 255, 255, 0.78);
  --ft-soft: rgba(255, 255, 255, 0.92);
  --ft-gold: var(--kv-yellow, #ffc617);
  background: var(--ft-bg);
  color: #fff;
  width: 100%;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.kv-footer::before,
.hp-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ft-gold);
  pointer-events: none;
}

/* —— Main grid —— */
.kv-footer__inner,
.hp-footer__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2rem) clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: clamp(1.5rem, 2.5vw, 2rem);
}

@media (min-width: 768px) {
  .kv-footer__inner,
  .hp-footer__inner {
    grid-template-columns: 1.15fr 1fr 1fr;
    column-gap: clamp(1.5rem, 3vw, 2.25rem);
  }

  .kv-footer__col--contact {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    padding-top: .25rem;
    border-top: 1px solid var(--ft-line);
  }

  .kv-footer__col--contact h3 {
    grid-column: 1 / -1;
    margin-bottom: .5rem !important;
  }

  .kv-footer__col--contact .kv-footer__contact {
    display: contents;
  }

  .kv-footer__col--contact .kv-footer__contact > li {
    margin: 0;
  }
}

@media (min-width: 1100px) {
  .kv-footer__inner,
  .hp-footer__inner {
    grid-template-columns: 1.25fr .9fr .9fr 1.15fr;
  }

  .kv-footer__col--contact {
    grid-column: auto;
    display: block;
    padding-top: 0;
    border-top: 0;
  }

  .kv-footer__col--contact h3 {
    grid-column: auto;
    margin-bottom: 1rem !important;
  }

  .kv-footer__col--contact .kv-footer__contact {
    display: grid;
    gap: .75rem !important;
  }
}

/* —— Brand mark — nền sáng để logo đỏ nổi trên footer xanh —— */
.kv-footer__brand-mark,
.hp-footer__brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: .55rem .85rem .55rem .7rem;
  border-radius: 14px;
  isolation: isolate;
  background:
    linear-gradient(135deg, #fffef8 0%, #fff4d4 42%, #ffe9a8 100%);
  border: 1.5px solid rgba(255, 198, 23, 0.55);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.kv-footer__brand-mark::before,
.hp-footer__brand-mark::before {
  content: "";
  position: absolute;
  inset: -2px -2px auto auto;
  width: 42%;
  height: 70%;
  border-radius: 0 12px 0 60%;
  background: radial-gradient(circle at 80% 20%, rgba(255, 198, 23, 0.45) 0%, rgba(255, 198, 23, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

.kv-footer__brand-mark::after,
.hp-footer__brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffc617 0%, #e8a800 55%, #c98900 100%);
  box-shadow: 0 0 10px rgba(255, 198, 23, 0.45);
  z-index: 1;
}

.kv-footer__brand-mark img,
.hp-footer__brand-mark img {
  position: relative;
  z-index: 2;
  height: auto;
  max-height: 44px;
  width: auto;
  max-width: min(220px, 100%);
  object-fit: contain;
  display: block;
}

.kv-footer__brand-name,
.hp-footer__brand-name {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #8b1a1a;
}

.kv-footer__tagline {
  margin: .75rem 0 0;
  font-size: .86rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ft-muted);
  max-width: 32ch;
}

.kv-footer__social-label {
  margin: 1.1rem 0 .5rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.kv-footer__social,
.hp-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.kv-footer__social a,
.hp-footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: .95rem;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.kv-footer__social a:hover,
.hp-footer__social a:hover {
  background: var(--ft-gold);
  color: #06492d;
  transform: translateY(-1px);
}

.kv-footer__social .soc-zalo {
  width: auto;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
}

/* —— Columns —— */
.kv-footer__col h3,
.hp-footer__col h3 {
  font-size: .72rem;
  font-weight: 800;
  margin: 0 0 .85rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kv-footer__col ul,
.hp-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .45rem;
}

.kv-footer__col li,
.hp-footer__col li {
  margin: 0;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ft-muted);
}

.kv-footer__col a,
.hp-footer__col a {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  color: var(--ft-soft);
  text-decoration: none;
  transition: color .15s ease;
}

.kv-footer__col a i {
  font-size: .95rem;
  opacity: .45;
}

.kv-footer__col a:hover,
.hp-footer__col a:hover {
  color: var(--ft-gold);
}

.kv-footer__col a:hover i {
  opacity: 1;
  color: var(--ft-gold);
}

.kv-footer__course {
  display: inline-flex;
  align-items: flex-start;
  gap: .35rem;
  color: var(--ft-muted);
  font-size: .86rem;
}

.kv-footer__course i {
  margin-top: .12rem;
  color: var(--ft-gold);
  opacity: .75;
  font-size: .85rem;
}

/* —— Contact rows —— */
.kv-footer__contact {
  gap: .7rem !important;
}

.kv-footer__contact-row {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  color: var(--ft-soft);
  text-decoration: none;
  line-height: 1.45;
  font-size: .86rem;
}

a.kv-footer__contact-row:hover {
  color: var(--ft-gold);
}

.kv-footer__contact-row b {
  display: block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: .15rem;
}

.kv-footer__contact-ic {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 198, 23, 0.1);
  color: var(--ft-gold);
  font-size: .9rem;
}

.kv-footer__addr-line { display: inline; }

/* —— Bottom bar —— */
.kv-footer__bottom,
.hp-footer__bottom {
  position: relative;
  z-index: 1;
  background: var(--ft-bg-deep);
  border-top: 1px solid var(--ft-line);
}

.kv-footer__bottom-inner,
.hp-footer__bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .95rem clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.kv-footer__bottom-inner > .kv-footer__copy:only-child,
.hp-footer__bottom-inner > .hp-footer__copy:only-child {
  width: 100%;
  text-align: center;
}

.kv-footer__copy,
.hp-footer__copy {
  padding: 0;
  text-align: left;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
}

.kv-footer__legal,
.hp-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.kv-footer__dmca,
.hp-footer__dmca {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 28px;
}

.kv-footer__dmca a,
.hp-footer__dmca a,
.kv-footer__dmca img,
.hp-footer__dmca img,
.kv-footer__dmca iframe,
.hp-footer__dmca iframe {
  max-width: 100%;
  max-height: 36px;
}

.kv-footer__cert,
.hp-footer__cert {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.kv-footer__cert:hover,
.hp-footer__cert:hover {
  background: rgba(255, 255, 255, 0.1);
}

.kv-footer__cert img,
.hp-footer__cert img {
  width: auto;
  max-width: 140px;
  max-height: 40px;
  object-fit: contain;
}

.kv-footer__cert i,
.hp-footer__cert i {
  color: var(--ft-gold);
  font-size: 16px;
}

@media (max-width: 767px) {
  body.kv-has-app-nav .kv-footer,
  body.kv-redesign .kv-footer,
  body.kv-public .kv-footer {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0));
  }

  .kv-footer__brand-mark,
  .hp-footer__brand-mark {
    padding: .5rem .75rem .5rem .62rem;
    border-radius: 12px;
  }

  .kv-footer__brand-mark img,
  .hp-footer__brand-mark img {
    max-height: 40px;
  }

  .kv-footer__col--contact {
    padding-top: .5rem;
    border-top: 1px solid var(--ft-line);
  }

  .kv-footer__bottom-inner,
  .hp-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .kv-footer__legal,
  .hp-footer__legal {
    justify-content: flex-start;
  }
}

body.kv-redesign .kv-footer {
  background: var(--ft-bg, #05472d) !important;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

body.kv-redesign .kv-footer,
body.kv-public .kv-footer,
.kv-footer {
  color: #fff;
}

body.kv-redesign .kv-footer__col h3,
body.kv-public .kv-footer__col h3,
.kv-footer .kv-footer__col h3 {
  color: rgba(255, 255, 255, 0.55) !important;
}

body.kv-redesign .kv-footer__brand-name {
  color: #8b1a1a !important;
}

body.kv-redesign .kv-footer__col a,
body.kv-redesign .kv-footer__col li,
body.kv-redesign .kv-footer__course,
body.kv-redesign .kv-footer__contact-row {
  color: rgba(255, 255, 255, 0.88) !important;
}
