/* ===== FORM STYLES ===== */
.form-label {
  font-family: MadaniArabic-Medium;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: rgba(34, 48, 62, 1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-control {
  color: black;
  padding: .8rem 1rem;
  border: 1px solid var(--gray-20, #D9D9D9);
  border-radius: 10px;
}

.form-control::placeholder {
  font-family: MadaniArabic-Regular;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  letter-spacing: 0%;
  text-transform: capitalize;
  color: rgba(172, 172, 172, 1);
}

.form-control:focus {
  box-shadow: none;
  border-color: #2AB573;
}

/* ===== CUSTOM BOOTSTRAP DROPDOWN ===== */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid #D9D9D9;
  border-radius: 10px;
  background: #fff;
  color: rgba(172, 172, 172, 1);
  font-family: "MadaniArabic-Regular", sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.custom-dropdown .dropdown-toggle::after {
  display: none;
}

.custom-dropdown .dropdown-toggle svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.custom-dropdown .dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.custom-dropdown .dropdown-toggle[aria-expanded="true"] {
  border-color: #2AB573;
  box-shadow: 0 0 0 3px rgba(42, 181, 115, 0.1);
}

.custom-dropdown .dropdown-toggle[aria-expanded="true"] svg path {
  fill: #2AB573;
}

.custom-dropdown .dropdown-toggle:hover {
  border-color: #bcc3ca;
  background-color: #fafbfc;
}

.custom-dropdown .dropdown-toggle.selected {
  color: #22303E;
}

.custom-dropdown .dropdown-menu {
  width: 100%;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 4px;
  margin-top: 6px !important;
  animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.custom-dropdown .dropdown-item {
  padding: 10px 12px;
  font-size: 14px;
  font-family: "MadaniArabic-Regular", sans-serif;
  color: #22303E;
  border-radius: 8px;
  margin: 2px 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: right;
}

[dir="ltr"] .custom-dropdown .dropdown-item {
  text-align: left;
}

.custom-dropdown .dropdown-item:hover {
  background: rgba(42, 181, 115, 0.08);
  color: #1a7a44;
}

.custom-dropdown .dropdown-item.active {
  background: rgba(42, 181, 115, 0.12);
  color: #1a7a44;
  font-family: "MadaniArabic-Medium", sans-serif;
}

.g-recaptcha {
  float: inline-end;
}

/* ===== PHONE INPUT ===== */
.phone-input {
  display: flex;
  align-items: stretch;
  border: 1px solid #D9D9D9;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  width: 100%;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.country-select-container {
  flex: 0 0 auto;
  min-width: 100px;
  background: #f6f8fa;
  position: relative;
}
.country-select-container::after{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 30px;
  background-color: #D9D9D9;
}
[dir="ltr"] .country-select-container::after {
  left: unset;
  right: 0;
}
[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__arrow {
  margin: 0 8px 0 0  !important;
}
.phone-number-container {
  flex: 1;
  background: white;
}

.phone-number-container input {
  border: none;
  outline: none;
  padding: 10px 12px;
  width: 100%;
  height: 100%;
  font-size: 14px;
  background: transparent;
  color: #24292f;
}

.phone-number-container input::placeholder {
  color: #656d76;
}

.phone-number-container input:focus {
  outline: none;
  box-shadow: none;
  border-color: #2AB573;
}

.phone-input:focus-within {
  border-color: #2AB573;
}

.phone-input .form-control {
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.phone-input .form-control:focus {
  border: none;
  box-shadow: none;
}

#phoneNumber {
  padding: 10px 20px 10px 10px !important;
  -moz-appearance: textfield;
}

#phoneNumber::-webkit-outer-spin-button,
#phoneNumber::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== SELECT2 ===== */
.select2-container {
  width: 100% !important;
  border: none;
}

.select2-container .select2-selection--single {
  border: none;
  border-radius: 0;
  height: auto;
  height: unset !important;
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.select2-container .select2-selection--single:hover {
  background: rgba(36, 162, 89, 0.04);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: normal;
  color: #22303E;
  font-size: 14px;
  font-weight: 500;
  font-family: "MadaniArabic-Medium", sans-serif;
}

/* Custom SVG chevron arrow */
.select2-container .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 8px;
  top: 50%!important;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  border: none !important;
  border-width: 0 !important;
  width: 9px !important;
  height: 6px !important;
  display: block !important;
  background: url("data:image/svg+xml,%3Csvg width='9' height='6' viewBox='0 0 9 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 0L4.28025 3.21975L1.0605 0L0 1.0605L4.28025 5.34075L8.5605 1.0605L7.5 0Z' fill='%2322303E'/%3E%3C/svg%3E") no-repeat center !important;
  background-size: contain !important;
  margin: 0 0 0 8px !important;
  transition: transform 0.3s ease;
}

.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border: none !important;
  border-width: 0 !important;
  background: url("data:image/svg+xml,%3Csvg width='9' height='6' viewBox='0 0 9 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 0L4.28025 3.21975L1.0605 0L0 1.0605L4.28025 5.34075L8.5605 1.0605L7.5 0Z' fill='%232AB573'/%3E%3C/svg%3E") no-repeat center !important;
  background-size: contain !important;
  transform: rotate(180deg);
}

.select2-container--default .select2-selection--single:focus {
  outline: none;
}

/* Dropdown panel */
.select2-dropdown {
  z-index: 1 !important;
  border: 1px solid #e1e4e8!important;
  border-radius: 10px!important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06)!important;
  margin-top: 6px!important;
  overflow: hidden!important;
  animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1)!important;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.select2-container--open {
  z-index: 9999 !important;
}

/* Search field inside dropdown */
.select2-search--dropdown {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}

.select2-search__field {
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: "MadaniArabic-Regular", sans-serif;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.select2-search__field:focus {
  border-color: #2AB573;
  box-shadow: 0 0 0 3px rgba(42, 181, 115, 0.1);
}

/* Dropdown options */
.select2-results__options {
  max-height: 240px;
  padding: 4px;
}

.select2-results__option {
  padding: 10px 12px;
  font-size: 14px;
  font-family: "MadaniArabic-Regular", sans-serif;
  color: #22303E;
  border-radius: 8px;
  margin: 2px 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.select2-results__option:last-child {
  border-bottom: none;
}

.select2-results__option--highlighted {
  background: rgba(42, 181, 115, 0.08);
  color: #1a7a44;
}

.select2-results__option--selected,
.select2-results__option[aria-selected="true"] {
  background: rgba(42, 181, 115, 0.12) !important;
  color: #1a7a44;
  font-family: "MadaniArabic-Medium", sans-serif;
}

.select2-selection {
  align-content: center !important;
  border: none !important;
}

.select2-selection__arrow {
  align-self: anchor-center !important;
}


/* Country flag */
.country-flag {
  border-radius: 3px;
  margin-right: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.join-us-bg{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* ===== BRAND LETTERS ANIMATION ===== */
.brand-letters {
  display: inline;
}

.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) scale(0.5) rotateX(90deg);
  filter: blur(8px);
  animation: letterReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.letter:nth-child(1) { animation-delay: 0.3s; }
.letter:nth-child(2) { animation-delay: 0.4s; }
.letter:nth-child(3) { animation-delay: 0.5s; }
.letter:nth-child(4) { animation-delay: 0.6s; }
.letter:nth-child(5) { animation-delay: 0.7s; }

@keyframes letterReveal {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.5) rotateX(90deg);
    filter: blur(8px);
  }
  50% {
    opacity: 1;
    filter: blur(2px);
  }
  75% {
    transform: translateY(-8px) scale(1.1) rotateX(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
  }
}

.letter.revealed {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0deg);
  filter: blur(0);
  animation: letterWave 4s ease-in-out infinite;
}

.letter.revealed:nth-child(1) { animation-delay: 0s; }
.letter.revealed:nth-child(2) { animation-delay: 0.15s; }
.letter.revealed:nth-child(3) { animation-delay: 0.3s; }
.letter.revealed:nth-child(4) { animation-delay: 0.45s; }
.letter.revealed:nth-child(5) { animation-delay: 0.6s; }

@keyframes letterWave {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    text-shadow: 0 0 0 transparent;
  }
  15% {
    transform: translateY(-12px) scale(1.12) rotate(-2deg);
    text-shadow: 0 8px 20px rgba(36, 162, 89, 0.3);
  }
  30% {
    transform: translateY(0) scale(1) rotate(0deg);
    text-shadow: 0 0 0 transparent;
  }
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    text-shadow: 0 0 0 transparent;
  }
}

/* ===== JOIN US PAGE STYLES ===== */
.contact {
  min-height: 100vh;
  margin: 5rem 0 !important;
}

.join-us-text-wrapper {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  align-self: flex-start;
}

.contact-form {
  box-shadow: 0px 4px 20px 0px #0000001A;
  border: 1px solid var(--gray-5, #F5F5F5);
  background: #FFFFFF;
  opacity: 1;
  gap: 20px;
  border-radius: 30px;
  border-width: 1px;
  padding: 2rem;
  width: 50%;
}

.join-us-card {
  background: #fff;
  border: 3px solid #2AB573;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.join-us-title {
  font-family: 'MadaniArabic-SemiBold', sans-serif;
  font-size: clamp(2.5rem, 4vw, 60px);
  line-height: 150%;
  letter-spacing: -1%;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.join-us-title-dark {
  color: rgba(65, 65, 65, 1);
}

.join-us-title-green {
  color: rgba(36, 162, 89, 1);
}

.join-us-subtitle {
  font-family: 'MadaniArabic-SemiBold';
  font-size: clamp(2rem, 4vw, 60px);
  line-height: 150%;
  letter-spacing: -1%;
  font-weight: 400;
  color: rgba(65, 65, 65, 1);
  margin-bottom: 1rem;
}

.join-us-description {
  font-family: 'MadaniArabic-Regular';
  font-size: clamp(1rem, 2vw, 25px);
  line-height: 50px;
  color: rgba(103, 103, 103, 1);
  width: 80%;
}

/* RTL specific styles for join-us */
[dir="rtl"] .join-us-text-column {
  text-align: right;
}

/* LTR specific styles for join-us */
[dir="ltr"] .join-us-text-column {
  text-align: left;
}

.g-recaptcha {
  float: inline-start;
}

@media (min-width: 992px) {
  .contact .d-flex.flex-lg-row {
    align-items: flex-start !important;
  }
}

/* ===== JOIN US RESPONSIVE ===== */
@media (max-width: 1500px) {
  .join-us-title {
    font-size: clamp(1.8rem, 3vw, 38px);
  }

  .join-us-subtitle {
    font-size: clamp(1.5rem, 2.8vw, 34px);
  }

  .join-us-description {
    font-size: clamp(0.85rem, 1.5vw, 16px);
    line-height: 32px;
  }

  .contact-form {
    padding: 1.25rem;
    border-radius: 20px;
    gap: 14px;
  }

  .form-label {
    font-size: 12px;
    line-height: 20px;
  }

  .form-control {
    padding: .6rem .8rem;
    font-size: 13px;
  }

  .form-control::placeholder {
    font-size: 13px;
  }

  .custom-dropdown .dropdown-toggle {
    padding: .6rem .8rem;
    font-size: 13px;
  }

  .custom-dropdown .dropdown-item {
    font-size: 13px;
    padding: 8px 10px;
  }

  .phone-input {
    border-radius: 8px;
  }

  .country-select-container {
    min-width: 85px;
  }

  .select2-container .select2-selection--single {
    padding: 0.6rem;
    font-size: 13px;
  }

  .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 13px;
  }

  .phone-number-container input {
    font-size: 13px;
    padding: 8px 10px;
  }

  #phoneNumber {
    padding: 8px 16px 8px 8px !important;
  }

  #submit-btn {
    font-size: 13px;
    padding: 10px !important;
  }
}

@media (max-width: 991px) {
  .join-us-text-wrapper {
    position: static;
    transform: none;
    align-self: auto;
  }

  .join-us-text-column {
    text-align: center !important;
    padding: 1.5rem;
    align-items: center;
  }

  .join-us-text-column .w-75 {
    width: 100% !important;
  }

  .join-us-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }

  .join-us-subtitle {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
  }

  .join-us-description {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.8;
    width: 100%;
    margin: 0 auto;
  }

  .contact-form {
    width: 100%;
    padding: 20px;
    border-radius: 18px;
    gap: 12px;
  }

  .form-label {
    font-size: 12px;
    line-height: 18px;
  }

  .form-control {
    padding: .55rem .75rem;
    font-size: 13px;
    border-radius: 8px;
  }

  .form-control::placeholder {
    font-size: 13px;
  }

  .custom-dropdown .dropdown-toggle {
    padding: .55rem .75rem;
    font-size: 13px;
    border-radius: 8px;
  }

  .custom-dropdown .dropdown-item {
    font-size: 12px;
    padding: 8px 10px;
  }

  .phone-input {
    border-radius: 8px;
  }

  .country-select-container {
    min-width: 80px;
  }

  .select2-container .select2-selection--single {
    padding: 0.55rem;
  }

  .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 12px;
  }

  .phone-number-container input {
    font-size: 13px;
    padding: 8px 10px;
  }

  #phoneNumber {
    padding: 8px 14px 8px 8px !important;
  }

  #submit-btn {
    font-size: 13px;
    padding: 10px !important;
    border-radius: 10px;
  }

  textarea.form-control {
    rows: 3;
  }
}

@media (max-width: 576px) {
  .join-us-card {
    border-radius: 15px;
    border-width: 2px;
  }

  .join-us-text-column {
    padding: 1rem;
  }

  .join-us-description {
    line-height: 1.6;
  }
}

/* ===== JOIN US ANIMATIONS ===== */
.join-us-text-column {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[dir="ltr"] .join-us-text-column {
  transform: translateX(-50px);
}

.join-us-text-column.animated {
  opacity: 1;
  transform: translateX(0);
}

.contact-form {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

[dir="ltr"] .contact-form {
  transform: translateX(50px);
}

.contact-form.animated {
  opacity: 1;
  transform: translateX(0);
}

.join-us-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.3s, transform 0.6s ease-out 0.3s;
}

.join-us-text-column.animated .join-us-title {
  opacity: 1;
  transform: translateY(0);
}

.join-us-subtitle {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.5s, transform 0.6s ease-out 0.5s;
}

.join-us-text-column.animated .join-us-subtitle {
  opacity: 1;
  transform: translateY(0);
}

.join-us-description {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.7s, transform 0.6s ease-out 0.7s;
}

.join-us-text-column.animated .join-us-description {
  opacity: 1;
  transform: translateY(0);
}
