.tdd-footer,
.tdd-footer * {
  box-sizing: border-box;
}

.tdd-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  color: var(--tdd-footer-text, #fff);
  background:
    radial-gradient(
      ellipse at 78% 16%,
      rgba(127, 194, 255, 0.2),
      transparent 40%
    ),
    radial-gradient(ellipse at 6% 88%, rgba(3, 26, 71, 0.32), transparent 38%),
    linear-gradient(
      105deg,
      rgba(5, 45, 99, 0.94),
      rgba(7, 59, 134, 0.86) 52%,
      rgba(31, 86, 177, 0.9)
    ),
    var(--tdd-footer-bg, #063b8f);
  font-family: inherit;
}

.tdd-footer::before,
.tdd-footer::after {
  content: "";
  position: absolute;
  width: clamp(280px, 42vw, 620px);
  aspect-ratio: 960 / 680;
  z-index: 0;
  pointer-events: none;
  background: url("../images/footer-education.svg") no-repeat center / contain;
  opacity: 0.12;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 65%);
  mask-image: linear-gradient(to right, transparent, #000 65%);
}

.tdd-footer::before {
  left: -70px;
  bottom: -35px;
  transform: scaleX(-1);
}

.tdd-footer::after {
  right: -70px;
  top: 10px;
}

.tdd-footer a {
  color: inherit;
  text-decoration: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.tdd-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1;
}

.tdd-footer__inner {
  position: relative;
  z-index: 1;
  width: calc(100% - 80px);
  max-width: 1250px;
  margin: 0 auto;
}

/* Hàng trên: logo + hotline + email + địa chỉ */
.tdd-footer__top {
  display: grid;
  grid-template-columns: 1.15fr 0.65fr 1.2fr 1.05fr;
  align-items: center;
  column-gap: 25px;
  padding: 55px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tdd-footer__brand {
  margin: 0;
}

.tdd-footer__logo {
  display: inline-block;
  max-width: 260px;
}

.tdd-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 86px;
  object-fit: contain;
  object-position: left center;
}

.tdd-footer__info {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.tdd-footer__info > span {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
}

.tdd-footer__phone {
  display: block;
}
.tdd-footer__phone + .tdd-footer__phone {
  margin-top: 4px;
}

/* Four link columns, followed by a separate social/embed row. */
.tdd-footer__main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 60px);
  padding: 28px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tdd-footer__extras {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 60px);
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tdd-footer__column h3 {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0 0 22px;
  padding-bottom: 13px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
}

.tdd-footer__extras > .tdd-footer__column {
  min-width: 0;
}

.tdd-footer__app-column {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #3f6cb2;
}

.tdd-footer__app {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.tdd-footer__app-label {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.5;
}

.tdd-footer__app-qr {
  width: 88px;
  flex: 0 0 88px;
}

.tdd-footer__app-qr-image {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.tdd-footer__app-qr-zoom {
  display: block;
  width: fit-content;
  border-radius: 8px;
  cursor: zoom-in;
}

.tdd-footer__app-qr-zoom:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.tdd-footer-qr-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tdd-footer-qr-dialog.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tdd-footer-qr-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 240ms ease;
}

.tdd-footer-qr-dialog.is-visible::backdrop {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tdd-footer-qr-dialog,
  .tdd-footer-qr-dialog::backdrop {
    transition: none;
  }
  .tdd-footer-qr-dialog {
    transform: none;
  }
}

.tdd-footer-qr-dialog .tdd-footer-qr-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 0;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: #17365d;
  font-size: 28px;
  line-height: 1;
  letter-spacing: normal;
  cursor: pointer;
}

.tdd-footer-qr-dialog__close:focus-visible {
  outline: 2px solid #063b8f;
  outline-offset: 2px;
}

.tdd-footer-qr-dialog__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  margin: 0;
  object-fit: contain;
}

.tdd-footer__app-downloads {
  flex: 1 1 140px;
  min-width: 0;
}

.tdd-footer__app-downloads .tdd-footer__app-label {
  overflow-wrap: anywhere;
}

.tdd-footer__app-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tdd-footer__app-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 38px;
  padding: 3px 6px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.tdd-footer__app-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tdd-footer__column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 49px;
  height: 3px;
  border-radius: 3px;
  background: #fba00a;
  transform: skewX(-28deg);
}

.tdd-footer__column h3::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 56px;
  width: 6px;
  height: 6px;
  background: #fba00a;
  transform: rotate(45deg);
}

.tdd-footer__column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tdd-footer__column li {
  margin-bottom: 13px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.tdd-footer__column li:last-child {
  margin-bottom: 0;
}

.tdd-footer__column li a {
  color: inherit;
}

.tdd-footer__column li a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1;
}

/* Social */
.tdd-footer__socials {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.tdd-footer__socials > a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: rgba(255, 255, 255, 0.65);
}

.tdd-footer__socials > a:hover {
  opacity: 1;
  transform: translateX(3px);
  color: #fff;
}

.tdd-footer__social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.tdd-footer__social-icon img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  padding-top: 0px;
  margin-top: 5px;
}

.tdd-footer__social-icon > span {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.tdd-footer__social-label {
  font-size: 15px;
}

.tdd-footer__embed {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.tdd-footer__embed--fanpage {
  max-width: 500px;
  height: 130px;
  background: transparent;
}
/* Bottom */
.tdd-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  min-height: 78px;
}

.tdd-footer__copyright {
  font-size: 12px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.tdd-footer__bottom-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .tdd-footer__inner {
    width: calc(100% - 48px);
  }

  .tdd-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 30px 50px;
  }

  .tdd-footer__main,
  .tdd-footer__extras {
    grid-template-columns: 1fr 1fr;
    gap: 40px 60px;
  }
  .tdd-footer__extras .tdd-footer__social-column {
    grid-column: 1 / -1;
  }
  .tdd-footer__extras {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .tdd-footer::before,
  .tdd-footer::after {
    width: 320px;
    opacity: 0.08;
  }
  .tdd-footer__inner {
    width: calc(100% - 36px);
  }

  .tdd-footer__top {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 36px 0 28px;
  }

  .tdd-footer__logo {
    max-width: 220px;
  }

  .tdd-footer__main,
  .tdd-footer__extras {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 28px 0;
  }
  .tdd-footer__extras .tdd-footer__social-column {
    grid-column: auto;
  }

  .tdd-footer__bottom {
    align-items: center;
    flex-direction: column;
    min-height: auto;
    padding: 22px 0;
    gap: 12px;
  }

  .tdd-footer__bottom-links {
    gap: 20px;
  }
}
