/**
 * Hamta Footer — corporate SEO footer (RTL)
 * Brand: teal deep #2F6562 + copper accent
 */

.hf-footer {
  --hf-font: "Vazirmatn", Tahoma, ui-sans-serif, system-ui, sans-serif;
  --hf-container: 75rem;
  direction: rtl;
  font-family: var(--hf-font);
  background: var(--hf-bg, #2f6562);
  color: var(--hf-text, #d1e0df);
  margin-top: auto;
  position: relative;
  z-index: 20;
  max-width: 100%;
  overflow-x: clip;
}

.hf-footer *,
.hf-footer *::before,
.hf-footer *::after {
  box-sizing: border-box;
}

.hf-container {
  width: min(100% - 2rem, var(--hf-container));
  margin-inline: auto;
}

.hf-footer a {
  color: var(--hf-link, #d1e0df);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.hf-footer a:hover,
.hf-footer a:focus-visible {
  color: var(--hf-link-hover, #7ec4c0);
  outline: none;
}

/* Trust bar */
.hf-footer__trust {
  background: color-mix(in srgb, var(--hf-bg, #2f6562) 82%, #000);
  border-bottom: 1px solid var(--hf-border, rgba(255, 255, 255, 0.12));
}

.hf-footer__trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  padding: 0.85rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
}

.hf-footer__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--hf-heading, #fff);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

a.hf-footer__trust-item:hover,
a.hf-footer__trust-item:focus-visible {
  color: var(--hf-link-hover, #7ec4c0);
  outline: none;
}

.hf-footer__trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hf-accent, #b87333);
  flex-shrink: 0;
}

/* Main grid */
.hf-footer__main {
  padding: 3rem 0 2.25rem;
}

.hf-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr) 1.15fr;
  gap: 2rem 1.5rem;
  align-items: start;
}

.hf-footer__col {
  min-width: 0;
}

.hf-footer__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--hf-heading, #fff);
  letter-spacing: -0.01em;
}

.hf-footer__about {
  margin: 0.85rem 0 1.15rem;
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--hf-text, #d1e0df);
  max-width: 28ch;
}

/* Logo */
.hf-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--hf-heading, #fff) !important;
}

.hf-footer__logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.hf-footer__logo-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hf-footer__logo-name {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hf-heading, #fff);
}

.hf-footer__logo-tag {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--hf-link-hover, #7ec4c0);
  line-height: 1.4;
}

/* CTA */
.hf-footer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.7rem 1.35rem;
  background: var(--hf-accent, #b87333);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hf-footer__cta:hover,
.hf-footer__cta:focus-visible {
  background: #9a5f28;
  color: #fff !important;
  transform: translateY(-1px);
}

/* Social */
.hf-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
}

.hf-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hf-heading, #fff) !important;
  border: 1px solid var(--hf-border, rgba(255, 255, 255, 0.12));
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hf-footer__social-link:hover,
.hf-footer__social-link:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--hf-link-hover, #7ec4c0);
  transform: translateY(-2px);
}

/* Menus */
.hf-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hf-footer__menu a {
  font-size: 0.875rem;
  line-height: 1.5;
  display: inline-block;
  position: relative;
  padding-inline-start: 0.85rem;
}

.hf-footer__menu a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hf-link-hover, #7ec4c0);
  opacity: 0.55;
}

.hf-footer__menu a:hover::before {
  opacity: 1;
}

/* Contact */
.hf-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hf-footer__contact-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hf-link-hover, #7ec4c0);
  margin-bottom: 0.15rem;
}

.hf-footer__contact-link,
.hf-footer__contact-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hf-heading, #fff);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.hf-footer__contact-link {
  color: var(--hf-heading, #fff) !important;
}

.hf-footer__contact-link:hover {
  color: var(--hf-link-hover, #7ec4c0) !important;
}

.hf-footer__badges {
  margin-top: 1.25rem;
}

.hf-footer__badges img {
  max-height: 64px;
  width: auto;
}

/* Bottom bar */
.hf-footer__bottom {
  background: var(--hf-bg-bottom, #254f4d);
  border-top: 1px solid var(--hf-border, rgba(255, 255, 255, 0.12));
  padding: 1rem 0;
}

.hf-footer__bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.hf-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--hf-text, #d1e0df);
}

.hf-footer__seo-note {
  margin: 0;
  font-size: 0.8125rem;
}

.hf-footer__seo-note a {
  font-weight: 500;
}

/* A11y */
.hf-footer .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .hf-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hf-footer__col--brand {
    grid-column: 1 / -1;
  }

  .hf-footer__about {
    max-width: 48ch;
  }
}

@media (max-width: 768px) {
  .hf-footer__main {
    padding: 2.25rem 0 1.75rem;
  }

  .hf-footer__grid {
    gap: 1.75rem 1.25rem;
  }

  .hf-footer__trust-row {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .hf-footer__bottom-row {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }
}

@media (max-width: 480px) {
  .hf-container {
    width: min(100% - 1.25rem, var(--hf-container));
  }

  .hf-footer__grid {
    grid-template-columns: 1fr;
  }

  .hf-footer__col {
    grid-column: 1 / -1;
  }

  .hf-footer__menu a,
  .hf-footer__contact-link,
  .hf-footer__contact-text {
    font-size: 0.9375rem;
  }
}

/* Back to top — sits above floating contact FAB on the right */
.hf-back-top {
  --hf-bt-size: 44px;
  --hf-bt-side: 24px;
  /* 24px FAB offset + 64px FAB + 12px gap */
  --hf-bt-bottom: 100px;

  position: fixed;
  right: var(--hf-bt-side);
  left: auto;
  bottom: var(--hf-bt-bottom);
  z-index: 99998;
  width: var(--hf-bt-size);
  height: var(--hf-bt-size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #54a29e;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(47, 101, 98, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    background 0.2s ease, box-shadow 0.2s ease;
}

.hf-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.hf-back-top:hover,
.hf-back-top:focus-visible {
  background: #3d7a76;
  box-shadow: 0 14px 28px rgba(47, 101, 98, 0.4);
  outline: none;
}

.hf-back-top svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .hf-back-top {
    --hf-bt-size: 42px;
    --hf-bt-side: 20px;
    /* 24 + 58 FAB + 12 gap */
    --hf-bt-bottom: 94px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hf-footer a,
  .hf-footer__cta,
  .hf-footer__social-link,
  .hf-back-top {
    transition: none;
  }

  .hf-footer__cta:hover,
  .hf-footer__social-link:hover {
    transform: none;
  }
}
