/* ==========================================================================
   Contact section
   ========================================================================== */

.contact-section {
  --contact-blue: #1a4ad1;
  --contact-yellow: #FAB72A;
  --contact-radius: 10px;
  /* Figma rating group: 338x265, ~20px below section top, right-aligned */
  --contact-rating-w: 338px;
  --contact-rating-h: 265px;
  --contact-rating-top: 20px;
  position: relative;
  background: var(--contact-blue);
  color: #fff;
  padding: 64px 0 72px;
  overflow: hidden;
}

.contact-section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 40px;
  align-items: start;
}

.contact-section__main {
  min-width: 0;
}

.contact-section__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #fff;
}

.contact-section__title-line {
  display: block;
}

.contact-section__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 4px 14px 4px 12px;
  background: var(--contact-yellow);
  color: #fff;
  font-style: italic;
  font-weight: 900;
  clip-path: polygon(0 0, 92% 0, 100% 100%, 0 100%);
  line-height: 1.1;
  vertical-align: middle;
}

.contact-section__lead {
  margin: 0 0 24px;
  max-width: 520px;
  color: rgba(255, 255, 255, .94);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-section__form-wrap {
  max-width: 560px;
}

.contact-section__form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.contact-section__form .form-grid .full {
  grid-column: 1 / -1;
}

.contact-section__form .field:not(textarea) {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--contact-radius);
  background: #fff;
  color: var(--ink);
  font-size: .9rem;
  font-family: var(--font);
  box-shadow: 0 1px 4px rgba(11, 27, 52, .06);
  box-sizing: border-box;
}

.contact-section__form textarea.field {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--contact-radius);
  background: #fff;
  color: var(--ink);
  font-size: .9rem;
  font-family: var(--font);
  box-shadow: 0 1px 4px rgba(11, 27, 52, .06);
  box-sizing: border-box;
}

.contact-section__form .field::placeholder {
  color: #9aa3b5;
}

.contact-section__form .field:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 180, 0, .35);
}

.contact-section__form textarea.field {
  height: 100px;
  min-height: 100px;
  resize: none;
}

.contact-section__form select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6678' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.contact-section__form .field-date-wrap {
  position: relative;
  height: 52px;
}

.contact-section__form .field-date-wrap .field {
  height: 100%;
  padding-right: 38px;
}

.contact-section__form .date-ico {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.contact-section__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin-top: 2px;
  padding: 15px 24px;
  border: 0;
  border-radius: var(--contact-radius);
  background: var(--contact-yellow);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 180, 0, .32);
  transition: background .15s;
}

.contact-section__submit:hover {
  background: #e8a50f;
}

.contact-section__submit svg {
  flex-shrink: 0;
}

.contact-section__servicing {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 22px;
  padding: 12px 18px;
  border-radius: 50px;
  background: rgba(8, 22, 58, .42);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
}

.contact-section__servicing .ic {
  width: 18px;
  height: 18px;
  color: #fff;
  flex-shrink: 0;
}

.contact-section__servicing-label {
  font-weight: 700;
}

.contact-section__servicing-locs {
  color: rgba(255, 255, 255, .92);
}

.contact-section__side {
  position: relative;
  align-self: stretch;
  min-height: 620px;
}

.contact-section__top {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  width: var(--contact-rating-w);
  min-height: var(--contact-rating-h);
  /* top-right corner of the section: 20px from top, ~30px from the
     viewport right edge (breaks out of the container like the design) */
  top: calc(var(--contact-rating-top) - 64px);
  right: calc(30px - max(18px, (100vw - var(--container)) / 2) - 18px);
  opacity: 1;
}

.contact-section__gbadge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 3px;
  padding: 9px 16px 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(11, 27, 52, .14);
}

.contact-section__gbadge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-section__gbadge-logo {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1;
}

.contact-section__gbadge-stars {
  color: #f5a623;
  font-size: .8rem;
  letter-spacing: 2px;
  line-height: 1;
}

.contact-section__gbadge-text {
  font-size: .72rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.contact-section__review {
  position: relative;
  width: 100%;
  padding: 18px 18px 42px;
  border: 1px solid rgba(11, 27, 52, .08);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 32px rgba(11, 27, 52, .16);
}

.contact-section__review-slide {
  display: none;
}

.contact-section__review-slide.is-active {
  display: block;
}

.contact-section__review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.contact-section__review-name {
  color: var(--navy);
  font-family: var(--display);
  font-size: 1rem;
}

.contact-section__review-stars {
  color: #f5a623;
  font-size: .85rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

.contact-section__review-text {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.contact-section__review-g {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 22px;
  height: 22px;
}

.contact-section__nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.contact-section__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

.contact-section__nav-btn svg {
  width: 18px;
  height: 18px;
}

.contact-section__nav-btn--prev {
  background: rgba(255, 255, 255, .3);
  color: #fff;
  box-shadow: 0 2px 10px rgba(11, 27, 52, .12);
}

.contact-section__nav-btn--next {
  background: var(--contact-yellow);
  color: var(--navy);
  box-shadow: 0 2px 10px rgba(255, 180, 0, .28);
}

.contact-section__nav-btn:hover {
  transform: scale(1.05);
}

.contact-section__plumber {
  position: absolute;
  left: -160px;
  bottom: -72px; /* flush with section bottom (cancels section padding) */
  width: min(60vw, 540px);
  margin: 0;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}

.contact-section__plumber img {
  width: 100%;
  height: auto;
  max-height: 800px;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, .22));
}

@media (max-width: 1024px) {
  .contact-section {
    padding: 48px 0 56px;
  }

  .contact-section__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-section__side {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-section__top {
    position: static;
    width: 100%;
    max-width: 400px;
    min-height: 0;
    align-items: center;
  }

  .contact-section__nav {
    justify-content: center;
  }

  .contact-section__plumber {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(100%, 360px);
    margin-top: 8px;
  }

  .contact-section__plumber img {
    max-height: 480px;
    object-position: bottom center;
  }

  .contact-section__form-wrap,
  .contact-section__submit {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .contact-section__form .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-section__title {
    font-size: 1.35rem;
  }

  .contact-section__servicing {
    border-radius: 16px;
    width: 100%;
  }
}
