/* Search Form Styles */
.acs-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.acs-search-form input[type="text"] {
    flex: 1 1 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.acs-search-form select {
    flex: 1 1 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.acs-search-submit,
.acs-clear-search {
    padding: 8px 15px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.acs-search-submit {
    background: #552682 !important;
    color: white;
}

.acs-search-submit:hover {
	color: #fff !important;
}

.acs-search-submit:hover {
    background-color: #005177;
}

.acs-clear-search {
    background-color: #f0f0f0;
    color: #333;
}

.acs-clear-search:hover {
    background-color: #e0e0e0;
}

/* NEW: Content wrapper layout */
.acs-content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* NEW: Sidebar styles */
.acs-sidebar-filters {
    flex: 0 0 250px;
    /* background-color: #f5f5f5; */
    /* border-right: 1px solid #e0e0e0; */
}

.acs-sidebar-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
    text-align: right;
}

.acs-sidebar-item:hover {
    background-color: #e9e9e9;
}

.acs-sidebar-item.active {
    background-color: #f0f0f0;
    font-weight: bold;
    border-right: 4px solid #552682;
}

/* NEW: Results container */
.acs-search-results-container {
    flex: 1;
}

/* Grid Layout Styles - UPDATED */
.acs-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.acs-result {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.acs-result:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.acs-result-thumbnail {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.acs-result-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.acs-result-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.acs-result-title {
    margin: 0;
    font-size: 1em;
    text-align: center;
}

.acs-result-title a {
    color: #333;
    text-decoration: none;
}

.acs-result-title a:hover {
    color: #0073aa;
}

/* Hide meta and excerpt for grid view */
.acs-result-meta,
.acs-result-excerpt {
/*     display: none; */
}

.acs-post {
  position: relative;
  width: 100%;
  height: 300px; /* Adjust to desired height */
  background-size: cover;
  background-position: center;
  margin-bottom: 30px; /* Spacing between posts */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Align overlay bar to bottom */
  align-items: flex-end;
  color: #fff; /* Default text color (white) */	
}

.acs-block-link {
	height: 100%;
}

.acs-post-overlay {
  background-color: rgba(85, 35, 139, 0.8); /* Purple with some opacity */
  padding: 15px;
  width: calc(100% - 30px);
}

.acs-post-title {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.acs-post-title a {
  color: #fff; /* Title text color */
  text-decoration: none;
}

.acs-post-title a:hover {
  color: #fff;
}

.acs-post-taxonomies {
	text-align: right;
	background: rgba(247, 181, 37, 0.87);
	padding: 6px;
	line-height: 100%;
	color: #000;
}

.acs-post-tag {
	font-family: "Open Sans";
	font-size: 13px;
    font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	color: #000;
}

.acs-post-tag:hover {
	color: #fff;
}

/* No Results Message */
.acs-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* Loading Message */
.acs-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
}

/* Responsive Design - UPDATED */
@media (max-width: 1200px) {
    .acs-search-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .acs-search-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .acs-content-wrapper {
        flex-direction: column;
    }
    
    .acs-sidebar-filters {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .acs-search-results {
        grid-template-columns: 1fr;
    }
    
    .acs-search-form {
        flex-direction: column;
    }
    
    .acs-search-form input[type="text"],
    .acs-search-form select,
    .acs-search-submit,
    .acs-clear-search {
        width: 100%;
        margin-bottom: 10px;
		flex: auto;
    }
}

/* Admin Styles */
.acs-admin-taxonomy-terms select {
    width: 100%;
    max-width: 300px;
    height: 100px;
}