/**
 * @file
 * Footer component styles (HHS-style).
 */

/* ==================== Site Footer ==================== */
.site-footer {
  background: linear-gradient(180deg, var(--tt-navy) 0%, var(--tt-navy-dark) 100%);
  color: var(--white);
  padding-top: var(--space-3xl);
}

.footer__main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ==================== Footer Grid ==================== */
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--white-10);
}

@media (min-width: 576px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ==================== Footer Brand ==================== */
.footer__brand {
  max-width: 300px;
}

.footer__brand img {
  height: 40px;
  margin-bottom: var(--space-md);
}

.footer__brand p {
  font-size: var(--font-size-sm);
  color: var(--white-70);
  line-height: var(--line-height-base);
  margin: 0;
}

/* ==================== Footer Navigation ==================== */
.footer__nav-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 var(--space-md);
  color: var(--tt-teal);
}

.footer__nav-list,
.footer__nav .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__nav-list li,
.footer__nav .menu li {
  margin-bottom: var(--space-sm);
}

.footer__nav-list a,
.footer__nav .menu a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--white-70);
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
}

/* Chevron icon before footer links */
.footer__nav-list a::before,
.footer__nav .menu a::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background-image: url('../../images/chevron-icon-white.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

/* Hover animation */
.footer__nav-list a:hover::before,
.footer__nav .menu a:hover::before {
  opacity: 1;
  transform: translateX(3px);
}

.footer__nav-list a:hover,
.footer__nav .menu a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer__nav-list a:focus-visible,
.footer__nav .menu a:focus-visible {
  color: var(--white);
  outline: 2px solid var(--tt-teal);
  outline-offset: 2px;
}

/* ==================== Footer Social (HHS Style) ==================== */
.footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--white-10);
}

.footer__social-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__social-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.footer__social-text span {
  display: block;
  color: var(--white-70);
  font-weight: var(--font-weight-normal);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: var(--space-md);
  margin-left: auto;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white-10);
  border-radius: var(--border-radius-full);
  color: var(--white);
  transition: all var(--transition-base);
}

.social-icon:hover {
  background-color: var(--tt-teal);
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 0 15px var(--tt-teal-20);
}

.social-icon:focus-visible {
  outline: 2px solid var(--tt-teal);
  outline-offset: 2px;
  background-color: var(--tt-teal);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* ==================== Footer Bottom ==================== */
.footer__bottom {
  padding: var(--space-lg) 0;
}

.footer__bottom-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.footer__copyright {
  font-size: var(--font-size-sm);
  color: var(--white-60);
  margin: 0;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__legal a {
  font-size: var(--font-size-sm);
  color: var(--white-60);
}

.footer__legal a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer__legal a:focus-visible {
  color: var(--white);
  outline: 2px solid var(--tt-teal);
  outline-offset: 2px;
}

/* ==================== Back to Top Button ==================== */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background-color: var(--tt-teal);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--tt-teal-dark);
  transform: translateY(-4px);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}
