.listing-section{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: fit-content;
    box-sizing: border-box;
}

.list-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 90%;
}

.list-title{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    margin-bottom: 30px;
}

.list-title h1 {
    font-size: 1.7em;
    font-weight: 500;
    margin: 0;
}

.list-title p{
    font-size: 1em;
    font-weight: 200;
    color: gray;
    margin: 0;
}

.list-nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 50px;
    padding-bottom: 10px;
    min-height: fit-content;
    border-bottom-style: solid;
    border-width: 1px;
    border-color: rgb(233, 233, 233);
    box-sizing: border-box;
}

.list-input{
    font-size: 0.8em;
    border: 1px solid rgb(233, 233, 233);
    border-radius: 8px;
    min-width: 50%;
    box-sizing: border-box;
    padding: 10px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #f5f5f5;
    outline: none;
}

.list-input:focus{
    border: 2px solid rgb(100, 100, 226); 
}

.filter-group{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-height: 100%;
    position: relative;
}

.filter-button{
    background-color: #f5f5f5;
    border: 1px solid rgb(233, 233, 233);
    border-radius: 8px;
    box-sizing: border-box;
    padding: 10px;
    width: 80px;
    font-size: 0.8em;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-button:hover{
    border: none;
    background-color: rgb(100, 100, 226);
    color: white;
}

.item-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin: 10px 0;
    gap: 15px;
    /* space between items */
    overflow-y: auto;
    box-sizing: border-box;
}

/* item style */
.item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    background-color: #f2f2f2;
    border-radius: 10px;
    border: 1px solid #e4e4e4;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.item-cover {
    width: 100%;
    height: 200px;
    position: relative;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    overflow: hidden;
}

.item-cover .top {
    position: relative;
}

.item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top p{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(226, 104, 104);
    color: white;
    padding: 5px;
    width: 50px;
    border-radius: 20px;
    font-size: 0.7em;
    margin: 10px;
}

/* .top button{

} */
/* 
.case{
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    font-size: 1.2em;
    padding: 10px;
    font-weight: 400;
    height: fit-content;
    width: 100%;
    margin: 0px;
    color: white;
    background-color: rgb(226, 104, 104);
    box-sizing: border-box;
}
.i-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 60%;
    width: 100%;
    gap: 3px;
}

.item-image{
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}
*/

.i-desc-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

.i-desc-wrapper h1 {
    font-size: 1.3em;
    font-weight: 400;
    margin: 0 0 5px 0;
}

.i-desc-wrapper p {
    font-size: 0.95em;
    font-weight: 200;
    margin: 2px 0;
    color: gray;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.i-desc-wrapper div{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 55%;
}

.i-desc-wrapper div span{
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.where{
    font-size: 0.9em;
    font-weight: 200;
    margin: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-button {
    width: 100%;
    height: 45px;
    margin-top: 10px;
    background-color: rgb(127, 146, 234);
    border-radius: 5px;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-button:hover {
    background-color: rgb(149, 165, 237);
}

/* pop up item */
.item-desc{
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    min-height: 550px;
    background-color: white;
    z-index: 1001;
    box-sizing: border-box;
    padding: 20px;
}
.desc-item-name{
    font-size: 1.7em;
    font-weight: 500;
    margin: 0;
}
.desc-desc{
    min-height: 70px;
    max-height: 80px;
    min-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgb(79, 79, 79);
}
.desc-image{
    display: flex;
    height: 270px;
    min-width: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.desc-info{
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    margin-bottom: 10px;
    margin-top: 10px;
    gap: 10px;
}
.desc-person-name{
    margin: 0;
    font-size: 1em;
    font-weight: 400;
    color: rgb(79, 79, 79);
}
.desc-where{
    margin: 0;
    font-size: 1em;
    font-weight: 400;
    color: rgb(79, 79, 79);
}
.desc-when{
    margin: 0;
    font-size: 1em;
    font-weight: 400;
    color: rgb(79, 79, 79);
}
.desc-contact{
    border: none;
    border-radius: 10px;
    padding: 12px;
    box-sizing: border-box;
    font-size: 1.1em;
    background-color: rgb(127, 146, 234);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.desc-contact:hover{
    background-color: rgb(149, 165, 237);
}

.item-span-tag{
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    padding-left: 3px;
}

.item-span-tag-image{
    width: 20px;
}

.filter-desc{
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    background-color: white;
    width: 150px;
    height: fit-content;
    border-radius: 10px;
    border: 1px solid rgb(233, 233, 233);
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.filter-desc span{
    display: flex;
    flex-direction: column;
    gap:5px;
    padding: 10px;
    width: 100%;
    min-width: fit-content;
}

.filter-desc span label {
    font-size: 0.9em;
    color: gray;
    margin-top: 10px;
}
.filter-desc span select{
    display: flex;
    font-size: 0.9em;
    padding: 10px;
    color: gray;
    background-color: white;
    border: 1px solid rgb(233, 233, 233);
    border-radius: 10px;
}

/* Tablet */
@media (min-width: 768px) {
    .list-title h1 {
        font-size: 2em;
    }
    .list-title p{
        font-size: 1em;
    }
    .item-container {
        justify-content: flex-start;
    }
    .item{
        width: 48%;
        max-width: 300px;
    }
    .case{
        font-size: 1em;
    }
    .date {
        font-size: 0.7em;
    }

    .name {
        font-size: 1.1em;
    }

    .where {
        font-size: 0.8em;
    }

    .list-input {
        font-size: 0.9em;
        min-width: 25%;
    }

    .filter-button {
        width: 120px;
        font-size: 0.9em;
    }
    .item-desc{
        min-width: 450px;
    }

    .desc-desc{
        max-width: 450px;
    }
    .desc-image{
        min-width: 450px;
    }
    .desc-person-name{
        font-size: 1em;
    }
    .desc-where{
        font-size: 1em;
    }
    .desc-when{
        font-size: 1em;
    }
    .item-cover {
        height: 180px;
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .item {
        width: 30%;
        max-width: 250px;
    }
    .case {
        font-size: 1.2em;
    }

    .date {
        font-size: 0.9em;
    }

    .name {
        font-size: 1.2em;
    }
    .where {
        font-size: 0.8em;
    }
    /* .item-desc {
        min-width: 550px;
        min-height: 650px;
    } */
    .desc-desc{
        max-width: 550px;
    }
    .desc-image{
        min-width: 100%;
        min-height: 370px;
    }
    .item-cover {
        height: 200px;
    }
}