@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

:root {
    /* primary color */
    --primary-color: #DBA765;
    --primary-color-90: rgba(219, 168, 101, 0.9);
    --primary-color-opacity-10: hsla(34, 62%, 63%, 0.1);
    --primary-color-opacity-20: hsla(34, 62%, 63%, 0.2);
    --primary-color-opacity-06: hsla(34, 62%, 63%, 0.06);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    width: 100%;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
    background-color: #F6F6F6;
}

header {
    width: 100%;
    background-color: white;
    color: var(--primary-color) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

header img {
    width: 15%;
    border-radius: 5px;
    padding-bottom: 10px;
    min-width: 180px;
}

header > p {
    text-align: center;
}

header .socialIcons {
    padding-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 20px;
}

header .socialIcons a {
    text-decoration: none;
    color: var(--primary-color);
    transition: scale 0.3s linear;
}

header .socialIcons a:hover {
    color: var(--primary-color);
    scale: 1.1;
}

/* Filter Navigation stylling start here */
.main-container {
    width: 90vw;
    margin: 0 auto;
}

.filter {
    width: 100%;
    height: 100%;
    margin-top: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.filter .serach-filter {
    width: 50%;
    height: 100%;
    height: max-content;
    display: flex;
    align-items: center;
    position: relative;
}

#searchBar {
    width: 100%;
    height: 40px;
    backdrop-filter: blur(5px);
    outline: none;
    font-size: 14px;
    font-weight: bold;
    font-variant: small-caps;
    background-color: transparent;
    padding: 7px 10px;
    letter-spacing: 1px;
    border: 1px solid #e1b9877a;
    border-radius: 5px;
    color: #000;
}

#searchBar::-webkit-input-placeholder {
    /* Edge */
    font-weight: lighter;
    font-size: 12px;
    width: 90%;
}

#searchBar:-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    font-weight: lighter;
    font-size: 12px;
    width: 90%;
}

#searchBar::placeholder {
    font-weight: lighter;
    font-size: 12px;
    width: 90%;
}

.search_icon {
    position: absolute;
    right: 15px;
    cursor: pointer;
}

#searchBar:active,
#searchBar:focus {
    background-color: rgba(0, 0, 0, 0.05);
}

.sortBy {
    height: 100%;
    width: 50%;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-end;
}

.sortBy .toggleLoc {
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    background-color: #F6F6F6;
    padding: 5px;
    letter-spacing: 1px;
    font-size: 14px;
    border: 1px solid #e1b9877a;
    border-radius: 5px;
}

.toggleLoc #toggleOnOff {
    padding-left: 7px;
}

.sortBy .toggleLoc #sortCheckbox {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.sortBy .toggleLoc #sortCheckbox:checked {
    background-color: var(--primary-color);
    color: white;
}

.sortBySelect,
.sort-filter {
    width: 150px;
    height: 40px;
    position: relative;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px 10px;
    transition: all 0.3s ease;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sortBySelect .drop_down,
.sort-filter .drop_down {
    position: absolute;
    top: 0px;
    right: 0;
    transition: all 0.3s ease;
}

select {
    appearance: none;
    background-image: url("./droparrow.svg");
    background-position: calc(100% - 10px) center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
}

.sortBySelect:hover,
.sort-filter:hover,
.sortBySelect:hover #drop_down {
    color: #000;
}

.sortBySelect:hover option {
    display: block;
}

.sortBySelect:hover #drop_down {
    /* transform: rotateZ(180deg); */
}

option:disabled {
    display: none !important;
}

.sortBySelect:hover #sort,
.sort-filter:hover #near_area {
    color: #000;
    /* background-color: rgba(0, 0, 0, 0.1); */
    /* box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1); */
}

#sort,
#near_area {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    width: 100%;
    height: 100%;
    outline: none;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    background-color: #F6F6F6;
    padding: 5px;
    letter-spacing: 1px;
    font-size: 14px;
    border: 1px solid #e1b9877a;
    border-radius: 5px;
}

.category-head {
    width: 100%;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* gap: 5px; */
}

.main-category-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* gap: 30px; */
}

.main-category-container .main-category-title {
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 12px;
    cursor: pointer;
    transition: background linear 0.4s;
    border: 1px solid #e1b9877a;
    border-radius: 5px 5px 0 0;
    /* transition-delay: 0.4s; */
}

.main-category-container .main-category-title.active {
    border-radius: 5px 5px 0 0;
    background-image: none !important;
    /* background: linear-gradient(90deg, var(--primary-color), var(--primary-color-90)) !important; */
    background: var(--primary-color);
    color: #fff;
    position: relative;
}

.main-category-container .main-category-title:first-child.active {
    animation: animatebgxforword linear 0.4s forwards;
}

.main-category-container .main-category-title:last-child.active {
    animation: animatebgxbackword linear 0.4s forwards;
}

.main-category-container .main-category-title.active::before {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: calc(100% + 5px);
    background: var(--primary-color-opacity-10);
    transition: all linear 0.4s;
    border-radius: 10px 10px 0 0;
    opacity: 0;
}

.main-category-container .main-category-title:first-child.active::before {
    animation: animatexforword linear 0.4s forwards;
}

.main-category-container .main-category-title:last-child.active::before {
    animation: animatexbackword linear 0.4s forwards;
}

@keyframes animatexforword {
    0% {
        opacity: 1;
        background: var(--primary-color);
        transform: translateX(100%);
    }
}

@keyframes animatexbackword {
    0% {
        opacity: 1;
        background: var(--primary-color);
        transform: translateX(-100%);
    }
}

@keyframes animatebgxforword {
    from {
        background-size: 0;
        background-position-x: 120px;
    }

    to {
        background-size: cover;
    }
}

@keyframes animatebgxbackword {
    from {
        background-size: 0;
        background-position: left;
    }
}

.category-head ul {
    width: 100%;
    list-style-type: none;
    display: flex;
    justify-content: center;
    column-gap: 12px;
    row-gap: 5px;
    background: var(--primary-color);
    padding: 10px;
    border-radius: 10px;
}

.category-head ul .category-title {
    flex: 0 0 calc((100%/5) - 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color-opacity-10);
    background-color: #fafafa;
    border-radius: 10px;
    padding: 12px;
    /* margin: 5px 0; */
    cursor: pointer;
    transition: all 0.4s ease;
}

.category-head ul .category-title:hover,
.category-head ul .category-title.active {
    background: var(--primary-color-opacity-20);
    background: #ffe5be;
}

.category-title li {
    padding: 0 10px;
    font-weight: bold;
    color: var(--primary-color);
}

.category-title span {
    color: var(--primary-color);
}

.active {
    /* background-image: linear-gradient(90deg, var(--primary-color), var(--primary-color-90)) !important; */
    background-color: var(--primary-color-opacity-20);
}

.active li,
.active span {
    color: var(--primary-color);
}


/* Project card area start here */
.posts-main-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 40px;
    position: relative;
    padding-bottom: 40px;
}



/* Projects card Start here */
.card {
    width: 100%;
    height: 350px;
    padding: 20px;
    border: 3px solid rgba(128, 128, 128, 0.3);
    background: linear-gradient(225deg, var(--primary-color-opacity-06), rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    transition: border 0.3s ease;
    margin: 0;
    position: relative;
}

.card.disabled {
    background: linear-gradient(45deg, rgba(128, 128, 128, 0.2), rgba(128, 128, 128, 0.03), rgba(255, 255, 255, 0.03));
}

.card:hover {
    border: 3px solid rgba(128, 128, 128, 0.8);
}

.card .card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: absolute;
    top: 20px;
    left: 20px;
}

.card .card-header .card-info {
    height: max-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card .card-header .card-info h2 {
    line-height: 30px;
    font-size: 1.10em;
    color: var(--primary-color);
    font-weight: bolder;
    text-transform: uppercase;
    user-select: text;
}

.card .card-header .card-info span {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--primary-color);
    user-select: text;
}

.card .card-header .card-info p {
    color: var(--primary-color);
    text-transform: capitalize;
    letter-spacing: 1px;
    font-weight: bold;
    user-select: text;
}

.card.disabled .card-header .card-info h2,
.card.disabled .card-header .card-info span,
.card.disabled .card-header .card-info p {
    color: gray;
}

.card .card-header img {
    max-width: 95px;
    max-height: 75px;
}


.card .card-body {
    width: 100%;
    height: 194px;
    display: grid;
    place-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.card .card-body img {
    width: 100%;
    height: 100%;
    scale: 0.6;
}

.card .card-footer {
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.card .card-footer button:not(.share) {
    padding: 5px 10px;
    background-image: linear-gradient(90deg, var(--primary-color), var(--primary-color-90));
    outline: none;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: #fff;
    transition: all 0.3s ease-in-out;
    font: 18px bold;
    font-family: 'Roboto', sans-serif !important;
    cursor: pointer;
}

.card .card-footer button:hover {
    background-image: none;
    color: var(--primary-color);
    background: var(--primary-color-opacity-10);
    /* background-color: rgba(0, 0, 0, 0.03); */
}

.card .card-footer button:not(.share):not(.disabled):active {
    box-shadow: inset 0px 2px 4px var(--primary-color);
}

.card .card-footer .share {
    border: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    -webkit-user-drag: none;
}

.card .card-footer .share svg rect {
    fill: var(--primary-color);
}

.card .card-footer .disabled {
    /* opacity: 0; */
    background-image: linear-gradient(90deg, #505050, #505050) !important;
    border: 2px solid #505050 !important;
    color: #000;
    cursor: not-allowed !important;
}

.card .card-footer .disabled:hover {
    color: #000;
    background: linear-gradient(90deg, #505050, #505050);
}


/* Responsive Stilling start here */
@media(max-width: 1600px) {
    .posts-main-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 1300px) {
    .category-head ul {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .category-head ul div:first-child {
        grid-column: 3 span;
    }
}


@media(max-width: 1170px) {
    .posts-main-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-head ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .category-head ul div:first-child {
        grid-column: 2 span;
    }
}

@media(max-width : 1130px) {
    .filter {
        flex-direction: column;
    }

    .filter .serach-filter {
        width: 100%;
    }

    .filter .sortBy {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

}

@media(max-width: 768px) {
    .posts-main-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width:768px) {
    header img {
        height: 20%;
        width: 20%;
    }

}

@media (max-width:550px) {
    .category-head ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .category-head ul div:first-child {
        grid-column: 2 span;
    }

    .card .card-footer button {
        font-size: 16px;
        padding: 5px;
    }

    .filter .sortBy {
        width: 100%;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .filter .sortBy .toggleLoc,
    .filter .sortBy .sort-filter,
    .filter .sortBy .sortBySelect {
        width: 100%;
    }
}


/* for mozilla firefox */
@-moz-document url-prefix() {
    header {
        padding: 10px 0 25px;
    }

    .card .card-body img {
        width: 100%;
        height: 194px;
    }
}

/* for no result found */
.empty {
    position: absolute;
    width: 100%;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* display: none; */
}

.hidden {
    display: none;
}

.block {
    display: block;
}