/* ======================================================== */
/*                     SITE FOOTER SECTION                  */
/* ======================================================== */

/* Định nghĩa biến màu sắc để dễ quản lý */
:root {
  --brand: #e88d05; /* Màu cam thương hiệu */
  --dark-blue: #1a233a; /* Màu xanh đậm cho footer main */
  --light-text: #ccc; /* Màu chữ nhạt */
  --white: #fff;
}

.site-footer {
  color: var(--light-text);
  text-align: left; /* Căn lề trái mặc định cho toàn bộ footer */
  font-family: "Roboto", sans-serif; /* Đảm bảo font nhất quán */
}

/* Phần chính của footer (nền xanh đậm) */
.footer-main {
  background-color: var(--dark-blue);
  padding: 1.75rem 0;
}

.footer-main .container {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.9fr;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 0 var(--site-content-pad-x);
  gap: 1.5rem;
}

/* Cột cuối: căn nội dung sát phải trong track */
.footer-main .container .footer-column:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.footer-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--white);
  display: inline-block;
}

.footer-column h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.5rem 0;
}

/* Danh sách thông tin liên hệ */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  flex-shrink: 0; /* Ngăn icon bị co lại */
  margin-top: 2px; /* Căn chỉnh nhẹ theo chiều dọc */
}
.contact-icon svg {
  width: 15px;
  height: 15px;
  fill: var(--white);
}

.contact-text {
  font-size: 0.78rem;
  line-height: 1.45;
}

.contact-text strong {
  color: var(--white); /* Đảm bảo label "Address:", "Hotline:"... màu trắng */
  font-weight: 600;
}

.contact-text a {
  color: var(--light-text); /* Màu link mặc định */
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-text a:hover {
  color: var(--brand); /* Màu cam khi hover */
}

/* Danh sách category */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
}
.category-list li a {
  color: var(--light-text); /* Màu chữ mặc định */
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.3s ease, transform 0.3s ease; /* Thêm transform vào transition */
}
.category-list li a::before {
  content: "•";
  font-size: 1.1em;
  line-height: 1;
  margin-right: 0.45rem;
  font-weight: bold;
  color: var(--white);
}
.category-list li a:hover {
  color: var(--brand); /* Đổi màu cam khi hover */
  transform: translateX(5px); /* Dịch chuyển sang phải 5px */
}

/* Social icons (Follow us) */
.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

.footer-social__link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--social-color, #ffffff);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(232, 141, 5, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.footer-social__link[data-social="facebook"] { --social-color: #1877f2; }
.footer-social__link[data-social="linkedin"] { --social-color: #0a66c2; }
.footer-social__link[data-social="youtube"] { --social-color: #ff0033; }
.footer-social__link[data-social="whatsapp"] { --social-color: #22c55e; }
.footer-social__link[data-social="instagram"] { --social-color: #e1306c; }
.footer-social__link[data-social="tiktok"] { --social-color: #25f4ee; }

.footer-social__link i {
  font-size: 22px;
  line-height: 1;
}

.footer-social__link:hover {
  color: #0b1220;
  background: var(--social-color, var(--brand));
  border-color: var(--social-color, var(--brand));
  transform: translateY(-1px);
}

.footer-social__link.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.footer-social__link:focus-visible {
  outline: 2px solid rgba(232, 141, 5, 0.75);
  outline-offset: 2px;
}

/* Phần dưới của footer (nền cam) */
.footer-bottom {
  background-color: var(--brand);
  color: var(--white);
  padding: 0.55rem 0;
  font-size: 0.72rem;
  /* Bỏ hoặc điều chỉnh margin-bottom nếu có khoảng trắng dưới cùng */
  margin-bottom: 0; /* Đảm bảo không có margin-bottom nào */
}
.footer-bottom .container {
  display: flex;
  justify-content: center; /* Đổi thành center để căn giữa dòng Copyright */
  align-items: center;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 0 var(--site-content-pad-x);
}
.footer-bottom p {
  margin: 0;
  text-align: center; /* Đảm bảo text p bên trong cũng được căn giữa */
  line-height: 1; /* Đảm bảo không có line-height thừa gây khoảng trống */
}

/* ======================================================== */
/*               FLOATING ACTION BUTTONS                    */
/* ======================================================== */

/* NÚT LIÊN HỆ NỔI (GÓC TRÁI) - 1 FAB, click mới mở danh sách */
.floating-contact-container {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 100;
  display: flex;
  /* FAB luôn ở dưới, menu bung lên phía trên */
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 10px;
}

/* No background on container (even when open) */

.floating-contact-fab {
  min-width: 48px;
  height: 48px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: rgba(30, 30, 30, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.40),
    0 0 0 3px rgba(230, 152, 36, 0.10);
  transition: transform 0.2s ease, background 0.2s ease;
}

.floating-contact-fab__icon,
.floating-contact-fab__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.floating-contact-fab__label {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.92;
}

.floating-contact-container.is-open .floating-contact-fab__chevron {
  transform: rotate(180deg);
}

@keyframes floating-fab-phone-wiggle {
  0% { transform: rotate(0deg) translateX(0); }
  10% { transform: rotate(-12deg) translateX(-1px); }
  20% { transform: rotate(12deg) translateX(1px); }
  30% { transform: rotate(-10deg) translateX(-1px); }
  40% { transform: rotate(10deg) translateX(1px); }
  50% { transform: rotate(-6deg) translateX(-1px); }
  60% { transform: rotate(6deg) translateX(1px); }
  70% { transform: rotate(-3deg) translateX(0); }
  100% { transform: rotate(0deg) translateX(0); }
}

/* Rung nhẹ để thu hút chú ý (chỉ icon phone) */
.floating-contact-fab__icon {
  transform-origin: 50% 80%;
  animation: floating-fab-phone-wiggle 1.8s ease-in-out infinite;
}

/* Khi hover/mở menu thì dừng rung cho đỡ “ồn” */
.floating-contact-fab:hover .floating-contact-fab__icon,
.floating-contact-container.is-open .floating-contact-fab__icon {
  animation-play-state: paused;
}
.floating-contact-fab:hover {
  background: rgba(30, 30, 30, 0.82);
  transform: translateY(-2px);
}
.floating-contact-container.is-open .floating-contact-fab {
  background: var(--brand);
}

.floating-contact-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-contact-btn {
  color: var(--white);
  padding: 8px 20px 8px 12px;
  border-radius: 50px;

  display: flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* Từng nút riêng biệt */
.btn-whatsapp { background-color: #25D366; }
.btn-zalo { background-color: #0068FF; }
.btn-wechat { background-color: #07C160; }

.floating-contact-btn:hover {
  transform: translateY(-3px) scale(1.05);
}

/* KHUNG BỌC ICON */
.icon-wrapper {
  position: relative; /* Quan trọng để định vị hiệu ứng radar */
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Áp dụng animation rung lắc cho khung bọc */
  animation: phone-icon-shake 2.5s infinite;
}
.floating-contact-btn:hover .icon-wrapper {
  animation-play-state: paused;
}

/* ICON BÊN TRONG */
.icon-wrapper img {
  width: 100%;
  height: 100%;
}

/* HIỆU ỨNG TỎA SÓNG RADAR (::before) */
.icon-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Căn giữa hoàn hảo */

  width: 100%;
  height: 100%;
  border-radius: 50%;

  /* Tạo hiệu ứng vòng tròn tỏa ra bằng box-shadow */
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);

  /* Áp dụng animation radar */
  animation: radar-pulse 2s infinite;
}
.floating-contact-btn:hover .icon-wrapper::before {
  animation-play-state: paused;
}

/* HIỆU ỨNG RUNG LẮC (cho icon) */
@keyframes phone-icon-shake {
  0%,
  50%,
  100% {
    transform: rotate(0);
  }
  10%,
  30% {
    transform: rotate(-20deg);
  }
  20%,
  40% {
    transform: rotate(20deg);
  }
}

/* HIỆU ỨNG TỎA SÓNG RADAR */
@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    opacity: 1; /* Thêm opacity để hiệu ứng mờ dần */
  }
  70% {
    transform: translate(-50%, -50%) scale(2.5);
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    opacity: 0;
  }
}

/* 
   PHẦN BÊN DƯỚI DÀNH CHO NÚT CUỘN LÊN ĐẦU TRANG,
   GIỮ NGUYÊN NHƯ CŨ
*/
/* NÚT CUỘN LÊN ĐẦU TRANG */
.scroll-to-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  background-color: rgba(30, 30, 30, 0.7);
  width: 45px;
  height: 45px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
}
.scroll-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top-btn:hover {
  background-color: var(--brand);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-main .container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .footer-main .container .footer-column:last-child {
    align-items: flex-start;
    text-align: left;
  }
  .footer-social {
    justify-content: flex-start;
  }
  .footer-bottom .container {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center; /* Căn giữa trên mobile cho footer-bottom */
    text-align: center;
  }
}

/* Tạo vùng đệm ở cuối nội dung chính */
main#site-main {
  padding-bottom: 64px;
}

/* KHẮC PHỤC LỖI HIỂN THỊ LOGO BỊ NHÒE/VỠ NÉT */
.logo-wrap img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-height: 70px;
  width: auto;
  object-fit: contain;
  max-width: 280px;
}
