/* Search and Filter Styles */
.posts-with-sidebar {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

/* Force 3 columns layout for blog entries */
.posts-content-area .oceanwp-row article {
    width: calc(33.333% - 20px) !important;
    max-width: calc(33.333% - 20px) !important;
}

@media (max-width: 768px) {
    .posts-content-area .oceanwp-row article {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.category-sidebar {
    flex: 0 0 280px;
    background-color: #3f1008;
    padding: 25px;
    border-radius: 0px;
    height: fit-content;
    position: sticky;
    top: 100px;
	margin-top: 10px;
}

.category-sidebar h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #ffb347;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #ffb347;
}

.category-checkbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-checkbox-list li {
    margin-bottom: 0px;
    border-bottom: 1px solid #9b9b9b70;
    padding: 10px 0;
}

.category-checkbox-list li:last-child {
    border-bottom: 0;
}

.category-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0px;
    border-radius: 3px;
}

.category-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
	border-radius: 4px;
}

.category-checkbox span {
    flex: 1;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
}

.category-count {
    color: #ffffff;
    font-size: 14px;
    margin-left: 5px;
	text-align: end;
}

.posts-content-area {
    flex: 1;
}

.search-wrapper {
    margin-bottom: 15px;
    position: relative;
    padding: 10px;
}

/* Date Filter Styles */
.date-filter-wrapper {
    margin-bottom: 20px;
    padding: 0 10px;
}

.date-filter-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Quick Date Filter Dropdown */
.filter-group {
    flex: 0 0 auto;
}

.quick-date-dropdown {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
    height: 36px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.quick-date-dropdown:hover {
    border-color: #25412d;
}

.quick-date-dropdown:focus {
    outline: none;
    border: 1px solid #ffb347;
    box-shadow: 0 0 0 3px rgb(255 179 71 / 20%);
}

/* Date Range Group */
.date-range-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1 1 auto;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-group label {
    font-weight: 600;
    color: #25412d;
    margin: 0;
    font-size: 14px;
}

.date-filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    height: 36px;
    width: 140px;
}

.date-filter-input:hover {
    border-color: #25412d;
}

.date-filter-input:focus {
    outline: none;
    border: 1px solid #ffb347;
    box-shadow: 0 0 0 3px rgb(255 179 71 / 20%);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.apply-date-btn,
.clear-date-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 36px;
}

.apply-date-btn {
    background: #3f1008;
    color: white;
}

.apply-date-btn:hover {
    background: #1a2d20;
    transform: translateY(-1px);
}

.clear-date-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #ddd;
}

.clear-date-btn:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .date-filter-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-group,
    .date-range-group,
    .button-group {
        width: 100%;
    }
    
    .date-range-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-input-group {
        width: 100%;
    }
    
    .date-filter-input,
    .quick-date-dropdown {
        width: 100%;
    }
    
    .button-group {
        flex-direction: row;
        gap: 8px;
    }
    
    .apply-date-btn,
    .clear-date-btn {
        flex: 1;
    }
}

.search-inner {
    position: relative;
    width: 100%;
}

.post-search-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #25412d;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.post-search-input:focus {
    outline: none;
    border: 1px solid #ffb347;
    box-shadow: 0px 0px 3px 3px rgb(255 179 71 / 33%);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #13aff0;
    pointer-events: none;
	height: 20px;
}

.clear-search {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    display: none;
}

.clear-search:hover {
    color: #666;
}

/* Loader Styles */
.posts-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.posts-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #13aff0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#blog-entries {
    position: relative;
    min-height: 300px;
    transition: opacity 0.3s ease;
	display: flex;
	justify-content: space-between;
	width: 100%;
}

#blog-entries article.col {
    -ms-flex: 0 0 33.333333%;
	flex: 0 0 33.333333%;
	max-width: 33.333333% !important;
	margin: 0;
    padding: 10px;
	width: 100% !important;
}

#blog-entries.loading {
    opacity: 0.3;
}

.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-posts-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.reset-filters-btn {
    width: 100%;
    padding: 10px;
    background-color: #ffb347;
    color: #000000;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
    font-weight: 500;
    line-height: 1.2;
}

.reset-filters-btn:hover {
    background: #c82333;
}

.reset-filters-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Load More Button Styles */
.load-more-container {
    text-align: center;
    padding: 20px 0;
	display: flex;
    justify-content: center;
    align-items: center;
}

#load-more-posts {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4aa564 0%, #25412d 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(19, 175, 240, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#load-more-posts:hover {
    background: linear-gradient(135deg, #4d9662 0%, #25412d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(37 65 45 / 47%);
}

#load-more-posts:active {
    transform: translateY(0);
}

.load-more-text {
    font-size: 16px;
}

.load-more-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

#load-more-posts:hover .load-more-icon {
    transform: translateY(3px);
}

#load-more-posts:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#load-more-posts:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Hide default pagination and infinite scroll elements */
.posts-content-area .page-numbers,
.posts-content-area .pagination,
.posts-content-area .scroller-status,
.posts-content-area .infinite-scroll-last {
    display: none !important;
}

/* Loading state */
#load-more-posts.loading {
    pointer-events: none;
    opacity: 0.7;
}

#load-more-posts.loading .load-more-text:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

/* Mobile Responsive */
@media (max-width: 1150px) {
    #blog-entries article.col {
      -ms-flex: 0 0 50%;
      flex: 0 0 50%;
      max-width: 50% !important;
    }
}

@media (max-width: 768px) {
    .posts-with-sidebar {
        flex-direction: column;
		margin-top: 10px;
    }
    
    .category-sidebar {
        position: static;
        flex: 1;
        margin-bottom: 0px;
    }
    
    .search-inner {
        max-width: 100%;
    }
    
    #load-more-posts {
        padding: 12px 30px;
        font-size: 14px;
    }
	
	#blog-entries article.col {
      -ms-flex: 0 0 100%;
      flex: 0 0 100%;
      max-width: 100% !important;
    }
	
}