/* Search Styles */

/* Compact Search Box (Header) */
.custom-search-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 5px 0;
}

.custom-search-container form {
    display: flex;
    max-width: 250px;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    height: 30px;
}

.custom-search-container input[type="text"] {
    padding: 10px;
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    border: none;
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: #fff;
    outline: none;
    flex: 1;
    height: 25px;
    box-sizing: border-box;
}

.custom-search-container input[type="text"]::placeholder {
    color: #bbb;
}

.custom-search-container button {
    padding: 0;
    height: 25px;
    width: 40px;
    border: none;
    background-color: #333;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-search-container button:hover {
    background-color: #FF5100;
    color: #fff;
}

.custom-search-container button img {
    width: 20px;
    height: 20px;
}

/* Search Results Page */
.search-results-container {
    font-family: 'Montserrat', sans-serif;
}

.search-header {
    font-size: 25px;
    margin-bottom: 20px;
    color: #333;
}

.search-header b {
    font-weight: bold;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 50px;
    flex-wrap: nowrap;
    width: 100%;
}

.search-filters select,
.search-filters input[type="text"] {
    flex-grow: 1;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    height: 42px;
    box-sizing: border-box;
}

.search-filters select {
    appearance: none;
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l4 4 4-4' stroke='%23555' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 12px 8px;
    padding-right: 32px;
}

.search-filters button {
    background-color: #333;
    color: #fff;
    cursor: pointer;
    width: 110px;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #333;
    border-radius: 8px;
    outline: none;
    height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-filters button:hover {
    background-color: #FF5100;
}

.result-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.result-item .thumbnail-container {
    position: relative;
}

.result-item img {
    width: 293px;
    height: auto;
    object-fit: cover;
    border-radius: 3px;
}

.result-categories {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: calc(100% - 20px);
}

.result-category {
    background-color: #fff;
    color: #333;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 22px !important;
    font-weight: 700;
    margin: 0 0 10px;
    color: #FF5100;
}

.result-title a {
    color: inherit;
    text-decoration: none;
}

.result-meta {
    font-size: 14px !important;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.result-meta h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    display: flex;
    align-items: center;
}

.result-meta a {
    color: #313131;
    text-decoration: none;
}

.result-meta a:hover {
    color: #333;
}

.result-meta img {
    width: 12px;
    height: 12px;
}

.result-excerpt {
    font-size: 16px;
    color: #333;
}

/* Mobile Adjustments */
@media (max-width: 820px) {
    .search-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .search-filters form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }
    .search-filters select,
    .search-filters input[type="text"],
    .search-filters button {
        width: 100%;
        max-width: none;
    }
    .search-filters button {
        height: 44px;
    }
}

@media (max-width: 640px) {
    .result-item {
        flex-direction: column;
    }
    .result-item img {
        width: 100%;
        height: auto;
    }
    .result-categories {
        position: static;
        padding: 6px 0 0;
    }
    .result-details {
        gap: 6px;
    }
    .result-meta {
        font-size: 13px !important;
    }
    .result-meta img {
        width: 10px;
        height: 10px;
    }
}

.load-more {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #777;
    cursor: pointer;
}

.no-more-results {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #bbb;
}

.loading-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
