.post-archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70%;
    margin: 0 auto;
}

.post-archive .search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 40px;
}

.post-archive .search-bar {
    display: flex;
    align-items: center;
    width: fit-content;
    height: fit-content;
    padding-bottom: 5px;
    border-bottom: 2px solid #4f48d6;
}

.post-archive .search-bar-container {
    position: relative;
}

.post-archive .category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.post-archive .post a {
    color: #4f48d6;
    text-decoration: none;
}

.post-archive .post {
    display: flex;
    flex-direction: column;
    flex: 1 1 48%; /* Two posts per row, considering the gap */
    max-width: 49%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    color: #4f48d6;
}

.post-archive .post .thumbnail-link {
    display: flex;
    position: relative;
    padding-top: 56.25%;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.post-archive .post .thumbnail-link img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the area without distortion */
}

.post-archive .post button {
    font-family: "VT323", monospace;
    font-size: 1.2rem;
    padding: 0 10px;
    color: #4f48d6;
    background-color: #fee664;
    border: none;
}

.post-archive .post .b-link {
    width: fit-content;
}

.post-archive .post .post-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0 20px;
}

.post-archive .post .cat-container {
    display: flex;
    justify-content: flex-start;
    font-size: 1.25rem;
    margin-top: 10px;
}

.post-archive .post .cat-container .date-text {
    color: #4f48d6;
    font-weight: 700;
    opacity: 0.8;
}

.post-archive .post .post-info img {
    height: 1.8rem;
}

.post-archive .post .post-info div {
    display: flex;
    gap: 0 10px;
    align-items: center;
}

.post-archive .post .post-info div p {
    font-size: 1.15rem;
    text-align: center;
    margin: 0;
}

.post-archive .post h5 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    max-width: 65%;
}

.post-archive .page-content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
}

.post-archive .see-more-container {
    margin: 40px 0;
}

.post-archive .bouton-voir-plus {
    font-family: "VT323", monospace;
    font-size: 1.2rem;
    padding: 0 10px;
    color: #4f48d6;
    background-color: #99e6ff;
    border: none;
}

.post-archive .bouton-voir-plus:hover {
    background-color: #99e6ff;
    color: #4f48d6;
}

.post-archive .bouton-voir-plus:focus {
    background-color: #99e6ff;
    color: #4f48d6;
}

.post-archive .search-container h2 {
    color: #4f48d6;
}

.post-archive .search-bar input {
    border: none;
    width: 200px;
    color: #4f48d6;
    padding: 0;
}

.post-archive .search-bar input::placeholder {
    color: #4f48d6;
}

.post-archive .search-bar input:focus {
    outline: none;
}

.post-archive .category-filter {
    font-family: "VT323", monospace;
    font-size: 1.3rem;
    padding: 0 10px;
    color: #4f48d6;
    border: none;
    border-radius: 10px;
}

.post-archive #search-button {
    border: none;
    padding: 0 10px;
}

.post-archive #search-button img {
    width: 16px;
    height: auto;
}

.post-archive #search-button:hover {
    background-color: transparent;
}

.post-archive #search-button:focus {
    background-color: transparent;
}

.post-archive .category-buttons > *:nth-child(3n + 1) {
    background-color: #fee664;
    color: #f83d49;
}

.post-archive .category-buttons > *:nth-child(3n + 2) {
    background-color: #4f48d6;
    color: #fff;
}

.post-archive .category-buttons > *:nth-child(3n + 3) {
    background-color: #99e6ff;
    color: #4f48d6;
}

.post-archive .category-buttons > *:nth-child(3n + 1):hover {
    background-color: #fee664;
    color: #f83d49;
}

.post-archive .category-buttons > *:nth-child(3n + 2):hover {
    background-color: #4f48d6;
    color: #fff;
}

.post-archive .category-buttons > *:nth-child(3n + 3):hover {
    background-color: #99e6ff;
    color: #4f48d6;
}
.post-archive .category-buttons > *:nth-child(3n + 1):focus {
    background-color: #fee664;
    color: #f83d49;
}

.post-archive .category-buttons > *:nth-child(3n + 2):focus {
    background-color: #4f48d6;
    color: #fff;
}

.post-archive .category-buttons > *:nth-child(3n + 3):focus {
    background-color: #99e6ff;
    color: #4f48d6;
}

.post-archive .autocomplete-list {
    display: none;
    list-style: none;
    padding: 0;
    margin: 5px 0 0;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: none;
    position: absolute;
    background: white;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.post-archive .autocomplete-list li {
    padding: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: #4f48d6;
}

.post-archive .autocomplete-list li:hover {
    background: #f0f0f0;
}

.post-archive .autocomplete-list li:active {
    background: #dcdcdc;
}

@media (max-width: 1024px) {
    .post-archive .post .post-info img {
        height: 1.5rem;
    }
    .post-archive .post .post-info div p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .post-archive .search-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px 0;
        width: 100%;
        margin-top: 40px;
        margin-bottom: 30px;
    }

    .post-archive .post {
        display: flex;
        flex: 1 1 48%; /* Two posts per row, considering the gap */
        max-width: 100%;
        margin: 0 auto;
        position: relative;
        overflow: hidden;
        color: #4f48d6;
    }

    .post-archive .post .cat-container {
        display: flex;
        justify-content: flex-start;
        font-size: 0.95rem;
        font-weight: 500;
        margin-top: 10px;
    }

    .post-archive .post .post-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0 20px;
    }

    .post-archive .post .post-info img {
        height: 1.4rem;
    }

    .post-archive .post .post-info div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .post-archive .post .post-info div p {
        font-size: 1.1rem;
        margin: 0;
    }

    .post-archive .post h4 {
        font-size: 1.2rem;
    }

    .post-archive .post p {
        font-size: 0.9rem;
    }
}

@media (max-width: 426px) {
    .post-archive .post .post-info img {
        height: 1.2rem;
    }

    .post-archive .post .post-info div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .post-archive .post .post-info div p {
        font-size: 0.9rem;
        margin: 0;
    }
}
