/* Base styles for the grid and list layouts */
.post-grid,
.post-list {
    width: 100%;
}

.author-icon, .date-icon, .comments-icon {
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    vertical-align: middle;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    width: 100%;
}

.post-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
    grid-gap: 20px;
}

/* Styles for individual post cards in grid layout */
.post-grid .post-card {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
	min-height: 590px;
	position: relative;
}

.post-grid .post-card .post-content .post-excerpt {
	min-height: 165px;
	max-height: 250px;
}

/* Styles for individual post list items in list layout */
.post-list .post-list-item {
    display: flex;
    flex-direction: row-reverse;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
    width: calc(50% - 16px); 
    height: 290px;
    padding: 0;
    box-sizing: border-box;
}

.post-list .post-list-item:hover {
    transform: scale(1.02);
}

.post-list .post-list-item .post-thumbnail {
    width: 260px;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0 8px 8px 0;
    margin: 0;
}

.post-list .post-list-item .post-content {
    padding: 15px 0 1px 20px;
    flex: 1;
}

.post-list .post-list-item .post-content .post-title {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.post-list .post-list-item .post-content .post-excerpt p {
    margin: 8px 0;
    color: #555;
}

.post-list .post-list-item .post-content .post-excerpt .star-rating {
    font-size: 14px;
    margin-bottom: 8px;
}

.post-list .post-list-item .post-content .read-more {
    color: #d18ac4;
    text-decoration: none;
    font-weight: bold;
    margin-top: 8px;
    display: inline-block;
}

.post-list .post-list-item .post-content .read-more:hover {
    text-decoration: underline;
}

.post-grid .post-card .post-thumbnail {
	width: 100%;
	min-height: 300px;
	object-fit: cover;
	margin-bottom: 10px;
	max-height: 300px;
}

/* List layout */
.post-list .post-thumbnail {
    width: 250px;
    height: 300px;
    object-fit: cover;
    margin: 10px 30px 20px 10px;
}

.post-grid .post-title {
    font-size: 20px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Styling for post excerpts and details */
.post-grid .post-excerpt,
.post-grid .post-details {
    color: #666;
    margin-bottom: 10px;
}

.author-info,
.date-icon,
.comments-icon {
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    vertical-align: middle;
}

.post-grid .read-more {
	display: inline-block;
	padding: 10px 20px;
	border: 2px solid #333;
	border-radius: 5px;
	background-color: transparent;
	color: #333;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s;
	position: absolute;
	bottom: -15px;
	left: 50%;
	transform: translate(-50%, -50%);
}

.post-grid .read-more:hover {
    background-color: #333;
    color: #fff;
}

.post-grid .post-content {
    flex-grow: 1;
} 

.entry-content .post-list li {
	margin-left: 0em;
	margin-bottom: 6px;
}

.load-more-wrapper {
	text-align: center;
}
#load-more-button {
	width: 100%;
	background: #688b8c;
}

/* Adjust for smaller screens */
@media (max-width: 1520px) {
  .post-grid .post-card {
    min-height: calc(590px - (1920px - 115vw) * 0.25);
  }
}

@media (min-width: 1090px) {
  .post-list .post-list-item {
    width: calc(33% - 10px);
  }
  .post-list {
    padding-left: 1px;
  }
}

@media (max-width: 1205px) {
    .post-grid {
        grid-template-columns: repeat(3, 30vw);
    }
}

@media (max-width: 900px) {
    .post-grid {
        grid-template-columns: repeat(2, 40vw);
    }
}

@media (max-width: 768px) {
    .post-list {
        justify-content: center;
        width: 100%;
        overflow: auto;
        max-width: 100%;
    }

    .post-list .post-list-item {
        width: calc(40.333% - 16px);
        margin: 8px;
        flex-direction: column;
        height: auto;
    }

    .post-list .post-list-item .post-thumbnail {
        width: 100%;
        height: 180px;
        border-radius: 0 0 8px 8px;
    }

    .post-list .post-list-item .post-content {
        padding: 12px;
    }
}

@media (max-width: 758px) {
    .post-grid {
        grid-template-columns: repeat(1, 90vw);
    }
}

@media (max-width: 700px) {
    .post-list {
        justify-content: center;
    }

    .post-list .post-list-item {
        width: calc(45% - 16px);
        margin: 8px;
        flex-direction: column;
        height: auto;
    }
}

@media (max-width: 600px) {
    .post-list {
        justify-content: center;
    }

    .post-list .post-list-item {
        width: calc(90% - 16px);
        margin: 8px;
        flex-direction: column;
        height: auto;
    }
}

@media (max-width: 568px) {
    .post-grid .post-thumbnail {
        height: 150px;
    }

    .post-grid .post-list-item,
    .post-grid .post-card {
        flex-direction: column;
    }

    .post-grid .post-thumbnail {
        width: 100%;
        margin-bottom: 10px;
    }

    .post-grid .post-excerpt,
    .post-grid .post-details {
        font-size: 16px;
    }
}