/* ============================================
   SmartB Academy - Footer
   ============================================ */

.footer {
  background: var(--bg, #FFFBF5);
  color: var(--muted, #64748B);
  position: relative;
  border-top: 1px solid var(--border, #E8E0D8);
}

.footer-inner {
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

/* Brand */
.footer-brand { max-width: 320px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-logo img { height: 32px; width: auto; }
.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--muted, #64748B);
  font-family: var(--font-s);
  font-style: italic;
}
.footer-hrd {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1.5px solid var(--amber);
  border-radius: 6px;
}

/* Link columns */
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text, #1B1B1B);
  margin-bottom: 20px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
}
.footer-col a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted, #64748B);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 10px 0;
}
.footer-col a:hover { color: var(--blue, #174263); }
.footer-col a svg {
  display: inline;
  vertical-align: middle;
  margin-right: 8px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border, #E8E0D8);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #64748B);
  text-align: center;
}

/* Tablet+ */
@media (min-width: 768px) {
  .footer-inner { padding: 80px 0 0; }
  .footer-grid {
    grid-template-columns: 1.3fr 2fr;
    gap: 64px;
    padding-bottom: 64px;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .footer-inner { padding: 88px 0 0; }
  .footer-grid {
    grid-template-columns: 1.4fr 2fr;
    gap: 96px;
    padding-bottom: 72px;
  }
  .footer-links { gap: 56px; }
}

/* Mobile */
@media (max-width: 767px) {
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-links .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479px) {
  .footer-links {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links .footer-col:last-child {
    grid-column: auto;
  }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: max(28px, env(safe-area-inset-left));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue, #174263);
  color: var(--pure-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.back-to-top svg { width: 18px; height: 18px; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-2px); }
