/* =====================================
   Contact Page Styles
   ===================================== */

.contact-page {
  width: 100%;
  background: #222222;
  color: #ffffff;
  min-height: 100vh;
}

.contact-page *,
.contact-page *::before,
.contact-page *::after {
  box-sizing: border-box; /* اطمینان از اینکه همه عناصر box-sizing درست دارند */
}

/* =====================================
   Hero Section
   ===================================== */
.contact-hero {
  position: relative;
  width: 100%;
  height: 394px;
  overflow: hidden;
  margin-bottom: 40px;
}

.contact-hero__image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.contact-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(34, 34, 34, 0.9) 100%
  );
}

.contact-hero__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.contact-hero__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.contact-hero__description {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  line-height: 1.6;
  color: #ffffff;
  opacity: 0.9;
  margin: 0;
}

/* =====================================
   Container
   ===================================== */
.contact-container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 94px 80px;
}

/* =====================================
   Breadcrumb
   ===================================== */
.contact-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  margin-bottom: 60px;
  padding: 20px 0;
  direction: rtl;
  opacity: 0.6;
}

.contact-breadcrumb__link {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.contact-breadcrumb__link:hover {
  opacity: 1;
}

.contact-breadcrumb__current {
  color: #ffffff;
}

.contact-breadcrumb__separator {
  color: #ffffff;
}

/* =====================================
   Content Layout
   ===================================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  direction: rtl;
}

/* =====================================
   Form Section (Left)
   ===================================== */
.contact-form-wrapper {
  display: flex;
  flex-direction: column;
}

.contact-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.contact-form__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 30px 0;
  text-align: right;
}

/* Success/Error Messages */
.contact-form__success,
.contact-form__error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 16px;
  line-height: 1.6;
}

.contact-form__success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.contact-form__error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.contact-form__success svg,
.contact-form__error svg {
  flex-shrink: 0;
}

.contact-form__success p,
.contact-form__error p {
  margin: 0;
  flex: 1;
  text-align: right;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form__label {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  text-align: right;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 16px 20px;
  background: rgba(63, 63, 70, 0.2);
  border: 1px solid rgba(113, 113, 122, 1);
  border-radius: 64px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  color: #ffffff;
  direction: rtl;
  text-align: right;
  transition: all 0.3s ease;
  box-sizing: border-box; /* اضافه شد: برای جلوگیری از بیرون زدن اینپوت‌ها از کادر */
}

.contact-form__textarea {
  border-radius: 24px;
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  background: rgba(63, 63, 70, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-form__input:disabled,
.contact-form__textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form__input.error,
.contact-form__textarea.error {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.05);
}

.contact-form__error-text {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 14px;
  color: #f87171;
  text-align: right;
}

/* Submit Button */
.contact-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 64px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  font-weight: 600;
  color: #b0fff2;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-form__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-form__submit:hover::before {
  opacity: 1;
}

.contact-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.contact-form__submit:active {
  transform: translateY(0);
}

.contact-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.contact-form__submit:disabled:hover {
  transform: none;
  box-shadow: none;
}

.contact-form__submit span,
.contact-form__submit svg {
  position: relative;
  z-index: 1;
}

/* Spinner Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* =====================================
   Info Section (Right)
   ===================================== */
.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Map Card */
.contact-map-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.contact-map__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  margin: 0 0 20px 0;
  text-align: right;
}

.contact-map__image-wrapper {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.contact-map__image {
  width: 100%;
  height: auto;
  display: block;
}

/* Contact Details Card */
.contact-details-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.contact-details__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  margin: 0 0 24px 0;
  text-align: right;
}

.contact-details__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-details__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  direction: rtl;
}

.contact-details__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #b0fff2;
}

.contact-details__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-details__label {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
}

.contact-details__value {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 16px;
  color: #ffffff;
  line-height: 1.6;
  text-align: right;
}

.contact-details__link {
  text-decoration: none;
  color: #b0fff2;
  transition: opacity 0.3s ease;
}

.contact-details__link:hover {
  opacity: 0.8;
}

/* Social Links */
.contact-social {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-social__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-align: right;
}

.contact-social__links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  direction: rtl;
}

.contact-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-social__link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* =====================================
   Editor Styles
   ===================================== */
.contact-page-block-editor {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
}

/* =====================================
   Responsive Design
   ===================================== */

/* Tablet */
@media (max-width: 1024px) {
  .contact-hero {
    height: 350px;
  }

  .contact-hero__title {
    font-size: 40px;
  }

  .contact-hero__description {
    font-size: 16px;
  }

  .contact-container {
    padding: 0 50px 60px;
  }

  .contact-content {
    gap: 30px;
  }

  .contact-form-card,
  .contact-map-card,
  .contact-details-card {
    padding: 30px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .contact-hero {
    height: 280px;
  }

  .contact-hero__title {
    font-size: 32px;
  }

  .contact-hero__description {
    font-size: 15px;
  }

  .contact-container {
    padding: 0 30px 40px;
  }

  .contact-breadcrumb {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-form-card,
  .contact-map-card,
  .contact-details-card {
    padding: 24px;
  }

  .contact-form__title,
  .contact-map__title,
  .contact-details__title {
    font-size: 22px;
  }

  .contact-form__label {
    font-size: 16px;
  }

  .contact-form__input,
  .contact-form__textarea {
    padding: 14px 18px;
    font-size: 16px;
  }

  .contact-form__submit {
    padding: 16px 28px;
    font-size: 16px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .contact-hero {
    height: 240px;
  }

  .contact-hero__title {
    font-size: 26px;
  }

  .contact-hero__description {
    font-size: 14px;
  }

  .contact-container {
    padding: 0 20px 30px;
  }

  .contact-form-card,
  .contact-map-card,
  .contact-details-card {
    padding: 20px;
    border-radius: 16px;
  }

  .contact-form__title,
  .contact-map__title,
  .contact-details__title {
    font-size: 20px;
  }

  .contact-form {
    gap: 16px;
  }

  .contact-form__input,
  .contact-form__textarea {
    padding: 12px 16px;
  }

  .contact-form__submit {
    padding: 14px 24px;
  }

  .contact-details__icon {
    width: 36px;
    height: 36px;
  }

  .contact-social__link {
    width: 40px;
    height: 40px;
  }
}