/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --color-muted: #8f9092;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-accent: #59b0f3;
  --color-accent-bg: rgba(17, 139, 232, 0.12);
  --color-cta: #ff9900;
  --color-white: #ffffff;
  --color-dark-text: #2c2f34;
  --color-category-base: #9a6f65;
  --color-category-hover: #5f443e;
  --text-sm: 0.875rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease;
  --color-partner-block-1: #ff069f;
  --color-partner-block-2: #ff5f06;
  --color-partner-block-3: #7a06ff;
  --color-partner-block-4: #ffd206;
  --color-partner-block-5: #0656ff;
  --color-partner-block-6: #19ff06;
  --color-partner-block-7: #333d29;
  --color-partner-block-8: #013a63;
  --color-partner-block-9: #007f5f;
  --color-partner-block-10: #002855;
}

#content {
  .wpbdp-page {
    ul.wpbdp-categories {
      margin-top: 2rem;
      gap: 1rem;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(2, 1fr);
      }
      @media screen and (max-width: 425px) {
        grid-template-columns: repeat(1, 1fr);
      }

      &::before {
        content: none;
      }
      li.cat-item {
        width: 100%;
        list-style: none;

        margin: 0;
        align-items: stretch;
        .container-wrapper {
          height: 100%;
          display: flex;
          flex-direction: column;
          gap: 1rem;
          .the-global-title {
            margin-bottom: 0;
            h3 {
              margin: 0;
              white-space: nowrap;
            }
          }

          .wpbdp-category-count {
            background-color: var(--brand-color);
            padding: 0.25rem 0.5rem;
            border-radius: var(--radius-lg);
            line-height: 0.95;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 400;
          }
          .wpbdp-category-description {
            @media screen and (min-width: 768px) {
              p {
                line-height: 1.25;
                font-weight: 300;
                font-size: 1rem;
                min-height: 4rem;
              }
            }
          }
          a.more-link {
            margin-top: auto;
            border-radius: var(--radius-md);
            .cat-term- {
              @media screen and (max-width: 768px) {
                display: none;
              }
            }
            .company-label {
              @media screen and (max-width: 768px) {
                /* display: none; */
              }
            }
          }
          &.magbet-category-card {
            padding: 1rem;
            .mag-box-title {
              margin-bottom: 0;
              h4 {
                margin-bottom: 0;
              }
            }
            .magbet-category-preview-listings {
              margin: 0;
              padding: 0;
              display: flex;
              gap: 0.5rem;
              align-items: center;
              li {
                list-style: none;
                height: 100%;
                flex: 1;
                a {
                  background-color: #f5f5f5;
                  padding: 0.5rem;
                  border-radius: 7px;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  height: 100%;
                  min-height: 4.75rem;
                  @media screen and (max-width: 768px) {
                    padding: 0.125rem !important;
                  }
                  img {
                    width: 100%;
                    width: auto;
                    max-height: 3rem;
                  }
                }
              }
            }
            a.more-link {
              background-color: var(--color-card-bg);
              border: 1px solid var(--color-grey-border);
              border-radius: var(--radius-md);
              font-size: 14px;
              padding: 7px 15px;

              &:hover {
                background-color: var(--color-brand-green);
                border-color: var(--color-brand-green);
              }
            }
          }
        }
        &:nth-child(odd) {
          .magbet-category-card {
            background-color: var(--tie-dark-skin-bg-main, #1f2024);
            background-color: #5e5e61;
            color: #ffffff;
          }
        }
        &:nth-child(even) {
          .magbet-category-card {
            a.more-link {
              background-color: #dedede;
              border: 1px solid #8e8e8e;
              color: var(--color-dark-text);
              &:hover {
                color: var(--color-white);
              }
            }
          }
        }
        @media screen and (max-width: 768px) and (min-width: 425px) {
          &:nth-child(4n + 2),
          &:nth-child(4n + 3) {
            .magbet-category-card {
              background-color: #ffffff;
              color: var(--tie-dark-skin-bg-main, #1f2024);
            }
          }
          &:nth-child(4n + 1),
          &:nth-child(4n + 4) {
            .magbet-category-card {
              background-color: var(--tie-dark-skin-bg-main, #1f2024);
              color: #ffffff;
            }
          }
        }
        /* 
        &:nth-child(1) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-1);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-1);
            }
          }
        }
        &:nth-child(2) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-2);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-2);
            }
          }
        }
        &:nth-child(3) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-3);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-3);
            }
          }
        }
        &:nth-child(4) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-4);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-4);
            }
          }
        }
        &:nth-child(5) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-5);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-5);
            }
          }
        }
        &:nth-child(6) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-6);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-6);
            }
          }
        } */
      }
    }
    .magbet-category-page {
      .magbet-sibling-categories {
        margin-top: 2rem;
        margin-bottom: 1rem;
        display: flex;
        gap: 0.25rem;
        align-items: center;
        justify-content: space-between;
        a.magbet-sibling-category {
          font-weight: 400;
          color: #002e14;
          background-color: #06cb5b;
          border-radius: 5px;
          width: 100%;
          padding: 0.25rem 0.5rem;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 0.875rem;
          font-weight: 600;
          &:hover {
            text-decoration: none !important;
            color: #424242;
          }
          &.is-active {
            font-weight: 600;
            background-color: #03aa4c;
            color: #fff;
          }
          .magbet-sibling-count {
            display: none;
          }
        }
        @media screen and (max-width: 768px) {
          display: grid;
          grid-template-columns: repeat(3, 1fr);
        }
      }
      .magbet-category-subheader {
        display: none;
        p {
          font-size: 1rem;
        }
      }
      .magbet-listings-wrapper {
        display: flex;
        flex-direction: column;
        .wpbdp-listings-sort-options {
          width: 30%;
          align-self: flex-end;
          @media screen and (max-width: 768px) {
            display: none;
          }
        }
        .wpbdp-listings-list- {
          .wpbdp-listing-excerpt {
            background-color: var(--color-dark-bg);
            padding: 0;
            border-radius: var(--radius-md);
            .listing-title {
              border-bottom-color: var(--color-white);
              h3 {
                padding: 0.25rem 1rem;
                a {
                  color: var(--color-white);
                  font-size: 1.25rem;
                  font-weight: 400;
                }
              }
            }
            .excerpt-content {
              padding: 20px 30px;
              display: flex;
              gap: 1rem;
              @media screen and (max-width: 768px) {
                flex-direction: column;
              }
              .listing-thumbnail {
                float: none;
                width: unset;
                a {
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  background: var(--color-white);
                  border-radius: var(--radius-md);
                  overflow: hidden;
                  min-width: 12rem;
                  padding: 1rem;
                }
              }
              .listing-details {
                margin-left: 0;
                .wpbdp-field-category {
                  display: none;
                }
                .wpbdp-field-excerpt {
                  color: var(--color-white);
                  font-size: 1rem;
                  line-height: 1.25;
                  font-size: 100;
                  .field-label {
                    display: none;
                  }
                  .value {
                    font-size: 1rem;
                    font-weight: 300;
                  }
                }
                .wpbdp-field-tags,
                .address-info {
                  display: none;
                }
                .wpbdp-field-website {
                  .field-label {
                    color: var(--color-white);
                    font-size: 1rem;
                    font-weight: 500;
                  }
                  .value {
                    a {
                      color: var(--color-white);
                      font-size: 1rem;
                      font-weight: 300;
                      line-height: 1;
                      display: inline-block;
                      &:hover {
                        color: var(--color-white);
                      }
                    }
                  }
                }
              }
            }
            .listing-actions {
              display: none;
            }
          }
        }
      }
    }
  }
  .wpbdp-listing-single {
    .listing-columns {
      .main-image {
        margin: 0;
        padding: 0;
      }
      display: flex;
      flex-direction: column;
      .listing-details {
        margin-left: 0;
      }
    }
  }
}

.magbet-listings-wrapper,
.search-results {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
  .wpbdp-listings-sort-options {
    width: 30%;
    align-self: flex-end;
    @media screen and (max-width: 768px) {
      display: none;
    }
  }
  .magbet-listing-page {
    .wpbdp-listings-list {
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      .magbet-partner-card,
      .wpbdp-pagination {
        grid-column: unset;
      }
      .wpbdp-pagination {
        grid-column: 1/-1;
      }
      .magbet-partner-card {
        padding: 0rem;
        border-color: #cfcfcf;
        transition: border-color 0.3s ease;
        .listing-actions {
          display: none;
        }
        .listing-thumbnail {
          a {
            background-color: #fff;
            display: flex;
            padding: 0.5rem;
            border-radius: 0;
            align-items: center;
            justify-content: center;
            min-height: 8rem;
            img {
              max-width: 75% !important;
            }
          }
        }
        .listing-details {
          display: flex;
          flex-direction: column;
          /*padding: 1rem;*/
          background-color: #363636;
          .wpbdp-field-category,
          .address-info,
          .wpbdp-field-phone,
          .wpbdp-field-tags {
            display: none;
          }
          .wpbdp-field-excerpt {
            margin-top: 0;
            .field-label {
              display: none;
            }
            .value {
              font-size: 1rem;
              font-weight: 300;
              line-height: 1.25;
              display: -webkit-box;
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 3;
              overflow: hidden;
             
            }
          }
          .wpbdp-field-title {
            display: flex;
            align-items: center;
            justify-content: center;
            .field-label {
              display: none;
            }
            .value {
              width: 100%;
              display: none;
              a.special-disabled {
                position: relative;
                background-color: var(--tie-buttons-color, var(--brand-color));
                color: var(--tie-buttons-text, var(--bright-color));
                border-radius: var(--radius-md, 7px);
                border: var(--tie-buttons-border-width, 0) solid
                  var(--tie-buttons-border-color, var(--brand-color));
                padding: 10px 25px;
                font-weight: 600;
                font-size: 14px;
                display: inline-block;
                text-align: center;
                line-height: 21px;
                cursor: pointer;
                text-decoration: none;
                vertical-align: middle;
                transition: 0.3s;
                appearance: none;
                margin-top: 1rem;
                width: 100%;
                &:hover {
                  text-decoration: none;
                  color: var(
                    --tie-buttons-text,
                    var(--bright-color)
                  ) !important;
                  background-color: var(
                    --tie-buttons-hover-color,
                    var(--dark-brand-color)
                  );
                }
              }
            }
          }
          .wpbdp-field-category,
          .wpbdp-field-website {
            display: none;
          }
          &:hover {
            background-color: #777777;
          }
        }
        &:hover {
          border-color: #fff;
        }
      }
      @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(3, 1fr);
      }
      @media screen and (max-width: 768px) {
        grid-template-columns: repeat(2, 1fr);
      }
      @media screen and (max-width: 425px) {
        grid-template-columns: repeat(1, 1fr);
      }
    }
  }
}

.wpbdp-main-box {
  .main-fields {
    form {
      .submit-btn {
        display: flex;
        justify-content: space-between;
        input[type="submit"].wpbdp-button {
          border-radius: var(--radius-md);
          line-height: 1;
          font-size: 1rem;
          flex-grow: 1;
          border: 1px solid #cacaca !important;
          background-color: #dedede !important;
          color: #1c1105 !important;
          &:hover {
            background-color: var(--color-brand-green) !important;
            color: var(--color-white) !important;
          }
        }
        .wpbdp-advanced-search-link {
          display: none;
        }
      }
    }
  }
}

/* ============================================================
   Magbet Related News
   ============================================================ */
.container-wrapper.related-news {
  margin-top: 2rem;
}
.magbet-related-news {
  padding: 15px 30px;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.13);
  margin-top: 2rem;
  @media screen and (max-width: 768px) {
    margin-right: -15px;
    margin-left: -15px;
    width: auto;
  }
  .the-global-title {
    &::before {
      background: var(--color-brand-red);
    }
  }
  .mag-box-title {
    h3 {
      margin: 0 20px 0 0;
      font-size: 1.125rem;
      &.title-mobile {
        display: none;
      }
      @media screen and (max-width: 768px) {
        &.title-mobile {
          display: block;
        }
        &.title-desktop {
          display: none;
        }
      }
    }

    .tie-alignright .slider-arrow-nav {
      display: flex;
      margin: 0;
      padding: 0;

      li {
        list-style: none;
        font-size: 0;
        margin-bottom: 0;

        a {
          color: var(--color-dark-text);
          border-color: var(--color-border);

          span[class^="tie-icon-"] {
            color: var(--color-dark-text);
          }
          &:not(.pagination-disabled):hover {
            span[class^="tie-icon-"] {
              color: var(--color-white);
            }
          }
        }
      }
    }
  }

  .posts-items {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1rem;

    li {
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: column;
      width: calc(100% / var(--per-page-desktop));
      @media screen and (max-width: 768px) {
        width: calc(100% / var(--per-page-mobile));
      }
      .post-title {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.25;
        margin-top: 0.5rem;
        /* margin-right: 15px; */
        a {
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 3;
          overflow: hidden;
          background: none;
        }
      }

      .post-thumb {
        /* float: left; */
        /* margin-right: 15px; */
        height: auto;
        img {
          width: 100%;
          height: auto;
          max-width: 100%;
        }
      }
      .post-details {
        .post-excerpt {
          font-size: 1rem;
          line-height: 1.25rem;
        }
      }
    }
  }

  a.all-by-partner-button {
    float: right;
    margin-top: 1rem;
    background-color: var(--color-grey-lighter);
    color: var(--color-black);
    text-align: center;
    border: 1px solid var(--color-grey-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    padding: 7px 15px;
    &:hover {
      background-color: var(--color-brand-red);
      border-color: var(--color-brand-red);
      color: var(--color-white);
    }
  }
}

/* Listing page */
#wpbdp-categories .wpbdp-categories .cat-item .container-wrapper {
  @media screen and (max-width: 425px) {
    border-radius: 0;
  }
}
#the-post .like-header {
  background-color: #e8e8e8;
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 1rem 1rem 1rem 2.5rem;
  border: none;
  border-bottom: 2px solid #919191;
  align-items: center !important;
  display: flex;
  justify-content: space-between;
  h1.page-title {
    position: relative;
    font-size: 1.125rem;
    padding: 3px 0;
    font-weight: 600;

    line-height: 1;
    color: #000;
    margin: 0;
    a.cat-parent {
      color: #000 !important;
      opacity: 0.4;
      font-weight: 700;
      &:hover {
        color: #000;
        opacity: 1;
      }
    }
    .cat-title {
      font-weight: 700;
    }
    &:before {
      content: "";
      background: var(--color-brand-green);
      width: 10px;
      height: 15px;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      left: 0;
      margin-left: -1.5rem;
    }
  }
  .wpbdp-main-box {
    margin: -1rem 0;
    @media screen and (max-width: 768px) {
      display: none;
    }
    .main-fields {
      &.box-row {
        &.cols-2 {
          margin: 4px 0;
        }
      }
      form {
        display: flex;
        flex-direction: row;
        align-items: center;
        .keywords-field {
          min-height: 36px;
          margin: 6px 0;
        }
        .button.wpbdp-button,
        input[type="submit"] {
          height: 36px;
          margin: 6px 0 !important;
          padding: 0 1rem !important;
        }
      }
    }
  }
  & + .wpbdp-main-box {
    display: none;
    @media screen and (max-width: 768px) {
      display: block;
    }
  }
}

.wpbdp-listing-single {
  .magbet-single-partner-container {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
    .magbet-single-partner-header-left {
    }
    .magbet-single-partner-header-right {
      .partner-image {
        width: 12rem;
        height: 6.25rem;
        padding: 0.5rem;
        border: 1px solid #c4c4c4;
        border-radius: var(--radius-md);
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        .listing-thumbnail {
          a {
            font-size: 0;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            img {
              width: auto;

              /*  max-width: 100% !important;*/
              max-height: unset;
              max-height: 5rem;
            }
          }
        }
      }
    }
    @media screen and (max-width: 768px) {
      flex-direction: column;
      align-items: center;
      .magbet-single-partner-header-left {
        width: 100%;
        .post-cat-wrap {
          display: flex;
          align-items: flex-start;
        }
        .partner-title {
          h1 {
            text-align: center;
            margin-bottom: 0;
          }
        }
      }
      .magbet-single-partner-header-right {
        width: 100%;
        .partner-image {
          width: 100%;
          align-items: center;
        }
      }
    }
  }
  .magbet-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    form {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 6px 0;
      .submit-btn {
        display: flex;
        justify-content: space-between;
        input[type="submit"].wpbdp-button {
          border-radius: var(--radius-md);
          line-height: 1;
          font-size: 1rem;
          flex-grow: 1;
          border: 1px solid #cacaca !important;
          background-color: #dedede !important;
          color: #1c1105 !important;
          &:hover {
            background-color: var(--color-brand-green) !important;
            color: var(--color-white) !important;
          }
        }
        .wpbdp-advanced-search-link {
          display: none;
        }
      }
    }
  }

  .magbet-partner-headers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    @media screen and (max-width: 768px) {
      flex-direction: column;
      .partner-image {
        width: 100%;
        .listing-thumbnail {
          width: 100%;
          a {
            width: 100%;
            display: block;
            img {
              width: 100%;
              height: auto;
              max-width: 100% !important;
              max-height: unset;
            }
          }
        }
      }
    }
  }

  .listing-description {
    p {
      margin-bottom: 0;
    }
  }

  .partner-fields {
    margin-bottom: 1rem;
    /*display: grid;*/
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
    @media screen and (max-width: 768px) {
      justify-content: space-between;
      gap: 1rem;
    }
    grid-template-columns: repeat(2, 1fr);
    background-color: #e8e8e8;
    border-top: 1px solid var(--color-grey-border);
    padding: 0.5rem 1rem;
    .wpbdp-field-display {
      @media screen and (max-width: 768px) {
        flex-direction: column;
      }
      &.wpbdp-field-association-meta {
        font-size: 1rem;
        font-weight: 300;
        display: flex;
        align-items: baseline;
        .field-label {
          font-weight: 300;
          &:after {
            content: ":";
          }
        }
        .value {
          font-weight: 600;
        }
      }
    }
    .wpbdp-field-meta.wpbdp-field-type-url {
      /* display: none;*/
    }
    .social-field {
      display: none;
    }
    .social-fields {
      .social-field {
        display: block;
      }
    }
    .wpbdp-field-meta {
      div {
        a {
          width: 20px;
          height: 20px;
          background-repeat: no-repeat;
          background-position: center center;
          background-size: contain;
          text-indent: 100%;
          white-space: nowrap;
          overflow: hidden;
          display: block;
          @media screen and (max-width: 768px) {
            width: 1.75rem;
            height: 1.75rem;
          }
        }
      }
      &.wpbdp-field-link_to_website {
        div {
          a {
            background-image: url("/wp-content/uploads/2026/07/icon-globe.svg") !important;
          }
        }
      }
      &.wpbdp-field-link_to_linkedin {
        div {
          a {
            background-image: url("/wp-content/plugins/business-directory-plugin/assets/images/social/LinkedIn.svg") !important;
          }
        }
      }
      &.wpbdp-field-link_to_facebook {
        div {
          a {
            background-image: url("/wp-content/plugins/business-directory-plugin/assets/images/social/Facebook.svg") !important;
          }
        }
      }
      &.wpbdp-field-link_to_x__twitter {
        div {
          a {
            background-image: url("/wp-content/plugins/business-directory-plugin/assets/images/social/Twitter.svg") !important;
          }
        }
      }
      &.wpbdp-field-link_to_instagram {
        div {
          a {
            background-image: url("/wp-content/plugins/business-directory-plugin/assets/images/social/Instagram.svg") !important;
          }
        }
      }
    }
  }
  .listing-actions {
    display: none;
  }
}

.magbet_single_category {
  .like-header:not(.magbet-category-header) {
    display: none;
    & + .wpbdp-main-box {
      display: none;
    }
  }
}

article.magbet_single_partner {
  .like-header:not(.magbet-category-header) {
    display: none;
    & + .wpbdp-main-box {
      display: none;
    }
  }
  .entry-header-outer {
    display: none;
  }

  .post-cat-wrap {
    /* margin-top: 1rem;*/
    a.main-cat {
      background-color: #0aa14b;
      &:hover {
        background-color: #11713a;
      }
    }
    .post-cat {
      &.visually-hidden {
        display: none;
      }
    }
  }
}

.wpbdp-wp-theme-jannah-child {
  &.wpbdp-view-main,
  &.wpbdp-view-show_category,
  &.wpbdp-view-show_l-isting,
  &.wpbdp-view-search {
    article.container-wrapper {
      padding: 0;
      background-color: unset;
      border: none;
      .entry-content {
        padding: 0;
      }
    }
  }
}
