/* Only news listing components; header, footer and article bodies retain their styles. */
body .elementor-widget:is(.elementor-widget-educamb_latest_news_v2, .elementor-widget-educamb_latest_news_v3, .elementor-widget-educamb_latest_news_v5, .elementor-widget-educamb_latest_news_v6) {
    --cit-news-columns: 3;
}
body .elementor-widget.elementor-widget-educamb_latest_news_v5 { --cit-news-columns: 4; }
body .elementor-widget .row:has(> div > :is(.single-blog-style1, .single-blog-style3, .single-blog-style4, .single-blog-style7)) {
    display: grid;
    grid-template-columns: repeat(var(--cit-news-columns, 3), minmax(0, 1fr));
    grid-auto-rows: 1fr;
}
body .elementor-widget .row > div:has(> :is(.single-blog-style1, .single-blog-style3, .single-blog-style4, .single-blog-style7)) {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
body :is(.elementor-widget, .blog-page-three) :is(.single-blog-style1, .single-blog-style3, .single-blog-style4, .single-blog-style7) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
body :is(.elementor-widget, .blog-page-three) :is(.single-blog-style1, .single-blog-style3, .single-blog-style7) > .text-holder,
body .elementor-widget .single-blog-style4__inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
body :is(.elementor-widget, .blog-page-three) .single-blog-style1 .text-holder > .bottom-box,
body .elementor-widget .single-blog-style3 .text-holder > .meta-info,
body .elementor-widget .single-blog-style7 .text-holder > .author-info {
    margin-top: auto;
}
body .elementor-widget .single-blog-style4 > .bottom-box { flex-shrink: 0; }
body .elementor-widget .single-blog-style7 .text-holder > h3 { margin-bottom: 24px; }
body :is(.elementor-widget, .blog-page-three) :is(.single-blog-style1, .single-blog-style3, .single-blog-style7) > .img-holder { flex-shrink: 0; }
body .elementor-widget .single-blog-style1 .img-holder img { width: 100%; height: auto; aspect-ratio: 37 / 24; object-fit: cover; }
body .elementor-widget .single-blog-style3 .img-holder img { width: 100%; height: auto; aspect-ratio: 34 / 26; object-fit: cover; }
body .elementor-widget .single-blog-style7 .img-holder .inner > img { width: 100%; height: auto; aspect-ratio: 27 / 34; object-fit: cover; }

/* Author information is intentionally hidden from post cards and single posts. */
body :is(.single-blog-style1, .single-blog-style3, .single-blog-style4, .single-blog-style7) .meta-info li:has(.icon-user),
body :is(.single-blog-style1, .single-blog-style3, .single-blog-style4, .single-blog-style7) .author-info,
body .blog-details-page__content .meta-info > span:has(.fa-user),
body .blog-details-page__author-box {
    display: none !important;
}

/* Tech-style previous/next navigation at the end of an article. */
body.single-post .blog-details-page__prev-next-option {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 42px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(31, 92, 169, .28);
}
body.single-post .blog-details-page__prev-next-option .single-box {
    width: auto;
    min-height: 104px;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0c1727 0%, #122b47 100%);
    border: 1px solid rgba(93, 169, 232, .42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035), 0 10px 24px rgba(7, 25, 47, .12);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
body.single-post .blog-details-page__prev-next-option .single-box:hover {
    border-color: #54c7ff;
    box-shadow: inset 0 0 18px rgba(48, 159, 231, .12), 0 14px 28px rgba(7, 25, 47, .2);
    transform: translateY(-2px);
}
body.single-post .blog-details-page__prev-next-option .single-box .icon-box {
    flex: 0 0 42px;
    align-self: stretch;
}
body.single-post .blog-details-page__prev-next-option .single-box .icon-box a,
body.single-post .blog-details-page__prev-next-option .single-box.left .icon-box a {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #8edcff;
    background: rgba(31, 92, 169, .28);
    border: 1px solid rgba(93, 169, 232, .45);
    transform: none;
}
body.single-post .blog-details-page__prev-next-option .single-box.left .icon-box a span {
    transform: rotate(180deg);
}
body.single-post .blog-details-page__prev-next-option .single-box.right {
    flex-direction: row-reverse;
}
body.single-post .blog-details-page__prev-next-option .single-box .title-box,
body.single-post .blog-details-page__prev-next-option .single-box.left .title-box,
body.single-post .blog-details-page__prev-next-option .single-box.right .title-box {
    min-width: 0;
    padding: 0;
}
body.single-post .blog-details-page__prev-next-option .single-box .title-box::before {
    display: block;
    margin-bottom: 7px;
    color: #72c9f7;
    font-family: Arial,sans-serif;
    font-size: 10px;
    letter-spacing: .16em;
    line-height: 1;
}
body.single-post .blog-details-page__prev-next-option .single-box.left .title-box::before { content: '← BÀI TRƯỚC'; }
body.single-post .blog-details-page__prev-next-option .single-box.right .title-box::before { content: 'BÀI KẾ TIẾP →'; }
body.single-post .blog-details-page__prev-next-option .single-box .title-box h3,
body.single-post .blog-details-page__prev-next-option .single-box .title-box h3 a {
    color: #f1f8ff;
    font-size: 16px;
    line-height: 1.45;
}
body.single-post .blog-details-page__prev-next-option .single-box .title-box h3 a:hover { color: #75d5ff; }

@media (max-width: 767px) {
    body.single-post .blog-details-page__prev-next-option { grid-template-columns: 1fr; }
    body.single-post .blog-details-page__prev-next-option .single-box { min-height: 88px; }
}

/* The theme's category, date, author and search-result listings. */
body .blog-page-three .thm-unit-test:has(> .post > .single-blog-style1) {
    display: grid;
    grid-auto-rows: 1fr;
}
body .blog-page-three .thm-unit-test > .post:has(> .single-blog-style1) { display: flex; min-width: 0; }
body .blog-page-three .single-blog-style1 .img-holder img { width: 100%; height: auto; aspect-ratio: 117 / 47; object-fit: cover; }

/* Search results use one consistent media slot, including posts without a feature image. */
body.search .blog-page-three .thm-unit-test {
    row-gap: 24px;
}
body.search .blog-page-three .thm-unit-test > .post .single-blog-style1 {
    margin-bottom: 0;
}
body.search .blog-page-three .single-blog-style1 .img-holder .cit-search-card-placeholder {
    display: flex;
    aspect-ratio: 117 / 47;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #d8dde3 0%, #aeb8c4 100%);
}
body.search .blog-page-three .cit-search-card-placeholder span {
    color: rgba(255, 255, 255, .58);
    font-family: "K2D",Arial,sans-serif;
    font-size: clamp(34px, 6vw, 76px);
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(41, 57, 73, .12);
}
body.search .blog-page-three .cit-search-card-image-link {
    position: relative;
    z-index: 3;
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Compact, modern sidebar search widget. */
body.search .sidebar-search-box.widget_search {
    margin-bottom: 34px;
    padding: 20px;
    border: 1px solid #dce7f0;
    background: linear-gradient(145deg, #f7fbfe 0%, #eef5fa 100%);
    box-shadow: 0 12px 28px rgba(24, 50, 78, .08);
}
body.search .sidebar-search-box.widget_search .wp-block-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
body.search .sidebar-search-box.widget_search .wp-block-search__inside-wrapper {
    display: flex;
    gap: 7px;
    padding: 5px;
    border: 1px solid #c7d9e8;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
body.search .sidebar-search-box.widget_search .wp-block-search__inside-wrapper:focus-within {
    border-color: #2e8bd0;
    box-shadow: 0 0 0 3px rgba(46, 139, 208, .12);
}
body.search .sidebar-search-box.widget_search .wp-block-search__input {
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 0;
    outline: 0;
    color: #18324e;
    background: transparent;
    font-family: "Readex Pro",Arial,sans-serif;
    font-size: 12px;
}
body.search .sidebar-search-box.widget_search .wp-block-search__input::placeholder { color: #8a9bad; }
body.search .sidebar-search-box.widget_search .wp-block-search__button {
    flex: 0 0 auto;
    display: inline-flex;
    width: 42px;
    min-width: 42px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #1f5ca9, #0b83b5);
    line-height: 1;
    font-size: 0;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}
body.search .sidebar-search-box.widget_search .wp-block-search__button::before {
    content: "\f002";
    display: block;
    font-family: FontAwesome;
    font-size: 14px;
    line-height: 1;
}
body.search .sidebar-search-box.widget_search .wp-block-search__button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Elementor Posts / Archive Posts: support cards and vertical classic grids. */
body.page-id-1517 .elementor-post__avatar img.avatar {
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    padding: 6px;
    border: 1px solid rgba(18, 106, 194, .22);
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 3px 12px rgba(18, 52, 78, .12);
}
body :is(.elementor-widget-posts, .elementor-widget-archive-posts) .elementor-posts-container.elementor-grid {
    grid-auto-rows: 1fr;
    align-items: stretch;
}
body :is(.elementor-widget-posts, .elementor-widget-archive-posts) .elementor-post__card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
body :is(.elementor-widget-posts, .elementor-widget-archive-posts) .elementor-post__text {
    display: flex;
    flex-direction: column;
    flex: 1;
}
body :is(.elementor-widget-posts, .elementor-widget-archive-posts) .elementor-post__read-more-wrapper {
    margin-top: auto;
    padding-top: 20px;
}
body :is(.elementor-widget-posts, .elementor-widget-archive-posts) .elementor-post__meta-data { margin-top: auto; }

@media (max-width: 1199px) {
    body .elementor-widget.elementor-widget-educamb_latest_news_v5 { --cit-news-columns: 2; }
}
@media (max-width: 991px) {
    body .elementor-widget:is(.elementor-widget-educamb_latest_news_v2, .elementor-widget-educamb_latest_news_v3, .elementor-widget-educamb_latest_news_v6) { --cit-news-columns: 1; }
}
@media (max-width: 767px) {
    body .elementor-widget.elementor-widget-educamb_latest_news_v5 { --cit-news-columns: 1; }
}
