/* =========================
   LAYOUT
========================= */

.custom-search-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

#custom-search-input {
    height: 100%;
}

.custom-search-form {
    display: flex;
    gap: 3px;
}


#live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    width: 100%;
    border: 1px solid #ddd;
    display: none;
    z-index: 9999;
}

#live-search-results ul {
    list-style: none;
    margin: 0;
    padding: 5px;
}

#live-search-results li {
    padding: 6px 10px;
}

#live-search-results li a {
    text-decoration: none;
    display: flex !important;
    color: #333;
    gap: 10px;
}

#live-search-results li:hover {
    background: #f5f5f5;
}
.search-content{
    display: flex;
    flex-direction: column;
}
.search-content .title{
font-size: 17px;
font-weight: 600;
line-height: 1.3;

display: -webkit-box;
    -webkit-line-clamp: 2;   /* number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.search-thumb-img{
    width: 75px;
    height: 75px !important;
    object-fit: cover;
    border-radius: 6px !important;
    flex-shrink: 0;
}

.search-submit {
    border-radius: 4px;
}

.search-submit:hover {
    background-color: #0d6efd;
}

/* Results grid */
.custom-search-results {
    flex: 70%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Sidebar */
.custom-search-sidebar {
    flex: 30%;
    background: #f7f7f7;
    padding: 20px;
    position: sticky;
    height: max-content;
    top: 50px;
}

/* =========================
   LATEST POSTS (basic)
========================= */

.latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-posts li {
    margin-bottom: 10px;
}

.latest-posts li a {
    text-decoration: none;
}

/* =========================
   SEARCH CARD DESIGN
========================= */

.search-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.search-card-link {
    display: block;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.search-card-image img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Overlay */
.search-card-overlay {
    position: absolute;
    inset: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.75) 20%,
            rgba(0, 0, 0, 0.2) 60%,
            rgba(0, 0, 0, 0.05));
}

/* Category Tag */
.search-card-tag {
    align-self: flex-start;
    background: #0d6efd;
    color: #fff;
    font-size: 14px;
    line-height: 1.78571428571;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* Title */
.search-card-title {
    margin: 0;
    font-size: 18px !important;
    line-height: 1.3;
    font-weight: 700;
    color: var(--e-global-color-a39e714);
}

/* Hover */
.search-card:hover img {
    transform: scale(1.05);
}

/* =========================
   RESPONSIVE
========================= */

/* Tablet */
@media (max-width: 1024px) {
   
    .search-card-image img {
        min-height: 360px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .custom-search-wrapper {
        flex-direction: column;
    }

    .custom-search-results {
        grid-template-columns: 1fr;
    }

    .search-card-image img {
        min-height: 300px;
    }

    .search-card-title {
        font-size: 18px;
    }
}


/* Sidebar Container */
.custom-search-sidebar {
    flex: 30%;
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 50px;
    height: fit-content;
}

/* Latest posts list */
.latest-posts {
    list-style: none;
    padding: 0;
    margin: 30px 0 0 0;
}

/* Each post row */
.latest-post-item {
    margin-bottom: 15px;
}

/* Link layout */
.latest-post-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}



/* Thumbnail */
.latest-post-thumb {
    display: flex;
}

.latest-post-thumb img {
    width: 60px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Title */
.latest-post-content span {
    font-size: 14px !important;
    line-height: 1.3;
    margin: 0;
    color: #111;
    font-weight: 500;
}

/* Hover effect */
.latest-post-link:hover h4 {
    color: #0d6efd;
}



/* =========================
   SEARCH PAGINATION
========================= */

.search-pagination {
    margin: 30px 0;
    display: flex;
    /* justify-content: center; */
    gap: 10px;
}

.search-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #eee;
    color: #1f1f1f;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Hover */
.search-pagination .page-numbers:hover {
    background: #cf412b;
    color: #fff;
}

/* Active Page */
.search-pagination .page-numbers.current {
    background: #0d6efd;
    color: #fff;
}

/* Next / Prev arrows */
.search-pagination .page-numbers.prev,
.search-pagination .page-numbers.next {
    width: auto;
    padding: 0 12px;
}



 
@media (min-width: 991px) and (max-width: 1350px) {
    .custom-search-results{
        flex:65%;
    }
    .custom-search-sidebar{
        flex:35%;
    }
    /* .latest-post-link {
        flex-direction: column;
        
        align-items: center;
       
        text-align: center;
        gap: 8px;
    }
    .latest-post-content h4 {
        font-size: 14px;
        line-height: 1.4;
        text-align: center;
    } */
}


/* Card style for Latest Posts */
.latest-post-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover lift effect */
.latest-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}


/* 
@media (max-width: 991px) {
    .custom-search-wrapper {
        flex-direction: column;
    }

} */



@media only screen and (min-width: 768.98px) and (max-width:1240px){
	.latest-post-link{
		text-align: left;
		 align-items: flex-start;
	}
	.latest-post-link .latest-post-content h4{
		text-align: left !important;
		font-size: 12px;
	}
	
	.latest-post-link {
  		display: flex !important;
    flex-direction: row !important;
	}
}

@media only screen and (max-width: 1024px) {
    .latest-post-link {
        align-items: center;
    }
    .search-content h4{
        font-size: 16px;
    }
}

@media only screen and (max-width: 991.98px) {
	
     .custom-search-results {
        grid-template-columns: repeat(1, 1fr);
        flex:55%;

    }
    .custom-search-sidebar{
        flex: 45%;
    }

}

@media only screen and (max-width: 768.98px){
    .custom-search-wrapper {
        flex-direction: row;
    }
	   .latest-post-link {
        align-items: center;
        flex-direction: row;
    }
	.custom-search-results{
		flex: 60%;
	}
	.custom-search-sidebar{
		flex: 40%;
	}
	.latest-post-thumb img{
		width: 60px;
	}
	.latest-post-content h4 {
		font-size: 12px;
	}
	.search-content .title{
        font-size: 15px;
    }
    .search-thumb-img{
        width: 50px;
        height: 50px !important;
    }
}

@media only screen and (max-width: 767.98px){
    .custom-search-wrapper {
        flex-direction: column;
    }
	    .latest-post-content h4 {
        font-size: 14px;
    }
    
}
@media only screen and (max-width: 500px){
.search-content .title{
        font-size: 14px;
    }
}

.search-card-date {
    display: block;
    font-size: 13px;
    color: #ffffff;
}

.latest-post-date {
    font-size: 12px;
    color: #1f1f1f;
    display: block;
}




@media (max-width: 400px){
    .latest-post-link {
        flex-direction: column;
        
        align-items: center;
       
        text-align: center;
        gap: 8px;
    }
    .latest-post-content h4 {
        font-size: 14px !important;
        line-height: 1.4;
        text-align: center;
    }
    .search-content h4{
        font-size: 14px !important;
    }
    .search-submit{
        display: none;
    }
}
