/* ==========================================================================
   Longevity FOR ALL — Custom CSS (scoped under .longevity-wrapper)
   Replaces Tailwind CSS — uses Bootstrap grid where possible
   ========================================================================== */

/* ---------- CSS Variables ---------- */
.longevity-wrapper {
    --bg: #ffffff;
    --hover-scale: 1.15;
    --bg-2: #f6f4f0;
    --ink: #111114;
    --ink-soft: #6a6a72;
    --line: #e4e1db;
    --accent: #00B4D8;
    --accent-2: #1f4d43;
    --surface: #ffffff;
    --radius: 4px;

    background: var(--bg);
    color: var(--ink);
    font-family: var(--bs-font-primary), sans-serif;
    font-weight: 400;
    position: relative;
    overflow-x: clip;
    width: 100%;
}

/* ---------- Resets (scoped) ---------- */
@media (min-width: 992px) {
    .longevity-wrapper {
        --hover-scale: 1.08;
    }
}

.longevity-wrapper *,
.longevity-wrapper *::before,
.longevity-wrapper *::after {
    box-sizing: border-box;
}

.longevity-wrapper img,
.longevity-wrapper video {
    max-width: 100%;
    display: block;
}

.longevity-wrapper h1,
.longevity-wrapper h2,
.longevity-wrapper h3,
.longevity-wrapper h4,
.longevity-wrapper h5,
.longevity-wrapper h6 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.longevity-wrapper p {
    margin: 0;
}

.longevity-wrapper a {
    text-decoration: none;
    color: inherit;
}

.longevity-wrapper button,
.longevity-wrapper input,
.longevity-wrapper select {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
}

.longevity-wrapper button {
    cursor: pointer;
}

.longevity-wrapper ::selection {
    background: #00B4D8;
    color: #fff;
}

/* ---------- Container ---------- */
.lgv-container {
    max-width: 1440px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .lgv-container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ---------- HERO ---------- */
.lgv-hero {
    width: 100%;
    padding-bottom: 0;
    margin-top: 0;
    position: relative;
}

.lgv-hero-video-wrap {
    width: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
}

.lgv-hero-video-wrap video {
    width: 100%;
    height: auto;
    display: block;
}

/* Scroll Indicator */
.lgv-scroll-indicator {
    position: absolute;
    bottom: 15%;
    /* Moved up to avoid Windows taskbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgv-scroll-icon {
    width: 96px;
    height: 96px;
    opacity: 0.6;
    filter: brightness(0) invert(1);
    /* ย้าย bounce animation มาไว้ที่รูปภาพแทน */
    animation: lgv-scroll-bounce 1.8s ease-in-out infinite;
}

/* อนิเมชั่นเด้งเบาๆ เฉพาะแกน Y เท่านั้น เพื่อไม่ให้กวนตารางแกน X */
@keyframes lgv-scroll-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

[x-cloak] {
    display: none !important;
}

.lgv-hero-header {
    padding-top: 1.5rem;
}

@media (min-width: 768px) {
    .lgv-hero-header {
        padding-top: 2rem;
    }
}

.longevity-wrapper .lgv-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--ink);
    display: inline-block;
    position: relative;
    padding-bottom: 0.75rem;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .longevity-wrapper .lgv-hero-title {
        font-size: 40px;
    }
}

.lgv-hero-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 6px;
    background: #00B4D8;
}

.lgv-hero-desc {
    font-size: 16px;
    color: var(--ink);
    max-width: 1000px;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .lgv-hero-desc {
        font-size: 18px;
    }
}

.lgv-hero-desc strong {
    font-weight: 600;
}

/* ---------- DOCUMENTARY ---------- */
.lgv-highlight {
    padding-top: 0.5rem;
}

@media (min-width: 768px) {
    .lgv-highlight {
        padding-top: 1rem;
    }
}

.lgv-highlight-inner {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
    .lgv-highlight-inner {
        padding-bottom: 3rem;
    }
}

.lgv-video-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    /* Add negative margins to allow full-bleed scroll if needed, but here we just pad */
}
.lgv-video-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.lgv-video-grid .lgv-highlight-item {
    flex: 0 0 85%;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .lgv-video-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        overflow-x: visible;
        padding-bottom: 0;
    }
    .lgv-video-grid .lgv-highlight-item {
        flex: none;
    }
}

.lgv-video-card {
    position: relative;
    /* aspect-ratio fallback for older browsers or Safari bugs */
    padding-bottom: 56.25%;
    /* 9/16 = 56.25% */
    height: 0;
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.lgv-video-card:hover {
    border-color: #00B4D8;
}

.lgv-video-card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.25s;
}

.lgv-video-card:hover .lgv-video-card-thumb {
    transform: scale(var(--hover-scale));
}

.lgv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.25s;
    opacity: 0;
}

@media (min-width: 768px) {
    .lgv-play-btn {
        width: 4rem;
        height: 4rem;
    }
}

.lgv-video-card:hover .lgv-play-btn {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.lgv-play-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.25rem;
}

@media (min-width: 768px) {
    .lgv-play-btn svg {
        width: 2rem;
        height: 2rem;
    }
}

.lgv-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8) 50%, transparent);
    transform: translateY(100%);
    transition: transform 0.25s;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 2.5rem;
}

@media (min-width: 768px) {
    .lgv-video-overlay {
        padding: 1.5rem;
        padding-top: 2.5rem;
    }
}

.lgv-video-card:hover .lgv-video-overlay {
    transform: translateY(0);
}

.lgv-video-overlay h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .lgv-video-overlay h3 {
        font-size: 18px;
    }
}

.lgv-video-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    line-height: 1.6;
}

/* ---------- FEED SECTION ---------- */
.lgv-feed {
    padding-top: 1.4rem;
    padding-bottom: 3rem;
}

.lgv-feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .lgv-feed-grid {
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
    }
}

/* --- Sidebar --- */
.lgv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .lgv-sidebar {
        position: sticky;
        top: 6rem;
        align-self: start;
    }
}

.lgv-sidebar-logo-wrap {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 992px) {
    .lgv-sidebar-logo-wrap {
        border-bottom: none;
    }
}

.lgv-sidebar-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.lgv-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lgv-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lgv-search-icon {
    position: absolute;
    left: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    pointer-events: none;
}

.longevity-wrapper .lgv-search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #d1d5db;
    color: #4b5563;
    padding: 0.75rem 0.5rem 0.75rem 2.5rem;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    border-radius: 0;
}

.longevity-wrapper .lgv-search-input:focus {
    border-bottom-color: #70c6d4;
}

.longevity-wrapper .lgv-search-input::placeholder {
    color: #9ca3af;
}

.lgv-select-wrap {
    position: relative;
}

.longevity-wrapper .lgv-select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #d1d5db;
    color: #4b5563;
    padding: 0.75rem 2rem 0.75rem 0.5rem;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    transition: border-color 0.3s;
}

.longevity-wrapper .lgv-select:focus {
    border-bottom-color: #70c6d4;
}

.lgv-select-arrow {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #4b5563;
    pointer-events: none;
}

.longevity-wrapper .lgv-search-btn {
    width: 100%;
    margin-top: 1rem;
    background: #70c6d4;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.2s;
}

.lgv-search-btn:hover {
    background: #000;
}

/* --- Articles Column --- */
.lgv-articles {
    column-count: 1;
    column-gap: 1.6rem;
}

@media (min-width: 576px) {
    .lgv-articles {
        column-count: 2;
    }
}

.lgv-article-item {
    margin-bottom: 1.9rem;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    vertical-align: top;
}

.lgv-no-results {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--ink-soft);
}

/* --- Article Meta Row --- */
.lgv-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0 0.35rem;
}

.lgv-section-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.lgv-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    background: var(--accent-2);
    color: #fff;
    flex-shrink: 0;
    margin-left: auto;
}

.lgv-article-title {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.005em;
    margin: 0 0 0.4rem;
    transition: color 0.18s;
}

.lgv-article-title-lg {
    font-size: 20px;
}

/* Unified Card Overlay */
.lgv-feed-card-has-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.lgv-unified-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 20%, transparent 40%);
    transition: opacity 0.3s ease;
}

/* Option 2: On desktop, hide by default and show on hover */
@media (hover: hover) and (pointer: fine) {
    .lgv-unified-card-overlay {
        opacity: 0;
    }

    .lgv-article-item-inner:hover .lgv-unified-card-overlay,
    .lgv-feed-video-link:hover .lgv-unified-card-overlay {
        opacity: 1;
    }
}

.lgv-unified-card-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lgv-unified-card-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.lgv-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s;
}

.lgv-article-title a:hover {
    color: var(--accent);
}

.lgv-article-excerpt {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 0.5rem;
}

.lgv-article-credit {
    font-size: 12px;
    color: var(--ink-soft);
    margin: 0;
}

/* --- VIDEO CARD (in feed) --- */
.lgv-feed-video-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    border-radius: 0;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.lgv-feed-video-vertical {
    aspect-ratio: 9 / 16;
}

.lgv-feed-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease-in-out;
}

.lgv-feed-video-wrap:hover .lgv-feed-video-thumb {
    transform: scale(var(--hover-scale));
}

.lgv-yt-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background 0.2s;
}

.lgv-yt-play-overlay:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lgv-yt-play-pill {
    width: 58px;
    height: 40px;
    border-radius: 10px;
    background: rgba(18, 18, 20, 0.78);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgv-feed-video-wrap:hover .lgv-yt-play-pill,
.lgv-video-card:hover .lgv-yt-play-pill {
    background: #f00;
    transform: scale(var(--hover-scale));
}

.lgv-yt-play-triangle {
    display: block;
    border-left: 15px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 5px;
    transition: transform 0.2s;
}

.lgv-yt-duration {
    position: absolute;
    z-index: 2;
    background: rgba(18, 18, 20, 0.82);
    color: #fff;
    font-weight: 500;
    font-family: system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    border-radius: 3px;
    font-size: 12px;
    padding: 0.28rem 0.42rem;
    right: 0.5rem;
    bottom: 0.5rem;
}

.lgv-feed-video-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- INFOGRAPHIC CARD --- */
.lgv-infographic-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    border-radius: var(--radius);
    cursor: pointer;
}

.lgv-infographic-limited {
    max-height: 460px;
}

.lgv-infographic-wrap img {
    width: 100%;
    height: auto;
    transition: transform 0.25s ease-in-out;
}

.lgv-infographic-gradient {
    position: absolute;
    inset: auto 0 0 0;
    height: 130px;
    z-index: 2;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.92), transparent);
}

.lgv-infographic-btn {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    transform: translateX(-50%);
    z-index: 3;
    border: 1px solid var(--line);
    background: var(--surface);
    color: inherit;
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.18s;
}

.lgv-infographic-btn:hover {
    border-color: var(--ink);
    transform: translateX(-50%) translateY(-2px);
}

/* --- DEFAULT CARD --- */
.lgv-card-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.lgv-card-img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    border-radius: var(--radius);
}

.lgv-card-img-wrap img {
    width: 100%;
    height: auto;
    transition: transform 0.25s ease-in-out;
}

.lgv-card-link:hover .lgv-card-img-wrap img {
    transform: scale(var(--hover-scale));
}

.lgv-card-link:hover .lgv-article-title {
    color: var(--accent);
}

/* ---------- LIGHTBOX ---------- */
.lgv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 10, 12, 0.9);
    overflow-y: auto;
    padding: clamp(1rem, 4vw, 3rem);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.lgv-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lgv-lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.lgv-lightbox-figure {
    margin: 0;
    max-width: min(100%, 620px);
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .lgv-lightbox-figure {
        margin-top: 0;
    }
}

.lgv-lightbox-figure img {
    width: 100%;
    border-radius: var(--radius);
}

.lgv-lightbox-caption {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    padding: 0.8rem 0.2rem 2rem;
    text-align: center;
}

/* ---------- ARTICLE DETAIL ---------- */
.breadcrumb-custom {
    font-size: 14px;
}

.breadcrumb-custom a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-custom a:hover {
    color: #00B4D8;
}

.breadcrumb-custom span {
    color: #ccc;
    margin: 0 8px;
}

.longevity-wrapper .lgv-article-page {
    min-height: 100vh;
}

.longevity-wrapper .lgv-article-main {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.longevity-wrapper .lgv-article-header-top {
    margin-bottom: 1.5rem;
}

.longevity-wrapper .lgv-article-section {
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
    display: inline-block;
    position: relative;
    padding-bottom: 0.8rem;
}

@media (min-width: 768px) {
    .longevity-wrapper .lgv-article-section {
        font-size: 32px;
    }
}

.longevity-wrapper .lgv-article-section-underline {
    border-radius: 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 7px;
    background-color: #00B4D8;
}

.longevity-wrapper .lgv-article-title-main {
    font-size: 19px;
    margin-top: 1rem;
    font-weight: 500;
}

.longevity-wrapper .lgv-article-media-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.longevity-wrapper .lgv-article-media-container.lgv-article-media-vertical {
    aspect-ratio: 9 / 16;
    height: 56.25vw;
    max-height: calc(1440px * 9 / 16);
    max-width: 100%;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    background-color: transparent;
    box-shadow: none;
}

/* Vertical layout specific rules */
.longevity-wrapper .lgv-article-main-content-layout {
    max-width: 960px;
    margin: 0 auto;
}

.longevity-wrapper .lgv-article-layout-vertical {
    display: block;
}

@media (min-width: 992px) {
    .longevity-wrapper .lgv-article-layout-vertical {
        display: block;
    }

    .longevity-wrapper .lgv-article-layout-vertical .lgv-article-media-container.lgv-article-media-vertical {
        height: 56.25vw;
        max-height: calc(1440px * 9 / 16);
        max-width: 100%;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 2rem;
    }

    .longevity-wrapper .lgv-article-layout-vertical .lgv-article-content-wrapper {
        margin-bottom: 0;
        padding-left: 0;
    }
}

.longevity-wrapper .lgv-article-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.longevity-wrapper .lgv-article-content-wrapper {
    margin-bottom: 4rem;
}

.longevity-wrapper .lgv-divider {
    height: 1px;
    background-color: rgba(234, 234, 234, 0.6);
    width: 100%;
    margin-bottom: 2rem;
}

.longevity-wrapper .lgv-divider-bottom {
    margin-bottom: 0;
    margin-top: 2rem;
}

.longevity-wrapper .lgv-article-content {
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 1.8;
    font-weight: 400;
}

.longevity-wrapper .lgv-article-content p {
    margin-bottom: 1.5rem;
}

.longevity-wrapper .lgv-article-content h3 {
    font-size: 21px;
    font-weight: 500;
    color: var(--ink);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.longevity-wrapper .lgv-related-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(234, 234, 234, 0.5);
}

@media (min-width: 992px) {
    .longevity-wrapper .lgv-related-section {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3rem;
    }
}

.longevity-wrapper .lgv-related-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.longevity-wrapper .lgv-related-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--ink);
    text-align: center;
    gap: 1rem;
}

.longevity-wrapper .lgv-related-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    align-self: center;
}

.longevity-wrapper .lgv-related-title {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .longevity-wrapper .lgv-related-title {
        font-size: 26px;
    }
}

.longevity-wrapper .lgv-related-grid {
    column-count: 1;
    column-gap: 1.6rem;
}

@media (min-width: 640px) {
    .longevity-wrapper .lgv-related-grid {
        column-count: 2;
    }
}

@media (min-width: 992px) {
    .longevity-wrapper .lgv-related-grid {
        grid-column: span 2 / span 2;
    }
}

.longevity-wrapper .lgv-related-card-wrap {
    display: block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 1.9rem;
}

.longevity-wrapper .lgv-related-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.longevity-wrapper .lgv-related-card-media-wrap {
    position: relative;
    overflow: hidden;
    background-color: #101014;
    border-radius: 0.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.longevity-wrapper .lgv-related-card-media {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease-in-out;
}

.longevity-wrapper .lgv-related-card-link:hover .lgv-related-card-media {
    transform: scale(var(--hover-scale));
}

.longevity-wrapper .lgv-related-card-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s;
}

.longevity-wrapper .lgv-related-card-link:hover .lgv-related-card-play-overlay {
    background-color: rgba(0, 0, 0, 0.05);
}

.longevity-wrapper .lgv-related-card-play-btn {
    width: 58px;
    height: 40px;
    border-radius: 10px;
    background-color: rgba(18, 18, 20, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
}

.longevity-wrapper .lgv-related-card-play-icon {
    display: block;
    border-left: 15px solid white;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 5px;
}

.longevity-wrapper .lgv-related-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.7rem;
    padding-bottom: 0.35rem;
}

.longevity-wrapper .lgv-related-card-section {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.longevity-wrapper .lgv-related-card-title {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.005em;
    margin: 0 0 0.4rem 0;
    transition: color 0.2s;
}

.longevity-wrapper .lgv-related-card-link:hover .lgv-related-card-title {
    color: var(--accent);
}

.longevity-wrapper .lgv-related-card-writer {
    font-size: 12px;
    color: var(--ink-soft);
    margin: 0;
}

/* ---------- UNIFIED FEED CARD ---------- */
.lgv-unified-card {
    position: relative;
    display: block;
    width: 100%;
    padding-bottom: 100%;
    /* 1:1 aspect ratio */
    height: 0;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none !important;
    color: #fff !important;
    cursor: pointer;
    background: #111;
    margin-bottom: 1.5rem;
}

.lgv-unified-card-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.lgv-unified-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.lgv-unified-card:hover .lgv-unified-card-img-wrap img {
    transform: scale(var(--hover-scale));
}

/* Duplicate lgv-unified-card-overlay removed */

.lgv-unified-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.lgv-unified-card-section {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.lgv-unified-card-icons {
    display: flex;
    gap: 0.5rem;
}

.lgv-unified-card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
}

.lgv-unified-card-credit {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.lgv-feed-card-has-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.lgv-article-item-inner {
    text-decoration: none !important;
    color: #fff !important;
    display: block;
}

.lgv-article-item-inner img {
    transition: transform 0.25s ease;
}

.lgv-article-item-inner:hover img {
    transform: scale(var(--hover-scale));
}

.lgv-icon-outline {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.01);
}

.lgv-icon-solid {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    font-family: sans-serif;
}

.lgv-bg-green {
    background-color: #2b594b;
}

.lgv-bg-brown {
    background-color: #8c735d;
}

.lgv-bg-red {
    background-color: #b73229;
}

/* ---------- VIDEO HOVER PREVIEW ---------- */
.lgv-feed-video-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    border: none;
    pointer-events: none;
    object-fit: cover;
}

/* ---------- FRAME SKIP (Feed Video) ---------- */
.lgv-frame-skip-img {
    animation: lgv-frame-fade 0.3s ease;
}

@keyframes lgv-frame-fade {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

.lgv-frame-skip-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    gap: 3px;
    padding: 0 4px 4px;
}

.lgv-frame-skip-dot {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.2s;
}

.lgv-frame-skip-dot.active {
    background: #fff;
}

/* ---------- DOCUMENTARY PREVIEW ---------- */
.longevity-wrapper .lgv-highlight-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
}

.longevity-wrapper .lgv-highlight-title-bar {
    position: static;
    width: 60px; /* Reduced size on mobile */
    height: 4px; /* Reduced thickness on mobile */
    border-radius: 2px;
    background-color: #00B4D8;
}

@media (min-width: 768px) {
    .longevity-wrapper .lgv-highlight-title {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        font-size: 32px;
    }

    .longevity-wrapper .lgv-highlight-title-bar {
        flex: 1; /* Stretch on desktop */
        width: 100%;
        height: 6px;
    }
}

.lgv-highlight-meta-title {
    margin: 0;
    font-size: 18px; /* Increased for better visibility */
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: color 0.2s;
}

.lgv-highlight-meta-title:hover {
    color: #00B4D8;
}
.lgv-doc-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    border: none;
    pointer-events: none;
    border-radius: inherit;
}

/* ---------- PAGINATION ---------- */
.lgv-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 0 1rem;
    font-family: var(--bs-font-primary), sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #4a4a4a;
}

.lgv-page-label {
    margin-right: 0.5rem;
}

.lgv-page-link {
    color: #4a4a4a;
    text-decoration: none;
    transition: color 0.2s;
}

.lgv-page-link:hover {
    color: var(--accent);
}

.lgv-page-link.active {
    color: #17a2b8;
    /* Cyan/Teal color from screenshot */
}

.lgv-page-dot {
    color: #4a4a4a;
}

.lgv-page-next {
    margin-left: 0.2rem;
}

/* ---------- HERO RESPONSIVE BANNER ---------- */
.lgv-hero-mobile-only {
    display: none;
}

.lgv-hero-desktop-only {
    display: block;
}

@media (max-width: 767px) {
    .lgv-hero-desktop-only {
        display: none;
    }

    .lgv-hero-mobile-only {
        display: block;
    }
}

/* ---------- CUSTOM DROPDOWN ---------- */
.lgv-custom-dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.lgv-custom-select {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid #d1d5db;
    color: #4b5563;
    padding: 0.75rem 2rem 0.75rem 0.5rem;
    font-size: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lgv-custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    margin-top: 0.25rem;
    max-height: 250px;
    overflow-y: auto;
}

.lgv-dropdown-item {
    padding: 0.75rem 1rem;
    color: #4b5563;
    font-size: 16px;
    transition: background-color 0.2s;
}

.lgv-dropdown-item:hover {
    background-color: #f3f4f6;
}

.lgv-dropdown-item.active {
    background-color: #e5e7eb;
    font-weight: 500;
}

.lgv-select-arrow.open {
    transform: translateY(-50%) rotate(180deg);
    transition: transform 0.3s;
}

.lgv-select-arrow {
    transition: transform 0.3s;
}
