.works-page__gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    padding-top: 2em;
    min-height: 100dvh;
}

.works-page__gallery .works-page__grid {
    max-width: 90em;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 18em));
    justify-content: center;
    gap: 2em;
    padding: 1em;
}

.works-page__gallery .works-page__grid .works-page__card {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
    background-color: #303446;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.5s ease-in-out;
    text-decoration: none;
    color: #fff;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__image {
    width: 100%;
    min-height: 15em;
    background-position: center;
    background-size: cover;
    border-radius: 8px;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5em;
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.works-page__gallery .works-page__grid .works-page__card .works-page__details-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 0 0 1em 0;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__details-wrapper .card-title {
    font-weight: 200;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__details-wrapper .chip {
    border: 1px solid #ffffff;
    width: fit-content;
    padding: 0.5em 1em;
    border-radius: 5em;
    font-family: "Phagspa", sans-serif;
    font-size: 12px;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__details-wrapper .card-desc {
    width: 100%;
    font-family: 'PT Sans Narrow', sans-serif;
    font-size: 1.2em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.works-page__gallery .works-page__grid .works-page__card .works-page__details-wrapper .card-btn {
    width: fit-content;
    justify-self: end;
}

.works-page__gallery .works-page__grid .works-page__card:hover {
    transform: scale(1.05);
}

.services-works {
    width: 100%;
    padding: 2em 0 12em;
    opacity: 0;
    transform: translateY(20px);
}

/* .services__cards {
  width: 90%;
  max-width: 50em;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
  gap: 1em;
  justify-content: center;
  padding: 3em 0 0 0;
} */

.services__cards {
    width: 80%;
    max-width: 60em;
    height: 50em;
    margin: 0 auto;
    display: grid;
    gap: 1.5em;
    grid-template-columns: 1fr;
    justify-content: center;
    padding: 3em 0 0 0;
}

@media screen and (min-width: 764px) {
    .services__cards {
        grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
        height: 25em;
    }

}

.services__flip-card {
    background-color: transparent;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.5s ease-in-out;
}

.services__flip-card:hover {
    transform: scale(1.05);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform .8s;
    transform-style: preserve-3d;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* .flip-card-inner:hover {
    transform: rotateY(180deg);
} */

.flip-card-front,
.flip-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-position: center;
    background-size: cover;
    border-radius: 5px;
    
}

.flip-card-front img,
.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.flip-card-back {
    color: white;
    transform: rotateY(180deg);
    height: 100%;
    width: 100%;
}

.back-card-overlay {
    height: 100%;
    width: 100%;
    border-radius: 5px;
    background-color: #021a4fa8;
    padding: 2em;

}

.back-content {
    border: 3px solid #fff;
    border-radius: 3px;
    width: 100%;
    height: 100%;
    font-family: 'PT Sans Narrow', sans-serif;
    font-weight: 300;
    font-size: clamp(.8em, 1vw, 1em);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
    padding: 1em;
}

.back-content .card-btn {
    padding: 0.5em 1em;
    border: 1px solid #fff;
    border-radius: 5em;
    transition: all 0.5s ease; 
    color: #fff;
    cursor: pointer;
}

.back-content .card-btn a {
    font-size: large;
}

.back-content .card-btn:hover {
    background-color: #ffffff;
    border: none;
    a {
        color: #303446;
    }
}

.services__card-front,
.services__card-back {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;

    &:hover {
        transform: rotateY(180deg);
    }

    .img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* .services__card {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.services__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
} */


/* category list */
.works .works_cat {
    display: flex;
    flex-wrap: wrap;
    width: calc(100% - 40px);
    max-width: 100%;
    margin: 0 auto 20px;
    justify-content: center;
    align-items: center;
    list-style: none;
}

@media only screen and (min-width: 641px) {
    .works .works_cat {
        width: 100%;
        margin: 0 auto 50px;
    }
}

.works #filter {
    margin: 50px;
}

.works #filter .works_cat li {
    background: transparent;
    position: relative;
    overflow: hidden;
    height: fit-content;
    width: fit-content;
    margin: 0 15px 13px 0;
    /* padding: 5px 20px 6px; */
    border-radius: 15px;
}

.works #filter .works_cat li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(248, 93, 9, 1) 7%,
            rgba(253, 178, 22, 1) 100%);
    opacity: 0;
    /* Start fully transparent */
    transition: opacity 0.5s ease;
    /* Smooth transition */
    z-index: -1;
    /* Ensure it sits behind content */
}

.works #filter .works_cat li:hover::before {
    opacity: 1;
    /* Show the gradient */
}

.works #filter .works_cat li label {
    display: block;
    /* color: #222; */
    border: transparent;
    border-radius: 15px;
    padding: 5px 20px 6px;
    /* margin: 0 15px 13px 0; */
    cursor: pointer;
    font-size: 18px;
    transition: 0.5s;
    transition: all 1 1 ease-in;
    font-family: "PT Sans Narrow", sans-serif;
    z-index: 5;
}

.works #filter .works_cat li input[type="checkbox"] {
    display: none;
}

@media only screen and (min-width: 641px) {
    .works #filter .works_cat li input {
        font-size: 16px;
        padding: 5px 20px 7px;
        margin: 0 15px 0 0;
    }
}

#works_arch .inner #filter .works_cat li label input[type="checkbox"]:checked+label {
    color: #fff;
    background-color: #f39800;
    /* border-color: #f39800; */
}

/* .works #filter .works_cat li label.current,
.works #filter .works_cat li label:hover {
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(248, 93, 9, 1) 7%,
    rgba(253, 178, 22, 1) 100%
  );
} */
li:has(.current) {
    background: linear-gradient(180deg,
            rgba(248, 93, 9, 1) 7%,
            rgba(253, 178, 22, 1) 100%) !important;
}

/* .current {
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(248, 93, 9, 1) 7%,
    rgba(253, 178, 22, 1) 100%
  );
} */

/* Pagination */
.works .pager_box {
    overflow: hidden;
    width: 100%;
    padding: 0 0 35px;
    margin: 20px auto -20px;
}

@media only screen and (min-width: 641px) {
    .works .pager_box {
        padding: 0 0 100px;
        margin: 50px auto -20px;
    }
}

.works .pager_box ul {
    text-align: center;
    font-weight: bold;
}

.works .pager_box li {
    border-radius: 15px;
    display: inline-block;
    margin: 0 4px 15px;
}

@media only screen and (min-width: 641px) {
    .works .pager_box li {
        margin: 0 10px;
    }
}

.works .pager_box li .page-numbers,
.works .pager_box li .page-numbers a {
    display: inline-block;
    color: #fff;
    background: transparent;
    width: 44px;
    height: 44px;
    line-height: 45px;
    font-size: 13px;
    /* border: 1px solid #222; */
    vertical-align: bottom;
    font-family: "PT Sans Narrow", sans-serif;
    border-radius: 100%;
}

@media only screen and (min-width: 641px) {

    .works .pager_box li .page-numbers,
    .works .pager_box li .page-numbers a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 17px;
    }
}

.works .pager_box li .dots {
    width: 13px;
    font-size: 0;
    border: none;
    /* margin: 0 -20px; */
}

@media only screen and (min-width: 641px) {
    .works .pager_box li .dots {
        width: 20px;
        margin: 0 -25px;
    }
}

.works .pager_box li .dots::before {
    content: "...";
    font-size: 14px;
    line-height: 45px;
}

@media only screen and (min-width: 641px) {
    .works .pager_box li .dots::before {
        font-size: 18px;
        /* line-height: 65px; */
    }
}

.works .pager_box li .current,
.works .pager_box li .page-numbers:hover {
    color: #fff;
    background: #f39700;
}

.works .pager_box li .dots:hover {
    color: #fff;
    background: transparent;
}

.works .pager_box .prev::before {
    font-family: "Font Awesome 5 Free";
    content: "\f104";
}

.works .pager_box .next::before {
    font-family: "Font Awesome 5 Free";
    content: "\f105";
}