/* CarHub Video Hub */

.carhub-video-body {
    margin: 0;
    background: #f4f7fb;
    color: #101828;
}

.carhub-video-page {
    --ch-blue: #1769ff;
    --ch-blue-dark: #0e4fc7;
    --ch-ink: #101828;
    --ch-muted: #667085;
    --ch-line: #e2e8f2;
    --ch-card: #ffffff;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 56px;
    color: var(--ch-ink);
    box-sizing: border-box;
}

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

/*
 * WordPress admin bar is fixed on the front end. Keep the CarHub header
 * below it so the logo can never be clipped while developing/logged in.
 */
body.admin-bar .carhub-video-page {
    padding-top: 32px;
}

.carhub-video-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    margin-bottom: 18px;
    padding: 12px 20px;
    border: 1px solid var(--ch-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 30px rgba(16, 24, 40, .06);
    overflow: visible;
}

.carhub-video-header__brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.carhub-video-header__brand img {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.carhub-video-header__back {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #cfe0ff;
    border-radius: 11px;
    color: var(--ch-blue);
    background: #f6f9ff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.carhub-video-header__back:hover {
    background: #eaf2ff;
}

.carhub-video-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid #dbe7f7;
    border-radius: 32px;
    background:
        radial-gradient(circle at 85% 15%, rgba(23, 105, 255, .22), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #edf5ff 58%, #dceaff 100%);
    box-shadow: 0 24px 60px rgba(16, 24, 40, .08);
}

.carhub-video-eyebrow {
    display: inline-block;
    color: var(--ch-blue);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.carhub-video-hero h1 {
    max-width: 720px;
    margin: 14px 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: .98;
    letter-spacing: -.045em;
}

.carhub-video-hero h1 em {
    color: var(--ch-blue);
    font-style: normal;
}

.carhub-video-hero p {
    max-width: 650px;
    margin: 0;
    color: var(--ch-muted);
    font-size: 17px;
    line-height: 1.75;
}

.carhub-video-hero__meta {
    padding: 22px;
    border: 1px solid rgba(23, 105, 255, .14);
    border-radius: 22px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
}

.carhub-video-hero__meta strong,
.carhub-video-hero__meta span {
    display: block;
}

.carhub-video-hero__meta strong {
    color: var(--ch-blue);
    font-size: 42px;
    line-height: 1;
}

.carhub-video-hero__meta span {
    margin-top: 8px;
    color: var(--ch-muted);
}

.carhub-video-section {
    margin-bottom: 24px;
    padding: 28px;
    border: 1px solid var(--ch-line);
    border-radius: 28px;
    background: var(--ch-card);
    box-shadow: 0 14px 38px rgba(16, 24, 40, .05);
}

.carhub-video-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.carhub-video-section__heading h2 {
    margin: 7px 0 0;
    font-size: 30px;
    letter-spacing: -.025em;
}

.carhub-video-section__subtext {
    margin: 7px 0 0;
    color: var(--ch-muted);
    font-size: 14px;
    line-height: 1.6;
}

.carhub-video-section__count {
    flex: 0 0 auto;
    color: var(--ch-muted);
    font-size: 14px;
    font-weight: 800;
}

/* -------------------------------------------------------------------------
 * Actual video cards
 * ---------------------------------------------------------------------- */

.carhub-video-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ch-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .04);
}

.carhub-video-card__media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #07101d;
}

.carhub-video-card__media--landscape {
    aspect-ratio: 16 / 9;
}

.carhub-video-card__media--portrait {
    aspect-ratio: 9 / 16;
}

.carhub-video-player__element {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: #000;
}

video.carhub-video-player__element {
    object-fit: contain;
}

iframe.carhub-video-player__element {
    object-fit: contain;
}

.carhub-video-card__body {
    padding: 17px 18px 19px;
}

.carhub-video-card__tag {
    display: block;
    color: var(--ch-blue);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .17em;
}

.carhub-video-card h3 {
    min-width: 0;
    margin: 8px 0 7px;
    font-size: 18px;
    line-height: 1.35;
}

.carhub-video-card__title {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    border: 0;
    color: var(--ch-ink);
    background: transparent;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.carhub-video-card__title:hover {
    color: var(--ch-blue);
}

.carhub-video-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.carhub-video-card__vehicle {
    color: var(--ch-blue);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.carhub-video-card__vehicle:hover {
    text-decoration: underline;
}

.carhub-video-card time {
    color: var(--ch-muted);
    font-size: 11px;
}

/* -------------------------------------------------------------------------
 * Trending shorts
 * ---------------------------------------------------------------------- */

.carhub-video-short-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.carhub-video-short-strip .carhub-video-card {
    flex: 0 0 184px;
    scroll-snap-align: start;
}

.carhub-video-short-strip .carhub-video-card__body {
    padding: 13px 13px 15px;
}

.carhub-video-short-strip .carhub-video-card h3 {
    margin: 7px 0 5px;
    font-size: 14px;
}

.carhub-video-short-strip .carhub-video-card__vehicle {
    font-size: 10px;
}

/* -------------------------------------------------------------------------
 * Latest shorts: two portrait videos per mobile screen.
 * ---------------------------------------------------------------------- */

.carhub-video-subheading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 13px;
}

.carhub-video-subheading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ch-line);
}

.carhub-video-subheading span {
    color: #718096;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
}

.carhub-video-short-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.carhub-video-short-grid .carhub-video-card__media--portrait {
    aspect-ratio: 9 / 16;
}

/* -------------------------------------------------------------------------
 * Landscape: one full-width 16:9 player.
 * ---------------------------------------------------------------------- */

.carhub-video-landscape-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.carhub-video-landscape-grid .carhub-video-card {
    width: 100%;
}

.carhub-video-landscape-grid .carhub-video-card__body {
    padding: 20px 22px 22px;
}

.carhub-video-landscape-grid .carhub-video-card h3 {
    font-size: 21px;
}

/* -------------------------------------------------------------------------
 * Featured reviews
 * ---------------------------------------------------------------------- */

.carhub-video-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.carhub-video-review-card {
    overflow: hidden;
    border: 1px solid var(--ch-line);
    border-radius: 20px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.carhub-video-review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(16, 24, 40, .10);
}

.carhub-video-review-card > img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.carhub-video-review-card__body {
    padding: 17px;
}

.carhub-video-review-card h3 {
    margin: 7px 0;
    font-size: 19px;
}

.carhub-video-review-card p {
    margin: 0 0 14px;
    color: var(--ch-muted);
    font-size: 13px;
    line-height: 1.6;
}

.carhub-video-review-card strong {
    color: var(--ch-blue);
    font-size: 13px;
}

/* -------------------------------------------------------------------------
 * Pagination / empty state
 * ---------------------------------------------------------------------- */

.carhub-video-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--ch-line);
}

.carhub-video-pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #b9d0ff;
    border-radius: 12px;
    color: var(--ch-blue);
    background: #fff;
    font-weight: 700;
    text-decoration: none;
}

.carhub-video-pagination a:hover {
    background: #f1f6ff;
}

.carhub-video-pagination span {
    color: var(--ch-muted);
    font-size: 13px;
    font-weight: 700;
}

.carhub-video-empty {
    display: grid;
    gap: 7px;
    padding: 50px 20px;
    text-align: center;
    color: var(--ch-muted);
}

.carhub-video-empty strong {
    color: var(--ch-ink);
    font-size: 20px;
}

.carhub-video-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 8px;
    color: var(--ch-muted);
    font-size: 13px;
}

/* -------------------------------------------------------------------------
 * In-page player modal
 * ---------------------------------------------------------------------- */

.carhub-video-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 22px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.carhub-video-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.carhub-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 24, .78);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.carhub-video-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1000px);
    max-height: calc(100vh - 44px);
    overflow: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 24px;
    background: #07101d;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.carhub-video-modal__close {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #fff;
    background: rgba(7, 16, 29, .82);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.carhub-video-modal__player {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.carhub-video-modal__player--landscape {
    aspect-ratio: 16 / 9;
}

.carhub-video-modal__player--portrait {
    width: min(100%, 420px);
    margin: 0 auto;
    aspect-ratio: 9 / 16;
}

.carhub-video-modal__player .carhub-video-player__element {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carhub-video-modal__title {
    padding: 14px 8px 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.carhub-video-modal-open {
    overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
    .carhub-video-hero {
        grid-template-columns: 1fr;
    }

    .carhub-video-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .carhub-video-short-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body.admin-bar .carhub-video-page {
        padding-top: 46px;
    }

    .carhub-video-page {
        width: min(100% - 20px, 560px);
        padding-bottom: 34px;
    }

    .carhub-video-header {
        min-height: 64px;
        margin-bottom: 12px;
        padding: 10px 14px;
        border-radius: 16px;
    }

    .carhub-video-header__brand img {
        width: 132px;
        max-height: 38px;
    }

    .carhub-video-header__back {
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .carhub-video-hero {
        gap: 18px;
        margin-bottom: 18px;
        padding: 27px 22px;
        border-radius: 25px;
    }

    .carhub-video-hero h1 {
        font-size: 39px;
    }

    .carhub-video-hero p {
        font-size: 15px;
        line-height: 1.65;
    }

    .carhub-video-hero__meta {
        padding: 18px;
    }

    .carhub-video-hero__meta strong {
        font-size: 36px;
    }

    .carhub-video-section {
        margin-bottom: 18px;
        padding: 18px;
        border-radius: 22px;
    }

    .carhub-video-section__heading {
        align-items: flex-start;
        margin-bottom: 17px;
    }

    .carhub-video-section__heading h2 {
        font-size: 25px;
    }

    .carhub-video-section__subtext {
        font-size: 12px;
    }

    .carhub-video-section__count {
        font-size: 11px;
    }

    /*
     * Two shorts fit inside the viewport. The strip remains horizontally
     * scrollable for additional shorts.
     */
    .carhub-video-short-strip {
        gap: 10px;
        margin-right: -2px;
        padding-right: 2px;
    }

    .carhub-video-short-strip .carhub-video-card {
        flex: 0 0 calc(50% - 5px);
        border-radius: 17px;
    }

    .carhub-video-short-strip .carhub-video-card__body {
        padding: 11px;
    }

    .carhub-video-short-strip .carhub-video-card h3 {
        font-size: 13px;
    }

    .carhub-video-short-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .carhub-video-short-grid .carhub-video-card {
        border-radius: 17px;
    }

    .carhub-video-short-grid .carhub-video-card__body {
        padding: 11px;
    }

    .carhub-video-short-grid .carhub-video-card h3 {
        font-size: 13px;
    }

    /*
     * Landscape videos always get one full-width 16:9 card.
     */
    .carhub-video-landscape-grid {
        gap: 14px;
    }

    .carhub-video-landscape-grid .carhub-video-card__body {
        padding: 15px;
    }

    .carhub-video-landscape-grid .carhub-video-card h3 {
        font-size: 18px;
    }

    .carhub-video-review-grid {
        grid-template-columns: 1fr;
    }

    .carhub-video-pagination {
        gap: 10px;
    }

    .carhub-video-pagination a {
        min-height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }

    .carhub-video-modal {
        padding: 8px;
    }

    .carhub-video-modal__dialog {
        padding: 6px;
        border-radius: 17px;
    }

    .carhub-video-modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .carhub-video-footer {
        flex-direction: column;
        padding: 12px 4px;
    }
}


/* Inline SEO price guide: keep content inside the existing video hero. */
.carhub-video-hero__copy {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.carhub-video-hero .carhub-seo-inline {
    width: 100%;
    max-width: 650px;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.carhub-video-hero .carhub-seo-inline__short,
.carhub-video-hero .carhub-seo-inline__full {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    color: var(--ch-muted);
    font-size: 17px;
    line-height: 1.75;
    overflow-wrap: break-word;
    word-wrap: break-word;
}


