/* Full-width wrapper for optional fade background */
.contact-block-wrapper {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.contact-block-wrapper__fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 17.5rem; /* 280px */
  background: linear-gradient(to bottom, #edf7fc, rgba(237, 247, 252, 0));
  pointer-events: none;
  z-index: 0;
}

.contact-block {
  position: relative;
  width: 100%;
  max-width: 78rem; /* 1248px */
  margin: 0 auto;
  background: white;
  border-radius: 1rem; /* 16px */
  overflow: hidden; /* Keep overflow hidden for rounded corners */
  z-index: 1;
}

/* When wrapper exists, remove the block's margin */
.contact-block-wrapper .contact-block {
  margin: 0 auto;
}

.contact-block__container {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Contact Information Section (Dark Background) */
.contact-block__info {
  background: #1b4759;
  padding: 0;
  position: relative;
  border-radius: 1rem 1rem 0 0; /* 16px */
  overflow: visible; /* Allow content to expand */
  min-height: 30.375rem; /* 486px - minimum height for desktop */
  padding-bottom: 2rem; /* Add bottom padding for content */
}

.contact-block__info::after {
  content: '';
  position: absolute;
  top: -7rem; /* 350px - adjusted to match figma position */
  right: 0; /* 772px */
  width: 31.8125rem; /* 509px */
  height: 14.25rem; /* 228px */
  background-image: url('../../../images/logowave_2.svg');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: 0.2;
}

.contact-block__info-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.contact-block__info-content {
  position: absolute;
  left: 2.5rem; /* 40px */
  top: 12rem; /* 192px */
  z-index: 3;
  display: flex;
  gap: 2rem; /* 32px */
  align-items: flex-start;
  justify-content: flex-start;
}

.contact-block__title {
  position: absolute;
  left: calc(50% - 36.5rem); /* calc(50% - 584px) */
  top: 6rem; /* 96px */
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 3rem; /* 48px */
  line-height: 3rem; /* 48px */
  color: #edf7fc;
  margin: 0;
  letter-spacing: -0.18rem; /* -2.88px */
  text-align: left;
  white-space: nowrap;
  z-index: 2;
}

.contact-block__section {
  flex-shrink: 0;
  width: 21rem; /* 336px */
  position: relative;
  display: flex;
  gap: 1.875rem; /* 30px */
  align-items: flex-start;
}

.contact-block__section-divider {
  flex-shrink: 0;
  width: 0.125rem; /* 2px */
  height: 12.375rem; /* 198px */
  background: linear-gradient(to bottom, rgba(237, 247, 252, 0.4), rgba(237, 247, 252, 0));
  opacity: 0.4;
}

.contact-block__section:first-child .contact-block__section-divider {
  display: none;
}

.contact-block__section-content {
  flex: 1;
}

.contact-block__section-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.625rem; /* 26px */
  line-height: 2rem; /* 32px */
  color: #a1d2e5;
  margin: 0 0 1.5rem 0; /* 0 0 24px 0 */
  letter-spacing: -0.0975rem; /* -1.56px */
}

.contact-block__details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px */
}

.contact-block__detail {
  display: flex;
  gap: 1rem; /* 16px */
  align-items: flex-start;
}

.contact-block__detail-icon {
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
  flex-shrink: 0;
  margin-top: 0.125rem; /* 2px */
}

.contact-block__detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px */
}

.contact-block__detail-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
  color: white;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.09625rem; /* 1.54px */
}

.contact-block__detail-value {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.625rem; /* 26px */
  color: #edf7fc;
  text-decoration: underline;
  text-underline-position: from-font;
}

.contact-block__detail-value:hover {
  color: #a1d2e5;
}

/* Contact Form Section (Light Background) */
.contact-block__form {
  background: #4ab3dd;
  padding: 6rem 14.4375rem; /* 96px 231px */
  border-radius: 0 0 1rem 1rem; /* 0 0 16px 16px */
}

.contact-block__form-content {
  display: flex;
  flex-direction: column;
  gap: 3.5rem; /* 56px */
  align-items: center;
  width: 100%;
}

.contact-block__form-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 3rem; /* 48px */
  line-height: 3rem; /* 48px */
  color: #edf7fc;
  text-align: center;
  margin: 0;
  letter-spacing: -0.18rem; /* -2.88px */
}

.contact-block__form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* 16px */
  align-items: center;
  width: 100%;
}

.contact-block__form-section-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
  color: #1b4759;
  text-transform: uppercase;
  letter-spacing: 0.09625rem; /* 1.54px */
  opacity: 0.7;
  text-align: center;
  width: 100%;
}

.contact-block__form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.5625rem; /* 25px */
  width: 100%;
  max-width: 35.4375rem; /* 567px */
}

.contact-block__form-input {
  border: none;
  border-bottom: 1px solid white;
  background: transparent;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.625rem; /* 26px */
  padding: 0.6875rem 0; /* 11px 0 */
  width: 100%;
  outline: none;
}

.contact-block__form-input::placeholder {
  color: white;
  opacity: 0.7;
}

.contact-block__form-input:focus {
  border-bottom-color: #a1d2e5;
}

.contact-block__form-textarea {
  border: none;
  border-bottom: 1px solid white;
  background: transparent;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.625rem; /* 26px */
  padding: 0.6875rem 0; /* 11px 0 */
  width: 100%;
  min-height: 2.9375rem; /* 47px */
  resize: vertical;
  outline: none;
}

.contact-block__form-textarea::placeholder {
  color: white;
  opacity: 0.7;
}

.contact-block__form-textarea:focus {
  border-bottom-color: #a1d2e5;
}

.contact-block__form-checkbox {
  display: flex;
  gap: 0.5rem; /* 8px */
  align-items: center;
  margin: 1.5625rem 0; /* 25px 0 */
}

.contact-block__form-checkbox input[type="checkbox"] {
  width: 1.25rem; /* 20px */
  height: 1.25rem; /* 20px */
  border: 1px solid white;
  border-radius: 0.25rem; /* 4px */
  background: transparent;
  cursor: pointer;
}

.contact-block__form-checkbox label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.625rem; /* 26px */
  color: white;
  cursor: pointer;
}

.contact-block__form-checkbox a {
  color: white;
  text-decoration: underline;
  text-underline-position: from-font;
}

.contact-block__form-checkbox a:hover {
  color: #a1d2e5;
}

.contact-block__form-button {
  background: #edf7fc;
  color: #1b4759;
  border: none;
  border-radius: 0.5rem; /* 8px */
  padding: 1rem 2.8125rem; /* 16px 45px */
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.5rem; /* 24px */
  letter-spacing: -0.02375rem; /* -0.38px */
  cursor: pointer;
  width: 100%;
  max-width: 14.125rem; /* 226px */
  transition: background-color 0.2s ease;
}

.contact-block__form-button:hover {
  background: #d1e8f0;
}

.contact-block__form-button:active {
  background: #b8dce8;
}

/* Radio Button Group */
.contact-block__form-radio-group {
  display: flex;
  gap: 2rem; /* 32px */
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.contact-block__form-radio {
  display: flex;
  gap: 0.5rem; /* 8px */
  align-items: center;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.625rem; /* 26px */
  color: white;
}

.contact-block__form-radio input[type="radio"] {
  width: 1.25rem; /* 20px */
  height: 1.25rem; /* 20px */
  border: 1px solid white;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  appearance: none;
  position: relative;
}

.contact-block__form-radio input[type="radio"]:checked {
  background: white;
}

.contact-block__form-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem; /* 8px */
  height: 0.5rem; /* 8px */
  background: #4ab3dd;
  border-radius: 50%;
}

.contact-block__form-radio span {
  white-space: nowrap;
}

/* Responsive Design */
/* Tablet: 1000px - 1300px - Three columns side by side */
@media (max-width: 81.25rem) and (min-width: 48.0625rem) { /* 1300px to 769px - Tablet */
  .contact-block-wrapper {
    padding: 0 0.5rem; /* Add padding to wrapper on tablet */
  }

  .contact-block {
    margin: 0 auto !important;
    max-width: 100% !important;
    border-radius: 1rem !important; /* Keep rounded corners on tablet */
  }

  /* When no wrapper, add margin directly to block */
  body > * > .contact-block,
  .wp-block > .contact-block {
    margin: 0 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }

  .contact-block__info {
    padding: 2.5rem 1.5rem 3rem !important; /* 40px 24px 48px */
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    border-radius: 1rem 1rem 0 0 !important; /* Rounded top corners */
  }

  .contact-block__title {
    position: static !important;
    text-align: center !important;
    margin: 0 0 2.5rem 0 !important; /* 0 0 40px 0 */
    width: 100% !important;
    font-size: 2.5rem !important; /* 40px */
    line-height: 2.5rem !important; /* 40px */
    letter-spacing: -0.15rem !important; /* -2.4px */
    left: auto !important;
    transform: none !important;
  }

  .contact-block__info-content {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 2rem !important; /* 32px */
    margin: 0 !important;
    left: auto !important;
    top: auto !important;
  }

  .contact-block__section {
    flex: 1 1 33.333% !important;
    width: auto !important;
    min-width: 0 !important;
    display: block !important;
    gap: 0 !important;
  }

  .contact-block__section-divider {
    display: none !important; /* Hide dividers on tablet */
  }

  .contact-block__section-content {
    width: 100% !important;
  }

  .contact-block__section-title {
    font-size: 1.125rem; /* 18px */
    line-height: 1.5rem; /* 24px */
    margin-bottom: 1.25rem; /* 20px */
    letter-spacing: -0.06rem; /* -0.96px */
  }

  .contact-block__details {
    gap: 0.875rem; /* 14px */
  }

  .contact-block__detail {
    gap: 0.625rem; /* 10px */
  }

  .contact-block__detail-icon {
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    margin-top: 0.125rem; /* 2px */
  }

  .contact-block__detail-content {
    gap: 0.5rem; /* 8px */
    flex: 1;
    min-width: 0;
  }

  .contact-block__detail-label {
    font-size: 0.625rem; /* 10px */
    line-height: 0.75rem; /* 12px */
    letter-spacing: 0.07rem; /* 1.12px */
  }

  .contact-block__detail-value {
    font-size: 0.875rem; /* 14px */
    line-height: 1.125rem; /* 18px */
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .contact-block__form {
    padding: 3rem 2rem; /* 48px 32px */
    border-radius: 0 0 1rem 1rem !important; /* Rounded bottom corners */
  }

  .contact-block__form-title {
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; /* 40px */
  }

  .contact-block__form-fields {
    max-width: 100%;
  }
}

@media (max-width: 48rem) { /* 768px - Mobile */
  .contact-block {
    margin: 0 !important;
    max-width: 100% !important;
    border-radius: 1rem !important; /* Keep rounded corners */
  }

  .contact-block__info {
    padding: 2.5rem 1.5rem !important; /* 40px 24px */
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    border-radius: 1rem 1rem 0 0 !important; /* Rounded top corners */
  }

  .contact-block__title {
    position: static !important;
    text-align: left !important;
    font-size: 2.25rem !important; /* 36px */
    line-height: 2.5rem !important; /* 40px */
    margin: 0 0 2rem 0 !important;
    left: auto !important;
    transform: none !important;
  }

  .contact-block__info-content {
    position: static !important;
    flex-direction: column !important;
    gap: 2.5rem !important; /* 40px */
    left: auto !important;
    top: auto !important;
  }

  .contact-block__section {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .contact-block__section-divider {
    display: none !important;
  }

  .contact-block__section-title {
    font-size: 1.375rem; /* 22px */
    line-height: 1.75rem; /* 28px */
  }

  .contact-block__form {
    padding: 2.5rem 1.5rem !important; /* 40px 24px */
    border-radius: 0 0 1rem 1rem !important; /* Rounded bottom corners */
  }

  .contact-block__form-content {
    gap: 2rem; /* 32px */
  }

  .contact-block__form-title {
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; /* 40px */
  }
}
