/**
 * Blog Styles for BK Pilates
 *
 * This file contains the styling for blog listing page and single post page
 */

/* --------------------------------------------------------------
# Blog Page Styles
-------------------------------------------------------------- */

/* Blog Hero Section with Background Support */
.blog-hero {
    height: 60vh;
    position: relative;
    padding: 140px 0 80px;
    /*background-color: var(--secondary-color);*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-header {
    max-width: 800px;
    margin: 0 auto;
}

.blog-title {
    font-size: 166px;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: uppercase;
}

.blog-description {
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.6;
}

/* Blog Search */
.blog-search-container {
    max-width: 500px;
    margin: 0 auto;
}

.blog-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-search-form .search-field {
    width: 100%;
    height: 50px;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.9);
}

.blog-search-form .search-submit {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 40px;
    width: 40px;
    border: none;
    background-color: var(--btn-bg);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search-form .search-submit:hover {
    background-color: var(--primary-color);
}

/* Blog Content Area */
.blog-content {
    padding: 50px 0;
    position: relative;
}

.blog-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: rgba(0, 0, 0, 0.5);*/
    z-index: 1;
}

.blog-content .container {
    position: relative;
    z-index: 2;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-header {
    /*margin-bottom: 15px;*/
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.post-meta i {
    margin-right: 5px;
    color: var(--btn-bg);
}

.post-title {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 600;
}

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

.post-title a:hover {
    color: var(--btn-bg);
}

.post-excerpt {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
}

.post-footer {
    margin-top: auto;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--btn-bg);
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Pagination */
.blog-pagination {
    text-align: center;
    margin-top: 60px;
}

.blog-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers.current {
    background-color: var(--btn-bg);
    color: #fff;
}

.blog-pagination .page-numbers:hover:not(.current) {
    background-color: #e0e0e0;
}

.blog-pagination .prev,
.blog-pagination .next {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* No Posts Found */
.no-posts-found {
    text-align: center;
    padding: 60px 0;
}

.no-posts-found h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.no-posts-found p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* --------------------------------------------------------------
# Single Post Styles
-------------------------------------------------------------- */

/* Post Header Hero */
.post-header-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
    margin-bottom: 60px;
}

.post-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.post-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

.post-header-content {
    max-width: 900px;
    margin: 0 auto;
}

.post-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
}

.post-breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.post-breadcrumbs .separator {
    margin: 0 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.post-breadcrumbs .current {
    color: #fff;
    font-weight: 500;
}

.post-header-hero .post-title {
    font-size: 46px;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-header-hero .post-meta {
    color: rgba(255, 255, 255, 0.9);
}

.post-header-hero .post-meta i {
    color: var(--btn-bg);
}

/* Post Content */
.post-content-wrapper {
    margin-bottom: 80px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.post-card .post-content {
    margin: 0 auto 0;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h2 {
    /*font-size: 32px;*/
    margin-top: 10px;
    margin-bottom: 25px;
    font-weight: 600;
}

.post-content h3 {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.post-content ul,
.post-content ol {
    margin-bottom: 25px;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.post-content blockquote {
    padding: 30px;
    margin: 40px 0;
    background-color: var(--light-accent);
    border-left: 5px solid var(--btn-bg);
    font-style: italic;
    font-size: 20px;
    line-height: 1.6;
    color: #555;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Author Box */
.post-author-box {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.author-bio {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0;
}

/* Post Navigation */
.post-navigation {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-previous a {
    justify-content: flex-start;
}

.nav-next a {
    justify-content: flex-end;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--btn-bg);
}

.nav-previous i {
    margin-right: 10px;
}

.nav-next i {
    margin-left: 10px;
}

/* Related Posts */
.related-posts-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    font-weight: 600;
}

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

.related-post {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-post .post-thumbnail {
    height: 200px;
}

.related-post .post-content {
    padding: 20px;
}

.related-post .post-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.related-post .post-meta {
    font-size: 13px;
    margin-bottom: 0;
}

/* Call to Action Section */
.post-cta-section {
    padding: 80px 0;
}

.post-cta {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 60px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    color: #fff;
}

.post-cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 600;
}

.post-cta p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.post-cta .btn {
    padding: 15px 35px;
    font-size: 18px;
    background-color: #fff;
    color: var(--primary-color);
    border: none;
}

.post-cta .btn:hover {
    background-color: var(--btn-bg);
    color: #fff;
}

/* --------------------------------------------------------------
# Responsive Styles
-------------------------------------------------------------- */

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .post-header-hero .post-title {
        font-size: 40px;
    }
}

@media (max-width: 991px) {
    .blog-hero {
        padding: 120px 0 60px;
    }

    .post-header-hero {
        height: 60vh;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-content {
        font-size: 17px;
    }

    .post-cta {
        padding: 40px;
    }
}

@media (max-width: 767px) {
    .blog-title {
        /*font-size: 36px;*/
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }

    .post-thumbnail {
        height: 200px;
    }

    .post-header-hero {
        height: auto;
        min-height: 400px;
    }

    .post-header-hero .post-title {
        font-size: 32px;
    }

    .post-content {
        font-size: 16px;
    }

    .post-content h2 {
        /*font-size: 28px;*/
    }

    .post-content h3 {
        font-size: 22px;
    }

    .post-author-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .post-cta h2 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 100px 0 50px;
        height: unset;
    }

    .blog-title {
        font-size: 80px;
    }

    .blog-description {
        font-size: 16px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .post-header-hero {
        min-height: 350px;
        padding-bottom: 30px;
    }

    .post-header-hero .post-title {
        font-size: 28px;
    }

    .post-content {
        padding: 0 15px;
    }

    .post-author-box {
        padding: 20px;
    }

    .author-avatar img {
        width: 70px;
        height: 70px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }

    .nav-previous,
    .nav-next {
        max-width: 100%;
    }

    .post-cta {
        padding: 30px 20px;
    }

    .post-cta h2 {
        font-size: 24px;
    }

    .post-cta p {
        font-size: 16px;
    }

    .post-cta .btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}