/* ================================================================
   BLOG PAGE STYLES
   File: blog-page.css
   Add to your theme's style.css or enqueue separately.
   ================================================================ */


/* ----------------------------------------------------------------
   CSS Variables — tweak here to retheme the whole page
   ---------------------------------------------------------------- */
:root {
    --color-accent-red:      #c0392b;
    --color-accent-hover:    #e40e01;   /* purple hover border on cards */
    --color-patient-bg:      #fde8e8;   /* soft pink panel background */
    --color-card-bg:         #ffffff;
    --color-card-border:     #e5e5e5;
    --color-text-dark:       #1a1a1a;
    --color-text-muted:      #555555;
    --color-text-light:      #777777;
    --color-meta-tag-bg:     #ffffff;
    --color-meta-tag-border: #cccccc;
    --color-breadcrumb:      #444444;
    --color-light-grey:      #dadada;

    --font-heading:          'Canva Sans', serif;
    --font-body:             'Canva Sans', Arial, sans-serif;

    --border-radius-card:    20px;
    --border-radius-tag:     20px;
    --card-shadow:           0 2px 12px rgba(0, 0, 0, 0.07);
    --card-shadow-hover:     0 6px 24px rgba(90, 45, 140, 0.15);

    --page-max-width:        1300px;
    --page-padding:          0 20px;
}


/* ----------------------------------------------------------------
   Page Wrapper
   ---------------------------------------------------------------- */
#blog-page-wrapper {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 24px 20px 60px;
    font-family: var(--font-body);
    color: var(--color-text-dark);
}


/* ----------------------------------------------------------------
   Breadcrumb
   ---------------------------------------------------------------- */
#blog-breadcrumb {
    font-size: 14px;
    color: var(--color-breadcrumb);
    margin-bottom: 24px;
}

#blog-breadcrumb a {
    color: var(--color-breadcrumb);
    text-decoration: none;
}

#blog-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 6px;
    color: #aaa;
}

.breadcrumb-current {
    font-weight: 600;
}


/* ----------------------------------------------------------------
   Category Filter Bar
   Lives inside #blog-left-column, so it naturally sits at the
   same vertical level as the Patient Stories panel on the right.
   ---------------------------------------------------------------- */
#blog-category-filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-patient-bg);
    border: 1px solid var(--color-patient-bg);
    border-radius: var(--border-radius-card);
    padding: 14px 20px;
    margin-bottom: 16px;  /* gap between filter bar and featured post card */
    width: 100%;          /* stretches to match the featured post card width */
}

.category-filter-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-text-dark);
}

.category-select-wrapper {
    position: relative;
    flex: 1;
}

.category-select-dropdown {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--color-text-dark);
    background: #ffffff;
    cursor: pointer;
    padding-right: 24px;
    border-radius: 14px;
}

.category-select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--color-text-muted);
    pointer-events: none;
}


/* ----------------------------------------------------------------
   Top Section: Left Column + Right Panel
   Two equal columns side by side.
   ---------------------------------------------------------------- */
#blog-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
    /* align-items: start; */
}

/* Left column: stacks the category filter bar above the featured post */
#blog-left-column {
    display: flex;
    flex-direction: column;
}


/* ----------------------------------------------------------------
   Featured Post Card
   ---------------------------------------------------------------- */
div#blog-featured-post-wrapper {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border-radius: 1rem;
    padding: 1rem;
}
#blog-featured-post {
    /* background: var(--color-card-bg); */
    /* border: 1px solid var(--color-card-border); */
    border-radius: var(--border-radius-card);
    padding: 0 0 24px 0;
    overflow: hidden;
    /* box-shadow: var(--card-shadow); */
}

.featured-post-image-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.featured-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

#blog-featured-post:hover .featured-post-image {
    transform: scale(1.03);
}

/* Meta tags sit inside both featured post and blog cards */
.post-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px 8px;
}

.meta-tag {
    font-weight: 500;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: var(--border-radius-tag);
    border: 1px solid var(--color-patient-bg);
    background: transparent;
    color: var(--color-text-dark);
    white-space: nowrap;
}

.meta-tag--category {
    background: var(--color-patient-bg);
    border-color: var(--color-patient-bg);
}

.meta-tag--date {
    border: 1px solid var(--color-light-grey);
    background: var(--color-light-grey);
    color: var(--color-text-muted);
}

.featured-post-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 4px 20px 12px;
}

.featured-post-title a {
    color: var(--color-text-dark);
    text-decoration: none;
}

.featured-post-title a:hover {
    color: var(--color-accent-red);
}

.featured-post-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin: 0 20px;
}


/* ----------------------------------------------------------------
   Patient Stories Panel
   ---------------------------------------------------------------- */
#patient-stories-panel {
    background: var(--color-patient-bg);
    border-radius: var(--border-radius-card);
    padding: 28px 24px;
}

.patient-stories-header {
    margin-bottom: 20px;
}

.patient-stories-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 8px;
}

.patient-stories-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

.patient-stories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.patient-story-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #ffffff;
    border-radius: var(--border-radius-card);
    padding: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
}

.patient-story-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.patient-story-thumbnail-wrapper {
    width: 90px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.patient-story-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.patient-story-info {
    flex: 1;
}

.patient-story-post-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-red);
    line-height: 1.4;
    margin: 0 0 4px;
}

.patient-story-hospital,
.patient-story-doctor {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
}


/* ----------------------------------------------------------------
   Blog Cards Grid
   ---------------------------------------------------------------- */
#blog-cards-grid-section {
    margin-top: 8px;
}

#blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    padding: 1rem
}

.blog-card:hover {
    border: 1px solid var(--color-patient-bg);
    box-shadow: var(--card-shadow-hover);
}

.blog-card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius-card);
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.04);
}

/* Reuse .post-meta-tags for card meta — padding adjusted */
.blog-card .post-meta-tags {
    padding: 14px 16px 6px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 4px 16px 10px;
}

.blog-card-title a {
    color: var(--color-text-dark);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--color-accent-red);
}

.blog-card-excerpt {
    font-size: 13px;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin: 0 16px 20px;
    flex: 1;
}


/* ----------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------- */
#blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

#blog-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--color-card-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-dark);
    text-decoration: none;
    background: #fff;
    transition: background 0.2s, color 0.2s;
}

#blog-pagination .page-numbers.current,
#blog-pagination .page-numbers:hover {
    background: var(--color-accent-hover);
    color: #fff;
    border-color: var(--color-accent-hover);
}

/* No posts message */
.blog-no-posts-message {
    text-align: center;
    font-size: 15px;
    color: var(--color-text-light);
    padding: 40px 0;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet */
@media (max-width: 900px) {
    #blog-top-section {
        grid-template-columns: 1fr;
    }

    #blog-left-column {
        width: 100%;
    }

    #blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 580px) {
    #blog-cards-grid {
        grid-template-columns: 1fr;
    }

    .featured-post-image-wrapper {
        height: 200px;
    }

    .patient-stories-title {
        font-size: 22px;
    }

    .featured-post-title {
        font-size: 22px;
    }
}