/* ==============================================
   FOOTER — dark gradient, 4-col grid
   ============================================== */

.ghit-footer {
  position: relative;
  background: linear-gradient(180deg, #1E1B4B, #0F0E2E);
  color: #fff;
  overflow: hidden;
  margin-top: 32px;
}

/* Dot-grid texture */
.ghit-footer__dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Purple glow blob */
.ghit-footer__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 240px;
  background: radial-gradient(ellipse, rgba(91,33,182,.5), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Inner wrapper */
.ghit-footer__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 28px 0;
}

/* 4-col grid */
.ghit-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

/* ── Brand col ── */
.ghit-footer__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-bottom: 18px;
}
/* Viền xoay phát sáng — đồng bộ .ghit-logo__icon ở header (dual background-clip). */
@property --ghit-footer-logo-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.ghit-footer__logo-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: 2px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, #7C3AED, #2563EB) padding-box,
    conic-gradient(from var(--ghit-footer-logo-angle), #FDE047, #F97316, #F43F5E, #EC4899, #FDE047) border-box;
  animation:
    ghit-footer-logo-spin-angle 3s linear infinite,
    ghit-footer-logo-pulse 2.2s ease-in-out infinite;
  transform: scale(1.18) rotate(-4deg); /* mặc định đã to, đồng bộ .ghit-logo__icon ở header */
  transition: transform var(--t-fast), filter var(--t-fast);
}
/* Hover: xoay nhanh vụt qua + sáng bừng lên (không phóng to thêm) — đồng bộ header */
.ghit-footer__logo:hover .ghit-footer__logo-icon {
  animation:
    ghit-footer-logo-spin-angle .6s linear infinite,
    ghit-footer-logo-pulse 2.2s ease-in-out infinite;
  filter: brightness(1.25) saturate(1.3);
}
@keyframes ghit-footer-logo-spin-angle {
  to { --ghit-footer-logo-angle: 360deg; }
}
@keyframes ghit-footer-logo-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(124,58,237,.5); }
  50%      { box-shadow: 0 0 24px rgba(37,99,235,.75); }
}
@media (prefers-reduced-motion: reduce) {
  .ghit-footer__logo-icon { animation: none; }
  .ghit-footer__logo:hover .ghit-footer__logo-icon { animation: none; filter: none; }
}
.ghit-footer__logo-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(1.2); /* mặc định đã zoom, đồng bộ header */
}
/* Vòng sáng mờ dần lặp lại — đồng bộ header (thay hiệu ứng tráng gương chói) */
.ghit-footer__logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
  opacity: 0;
  pointer-events: none;
  animation: ghit-footer-logo-ring-pulse 2.6s ease-in-out infinite;
}
@keyframes ghit-footer-logo-ring-pulse {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ghit-footer__logo-icon::after { animation: none; }
}
.ghit-footer__logo-name {
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}
.ghit-footer__desc {
  color: rgba(255,255,255,.6);
  font-size: 14px;
  line-height: 1.7;
  max-width: 300px;
  margin: 0 0 20px;
  text-align: justify;
}

/* Social buttons */
.ghit-footer__social {
  display: flex;
  gap: 10px;
}
.ghit-footer__social-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}

/* Facebook — nền xanh thương hiệu */
.ghit-footer__social-btn--fb {
  background: #1877F2;
}
.ghit-footer__social-btn--fb:hover {
  background: #2E8CFF;
  transform: translateY(-2px);
}

/* YouTube — icon 2 màu tự nhiên, không cần nền riêng */
.ghit-footer__social-btn--yt {
  background: transparent;
}
.ghit-footer__social-btn--yt:hover {
  transform: translateY(-2px);
}

/* App promo — nền cam đặc, đơn giản, không animation, vẫn nổi bật nhờ màu tương phản */
.ghit-footer__social-btn--app {
  background: #F97316;
}
.ghit-footer__social-btn--app:hover {
  background: #FB923C;
  transform: translateY(-2px);
}
.ghit-footer__app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--t-fast);
}
.ghit-footer__app-link:hover { color: #A78BFA; }

/* ── Link columns ── */
.ghit-footer__col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin: 0 0 16px;
}
.ghit-footer__col-title--purple { color: #A78BFA; }
.ghit-footer__col-title--teal   { color: #5EEAD4; }
.ghit-footer__col-title--blue   { color: #93C5FD; }

.ghit-footer__links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ghit-footer__links a {
  color: rgba(255,255,255,.66);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--t-fast);
}
.ghit-footer__links a:hover { color: #fff; }
.ghit-footer__links a:focus-visible {
  outline: 2px solid var(--color-primary, #6366f1);
  outline-offset: 2px;
}

/* Popular posts — dot prefix */
.ghit-footer__links--dots a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
}
.ghit-footer__dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #60A5FA;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ── Bottom bar ── */
.ghit-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.ghit-footer__copy {
  color: rgba(255,255,255,.5);
  font-size: 13px;
  font-family: var(--font-mono);
}
.ghit-footer__copy a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
}
.ghit-footer__copy a:hover { color: #fff; }

.ghit-footer__bottom-links {
  display: flex;
  gap: 22px;
}
.ghit-footer__bottom-links a {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--t-fast);
}
.ghit-footer__bottom-links a:hover { color: #fff; }
.ghit-footer__bottom-links a:focus-visible {
  outline: 2px solid var(--color-primary, #6366f1);
  outline-offset: 2px;
}

/* ── Back to top ── */
.ghit-back-top {
  position: fixed;
  right: calc(4px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 55;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #5B21B6, #2563EB);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -10px rgba(91,33,182,.7);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, box-shadow .2s;
  pointer-events: none;
}
.ghit-back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ghit-back-top:hover {
  box-shadow: 0 18px 36px -8px rgba(91,33,182,.85);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ghit-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ghit-footer__brand { grid-column: 1 / -1; }
  .ghit-footer__desc { max-width: 100%; }
}
@media (max-width: 900px) {
  .ghit-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .ghit-footer__grid { grid-template-columns: 1fr; }
  .ghit-footer__inner { padding-inline: 16px; }
  .ghit-footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}
