/* ajax search styles
 */

#ajax-search-form {
    margin-bottom: 20px;
}

#ajax-pagination {
    display: flex;
    justify-content: center; /* Center elements horizontally */
    align-items: center;     /* Center elements vertically (if container has a set height) */
    margin: 20px auto;       /* Ensures the container is treated as a block element */
}

.ajax-search-form-btn, #ajax-search-reset {
		background: var(--primary-color) !important;
    margin: 22px 0px 0px 0px !important;
    font-size: 14px;
		min-width: 100px;
}

html[lang="ar"] .ajax-search-form-btn, #ajax-search-reset {
	margin-right: 20px;
}


.ajax-search-form-btn:hover, #ajax-search-reset:hover {
    background: #b0ab73 !important;
}

.ajax-form-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows elements to wrap to the next line if needed */
}

.ajax-form-group {
    flex: 1;           /* Ensures each group takes equal width in the row */
    min-width: 50px;  /* Prevents elements from shrinking too much */
    border-radius: 5px;
		margin-right: 15px;
}

.ajax-input-group {
    display: flex;
    align-items: center;
}

html[lang="ar"] .ajax-input-group {
	margin-left: 20px;
}

.ajax-input-group img {
    margin-left: 5px;
    cursor: pointer;
}

.ajax-form-group:last-child {
    margin-right: 0;
}

/* Responsive Styles */
@media (max-width: 550px) {
    .ajax-form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .ajax-form-group {
        width: 100%;
        margin-bottom: 15px;
				margin-right: 0;
    }
	.ajax-search-form-btn, #ajax-search-reset {
		width: 100%;
	}
    .ajax-form-group:last-child {
        margin-bottom: 0;
    }
    .ajax-input-group {
        width: 100%;
    }
    .ajax-input-group img {
        margin-left: auto;
    }
    .ajax-page-btn {
        font-size: 0.7em !important;
        width: 70px !important;
    }
    .ajax-page-btn.previousnext {
        width: 100px !important;
    }
}

/* General styling for post items */
.ajax-post-item {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    max-height: 160px;
}

.ajax-post-item.service {
	max-height: none;
}

.ajax-post-item:nth-child(odd) {
    background: #e5e5e5;
}

.ajax-post-thumbnail {
    margin-right: 10px;
    width: 20%;
    padding: 5px;
}

.ajax-post-thumbnail img {
    width: 95%;    /* Adjust size as needed */
    height: 110px;
}

.ajax-post-title a {
    text-decoration: none !important;
    color: var(--secondary-color);
    font-size: 1.7rem;
		text-transform: normal;
		font-weight: 400 !important;
}

.ajax-post-title a:hover{
	text-decoration: underline !important;
}

.ajax-post-title {
	line-height:1;
	background-image: none !important;
	margin-bottom: 0 !important;
}

.ajax-post-content {
    flex: 1;
    max-height: 70%;
}

.ajax-post-content p {
    margin-bottom: 0px !important;
		font-weight: 400 !important;
	 	color: #383737;
    font-family: 'simonson', Arial, sans-serif;
}

.ajax-post-excerpt {

}

.ajax-post-date {
    color: #515151;
    font-size: 1em;
}

.ajax-read-more-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #215f24;
    color: #fff;
    text-decoration: none !important;
    font-size: 0.9em;
    float: right;
}

.ajax-read-more-button:hover {
	color: #fff !important;
	background: #AE7B26;
}

html[lang="ar"] .ajax-read-more-button {
    float: left;
}

html[lang="ar"] .ajax-post-date {
    float: right;
}

.ajax-page-btn {
    position: relative;
    float: left;
    line-height: 24px;             /* Using the line-height from provided styles */
    color: #fff;
    text-decoration: none;
    font-weight: 200;
    height: 28px !important;       /* Keeping the height from provided styles */
    filter: none !important;       /* Keeping filter from provided styles */
    background: var(--primary-color) none no-repeat scroll left top;
    border-radius: 0;              /* No border radius as per provided styles */
    padding: 2px 7px;              /* Using padding from provided styles */
    margin: 0 10px 0 0;            /* Margin from provided styles */
    font-size: 1em;                /* Font size from provided styles */
    width: 35px;                   /* Fixed width as per provided styles */
    text-align: center;            /* Text alignment from provided styles */
    white-space: nowrap;           /* Prevent text wrapping */
    box-sizing: border-box; 
    border: none !important;       /* Include padding and border in width/height */
}

.ajax-page-btn.active, .ajax-page-btn:hover {
    background: #b0ab73;
}

.ajax-page-btn.previousnext {
    width: 80px;
}

.ajax-page-btn:disabled {
    opacity: 0.5;
		background-color: grey;
}

@media only screen and (max-width: 550px) {
    .ajax-post-item {
        display: block; /* Stack elements vertically */
        text-align: left; /* Align text to the left */
        height: auto !important;
        max-height: none !important;
				padding-bottom: 50px;
    }
    
    .ajax-post-thumbnail {
        width: 100%; /* Full width for the image */
        margin-bottom: 10px; /* Add spacing below the image */
        height: 100% !important;
    }
    
    .ajax-post-thumbnail img {
        width: 100%;            /* Ensure the image takes the full width */
        max-height: 218px !important;
        height: 30% !important; /* Maintain aspect ratio */
    }

    .ajax-post-content {
        display: block; /* Stack content vertically */
        max-height: none !important;
    }

    .ajax-post-title {
        margin-bottom: 10px; /* Add spacing between elements */
    }

    .ajax-post-excerpt p {
        margin-bottom: 0px !important;
    }

    .ajax-read-more-button {
        display: block;
        margin-top: 10px;
    }
	
	.ajax-post-date {
		margin-top: 10px;
	}
}
/* End of Ajax-Search Styles */