.posts-cover {
    background-color: #FFFFFF; /* Replace with your desired background color */
    color: #fff; /* Text color */
    text-align: center;
    padding: 50px 20px; /* Adjust padding to your preference */
}

.posts-cover h1 {
    font-size: 3rem; /* Large text for the main title */
    margin-bottom: 0.5rem; /* Spacing between title and subtitle */
}

.posts-cover .subtitle {
    font-size: 1.5rem; /* Smaller text for the subtitle */
    color: #aaa; /* Subtle color for the subtitle */
}

.posts-page {
    max-width: 1200px; /* Adjust based on your preference */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Creates a responsive grid */
    grid-gap: 20px; /* Space between posts */
    padding-top: 20px; /* Space at the top */
}

.post-preview {
    display: block; /* Change from flex to block */
    background: #ffffff; /* Card background */
    border-radius: 10px; /* Rounded corners for the cards */
    overflow: hidden; /* Ensures the content fits within the border radius */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Card shadow */
    transition: transform 0.2s; /* Animation on hover */
}

.post-preview:hover {
    transform: translateY(-5px); /* Slight lift on hover */
}

.post-image img {
    width: 100%; /* Full width of the card */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
}

.post-content {
    padding: 15px; /* Padding inside the card */
}

.post-title {
    font-size: 1.2em; /* Adjust title size */
    color: #333; /* Title color */
    margin-bottom: 10px; /* Space below title */
}

.post-summary {
    font-size: 1em;
    margin-bottom: 15px; /* Space below summary */
}

/* Rich content inside post detail */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

.post-body iframe,
.post-body .media-embed,
.post-body oembed {
    display: block;
    max-width: 100%;
    margin: 20px auto;
}

.post-body figure {
    margin: 20px 0;
    text-align: center;
}

.post-body figure figcaption {
    font-size: 0.9em;
    color: #777;
    margin-top: 8px;
}

.post-body blockquote {
    border-left: 4px solid #333;
    padding: 10px 20px;
    margin: 20px 0;
    background: #f9f9f9;
    font-style: italic;
}

.post-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
}

.post-body code {
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-body h2, .post-body h3, .post-body h4 {
    margin-top: 25px;
    margin-bottom: 10px;
}

/* YouTube / media embed responsive wrapper */
.post-body .ck-media__wrapper,
.post-body [data-oembed-url] {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
}

.post-body .ck-media__wrapper iframe,
.post-body [data-oembed-url] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.read-more {
    text-decoration: none;
    color: #1a8917;
    font-weight: bold; /* Make it stand out */
}
