/*
Theme Name: Matti Homes
Author: Krishna Karki
Description: Wordpress Custom Theme For Matti Homes
Version: 1.0
*/

:root {
  --bs-body-font-family: Outfit, Inter, Poppins, Nunito, Asap, system-ui,
    -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
}

body {
  position: relative;
}

@media (min-width: 1400px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1440px;
    padding: 0px;
  }
}
@media only screen and (max-width: 1440px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 100%;
    padding: 0px;
  }
}

/**** Form Styles ------------------------- */
form {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--color-grey-light-alt);
  opacity: 0px;
  padding: 10.97px 33.5px;

  .form-title {
    font-family: Outfit;
    font-size: 32px;
    font-weight: 500;
    line-height: 36.05px;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

    span {
      font-family: Outfit;
      font-size: 32px;
      font-weight: 500;
      line-height: 36.05px;
      letter-spacing: -0.14em;
      text-align: center;
      text-underline-position: from-font;
      text-decoration-skip-ink: none;
    }
  }
  input,
  .form-control {
    background: #f3f3f3;
    /* height: 56px; */
    padding: 13px 24px 13px 24px;
    border: 0px;
    border-radius: 8px;

    font-family: Outfit;
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
    color: #111111;

    &::placeholder {
      color: #c1c1c1;
    }
  }

  label,
  .form-label {
    font-family: Outfit;
    font-size: 24px;
    font-weight: 500;
    line-height: 36.05px;
    color: var(--color-black);
    margin-bottom: 12px;
  }
  button[type="submit"] {
    width: fit-content;
    height: 48px;
    flex-shrink: 0;
    padding-left: 32px;
    padding-right: 12px;

    border: 3px solid #ec1e24;
    border-radius: 48px;

    font-family: Nunito;
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.01em;

    color: var(--primary-color);
    background: var(--light-color);
    transition-property: background border-color;
    transition: all 0.3s ease-in-out;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    &:hover {
      background: var(--gray_900);
      border-color: var(--gray_900);
      color: var(--primary-color);
    }
  }

  .row {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px;
  }

  @media only screen and (max-width: 768px) {
    .row {
      --bs-gutter-x: 16px;
      --bs-gutter-y: 16px;
    }
    input,
    .form-control {
      font-size: 16px;
      line-height: 24px;
    }

    label,
    .form-label {
      font-size: 18px;
      line-height: 24px;
      margin-bottom: 8px;
    }
  }

  @media only screen and (max-width: 576px) {
    padding: 10.97px 20px;

    input,
    .form-control {
      font-size: 14px;
      line-height: 24px;
      padding: 8px 16px;
    }

    label,
    .form-label {
      font-size: 16px;
      line-height: 24px;
      margin-bottom: 4px;
    }

    .form-title {
      font-size: 24px;
      line-height: 36.05px;
    }

    button[type="submit"] {
      height: 48px;
      font-size: 18px;
    }
  }
}
/*** Form Style end here ------------------------- */

/* Getin touch section start from here */
.getin-touch-section {
  padding: 92.64px 54px 99.77px 54px;
  .title {
    font-family: Outfit;
    font-size: 64px;
    font-weight: 600;
    line-height: 80.64px;
    color: var(--color-black);
    margin-bottom: 24px;
  }

  .description {
    font-family: Outfit;
    font-size: 32px;
    font-weight: 400;
    line-height: 53px;
    color: var(--color-dim-gray);
  }

  .description-wrapper {
    gap: 103px;
  }

  .get-in-touch-btn {
    width: 223px;
    height: 48px;
    flex-shrink: 0;

    border: 3px solid #ec1e24;
    border-radius: 48px;

    font-family: Nunito;
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.01em;

    color: var(--primary-color);
    background: var(--light-color);

    transition-property: background border-color;
    transition: all 0.3s ease-in-out;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    &:hover {
      background: var(--gray_900);
      border-color: var(--gray_900);
    }
  }

  @media only screen and (max-width: 1024px) {
  }
  @media only screen and (max-width: 991px) {
    .title {
      font-size: 52px;
      line-height: 70px;
      margin-bottom: 20px;
    }

    .description {
      font-size: 24px;
      line-height: 32px;
    }

    .description-wrapper {
      gap: 80px;
    }
  }
  @media only screen and (max-width: 768px) {
    padding: 60px 40px;

    .title {
      font-size: 42px;
      line-height: 52px;
      margin-bottom: 15px;
    }

    .description {
      font-size: 18px;
      line-height: 24px;
    }

    .description-wrapper {
      gap: 60px;
    }
  }
  @media only screen and (max-width: 576px) {
    padding: 60px 20px;

    .description-wrapper {
      gap: 20px;

      flex-direction: column;
      align-items: flex-start !important;
    }

    .get-in-touch-btn {
      width: 175px;
      height: 48px;
      font-size: 18px;
    }
  }
}
/* Getin touch section end here */

/*** Contact info section start from here ------------------------ */
.contact-info-section {
  background: url(./assets/images/contact-info-bg.png);
  background-size: cover;
  padding: 80px 26px 80px 54px;

  .headings {
    h6 {
      font-family: Outfit;
      font-size: 24px;
      font-weight: 400;
      line-height: 36px;
      color: var(--black);
      margin-bottom: 24px;
    }

    h3 {
      font-family: Outfit;
      font-size: 56px;
      font-weight: 400;
      line-height: 72.8px;
      color: var(--black);
      margin: 0px;
    }
  }

  .contact-info-row {
    --bs-gutter-x: 40px;
    --bs-gutter-y: 40px;
  }

  .info-wrapper {
    --bs-gutter-x: 40px;
    .info {
      h4,
      h5 {
        font-family: Outfit;
        font-size: 22px;
        font-weight: 600;
        line-height: 27.72px;
        color: var(--black);
        padding-bottom: 25px;
        margin: 0px;
        position: relative;
        a {
          color: var(--black);
        }
      }

      h4 {
        margin-bottom: 25px;
        &::after {
          content: "";
          position: absolute;
          bottom: 0px;
          left: 0px;
          height: 3px;
          width: 27px;
          background: var(--black);
        }
      }

      p {
        font-family: Outfit;
        font-size: 20px;
        font-weight: 400;
        line-height: 32px;
        color: var(--black);
        margin: 0px;
      }
    }
  }

  @media only screen and (max-width: 768px) {
    padding: 60px 40px;

    .headings {
      h6 {
        font-size: 18px;
        line-height: 24px;
        margin-bottom: 20px;
      }
      h3 {
        font-size: 46px;
        line-height: 62.8px;
      }
    }

    .info-wrapper {
      --bs-gutter-y: 20px;

      .info {
        h4,
        h5 {
          line-height: 27.72px;
          font-size: 18px;
          padding-bottom: 16px;
        }

        h4 {
          margin-bottom: 16px;
        }

        p {
          font-size: 16px;
          line-height: 22px;
        }
      }
    }
  }
  @media only screen and (max-width: 576px) {
    padding: 60px 20px;

    .headings {
      h6 {
        font-size: 18px;
        line-height: 22px;
        margin-bottom: 15px;
      }
      h3 {
        font-size: 32px;
        line-height: 42.8px;
      }
    }

    .info-wrapper {
      --bs-gutter-y: 20px;
      .info {
        h4,
        h5 {
          font-size: 18px;
          line-height: 27.72px;
          padding-bottom: 10px;
        }

        h4 {
          margin-bottom: 10px;
        }
      }
    }
  }
}
/*** Contact info section end here ------------------------ */

/*** Seach bar section start from here */
.search-bar {
  background: #ffffff;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  gap: 40px;
  height: auto;
  min-height: 122px;
  box-shadow: 0px 4px 40px rgba(0, 0, 0, 0.18);
  border-radius: 20px;

  @media only screen and (max-width: 1200px) {
    gap: 10px;
  }
  @media only screen and (max-width: 991px) {
    padding: 14px 32px;
    flex-wrap: wrap;
    .inner-item {
      flex: 1;
    }
  }
  @media only screen and (max-width: 768px) {
    .inner-item {
      flex-basis: 100%;
      max-width: none;
    }
  }
  @media only screen and (max-width: 600px) {
    height: auto;
    row-gap: 16px;
    padding-inline: 22px;

    .inner-item {
      width: 100%;

      .lable {
        justify-content: space-between;
      }
    }
  }

  .label {
    display: flex;
    align-items: center;
    gap: 33px;

    font-family: "Outfit";
    font-style: normal;
    font-weight: 500;
    font-size: 24px;
    line-height: 150%;
    color: #4c4c4c;
    margin-bottom: 8px;
    cursor: pointer;

    @media only screen and (max-width: 991px) {
      font-size: 18px;
      line-height: normal;
      justify-content: space-between;
    }
  }

  .value {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    margin: 0px;
    color: #979797;

    @media only screen and (max-width: 600) {
      font-size: 14px;
    }
  }

  .dropdown-item {
    cursor: pointer;
  }

  .divider {
    margin: 0 auto;
    width: 1px;
    height: 90px;
    background: #c8cdc0;

    @media only screen and (max-width: 991px) {
      display: none;
    }
  }

  .search-btn-wrapper {
    @media only screen and (max-width: 991px) {
      width: 100%;
    }
  }

  .search-btn {
    width: 80px;
    height: 80px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background: var(--primary-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;

    &.reset {
      background: #e1e1e1;
      color: inherit;
      text-decoration: none;
    }

    &:active {
      transform: scale(0.95);
      box-shadow: 0 2px 8px rgba(236, 30, 36, 0.2);
      background: #d41920;
    }

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 50%;
      height: 100%;
      background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
      );
      transform: skewX(-25deg);
      transition: none;
    }

    &:hover::before {
      left: 150%;
      transition: 0.75s ease-in-out;
    }

    img {
      transition: transform 0.3s ease;
    }

    &:hover img {
      transform: scale(1.1);
    }

    &:active img {
      transform: scale(0.9);
    }

    /* Adjust for mobile */
    @media only screen and (max-width: 991px) {
      width: 100%;
      height: 46px;
      border-radius: 20px;

      &:hover {
        transform: scale(1.02); /* Smaller scale on mobile */
        box-shadow: 0 2px 10px rgba(236, 30, 36, 0.2);
      }

      &:active {
        transform: scale(0.98);
        box-shadow: 0 1px 5px rgba(236, 30, 36, 0.15);
      }
    }
  }
}

.search-group {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease-in-out;
}

.search-input:focus + .dropdown-menu + .search-input-wrapper::after,
.search-input-wrapper:focus-within::after {
  width: 100%;
}

.search-input:focus {
  outline: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: none;
  z-index: 1002;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: searchBarfadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-content {
  padding: 8px 0;
}

.dropdown-icon {
  transition: transform 0.3s ease;
}

.search-group.active .dropdown-icon {
  transform: rotate(180deg);
}

/* Scrollbar styling */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* States dropdown container */
.states-dropdown {
  position: absolute;
  display: none;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  transform: translateX(-10px);
  z-index: 1001;
  margin-left: 8px;
}

.states-dropdown.show {
  opacity: 1;
  transform: translateX(0);
  animation: statesFadeIn 0.3s ease-out forwards;
}

body.scroll-locked {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px); /* Prevent layout shift */
}

.states-dropdown.hiding {
  animation: statesFadeOut 0.5s ease-out forwards;
}

.states-dropdown .dropdown-item.selected {
  background: rgba(236, 30, 36, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.states-dropdown .dropdown-item:hover {
  background: rgba(236, 30, 36, 0.05);
  color: var(--primary-color);
}

/* Modified dropdown item styles */
.dropdown-item {
  padding: 12px 16px;
  font-family: "Outfit";
  font-size: 16px;
  color: #4c4c4c;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  position: relative;
  line-height: 1.5;
}

.dropdown-item .item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-menu.hiding {
  animation: searchBarfadeOut 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item[data-type="country"]:hover::after {
  color: var(--primary-color);
  transform: translateX(3px);
}

.dropdown-item[data-type="country"].selected::after {
  color: var(--primary-color);
}

/* Highlight match styling */
.dropdown-item strong {
  color: var(--primary-color);
  font-weight: 600;
}

.states-content {
  padding: 8px 0;
  max-height: 300px;
  overflow-y: auto;
}

/* Scrollbar styling for states dropdown */
.states-content::-webkit-scrollbar {
  width: 6px;
}

.states-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.states-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.states-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Keep existing dropdown animations */
@keyframes searchBarfadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

@keyframes searchBarfadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
  }
}

/* Mobile responsiveness */
@media only screen and (max-width: 600px) {
  .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
  }

  .dropdown-item[data-type="country"]::after {
    font-size: 18px;
  }

  .states-dropdown {
    min-width: 180px;
  }
}

/* Touch device optimization */
@media (hover: none) {
  .dropdown-item[data-type="country"]::after {
    transform: translateX(0);
  }

  .states-dropdown {
    margin-left: 4px;
  }
}

@keyframes statesFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes statesFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50px);
  }
}

.item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrow container */
.item-arrow {
  margin-left: 8px;
  font-size: 20px;
  color: #979797;
  transition: all 0.2s ease;
}

/* Highlight styling */
.dropdown-item .highlight {
  color: var(--primary-color);
  font-weight: 500;
  background: transparent;
}

/* Selected state */
.dropdown-item.selected {
  background: rgba(236, 30, 36, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

/* Hover state */
.dropdown-item:hover {
  background: rgba(236, 30, 36, 0.05);
  color: var(--primary-color);
}

.dropdown-item:hover .item-arrow {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* Remove the old arrow styling */
.dropdown-item[data-type="country"]::after {
  content: none;
}

/* Input styling */
.search-input {
  width: 100%;
  font-family: "Outfit";
  font-size: 16px;
  line-height: 150%;
  color: #4c4c4c;
  background: #ffffff;
  outline: none;
  border: none;
  padding: 8px 0;
}

.search-input::placeholder {
  color: #979797;
}

.state-item {
  padding: 12px 16px;
  font-family: "Outfit";
  font-size: 16px;
  color: #4c4c4c;
}

.state-item .country-label {
  font-size: 14px;
  color: #979797;
  margin-left: 8px;
}

.state-item:hover .country-label {
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e5e5;
  margin: 8px 0;
}

@media only screen and (max-width: 600px) {
  .state-item {
    padding: 10px 16px;
    font-size: 14px;
  }

  .state-item .country-label {
    font-size: 12px;
  }
}

/* No results state */
.no-results {
  padding: 16px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Seach bar section end here */
