/* Blog Section Styles */
.blog-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 120px;
    box-sizing: border-box;
}

.blog-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
}

.blog-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.blog-description {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    max-width: 1020px;
}

.blog-heading {
    font-family: 'IvyOra Display', serif;
    font-weight: 700;
    font-style: normal;
    font-size: 32px;
    line-height: normal;
    color: #005b68;
    margin: 0;
}

.blog-heading .italic {
    font-style: italic;
    font-weight: 500;
}

.blog-paragraph {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: #403936;
    margin: 0;
}

.blog-button-desktop {
    display: flex;
    align-self: flex-end;
    margin-top: 10px;
}

.blog-button-mobile {
    display: none;
}

.blog-cards {
    display: flex;
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

.blog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.blog-card-orange {
    background-color: #ed6a59;
}

.blog-card-orange .blog-card-title,
.blog-card-orange .blog-card-title a,
.blog-card-orange .blog-tag {
    color: #ffffff;
}

.blog-card-white {
    background-color: #ffffff;
}

.blog-card-image {
    width: 100%;
    height: 166px;
    overflow: hidden;
    background-color: #f6e9d9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.blog-card-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 16px;
}

.blog-card-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: normal;
    height: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
}

.blog-card-orange .blog-card-title,
.blog-card-orange .blog-card-title a {
    color: #ffffff;
    text-decoration: none;
}

.blog-card-white .blog-card-title,
.blog-card-white .blog-card-title a {
    color: #403936;
    text-decoration: none;
}

.blog-card-title a:hover {
    opacity: 0.8;
}

.blog-card-tags-container {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.blog-card-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-tag {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: normal;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.blog-card-orange .blog-tag {
    color: #ffffff;
}

.blog-card-white .blog-tag {
    color: #403936;
}

.blog-tag-dot {
    width: 2px;
    height: 2px;
    background-color: currentColor;
    border-radius: 50%;
    flex-shrink: 0;
}

.blog-button-desktop .btn {
}

.sc-card-arrow {
    display: none;
}

/* Tablet Styles */
@media (max-width: 1200px) {
    .blog-section {
        padding: 0 60px;
    }

    .blog-header {
        flex-direction: column;
    }

    .blog-button-desktop {
        display: none;
    }

    .blog-button-mobile {
        display: flex;
        align-self: flex-start;
    }

    .blog-cards {
        overflow-x: auto;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .blog-cards::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .blog-card {
        /* flex-shrink: 0; */
        width: auto;
    }

    .blog-card-image {
        height: 140px;
    }
}

/* Mobile Styles */
@media (max-width: 800px) {
    .blog-section {
        padding: 0 24px;
        gap: 40px;
    }

    .blog-card {
        flex-shrink: 0;
        width: 100%;
    }

    .blog-description {
        gap: 16px;
    }

    .blog-heading {
        font-size: 24px;
    }

    /* Mobile: style the "View all" button to match media section
       and prevent it from being center-aligned inside the container. */
    .blog-button-mobile {
        display: inline-flex;
        align-self: center;
    }

    .blog-button-mobile :is(a, button) {
        color: inherit;
        text-decoration: none;
    }

    /* Override modular button styles for the mobile view so the blog
       "View all" matches the media section appearance. */
    .blog-button-mobile .btn {
        background-color: #ffffff !important;
        border: 1px solid #d4d2e3 !important;
        color: #005b68 !important;
        border-radius: 30px !important;
        padding: 13.663px 20.495px !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
    }

    /* Mobile: show forward arrow to the right of tags, matching clinical arrow styles */
    .blog-card-tags {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    .sc-card-arrow {
        cursor: pointer;
        display: flex;
        padding: 10px 16px;
        flex-direction: column;
        align-items: center;
        border-radius: 27px;
        background: #ed6a59;
        border: 1px solid #fff;
        transition: filter 0.2s;
    }

    .sc-card-arrow .sc-card-arrow-icon-orange {
        display: none;
    }

    .sc-card-arrow:hover .sc-card-arrow-icon,
    .sc-card-arrow:focus-visible .sc-card-arrow-icon {
        display: none;
    }

    .sc-card-arrow:hover .sc-card-arrow-icon-orange,
    .sc-card-arrow:focus-visible .sc-card-arrow-icon-orange {
        display: flex;
    }

    .sc-card-arrow:hover,
    .sc-card-arrow:focus-visible {
        background: #ffffff;
        border: 1px solid #ed6a59;
    }

    /* If blog card bg is orange, invert the button: white bg + orange icon by default */
    .blog-card-orange .sc-card-arrow {
        background: #ffffff;
        border: 1px solid #ed6a59;
    }

    .blog-card-orange .sc-card-arrow .sc-card-arrow-icon {
        display: none;
    }

    .blog-card-orange .sc-card-arrow .sc-card-arrow-icon-orange {
        display: flex;
    }

    /* If blog card bg is white, keep orange bg + white (or dark) icon */
    .blog-card-white .sc-card-arrow {
        background: #ed6a59;
        border: 1px solid #fff;
    }

    .blog-card-white .sc-card-arrow .sc-card-arrow-icon {
        display: flex;
    }

    .blog-card-white .sc-card-arrow .sc-card-arrow-icon-orange {
        display: none;
    }
}
