/* ===================================================================
   Contact Us Page Styling
   Highly premium, translucent form, brand accents, and responsive layout
   =================================================================== */

.contact-page-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: #0A0B18;
  color: #ffffff;
  font-family: var(--yes-font-stack-mixed);
  box-sizing: border-box;
  overflow: hidden;
  padding-top: clamp(8rem, 15vh, 12rem);
  /* Keep spacing for fixed header */
  display: flex;
  align-items: center;
}

/* Coordinate / Grid overlay lines in background */
.contact-page-container .grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  z-index: 1;
}

.contact-section-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
  position: relative;
  z-index: 2;
}

/* Two-column layout grid */
.contact-page #page-below-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem clamp(1.5rem, 5vw, 4.5rem) clamp(4rem, 8vh, 8rem);
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Ensure side-by-side grid layout inside page-hero-body: info on left, form on right */
.page-hero-body:has(.contact-info-col):has(.contact-form-col) {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important;
  gap: clamp(2rem, 5vw, 5rem) !important;
  align-items: flex-start !important;
  width: 100vw !important;
  max-width: 1385px !important;
}

.page-hero-body:has(.contact-info-col):has(.contact-form-col) .contact-info-col {
  grid-column: 1 !important;
}

.page-hero-body:has(.contact-info-col):has(.contact-form-col) .contact-form-col {
  grid-column: 2 !important;
}

/* ----------------------------------------------------
   Left Column: Contact details
   ---------------------------------------------------- */
.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-tagline {
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8CB5FF;
  /* Brand accent blue */
  text-transform: uppercase;
}

.contact-heading {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif !important;
  text-align: left;
  font-size: clamp(28px, 3.2vw, 54px) !important;
  font-weight: 700 !important;
  margin: 0 0 0 0 !important;
  background: linear-gradient(90deg, #8CB5FF 0%, #FFFFFF 38%, #739CE2 72%, #FFFFFF 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 7s ease-in-out infinite;
}

.contact-heading .highlight-brand {
  color: #8CB5FF;
  /* Highlight yes. */
  -webkit-text-fill-color: #8CB5FF;
  position: relative;
}

.contact-description {
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1rem 0;
  max-width: 580px;
}

/* Detail list and rows */
.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-detail-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
}

.contact-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8CB5FF;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-detail-row:hover .contact-icon-box {
  background-color: rgba(140, 181, 255, 0.08);
  border-color: rgba(140, 181, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 181, 255, 0.15);
}

.contact-detail-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-detail-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.contact-detail-value {
  font-size: clamp(14px, 1.05vw, 16.5px);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

a.contact-detail-value:hover {
  color: #8CB5FF;
}

/* ----------------------------------------------------
   Right Column: Form Card
   ---------------------------------------------------- */
.contact-form-col {
  width: 100%;
}

.contact-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: clamp(2rem, 6%, 3rem);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.contact-card-heading {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.contact-card-subheading {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

/* Form structure */
.contact-custom-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

html[dir="rtl"] .form-group {
  text-align: right;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.required-star {
  color: #8CB5FF;
  margin-left: 2px;
}

/* Input boxes styling */
.contact-custom-form input[type="text"],
.contact-custom-form input[type="email"],
.contact-custom-form input[type="tel"],
.contact-custom-form input,
.contact-form-input,
.contact-custom-form textarea {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  padding: 0.85rem 1.05rem !important;
  color: #ffffff !important;
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 15px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease !important;
}

.contact-custom-form input::placeholder,
.contact-form-input::placeholder,
.contact-custom-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.contact-custom-form input:focus,
.contact-form-input:focus,
.contact-custom-form textarea:focus {
  border-color: #8CB5FF !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 0 8px rgba(140, 181, 255, 0.12) !important;
}

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

/* Submit Button styling */
.form-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  background: linear-gradient(90deg, #4F80FF 0%, #4873B7 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 1rem;
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(79, 128, 255, 0.2);
}

.form-submit-btn svg {
  transition: transform 0.25s ease;
}

.form-submit-btn:hover {
  background: linear-gradient(90deg, #6ba0ff 0%, #5686d6 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px rgba(79, 128, 255, 0.35);
}

.form-submit-btn:hover svg {
  transform: translateX(4px);
}

.form-submit-btn:active {
  transform: translateY(0.5px);
}

.card-footer-privacy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 1.15rem 0 0 0;
  line-height: 1.4;
}

/* ----------------------------------------------------
   Responsive Adjustments
   ---------------------------------------------------- */

@media (max-width: 991px) {
  .contact-page #page-below-hero {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 3rem clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 6vh, 6rem);
  }

  .contact-heading {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .contact-description {
    max-width: 100%;
  }

  .page-hero-body:has(.contact-info-col):has(.contact-form-col) {
    grid-template-columns: 1fr !important;
    gap: 3.5rem !important;
    width: 100% !important;
  }

  .page-hero-body:has(.contact-info-col):has(.contact-form-col) .contact-info-col {
    grid-column: 1 !important;
  }

  .page-hero-body:has(.contact-info-col):has(.contact-form-col) .contact-form-col {
    grid-column: 1 !important;
  }
}

@media (max-width: 575px) {
  .contact-page-container {
    padding-top: 100px;
    /* Header space on small screen */
  }

  .contact-section-inner {
    padding: 0 1.25rem;
  }

  .form-row-split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .contact-page #page-below-hero {
    gap: 2.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .contact-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ----------------------------------------------------
   Success & Error States for Contact Form
   ---------------------------------------------------- */
.contact-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  animation: success-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-title {
  font-family: "Aeonik", "Inter", var(--yes-font-stack-mixed);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  color: #ffffff;
  margin: 1.5rem 0 0.75rem 0;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #8CB5FF 0%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 420px;
}

/* Checkmark Animation styling */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  position: relative;
}

.success-checkmark .check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid rgba(79, 128, 255, 0.2);
}

.success-checkmark .check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
}

.success-checkmark .check-icon .icon-line {
  height: 5px;
  background-color: #8CB5FF;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
  top: 46px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.75s;
}

.success-checkmark .check-icon .icon-circle {
  top: -4px;
  left: -4px;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #8CB5FF;
  box-sizing: content-box;
  position: absolute;
  animation: check-circle-expand 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Spinner inside button */
.form-submit-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.submit-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: submit-spin 0.8s linear infinite;
  margin-left: 0.5rem;
}

/* Error feedback styling */
.contact-error-msg {
  display: none;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 14px;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-align: left;
  animation: error-shake 0.4s ease-in-out;
}

/* Keyframe animations */
@keyframes success-fade-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes icon-line-tip {
  0% {
    width: 0;
    left: 1px;
    top: 19px;
  }

  54% {
    width: 0;
    left: 1px;
    top: 19px;
  }

  70% {
    width: 50px;
    left: -8px;
    top: 37px;
  }

  84% {
    width: 17px;
    left: 21px;
    top: 48px;
  }

  100% {
    width: 25px;
    left: 14px;
    top: 46px;
  }
}

@keyframes icon-line-long {
  0% {
    width: 0;
    right: 46px;
    top: 54px;
  }

  65% {
    width: 0;
    right: 46px;
    top: 54px;
  }

  84% {
    width: 55px;
    right: 0px;
    top: 35px;
  }

  100% {
    width: 47px;
    right: 8px;
    top: 38px;
  }
}

@keyframes check-circle-expand {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(0.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes error-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ----------------------------------------------------
   RTL Adjustments (Arabic)
   ---------------------------------------------------- */
html[dir="rtl"] .contact-heading {
  text-align: right !important;
  background-position: right center;
}

html[dir="rtl"] #contact-name,
html[dir="rtl"] .contact-custom-form input,
html[dir="rtl"] .contact-form-input,
html[dir="rtl"] .contact-custom-form textarea {
  text-align: right !important;
}

html[dir="rtl"] .form-submit-btn svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .form-submit-btn:hover svg {
  transform: scaleX(-1) translateX(4px);
}