/* ==========================================================================
   pages/contact.css — استایل‌های اختصاصی صفحه تماس با ما
   لود می‌شود فقط وقتی basename(SCRIPT_NAME) === 'contact.php'
   ========================================================================== */

/* ─────────────────────────────────────
   ۱) CONTACT FORM — فرم تماس
   ───────────────────────────────────── */
.contact-form-wrap {
  position: relative;
  max-width: 36rem;
  margin-inline: auto;
  padding: var(--s-6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 243, 235, 0.95) 100%);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px -12px rgba(197, 160, 89, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  overflow: hidden;
}
.contact-form-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  background-image: url('../../img/honeycomb-luxury.svg');
  background-repeat: repeat;
  background-size: 52px 90px;
  opacity: 0.14;
  mask-image: radial-gradient(circle at 0% 0%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 0% 0%, black 20%, transparent 80%);
  pointer-events: none;
}
.contact-form-wrap::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(197, 160, 89, 0.22);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}
.form {
  display: grid;
  gap: var(--s-4);
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────
   ۲) CONTACT TRIO — راه‌های ارتباطی
   الگوی بصری با footer__contact-* هم‌خوانی دارد
   اما روی پس‌زمینهٔ روشن (نه تاریک مثل فوتر)
   ───────────────────────────────────── */
.contact-trio {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.contact-trio__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-4);
  background: var(--shafa-input-bg-strong);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: var(--shafa-radius-md);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.03);
  transition: transform var(--shafa-duration-base) var(--shafa-ease-natural),
              border-color var(--shafa-duration-base) var(--shafa-ease-natural),
              box-shadow var(--shafa-duration-base) var(--shafa-ease-natural);
}
.contact-trio__item:hover {
  transform: translateY(-4px);
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 12px 32px rgba(197, 160, 89, 0.15);
}
.contact-trio__item:focus-visible {
  outline: 3px solid var(--shafa-border-focus);
  outline-offset: 3px;
}
.contact-trio__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: var(--shafa-gold-gradient);
  color: var(--shafa-on-gold);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.35);
  transition: transform 300ms ease;
}
.contact-trio__item:hover .contact-trio__icon {
  transform: rotate(30deg) scale(1.1);
}
.contact-trio__label {
  font-size: var(--shafa-fs-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--shafa-tracking-normal);
  color: var(--shafa-text-tertiary);
}
.contact-trio__value {
  font-size: var(--shafa-fs-sm);
  color: var(--shafa-text-primary);
  text-decoration: none;
  line-height: 1.5;
  transition: color var(--shafa-duration-fast) var(--shafa-ease-natural);
}
.contact-trio__value:hover {
  color: var(--shafa-gold-text);
}
.contact-trio__value[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* ─────────────────────────────────────
   ۳) CONTACT MAP — نقشه تماس
   ───────────────────────────────────── */
.contact-map {
  margin-top: var(--s-5);
  border-radius: var(--shafa-radius-lg);
  overflow: hidden;
  border: 1px solid var(--shafa-border-subtle);
  aspect-ratio: 16 / 9;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.contact-map__link {
  display: block;
  text-align: center;
  margin-top: var(--s-3);
}
.contact-map__link a {
  color: var(--shafa-gold-text);
  text-decoration: none;
  font-weight: 500;
}
.contact-map__link a:hover,
.contact-map__link a:focus-visible {
  text-decoration: underline;
}

/* ─────────────────────────────────────
   ۴) BACK TO TOP — هم‌خوانی با about.css
   ───────────────────────────────────── */
  .back-to-top {
    position: fixed;
    bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
    inset-inline-start: var(--s-6);
  width: 48px;
  height: 48px;
  background: var(--shafa-gold-satin);
  color: var(--shafa-on-gold);
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shafa-shadow-lg);
  z-index: var(--shafa-z-toast);
  transition: transform var(--shafa-duration-fast) var(--shafa-ease-natural),
              background var(--shafa-duration-fast) var(--shafa-ease-natural),
              box-shadow var(--shafa-duration-fast) var(--shafa-ease-natural);
}
.back-to-top.visible {
  display: flex;
}
.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--shafa-gold-hover);
  box-shadow: var(--shafa-shadow-hover);
}
.back-to-top:active {
  transform: translateY(0) scale(0.95);
}
.back-to-top .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
  .back-to-top:hover {
    transform: none;
  }
}

/* ─────────────────────────────────────
   ۵) RESPONSIVE — موبایل
   ───────────────────────────────────── */
@media (max-width: 768px) {
  .contact-trio {
    grid-template-columns: 1fr;
  }
  .contact-map {
    margin-top: var(--s-4);
  }
  .back-to-top {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    inset-inline-start: 1rem;
  }
}
