/* Contact Page Header */
.contact-page-header {
  background-image: url("https://images.pexels.com/photos/4348401/pexels-photo-4348401.jpeg");
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 4rem 0;
}

.contact-page-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.contact-header-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

/* Prevent horizontal overflow on very small screens within contact page scope */
.com-contact .wrapper {
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.contact-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  font-family: "Assistant Bold";
}

.contact-accent {
  color: #2563eb;
}

.contact-description {
  font-size: 1.125rem;
  font-weight: 500;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  font-family: "Assistant Regular";
}

/* Two Column Layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

/* Contact Form Column */
.contact-form-column {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.contact-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
  text-align: right;
  font-family: "Assistant Bold";
}

/* Form Styles */
.contact-form {
  direction: rtl;
}

.field-row {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
  font-family: "Assistant Regular";
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
  vertical-align: top;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.website-field {
  display: none; /* Honeypot field */
}

/* Captcha */
.captcha-reg {
  margin: 1.5rem 0;
  text-align: center;
}

.g-recaptcha {
  display: inline-block;
}

/* Submit Button */
.control-group {
  margin-top: 1.5rem;
}

.btn {
  width: 100%;
  background: #2563eb;
  color: white;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Assistant Bold";
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Contact Info Column */
.contact-info-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Allow grid children to shrink properly to avoid overflow */
.contact-form-column,
.contact-info-column {
  min-width: 0;
}

.contact-info-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
  text-align: right;
  font-family: "Assistant Bold";
}

/* Contact Info List */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: right;
}

.contact-info-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.contact-info-content {
  flex: 1;
  font-family: "Assistant Regular";
}

.contact-info-content strong {
  color: #1f2937;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.contact-link {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}
.contact-link a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}
.contact-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.contact-link a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.contact-address {
  color: #4b5563;
  line-height: 1.5;
}

.contact-address div {
  margin-bottom: 0.25rem;
}

/* Google Map */
.contact-map-card {
  margin-top: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  height: 250px;
  border: 1px solid #e5e7eb;
}

.contact-map {
  width: 100%;
  height: 100%;
  border: none;
}

/* Messages */
.success-msg {
  background: #d1fae5;
  color: #065f46;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #a7f3d0;
  font-family: "Assistant Regular";
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-msg {
  background: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #fca5a5;
  font-family: "Assistant Regular";
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-msg {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #fde68a;
  font-family: "Assistant Regular";
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-icon {
  flex-shrink: 0;
}

/* Animate on Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }

  .contact-title {
    font-size: 2.5rem;
  }

  .contact-description {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .contact-page-header {
    padding: 3rem 0;
  }

  .contact-header-content {
    padding: 0 1.5rem;
  }

  .contact-title {
    font-size: 2rem;
  }

  .contact-form-column,
  .contact-info-card {
    padding: 1.5rem;
  }

  .contact-info-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 0.75rem;
  }

  .contact-info-icon {
    align-self: center;
  }

  .contact-map-card {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .contact-title {
    font-size: 1.75rem;
  }

  .contact-description {
    font-size: 0.9rem;
  }

  .contact-form-column,
  .contact-info-card {
    padding: 1rem;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }

  .contact-map-card {
    height: 180px;
  }
}
@media (max-width: 400px) {
  .contact-layout {
    padding: 1rem 1.5rem;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
  }
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 100% 0;
    max-width: 100%;
  }
}
@media (max-width: 400px) {
  .g-recaptcha {
    transform: scale(0.6);
  }
}
.success-msg {
  direction: rtl;
  margin-top: 1rem;
  color: #059669 !important;
  background-color: #d1fae5 !important;
  border: 1px solid #a7f3d0;
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-family: "Assistant Bold";
  animation: slideIn 1.5s ease-out;
}
.error-msg,
.warning-msg {
  direction: rtl;
  margin-top: 1rem;
  background: #fee2e2 !important;
  color: #dd4c4c !important;
  border: 1px solid #fecaca;
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-family: "Assistant Bold";
  animation: slideIn 1.5s ease-out;
}

/* Form Validation Styles */
.contact-form input[type="text"].border-red-500,
.contact-form input[type="email"].border-red-500,
.contact-form textarea.border-red-500 {
  border-color: #ef4444 !important;
  box-shadow: none;
  transition: all 0.3s ease;
}

.contact-form input[type="text"].focus\:ring-red-500:focus,
.contact-form input[type="email"].focus\:ring-red-500:focus,
.contact-form textarea.focus\:ring-red-500:focus {
  border-color: #ef4444 !important;
  box-shadow: none;
}

.contact-form input[type="text"].border-gray-300,
.contact-form input[type="email"].border-gray-300,
.contact-form textarea.border-gray-300 {
  border-color: #d1d5db !important;
  transition: all 0.3s ease;
}

.contact-form input[type="text"].focus\:ring-orange-500:focus,
.contact-form input[type="email"].focus\:ring-orange-500:focus,
.contact-form textarea.focus\:ring-orange-500:focus {
  border-color: #2563eb !important;
  box-shadow: none;
  transition: all 0.3s ease;
}

/* Form Message Styles */
#contact-form-message {
  text-align: center;
  border-radius: 0.5rem;
  font-family: "Assistant Bold";
  animation: slideIn 1.5s ease-out;
}

#contact-form-message.text-green-600 {
  direction: rtl;
  margin-top: 1rem;
  padding: 0.75rem;

  color: #059669 !important;
  background-color: #d1fae5 !important;
  border: 1px solid #a7f3d0;
  animation: slideIn 1.5s ease-out, pulse 2s ease-in-out;
}

#contact-form-message.text-red-600 {
  direction: rtl;
  margin-top: 1rem;
  padding: 0.75rem;

  color: #dd4c4c !important;
  background-color: #fee2e2 !important;
  border: 1px solid #fecaca;
  animation: slideIn 1.5s ease-out;
}

.captcha-reg.error {
  border: 2px solid #ef4444 !important;
  border-radius: 8px;
  padding: 0.5rem;
}

/* Form Validation Icons */
#contact-form-message i {
  margin-left: 0.5rem;
}

/* SVG Icon Styles */
.inline-icon {
  display: inline-block;
  vertical-align: text-top;
  margin-left: 0.5rem;
  margin-right: 0.25rem;
  margin-top: 2px;
}

/* Responsive adjustments for validation */
@media (max-width: 700px) {
  #contact-form-message {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

/* Error Tooltip Styles */
.error-tooltip {
  position: absolute;
  background: #dd4c4c;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 49;
  top: -8px;
  left: -13px;
  white-space: nowrap;
  font-family: "Assistant SemiBold";
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: tooltipSlideIn 0.3s ease-out;
}

.error-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-left-color: #dd4c4c;
  border-right: 0;
}

/* Animation Keyframes */
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tooltipSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-5px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Responsive adjustments for tooltips */
@media (max-width: 1000px) {
  .error-tooltip {
    left: 0px;
  }
  .error-tooltip::after {
    border-width: 8px;
    right: -8px;
  }
}
