/* Home Contact Section */
.home-contact-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 940px;
    display: flex;
    align-items: center;
}

/* Semi-transparent overlay to ensure text readability if needed */
.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.home-contact-section .container {
  margin-bottom: 0px;
  display: flex;
  align-items: end;
  justify-content: start;
  min-height: 940px;
  padding-bottom: 80px;
  padding-left: 320px;
  z-index: 2;
}

/* Form Wrapper */
.contact-form-wrapper {
  border: 0 solid #FFF;
  background: linear-gradient(153deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.00) 100%);
  backdrop-filter: blur(21px);
  max-width: 700px;
  padding: 50px 40px 70px 40px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.contact-form-wrapper p {
    padding: 0;
}
.contact-form-wrapper br {
    display: none;
}
.contact-title {
  color: #FFF;
  text-align: center;
  font-family: Golden;
  font-size: 50px;
  font-style: normal;
  font-weight: 400;
  line-height: 60px;
  letter-spacing: 2.5px;
  margin-top: 0px;
  margin-bottom: 34px;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

/* Contact Form 7 Styles */
.wpcf7-form p {
    margin-bottom: 20px;
    margin-top: 0;
}
.wpcf7-form p:last-child {
    margin-bottom: 0;
}
/* Inputs */
.home-contact-section input[type="text"],
.home-contact-section input[type="email"],
.home-contact-section input[type="tel"],
.home-contact-section textarea {
    width: 100%;
    background: #FFF;
    border: none;
    border-radius: 50px;
    padding: 18px 25px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: #093A58;
    margin-bottom: 0; /* CF7 adds p tags, so we rely on them for spacing or reset */
    outline: none;
}
.home-contact-section textarea {
    border-radius: 20px;
    resize: none;
    height: 115px;
}
.home-contact-section input::placeholder,
.home-contact-section textarea::placeholder {
    color: #CCC;
}

/* Submit Button */
.home-contact-section input[type="submit"] {
  border-radius: 900px;
  border: 1px solid #F76A32;
  background: #F76A32;
  width: 246px;
  height: 60px;
  color: #FFF;
  text-align: center;
  font-family: Golden;
  font-size: 25px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-top: 0px;
  cursor: pointer;
  transition: background 0.3s;
  display: inline-block;
}
.home-contact-section input[type="submit"]:hover {
    background: #d65a2b;
}

/* CF7 Spinner & Validation */
.wpcf7-spinner {
    position: absolute;
    margin-top: 10px;
}
.wpcf7-not-valid-tip {
    color: #ffcccc;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    text-align: left;
    padding-left: 15px;
}
.wpcf7-response-output {
    color: #FFF;
    border-color: #FFF !important;
    border-radius: 10px;
    margin-top: 20px;
}

/* Responsive */
@media screen and (max-width: 1279px) {
   .home-contact-section {
      min-height: 560px;
   }
   .home-contact-section .container {
      min-height: 560px;
      padding-right: 20px;
      padding-left: 20px;
      padding-bottom: 50px;
   }
   .contact-form-wrapper {
      width: 100%;
      max-width: 100%;
      padding: 30px 20px 50px 20px;
   }

   /* Grid Layout for Form */
   .contact-form-wrapper .wpcf7-form {
       display: grid;
       grid-template-columns: 1fr 1fr;
       column-gap: 20px;
       row-gap: 0; /* Handled by p margins */
   }
   
   /* Force First 3 Fields to Left Column */
   .contact-form-wrapper .wpcf7-form p:nth-of-type(1),
   .contact-form-wrapper .wpcf7-form p:nth-of-type(2),
   .contact-form-wrapper .wpcf7-form p:nth-of-type(3) {
       grid-column: 1;
       /* Auto row flow */
   }

   /* Message (4th Field) to Right Column, spanning 3 rows */
   .contact-form-wrapper .wpcf7-form p:nth-of-type(4) {
       grid-column: 2;
       grid-row: 1 / span 3;
       margin-bottom: 20px;
   }
   
   /* Ensure textarea fills height */
   .contact-form-wrapper .wpcf7-form p:nth-of-type(4) textarea {
       height: 220px;
       min-height: 170px;
   }
   
   /* Submit Button (5th Field) - Centered at bottom */
   .contact-form-wrapper .wpcf7-form p:nth-of-type(5) {
       grid-column: 1 / -1;
       display: flex;
       justify-content: center;
       margin-top: 0px;
       margin-bottom: 0px;
   }

   /* Explicit Order (Optional logic if needed, but above works for standard 1-2-3-4 structure) */
   .contact-form-wrapper .wpcf7-form p:nth-of-type(1) { grid-row: 1; height: 60px;}
   .contact-form-wrapper .wpcf7-form p:nth-of-type(2) { grid-row: 2; height: 60px;}
   .contact-form-wrapper .wpcf7-form p:nth-of-type(3) { grid-row: 3; height: 60px;}

   .contact-title {
      margin-bottom: 10px;
      font-size: 40px;
   }
   .home-contact-section input[type="submit"] {
    width: 222px;
    height: 50px;
    margin: auto;
    padding: 0;
    font-size: 20px;
   }
}

@media screen and (max-width: 726px) {
.contact-form-wrapper .wpcf7-form {
        grid-template-columns: unset!important;
    }
    .contact-form-wrapper .wpcf7-form p:nth-of-type(4) {
        grid-column: unset!important;
        grid-row: unset!important;
    }
    .home-contact-section .container {
        padding: 0;
        margin-top: 40px;
        min-height: unset;
    }
    .contact-form-wrapper {
        backdrop-filter: blur(0px);
        background: unset;
        box-shadow: unset;
    }
    .contact-title {
        font-size: 27px;
        line-height: unset;
        text-shadow: unset;
        letter-spacing: 1.35px;
        font-weight: 400;
    }
}