/**
 * Site footer styles
 *
 * 1. Footer base + decorative pattern
 * 2. Logo
 * 3. Contact / social / timing row
 * 4. Bottom bar (legal menu + copyright)
 * 5. Responsive
 */

/* The design overlays a faint circuit-line texture, concentrated on the right
   half and mirrored faintly on the left — approximated here with the same
   image anchored to each edge rather than tiled uniformly. */
.site-footer {
  background-color: var(--color-nav-bg);
  background-image:
    url("../../images/footer-pattern.png"),
    url("../../images/footer-pattern.png");
  background-repeat: no-repeat, no-repeat;
  background-position:
    right top,
    left top;
  background-size:
    55% auto,
    30% auto;
  padding: 4rem 0 2rem;
  font-family: var(--font-header-footer);
}
.footer-container {
  max-width: 1660px;
}

/* ============================ LOGO ============================ */
.footer__logo {
  margin-bottom: 2.5rem;
}
.footer__logo-img {
  max-width: min(100%, 530px);
  max-height: 300px;
  width: auto;
}
.footer__brand-name {
  color: var(--dark-text);
  font-size: 1.75rem;
  font-weight: 700;
}

/* ============================ CONTACT / SOCIAL / TIMING ============================ */
.footer__row {
  row-gap: 2rem;
}
.footer__heading {
  color: var(--dark-text);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1rem;
}
.footer__contact-icon svg {
  display: block;
  width: 32px;
  height: 32px;
}
.footer__contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.footer__contact-label {
  color: var(--dark-text);
  font-size: 0.95rem;
}
.footer__contact-value {
  color: var(--color-accent-red);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
  font-size: clamp(0.85rem, 3.9vw, 1rem);
}
.footer__social-col {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
}
.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0;
}
.footer__social-link {
  color: var(--dark-text);
  text-decoration: none;
}
.footer__social-link:hover,
.footer__social-link:focus {
  color: var(--color-accent-red);
}
.footer__hours {
  font-size: 1.125rem;
}
.footer__hours-days {
  color: var(--dark-text);
  font-weight: 600;
}
.footer__hours-value {
  color: var(--muted-color);
}

/* ============================ BOTTOM BAR ============================ */
.footer__divider {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 1;
  margin: 2.5rem 0 1.5rem;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
}
.footer__legal a {
  color: var(--dark-text);
  text-decoration: none;
}
.footer__legal a:hover,
.footer__legal a:focus {
  color: var(--color-accent-red);
}
.footer__copyright {
  color: var(--dark-text);
  font-size: 0.95rem;
}

/* ============================ RESPONSIVE ============================ */

@media (min-width: 992px) {
  .footer__contact-value {
    font-size: clamp(0.75rem, 1.25vw, 1rem);
  }
}

@media (max-width: 1199.98px) {
  .footer__contact-icon svg {
    width: 26px;
    height: 26px;
  }
  .footer__contact-item {
    gap: 10px;
  }
  .footer__contact-label {
    font-size: 0.8rem;
  }
}

/* --- sm: 576–767 --- */
@media (max-width: 767.98px) {
  .footer__bottom {
    text-align: center;
  }
  .footer__legal {
    justify-content: center;
  }
}

/* --- xs: 0–575 --- */
@media (max-width: 575.98px) {
  .footer__logo-img {
    max-height: 100px;
  }
}

/* ============================ BACK TO TOP ============================ */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 4rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--color-accent-red);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s,
    background-color 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background-color: var(--color-brand-red);
  color: #fff;
}
.back-to-top svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .footer__logo-img {
    max-height: 100px;
  }
}

@media (max-width: 575.98px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 42px;
    height: 42px;
  }
}
