/* ==========================================================================
   KIDO · Footer (giữ theo bản hiện tại)
   ========================================================================== */

/* Footer = biển: nước nông ở đường chân trời, sâu dần xuống đáy */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #a6cdf0 0px,
    #7fb2e2 30px,
    #4a88c7 66px,
    #27609c 100px,
    #17457a 134px,
    #0e2c52 172px,
    #0b2444 56%,
    #08182f 100%
  );
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-base);
  padding-top: clamp(104px, 10vw, 148px);
}

/* đường chân trời giữa trời và biển */
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.75) 22%,
    rgba(255, 255, 255, 0.75) 78%,
    rgba(255, 255, 255, 0.12) 100%
  );
  z-index: 2;
}

/* lớp hoạ tiết mặt nước */
.footer__sea-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* kéo nhẹ ánh nắng xuống mặt nước */
.footer__sun-glow {
  position: absolute;
  left: 2%;
  top: -40px;
  width: 34%;
  height: 210px;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 222, 162, 0.28), transparent 70%);
  filter: blur(6px);
}

.sea-boat {
  position: absolute;
  left: 1.5%;
  bottom: 30%;
  width: clamp(64px, 6vw, 92px);
  opacity: 0.2;
  animation: bob 9s var(--ease) infinite;
}

.sea-fish {
  position: absolute;
  width: clamp(30px, 3.2vw, 46px);
  opacity: 0.18;
}

.sea-fish--1 {
  right: 18%;
  top: 44px;
  animation: swim 14s var(--ease) infinite;
}

.sea-fish--2 {
  right: 11%;
  top: 74px;
  width: clamp(20px, 2.2vw, 32px);
  opacity: 0.13;
  animation: swim 18s var(--ease) infinite 1s;
}

.sea-star {
  position: absolute;
  right: 1.8%;
  bottom: 14%;
  width: clamp(28px, 2.6vw, 38px);
  opacity: 0.18;
  transform: rotate(-12deg);
}

.sea-bubble {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
}

.sea-bubble--1 {
  width: 11px;
  height: 11px;
  left: 44%;
  top: 44px;
}
.sea-bubble--2 {
  width: 7px;
  height: 7px;
  left: 47%;
  top: 74px;
}
.sea-bubble--3 {
  width: 9px;
  height: 9px;
  right: 32%;
  top: 108px;
}

.sea-bubble--b1 {
  width: 12px;
  height: 12px;
  left: 7%;
  bottom: 26%;
}
.sea-bubble--b2 {
  width: 7px;
  height: 7px;
  left: 9.5%;
  bottom: 38%;
}
.sea-bubble--b3 {
  width: 9px;
  height: 9px;
  right: 7%;
  bottom: 40%;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes swim {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

@media (max-width: 1080px) {
  .footer__life {
    display: none;
  }
}

@media (max-width: 860px) {
  .sea-fish--2,
  .sea-bubble--3 {
    display: none;
  }
}

.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1fr 1.25fr;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__logo {
  width: 72px;
  height: auto;
  margin-bottom: var(--sp-4);
}

.footer__legal {
  margin: 0 0 0.6em;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer__desc {
  max-width: 36ch;
  font-size: var(--fs-sm);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.66);
}

.footer__title {
  position: relative;
  margin: 0 0 1.1em;
  padding-bottom: 0.65em;
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--amber);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease), padding-left var(--dur-1) var(--ease);
}

.footer__links a:hover {
  padding-left: 5px;
  color: #fff;
}

.footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.footer__contact li {
  display: flex;
  gap: 0.65em;
  align-items: flex-start;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.footer__contact svg {
  flex: none;
  margin-top: 3px;
  color: var(--amber);
}

.footer__contact a {
  color: inherit;
  text-decoration: none;
}

.footer__contact a:hover {
  color: #fff;
}

.footer__social {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-5);
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transition: transform var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.footer__social a:hover {
  transform: translateY(-3px);
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy-900);
}

.footer__bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5) var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
}

.footer__copy {
  margin: 0;
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__legal-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-xs);
  text-decoration: none;
}

.footer__legal-links a:hover {
  color: #fff;
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr;
    row-gap: var(--sp-8);
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
    row-gap: var(--sp-7);
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
}

/* Link xem thêm cơ sở ở cột Liên hệ */
.footer__more-branches a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
}

.footer__more-branches a:hover {
  color: #fff;
  text-decoration: underline;
}

/* --- Hỗ trợ nhanh (float contact) ----------------------------------------- */
.float-contact {
  position: fixed;
  right: clamp(12px, 1.6vw, 22px);
  bottom: clamp(16px, 2.4vw, 26px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.float-contact__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 14px 26px -16px rgba(11, 36, 68, 0.8);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}

.float-contact__btn:hover,
.float-contact__btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

.float-contact__btn--phone {
  background: var(--navy);
  color: #fff;
}

.float-contact__btn--phone:hover {
  background: var(--navy-800, #0f2f5c);
}

.float-contact__btn--zalo {
  color: #0068ff;
}

.float-contact__btn--fb {
  color: #1877f2;
}

.float-contact__btn--top {
  background: var(--amber);
  color: #fff;
}

.float-contact__btn--top:hover {
  background: var(--amber-600);
}

/* Nút lên đầu trang: ẩn cho tới khi cuộn */
.float-contact__btn--top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease),
    visibility var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}

.float-contact__btn--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Nhãn hiện khi hover */
.float-contact__label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 0.4em 0.75em;
  border-radius: var(--r-pill);
  background: var(--navy);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.float-contact__btn:hover .float-contact__label,
.float-contact__btn:focus-visible .float-contact__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: giữ nguyên thanh hành động, chỉ giữ nút lên đầu trang */
@media (max-width: 900px) {
  .float-contact {
    right: 12px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    gap: 0;
  }

  .float-contact__btn:not(.float-contact__btn--top) {
    display: none;
  }

  .float-contact__btn--top {
    width: 42px;
    height: 42px;
    box-shadow: 0 10px 20px -12px rgba(11, 36, 68, 0.9);
  }

  .float-contact__label {
    display: none;
  }
}
