/* =========================================================
   TGWV Builder — Bài viết nổi bật 3 (carousel)
   BEM block: tgwv-bvnb3
========================================================= */
.tgwv-bvnb3 {
    --tgwv-bvnb3-primary: var(--tgwv-brand, #000000);
    --tgwv-bvnb3-primary-hover: var(--tgwv-secondary, color-mix(in srgb, var(--tgwv-brand, #000000) 85%, #000));
    --tgwv-bvnb3-text-muted: #555555;
    --tgwv-bvnb3-text-desc: #666666;
    --tgwv-bvnb3-text-date: #888888;
    background-color: #ffffff;
    padding-top: 30px;
    padding-bottom: 30px;
}

@media (min-width: 992px) {
    .tgwv-bvnb3 {
        padding-top: 50px;
        padding-bottom: 50px;
    }
}

.tgwv-bvnb3__inner {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tgwv-bvnb3__header {
    text-align: center;
    margin-bottom: 20px;
}

.tgwv-bvnb3__title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tgwv-bvnb3-primary);
    margin: 0 0 15px;
    line-height: 1.3;
    text-transform: uppercase;
}

.tgwv-bvnb3__subtitle {
    color: var(--tgwv-bvnb3-text-muted);
    font-size: 1rem;
    max-width: 800px;
    line-height: 1.6;
    margin: 0 auto;
}

.tgwv-bvnb3__subtitle > *:first-child {
    margin-top: 0;
}

.tgwv-bvnb3__subtitle > *:last-child {
    margin-bottom: 0;
}

.tgwv-bvnb3__subtitle p {
    margin: 0 0 0.5em;
    color: inherit;
    line-height: inherit;
}

.tgwv-bvnb3__subtitle a {
    color: var(--tgwv-bvnb3-primary);
    text-decoration: underline;
}

.tgwv-bvnb3__subtitle a:hover {
    color: var(--tgwv-bvnb3-primary-hover);
}

.tgwv-bvnb3__card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tgwv-bvnb3__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 52, 102, 0.12);
}

.tgwv-bvnb3__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex-shrink: 0;
}

.tgwv-bvnb3__media > a {
    display: block;
    width: 100%;
    height: 100%;
}

.tgwv-bvnb3__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.tgwv-bvnb3__card:hover .tgwv-bvnb3__img {
    transform: scale(1.06);
}

.tgwv-bvnb3__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tgwv-bvnb3__date {
    font-size: 0.85rem;
    color: var(--tgwv-bvnb3-text-date);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.tgwv-bvnb3__card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 12px;
}

.tgwv-bvnb3__card-title a {
    color: var(--tgwv-bvnb3-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tgwv-bvnb3__card-title a:hover {
    color: var(--tgwv-bvnb3-primary-hover);
}

.tgwv-bvnb3__desc {
    font-size: 0.95rem;
    color: var(--tgwv-bvnb3-text-desc);
    line-height: 1.6;
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.tgwv-bvnb3__link {
    font-size: 16px;
    font-weight: 600;
    color: var(--tgwv-bvnb3-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-top: auto;
}

.tgwv-bvnb3__link:hover {
    color: var(--tgwv-bvnb3-primary-hover);
}

.tgwv-bvnb3__link i {
    transition: transform 0.2s ease;
}

.tgwv-bvnb3__link:hover i {
    transform: translateX(4px);
}

.tgwv-bvnb3__footer {
    text-align: center;
    margin-top: 20px;
}

.tgwv-bvnb3__view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff !important;
    background-color: var(--tgwv-bvnb3-primary);
    border: none;
    border-radius: 50rem;
    text-decoration: none !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 52, 102, 0.2);
}

.tgwv-bvnb3__view-all:hover,
.tgwv-bvnb3__view-all:focus {
    color: #ffffff !important;
    background-color: var(--tgwv-bvnb3-primary-hover);
    box-shadow: 0 6px 18px rgba(0, 52, 102, 0.28);
}

.tgwv-bvnb3__empty-msg {
    text-align: center;
    color: var(--tgwv-bvnb3-text-desc);
    margin: 0;
}

/* Scroll reveal — only hide when JS marked pending */
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tgwv-bvnb3__col.tgwv-bvnb3__col--visible {
    opacity: 1;
    transform: translateY(0);
}

.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(1) { transition-delay: 0s; }
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(2) { transition-delay: 0.15s; }
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(3) { transition-delay: 0.3s; }
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(4) { transition-delay: 0.45s; }
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(5) { transition-delay: 0.6s; }
.tgwv-bvnb3__col.tgwv-bvnb3__col--reveal:nth-child(6) { transition-delay: 0.75s; }

@media (max-width: 991.98px) {
    .tgwv-bvnb3__title { font-size: 24px; }
    .tgwv-bvnb3__card-title { font-size: 1.1rem; }
    .tgwv-bvnb3__link,
    .tgwv-bvnb3__view-all { font-size: 14px; }
}

/* Track / slider grid */
.tgwv-bvnb3__slider {
    position: relative;
}

.tgwv-bvnb3__viewport {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.tgwv-bvnb3__track {
    display: flex;
    flex-wrap: nowrap;
    margin-left: -12px;
    margin-right: -12px;
}

.tgwv-bvnb3__slide {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Desktop: static 3-column grid (match screenshot); wrap extra rows */
@media (min-width: 992px) {
    .tgwv-bvnb3__track {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 24px 0;
        transform: none !important;
        transition: none !important;
    }

    .tgwv-bvnb3__slide {
        margin-bottom: 0;
    }
}

@media (max-width: 991.98px) {
    .tgwv-bvnb3__slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .tgwv-bvnb3__slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Nav controls — below items on tablet/mobile; hidden on desktop */
.tgwv-bvnb3__nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 1.25rem;
}

.tgwv-bvnb3__control {
    position: static;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 2px solid var(--tgwv-bvnb3-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tgwv-bvnb3-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    flex-shrink: 0;
}

.tgwv-bvnb3__control:hover {
    background-color: var(--tgwv-bvnb3-primary-hover);
    border-color: var(--tgwv-bvnb3-primary-hover);
    color: #ffffff;
}

@media (min-width: 992px) {
    .tgwv-bvnb3__nav {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .tgwv-bvnb3__nav {
        display: flex;
    }
}
