/**
 * BioOptimal Blog Redesign CSS
 * Custom styles for the redesigned blog layout
 */

/* General Blog Layout Styles */
.biooptimal-blog-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Full width styles */
.full-width {
    width: 100%;
    float: none;
}

/* Hide all post dates in the header */
.entry-header .post-date,
.post-date {
    display: none !important;
}

/* Position relative for content containers */
.featured-post-content, .grid-post-inner {
    position: relative;
    padding-bottom: 40px; /* Space for date and read more */
}

/* Add footer with date and read more link */
/* .grid-post-inner:after {
    content: "";
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    height: 20px; /* Height for the date and read more */
/*} */
.mb-0{
    margin-bottom: 0 !important;
}
.p-10{
    padding: 10px 0px !important;
}
/* Add post date to the bottom */
.featured-post-content:before{
    content: attr(data-post-date);
    position: absolute;
    bottom: 15px;
    left: 0;
    font-size: 0.9em;
    color: #888;
    z-index: 5;
}

.biooptimal-blog-layout .page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.blog-section {
    margin-bottom: 50px;
}

/* Section 1: Featured Post */
.featured-post-section {
    margin-bottom: 60px;
}

.featured-post {
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-post-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}

.featured-post-content {
    flex: 1;
    min-width: 300px;
    padding: 20px 25px 60px 25px;
    position: relative;
}

.featured-post-image {
    flex: 0 0 40%;
    position: relative;
    z-index: 1;
    max-height: 100%;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-post .entry-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-post .entry-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post .entry-title a:hover {
    color: #0073aa;
}

.featured-post .post-tags {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

.featured-post .takeaway {
    background-color: #f8f9fa;
    padding: 15px;
    margin: 15px 0;
    border-left: 3px solid #0073aa;
    font-style: italic;
}

.featured-post .entry-summary {
    margin-top: 20px;
}

/* Footer styling for post date and read more link */
.entry-summary p {
    margin-bottom: 5px;
}

/* Clear fix for entry-summary */
.entry-summary:after {
    content: "";
    display: table;
    clear: both;
}

/* Create space between post date and read more */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.featured-post .post-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.featured-post .post-date {
    display: block !important;
    font-size: 0.9em;
    color: #888;
    margin: 0;
}

.featured-post .read-more {
    color: #0073aa;
    text-transform: uppercase;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.featured-post .read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0073aa;
    transition: width 0.3s ease-in-out;
}

.featured-post .read-more:hover::after {
    width: 100%;
}

/* .featured-post .read-more:hover {
    text-decoration: underline;
} */

/* Section 2: Grid Posts */
.grid-posts-section {
    margin-bottom: 60px;
}

.grid-posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
}

.grid-post {
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.grid-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.grid-post-inner {
    position: relative;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: inherit;
    display: flex;
    flex-direction: column;
    padding-bottom: 0px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tcs-blog article{
    padding-bottom: 0 !important;
}
.grid-post-link:hover .grid-post-inner {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.grid-post-image {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.grid-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-post:hover .grid-post-image img {
    transform: scale(1.05);
}

.grid-post .entry-header,
.grid-post .entry-content {
    padding: 15px 20px;
}

.grid-post .entry-title {
    font-size: 1.3em;
    line-height: 1.3;
    /* margin-bottom: 10px; */
}

.grid-post .entry-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.grid-post .entry-title a:hover {
    color: #0073aa;
}

.grid-post .entry-content {
    font-size: 0.95em;
    color: #333;
    margin-bottom: 40px;
    padding: 0 20px;
}

.grid-post .post-tags {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 8px;
}

.grid-post .post-date {
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
    display: inline-block;
}

.grid-post .takeaway {
    background-color: #f8f9fa;
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #0073aa;
    font-size: 0.9em;
    font-style: italic;
}

.grid-post .entry-summary {
    padding: 0 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-post .entry-summary p {
    flex: 1;
    margin-bottom: 0;
}

.grid-post .post-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    background-color: #fff;
    height: auto;
    min-height: 46px;
    box-sizing: border-box;
    z-index: 5;
}

.grid-post .post-date {
    display: block !important;
    font-size: 0.85em;
    color: #888;
    margin: 0;
}

.grid-post .read-more {
    color: #0073aa;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9em;
    position: relative;
    padding-bottom: 2px;
    display: inline-block;
}

.grid-post .read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0073aa;
    transition: width 0.3s ease-in-out;
}

.grid-post .read-more:hover::after {
    width: 100%;
}

/* Section 3: Pagination */
.pagination-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.custom-pagination {
    text-align: center;
}

.custom-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.custom-pagination .page-numbers:hover {
    background-color: #f5f5f5;
    color: #333;
}

.custom-pagination .page-numbers.current {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.custom-pagination .page-numbers.prev,
.custom-pagination .page-numbers.next {
    background-color: #f5f5f5;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .grid-posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .featured-post-content{
        min-width: auto !important;
    }
    .featured-post-inner {
        flex-direction: column;
    }
    
    .featured-post-content {
        order: 2;
    }
    
    .featured-post-image {
        order: 1;
        max-width: 100%;
    }
    
    .grid-posts-container {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }
    
    .biooptimal-blog-layout .page-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 480px) {
    .biooptimal-blog-layout {
        padding: 15px;
    }
    
    .featured-post-content {
        padding: 20px;
    }
    
    .featured-post .entry-title {
        font-size: 1.5em;
    }
    
    .grid-post .entry-title {
        font-size: 1.2em;
    }
    
    .custom-pagination .page-numbers {
        padding: 6px 12px;
        margin: 0 3px;
    }
}
