/* =============================================================================
   VIDEO HUB — DESIGN SYSTEM TOKENS
   ============================================================================= */

:root {
    --vh-primary:        #4F46E5;
    --vh-primary-hover:  #4338CA;
    --vh-primary-light:  #EEF2FF;
    --vh-accent:         #7C3AED;
    --vh-surface:        #FFFFFF;
    --vh-surface-2:      #F8FAFC;
    --vh-border:         #E2E8F0;
    --vh-border-hover:   #CBD5E1;
    --vh-text-primary:   #0F172A;
    --vh-text-secondary: #475569;
    --vh-text-muted:     #94A3B8;
    --vh-shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --vh-shadow-md:      0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
    --vh-shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06);
    --vh-shadow-hover:   0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.08);
    --vh-radius-sm:      8px;
    --vh-radius-md:      12px;
    --vh-radius-lg:      16px;
    --vh-radius-xl:      24px;
    --vh-transition:     all .2s cubic-bezier(.4,0,.2,1);
    --vh-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

/* =============================================================================
   BASE RESET
   ============================================================================= */

.vh-page *,
.vh-page *::before,
.vh-page *::after {
    box-sizing: border-box;
}

/* .vh-page {
    font-family: var(--vh-font);
    background: var(--vh-surface-2);
    color: var(--vh-text-primary);
    -webkit-font-smoothing: antialiased;
} */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================================
   ELEMENTOR CONFLICT RESET
   Surgically undo only the Elementor/theme properties that bleed into vh-page
   buttons — avoids cascade-order issues caused by all:unset.
   ============================================================================= */

.vh-page button,
.vh-page button:hover,
.vh-page button:focus,
.vh-page button:active,
.vh-page button:visited {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    color: inherit;
    background-color: transparent;
    background-image: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    outline: none;
}


/* =============================================================================
   TOOLBAR
   ============================================================================= */

.vh-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--vh-border);
    padding: 14px 15px;
    box-shadow: var(--vh-shadow-sm);
}

.vh-toolbar__inner {
    
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Search */
.vh-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}

.vh-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--vh-text-muted);
    pointer-events: none;
}

.vh-search {
    width: 100% !important;
    height: 42px;
    padding: 0 40px 0 38px !important;
    border: 1.5px solid var(--vh-border) !important;
    border-radius: var(--vh-radius-sm) !important;
    background: var(--vh-surface) !important;
    font-size: 14px;
    color: var(--vh-text-primary) !important;
    transition: var(--vh-transition) !important;
    outline: none !important;
}

.vh-search::placeholder {
    color: var(--vh-text-muted);
}

.vh-search:focus {
    border-color: var(--vh-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.vh-page .vh-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vh-text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color .15s, background-color .15s;
}

.vh-page .vh-search-clear:hover {
    color: var(--vh-text-primary);
    background-color: var(--vh-border);
}

.vh-search-clear svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Category select */
.vh-select-wrap {
    position: relative;
}

.vh-select {
    height: 42px;
    padding: 0 36px 0 14px;
    border: 1.5px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
    background: var(--vh-surface);
    font-size: 14px;
    color: var(--vh-text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: var(--vh-transition);
    white-space: nowrap;
}

.vh-select:focus {
    border-color: var(--vh-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.vh-select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--vh-text-muted);
    pointer-events: none;
}

/* Results count */
.vh-results-meta {
    margin-left: auto;
    font-size: 13px;
    color: var(--vh-text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

#vh-result-count {
    font-weight: 700;
    color: var(--vh-text-primary);
}

/* =============================================================================
   CONTENT AREA
   ============================================================================= */

/* .vh-content {
    padding: 40px 24px 80px;
}

.vh-container {
    max-width: 1200px;
    margin: 0 auto;
} */

/* =============================================================================
   VIDEO GRID
   ============================================================================= */

.vh-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .vh-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .vh-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   VIDEO CARD
   ============================================================================= */

.vh-card {
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-md);
    overflow: hidden;
    box-shadow: var(--vh-shadow-sm);
    transition: var(--vh-transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.vh-card:hover {
    box-shadow: var(--vh-shadow-hover);
    border-color: var(--vh-border-hover);
    transform: translateY(-3px);
}

/* Card Media */
.vh-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0F172A;
    overflow: hidden;
    flex-shrink: 0;
}

.vh-card__iframe-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vh-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.vh-card:hover .vh-card__thumb {
    transform: scale(1.04);
}

.vh-card__iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    inset: 0;
}

/* Play button */
.vh-page .vh-play-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: var(--vh-transition);
    z-index: 2;
}

.vh-play-btn svg {
    width: 56px;
    height: 40px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
    transition: var(--vh-transition);
}

.vh-play-btn__bg {
    fill: rgba(33,33,33,.85);
    transition: fill .2s;
}

.vh-play-btn__arrow {
    fill: #fff;
}

.vh-page .vh-play-btn:hover .vh-play-btn__bg,
.vh-card:hover .vh-play-btn__bg {
    fill: var(--vh-primary);
}

.vh-page .vh-play-btn:hover svg,
.vh-card:hover .vh-play-btn svg {
    transform: scale(1.08);
}

.vh-card__placeholder {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    color: rgba(255,255,255,.3);
    font-size: 48px;
}

/* Category badge */
.vh-card__category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--vh-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 12px 1px 12px;
    border-radius: 100px;
    z-index: 3;
    pointer-events: none;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(79,70,229,.35);
}

/* Card Body */
.vh-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.vh-card__title {
    font-size: 16px !important;
    font-weight: 700;
    color: var(--vh-text-primary) !important;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.vh-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.vh-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--vh-text-secondary);
    font-weight: 500;
}

.vh-card__meta-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: .7;
}

.vh-card__duration {
    color: var(--vh-primary);
}

.vh-card__guest::before {
    content: '·';
    margin-right: 4px;
    opacity: .4;
}

/* Description */
.vh-card__desc {
    font-size: 13.5px;
    color: var(--vh-text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* =============================================================================
   NO RESULTS
   ============================================================================= */

.vh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--vh-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.vh-no-results svg {
    width: 56px;
    height: 56px;
    opacity: .35;
}

.vh-no-results p {
    font-size: 15px;
    margin: 0;
}

/* =============================================================================
   STATE: LOADING
   ============================================================================= */

.vh-grid.is-loading {
    opacity: 0;
    pointer-events: none;
}

.vh-grid.is-entering {
    animation: vh-fade-in .25s ease forwards;
}

@keyframes vh-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   ACTIVE FILTER PILLS (generated by JS)
   ============================================================================= */

.vh-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.vh-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--vh-primary-light);
    color: var(--vh-primary);
    border: 1px solid rgba(79,70,229,.2);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px 4px 10px;
    border-radius: 100px;
}

.vh-page .vh-filter-pill button {
    color: inherit;
    opacity: .7;
    transition: opacity .15s;
}

.vh-page .vh-filter-pill button:hover { opacity: 1; }

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 600px) {
    .vh-hero {
        padding: 56px 16px 60px;
    }

    .vh-hero__stats {
        gap: 28px;
        padding: 16px 24px;
    }

    .vh-toolbar {
        padding: 12px 16px;
    }

    .vh-toolbar__inner {
        gap: 8px;
    }

    .vh-search-wrap {
        min-width: 100%;
    }

    .vh-results-meta {
        margin-left: 0;
        font-size: 12px;
    }

    .vh-content {
        padding: 24px 16px 56px;
    }

    .vh-card__body {
        padding: 14px 16px 16px;
    }
}

@media (max-width: 400px) {
    .vh-select {
        font-size: 13px;
    }
}
