/* Blog Filter Module Styles - Scoped to avoid conflicts */
.phast-blog-section .phast-blog-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.phast-blog-section .phast-blog-section__header--no-content {
    justify-content: flex-start !important;
}

.phast-blog-section .phast-blog-section__heading-wrapper {
    max-width: 800px;
}

.phast-blog-section .phast-blog-section__title {
    color: #003840;
    margin: 18px 0 24px;
    padding: 0;
}

.phast-blog-section .phast-blog-section__sub-description {
    font-size: 18px;
    margin: 0;
    line-height: 27px;
}

/* Badge Style - Scoped */
.phast-blog-section .phast-badge {
    display: inline-block;
}

/* Filter Styles */
.phast-blog-section .phast-blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.phast-blog-section .phast-blog-filter__item {
    background-color: transparent;
    color: #006271;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 60px;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid #006271;
    position: relative;
    overflow: hidden;
    z-index: 1;
    gap: 13px;
    -webkit-transition: color 300ms ease 0ms, background-color 300ms ease 0ms;
    -o-transition: color 300ms ease 0ms, background-color 300ms ease 0ms;
    transition: color 300ms ease 0ms, background-color 300ms ease 0ms;
}

.phast-blog-section .phast-blog-filter__item:hover,
.phast-blog-section .phast-blog-filter__item--active {
    background: #006271;
    color: #ffffff;
}

.phast-blog-section .phast-blog-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.phast-blog-section .phast-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    font-size: 18px;
    color: #666;
    width: 100%;
}

.phast-blog-section .phast-blog-section__grid-wrapper {
    position: relative;
    min-height: 200px;
}

/* Loading State */
.phast-blog-section .phast-blog-filter__loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #006271;
    border-radius: 50%;
    animation: phast-bf-spin 1s linear infinite;
    z-index: 10;
}

@keyframes phast-bf-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.phast-blog-section.phast-bf--loading .phast-blog-section__grid {
    opacity: 0.3;
    pointer-events: none;
}

.phast-blog-section.phast-bf--loading .phast-blog-filter__loader {
    display: block;
}

/* Pagination Styles */
.phast-blog-section .phast-blog-section__pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.phast-blog-section .phast-bf-pagination {
    display: flex;
    gap: 8px;
}

.phast-blog-section .phast-bf-pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.phast-blog-section .phast-bf-pagination__link:hover,
.phast-blog-section .phast-bf-pagination__link--active {
    background: #006271;
    color: #fff;
    border-color: #006271;
}

/* News Card Styles - Scoped to BlogFilter to avoid affecting NewsInsights */
.phast-blog-section .phast-news-card {
    background: #ffffff;
    overflow: hidden;
    -webkit-box-shadow: 0px 12px 16px -4px rgba(0, 0, 0, 0.08), 0px 4px 6px -2px rgba(0, 0, 0, 0.03);
    box-shadow: 0px 12px 16px -4px rgba(0, 0, 0, 0.08), 0px 4px 6px -2px rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.phast-blog-section .phast-news-card__media {
    width: 100%;
    height: 339px;
    overflow: hidden;
    position: relative;
}

.phast-blog-section .phast-news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.phast-blog-section .phast-news-card__body {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.phast-blog-section .phast-news-card__meta {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.phast-blog-section .phast-news-card__label {
    padding: 4px 8px;
    border-radius: 40px;
    background-color: #84BD00;
    color: #FFF;
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    line-height: 21px;
}

.phast-blog-section .phast-news-card__reading-time {
    font-size: 14px;
    color: #000000;
    font-weight: 700;
    line-height: 21px;
}

.phast-blog-section .phast-news-card__headline {
    font-weight: 500;
    font-size: 24px;
    line-height: 34px;
    color: #000000;
    padding-bottom: 8px;
}

.phast-blog-section .phast-news-card__summary {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #000000;
    margin-bottom: 24px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phast-blog-section .phast-news-card__more {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    transition: color 0.3s ease;
    width: max-content;
    text-decoration: none;
}

.phast-blog-section .phast-news-card__more:hover {
    color: #006271;
}

.phast-blog-section .phast-news-card__arrow {
    font-family: 'ETmodules' !important;
    font-size: 20px !important;
}

/* Alignment Classes */
.phast-blog-section--align-center .phast-blog-section__header,
.phast-blog-section--align-center .phast-blog-filter {
    justify-content: center;
}

.phast-blog-section--align-center .phast-blog-section__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.phast-blog-section--align-right .phast-blog-section__header,
.phast-blog-section--align-right .phast-blog-filter {
    justify-content: flex-end;
}

.phast-blog-section--align-right .phast-blog-section__header {
    align-items: flex-end;
    text-align: right;
}

/* Responsive Alignment */
@media (min-width: 768px) and (max-width: 980px) {

    .phast-blog-section--align-tablet-center .phast-blog-section__header,
    .phast-blog-section--align-tablet-center .phast-blog-filter {
        justify-content: center;
    }

    .phast-blog-section--align-tablet-center .phast-blog-section__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .phast-blog-section--align-tablet-left .phast-blog-section__header,
    .phast-blog-section--align-tablet-left .phast-blog-filter {
        justify-content: flex-start;
    }

    .phast-blog-section--align-tablet-left .phast-blog-section__header {
        flex-direction: row;
        align-items: flex-end;
        text-align: left;
    }

    .phast-blog-section--align-tablet-right .phast-blog-section__header,
    .phast-blog-section--align-tablet-right .phast-blog-filter {
        justify-content: flex-end;
    }

    .phast-blog-section--align-tablet-right .phast-blog-section__header {
        align-items: flex-end;
        text-align: right;
    }
}

@media (max-width: 767px) {

    .phast-blog-section--align-phone-center .phast-blog-section__header,
    .phast-blog-section--align-phone-center .phast-blog-filter {
        justify-content: center;
    }

    .phast-blog-section--align-phone-center .phast-blog-section__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .phast-blog-section--align-phone-left .phast-blog-section__header,
    .phast-blog-section--align-phone-left .phast-blog-filter {
        justify-content: flex-start;
    }

    .phast-blog-section--align-phone-left .phast-blog-section__header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .phast-blog-section--align-phone-right .phast-blog-section__header,
    .phast-blog-section--align-phone-right .phast-blog-filter {
        justify-content: flex-end;
    }

    .phast-blog-section--align-phone-right .phast-blog-section__header {
        align-items: flex-end;
        text-align: right;
    }

    .phast-blog-section .phast-blog-section__grid {
        grid-template-columns: 1fr;
    }

    .phast-blog-section .phast-blog-section__header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .phast-blog-section .phast-blog-filter {
        justify-content: flex-start;
    }
}

@media (max-width: 1024px) {
    .phast-blog-section .phast-blog-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width:980px) {
    .phast-blog-section .phast-blog-section__title {
        font-size: 38px;
    }
}

@media (max-width: 767px) {
    .phast-blog-section .phast-blog-section__grid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .phast-blog-section .phast-blog-section__header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 32px;
    }
}