/**
 * Contact page – modern revamp
 * BEM block: aptly-contact
 * Brand: dark blue #000677, light blue #08BBD2
 */

.aptly-contact {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-height, 80px) + 3rem);
  padding-bottom: 4rem;
  overflow: hidden; /* keep section stable on first paint; prevent spill/jump on both axes */
  background: linear-gradient(165deg, #050518 0%, #0a0c28 35%, #060824 60%, #050518 100%);
}

/* —— Background: gradient mesh + noise —— */
.aptly-contact__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aptly-contact__bg::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120vmax;
  height: 120vmax;
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(8, 187, 210, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.aptly-contact__gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.aptly-contact__gradient--1 {
  width: 85vmin;
  height: 85vmin;
  background: radial-gradient(circle, rgba(0, 6, 119, 0.85) 0%, rgba(0, 6, 119, 0.2) 50%, transparent 70%);
  top: -25%;
  right: -15%;
  opacity: 0.7;
}

.aptly-contact__gradient--2 {
  width: 70vmin;
  height: 70vmin;
  background: radial-gradient(circle, rgba(8, 187, 210, 0.35) 0%, rgba(8, 187, 210, 0.08) 50%, transparent 70%);
  bottom: -15%;
  left: -10%;
  opacity: 0.9;
}

.aptly-contact__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.aptly-contact__wrap {
  position: relative;
  z-index: 1;
}

/* —— Hero —— */
.aptly-contact__hero {
  text-align: center;
  margin-bottom: 3.5rem;
  margin-left: auto;
  margin-right: auto;
}

.aptly-contact__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(8, 187, 210, 0.95);
  margin: 0 0 0.75rem;
}

.aptly-contact__title.aptly-banner__heading .aptly-contact__title-accent {
  font-weight: 600;
  color: #08bbd2;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .aptly-contact__title.aptly-banner__heading .aptly-contact__title-accent {
    background: linear-gradient(135deg, #08bbd2 0%, #5dd4e8 50%, #000677 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.aptly-contact__subtitle {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1rem;
}

.aptly-contact__trust {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* —— Main: two columns (equal height) —— */
.aptly-contact__main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.aptly-contact__form-col {
  min-width: 0;
  display: flex;
}

.aptly-contact__info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* —— Cards —— */
.aptly-contact__card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 35, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.aptly-contact__card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.aptly-contact__card--form {
  padding: 2rem 2.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.aptly-contact__card--map {
  padding: 0;
  min-height: 320px;
  overflow: hidden;
}

/* —— Form —— */
.aptly-contact__form-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem;
}

.aptly-contact__form-intro {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
  margin: 0 0 1.75rem;
}

.aptly-contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}

.aptly-contact__form-row {
  display: contents;
}

.aptly-contact__form .aptly-contact__form-group:nth-child(1) {
  grid-column: 1;
}
.aptly-contact__form .aptly-contact__form-group:nth-child(2) {
  grid-column: 2;
}
.aptly-contact__form .aptly-contact__form-group:nth-child(3) {
  grid-column: 1;
}
.aptly-contact__form .aptly-contact__form-group:nth-child(4) {
  grid-column: 2;
}
.aptly-contact__form .aptly-contact__form-group:nth-child(5) {
  grid-column: 1;
}
.aptly-contact__form .aptly-contact__form-group:nth-child(6) {
  grid-column: 2;
}

.aptly-contact__form-group--full {
  grid-column: 1 / -1;
}

.aptly-contact__form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
}

.aptly-contact__form-group input,
.aptly-contact__form-group select,
.aptly-contact__form-group textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  color: var(--color-primary, #000677);
  background: #fff;
  border: 1px solid rgba(0, 6, 119, 0.2);
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.aptly-contact__form-group input::placeholder,
.aptly-contact__form-group textarea::placeholder {
  color: rgba(0, 6, 119, 0.45);
}

.aptly-contact__form-group input:focus,
.aptly-contact__form-group select:focus,
.aptly-contact__form-group textarea:focus {
  outline: none;
  border-color: #08bbd2;
  box-shadow: 0 0 0 3px rgba(8, 187, 210, 0.2);
  background-color: #fff;
}

.aptly-contact__form-group select {
  cursor: pointer;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23000677' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.aptly-contact__form-group select.is-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath transform='rotate(180 6 6)' d='M2.5 4.5L6 8L9.5 4.5' stroke='%23000677' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.aptly-contact__form-group select option {
  background: #fff;
  color: var(--color-primary, #000677);
}

.aptly-contact__form-group select option[value=""] {
  color: rgba(0, 6, 119, 0.45);
}

.aptly-contact__form-group select:has(option[value=""]:checked) {
  color: rgba(0, 6, 119, 0.45);
}

.aptly-contact__form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.aptly-contact__form-actions {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.aptly-contact__form-actions .btn,
.aptly-contact__form-actions button {
  width: fit-content !important;
  min-width: unset !important;
  cursor: pointer;
}

.aptly-contact__form-actions .btn.aptly-contact__btn--disabled,
.aptly-contact__form-actions .btn[aria-disabled="true"],
.aptly-contact__form-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* —— Offices card —— */
.aptly-contact__card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1.25rem;
}

.aptly-contact__offices {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.aptly-contact__office-region {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(8, 187, 210, 0.95);
  margin-bottom: 0.25rem;
}

.aptly-contact__office-city {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.35rem;
}

.aptly-contact__office-address {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  font-style: normal;
  margin: 0;
}

/* —— Contact chips —— */
.aptly-contact__contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.aptly-contact__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

.aptly-contact__chip:hover {
  background: rgba(8, 187, 210, 0.15);
  border-color: rgba(8, 187, 210, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.aptly-contact__chip-icon {
  display: flex;
  opacity: 0.9;
}

.aptly-contact__chip-icon img {
  display: block;
}

/* —— Map card (world map image / video) —— */
.aptly-contact__map-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #0a0c28;
  overflow: hidden;
}

.aptly-contact__world-map-img,
.aptly-contact__world-map-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .aptly-contact__main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .aptly-contact__card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 12, 35, 0.92);
  }

  .aptly-contact__card--map {
    min-height: 280px;
  }

  .aptly-contact__map-inner,
  .aptly-contact__world-map-img,
  .aptly-contact__world-map-video {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .aptly-contact {
    padding-top: calc(var(--header-height, 80px) + 2rem);
    padding-bottom: 3rem;
  }

  .aptly-contact__hero {
    margin-bottom: 2.5rem;
  }

  .aptly-contact__card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .aptly-contact__card--map {
    min-height: 260px;
    padding: 0;
  }

  .aptly-contact__map-inner,
  .aptly-contact__world-map-img,
  .aptly-contact__world-map-video {
    min-height: 260px;
  }

  .aptly-contact__form {
    grid-template-columns: 1fr;
  }

  .aptly-contact__form .aptly-contact__form-group:nth-child(1),
  .aptly-contact__form .aptly-contact__form-group:nth-child(2),
  .aptly-contact__form .aptly-contact__form-group:nth-child(3),
  .aptly-contact__form .aptly-contact__form-group:nth-child(4),
  .aptly-contact__form .aptly-contact__form-group:nth-child(5),
  .aptly-contact__form .aptly-contact__form-group:nth-child(6) {
    grid-column: 1;
  }

  .aptly-contact__form-actions {
    display: flex;
    justify-content: center;
  }

  .aptly-contact__contact-chips {
    flex-direction: column;
  }

  .aptly-contact__chip {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .aptly-contact__card--map {
    min-height: 200px;
    padding: 0;
  }

  .aptly-contact__map-inner,
  .aptly-contact__world-map-img,
  .aptly-contact__world-map-video {
    min-height: 200px;
  }
}
