/* Contact Page Styles */
.contact-hero {
  position: relative;
  background-size: contain;
  padding: 50px 0 70px;
  display: flex;
  align-items: flex-start;
}

.contact-hero__container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: var(--container-max-width);
  width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  gap: calc(2rem + 2vw);
}

.contact-hero__left {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 10px;
}

.contact-hero__tagline {
  font-size: calc(1.2rem + 0.5vw);
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1.1;
  margin-bottom: 0;
}

.contact-hero__title {
  font-size: calc(2.8rem + 1vw);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

.contact-hero__divider {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.contact-hero__divider-svg {
  width: 100%;
  height: auto;
}

.contact-hero__subtitle-group {
  margin-top: var(--space-sm);
}

.contact-hero__subtitle {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: var(--color-secondary) !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.5 !important;
  max-width: 32em;
  margin-left: 0;
  text-align: left;
}

.contact-hero__right {
  flex: 1 1 45%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-top: 10px;
  position: relative;
}

.contact-hero__form-card {
  position: relative;
  background: #fff;
  border: 16px solid #282828;
  border-radius: 0;
  padding: calc(1.8rem + 0.4vw) calc(1rem + 0.2vw);
  max-width: 480px;
  width: 100%;
  z-index: 1;
}

.contact-hero__form-card:before {
  content: '';
  position: absolute;
  box-shadow: none;
  bottom: -17px; /* Controls the vertical overlap */
  right: -16px; /* Positions the white block to the left of the black */
  width: 15px; /* Width of the white block */
  height: 15px; /* Height (thickness) of the line */
  background-color: #ffffff; /* White color */
  z-index: 2; /* Higher z-index to overlay the border and the black part */
}

.contact-hero__form-card:after {
  content: '';
  position: absolute;
  bottom: -17px; /* Matches the vertical position of the white block */
  right: -31px; /* Positions the black block to the right, creating overlap */
  width: 15px; /* Width of the black block */
  height: 15px; /* Height (thickness) of the line */
  background-color: #282828; /* Black color (matching border) */
  z-index: 1; /* Lower z-index than the white part, above the form */
}

.contact-hero__form-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 5px solid #222;
  background: transparent;
  z-index: 2;
}

.contact-hero__form-corner--tl {
  top: -5px;
  left: -5px;
  border-bottom: none;
  border-right: none;
}

.contact-hero__form-corner--tr {
  top: -5px;
  right: -5px;
  border-bottom: none;
  border-left: none;
}

.contact-hero__form-corner--bl {
  bottom: -5px;
  left: -5px;
  border-top: none;
  border-right: none;
}

.contact-hero__form-corner--br {
  bottom: -5px;
  right: -5px;
  border-top: none;
  border-left: none;
}

.contact-hero__form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 15px;
  text-transform: none;
  line-height: 1.2;
}

.contact-hero__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.contact-hero__form input,
.contact-hero__form textarea {
  background: #eaeaea;
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  font-size: calc(0.85rem + 0.1vw);
  margin-bottom: 0;
}

.contact-hero__form textarea {
  min-height: 60px;
  resize: vertical;
}

.contact-hero__form input:focus,
.contact-hero__form textarea:focus {
  outline: 2px solid var(--color-primary);
  background: #fff;
}

.contact-hero__form-button {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: calc(0.8rem + 0.1vw);
  border-radius: 0;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  width: auto;
  align-self: flex-start;
}

.contact-hero__form-arrow {
  font-size: 1.2em;
  margin-left: 4px;
  transition: transform 0.2s ease-in-out;
  vertical-align: middle;
  display: inline-block;
}

.contact-hero__form-button:hover .contact-hero__form-arrow {
  transform: translateX(5px);
}

.contact-hero__form-container {
  position: relative;
  width: 100%;
  min-height: 350px;
}

.contact-hero__form-view {
  opacity: 1;
  transition: opacity 0.4s ease;
  width: 100%;
}

.contact-hero__success-view {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px 0;
}

.contact-hero__form-container--success .contact-hero__form-view {
  opacity: 0;
  visibility: hidden;
}

.contact-hero__form-container--success .contact-hero__success-view {
  opacity: 1;
  visibility: visible;
}

.contact-hero__success-title {
  font-size: calc(1.3rem + 0.2vw);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.contact-hero__success-desc {
  color: var(--color-secondary);
  font-size: calc(0.85rem + 0.1vw);
  line-height: 1.4;
}

/* Contact Form Corner Decorations */
.contact-hero__form-corner-arrow {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%,-50%);
  width: 46px;
  height: 46px;
  z-index: 10;
  pointer-events: none;
}

.contact-hero__form-inner-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 46px;
  z-index: 3;
  pointer-events: none;
}

/* ================= CONTACT US TABLE SECTION ================= */
.contact-us-table__container {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin: 0 auto;
}
.contact-us-table__team-highlights {
  margin: 60px 0;
}

.contact-us-table__highlights-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 40px 0;
  position: relative;
  display: inline-block;
}
.contact-us-table-team__corner-svg {
  display: inline-block;
  position: absolute;
  top: 0;
  right: -20px;
  width: 15px;
  height: 15px;
}

/* Stats Table - Similar to homepage quality section */
.contact-us-table__stats-table {
  width: 100%;
  margin: 0 auto;
  background-color: var(--color-secondary);
  border-radius: 0;
  overflow: hidden;
}

.contact-us-table__stats-row {
  display: flex;
  width: 100%;
}

.contact-us-table__stats-cell {
  flex: 1;
  padding: 2rem 1.5rem;
  text-align: left;
  position: relative;
  background-color: var(--color-secondary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.contact-us-table__stats-cell:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  bottom: 20%;
  width: 1px;
  background-color: #e63946;
}

.contact-us-table__stats-text {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
}


/* Contact Estimator CTA Section */
.contact-estimator-cta {
  background: var(--color-primary);
  color: #fff;
  min-height: 50vh;
  padding: 48px 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1200px) {
  .contact-estimator-cta {
    min-height: 50vh;
    padding: 64px 0;
  }
}

@media (min-width: 1600px) {
  .contact-estimator-cta {
    min-height: 50vh;
    padding: 80px 0;
  }
}

@media (min-width: 1920px) {
  .contact-estimator-cta {
    min-height: 50vh;
    padding: 96px 0;
  }
}

.contact-estimator-cta__container {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin: 0 auto;
  position: relative;
  z-index: 3;
  padding: 0 8%;
  display: flex;
  align-items: center;
  min-height: inherit;
}

.contact-estimator-cta__content {
  width: 69%;
  text-align: left;
  position: relative;
  z-index: 5;
}

.contact-estimator-cta__title {
  font-size: calc(1.8rem + 0.7vw);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 30px;
  position: relative;
  width: 100%;
  color: #fff;
}

.contact-estimator-cta__corner-svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  vertical-align: top;
  filter: brightness(0) invert(1)
}

.contact-estimator-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  min-width: 180px;
  font-weight: 600;
  font-size: 16px;
  border-radius: 0;
  background: var(--color-secondary);
  transition: background 0.2s ease;
  margin-top: 5px;
  text-decoration: none;
}

.contact-estimator-cta__button:hover {
  text-decoration: none;
  color: #fff;
}

.contact-estimator-cta__button-arrow {
  margin-left: 10px;
  font-size: 1.25em;
  transition: transform 0.2s ease-in-out;
  vertical-align: middle;
  margin-left: 8px;
  display: inline-block;
}

.contact-estimator-cta__button:hover .contact-estimator-cta__button-arrow {
  transform: translateX(5px);
}

.contact-estimator-cta__image {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 45%;
  z-index: 1;
  overflow: visible;
}

.contact-estimator-cta__svg {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .contact-hero__container {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: 0 var(--space-md);
  }
  .contact-hero__left {
    margin-bottom: 10px;
  }
  .contact-hero__form-card {
    max-width: 480px;
    margin: 0 auto;
  }
  .contact-hero__divider {
    justify-content: center;
  }
}

@media (max-width: 1000px) {
  .contact-estimator-cta {
    padding: 40px 0 180px;
    min-height: 320px;
  }
  .contact-estimator-cta__container {
    flex-direction: column;
    min-height: unset;
  }
  .contact-estimator-cta__content {
    width: 100%;
    text-align: center;
  }
  .contact-estimator-cta__title {
    margin-left: auto;
    margin-right: auto;
  }
  .contact-estimator-cta__image {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 300px;
  }
  .contact-estimator-cta__svg {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 80%;
    height: auto;
    max-height: 100%;
  }
}

@media (max-width: 767px) {
  .contact-estimator-cta {
    padding: 32px 0 120px;
    min-height: 200px;
  }
  .contact-estimator-cta__image {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .contact-hero__form-inner-corner {
    width: 46px;
    height: 32px;
  }
  .contact-hero__form-corner-arrow {
    width: 32px;
    height: 32px;
  }
}
